feat(admin): session windows in SQL, opened from the admin portal (schema 62)
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m33s
Foundation / postgres-tools (push) Successful in 2m14s
Foundation / server-image (push) Successful in 5m21s
Foundation / image (push) Successful in 6m18s

The dev session window moves from Git to SQL (ADR-0087 amendment): the admin
portal opens, extends (30 min to 4 h from now) and closes it, and the cellular
region re-reads it every 5 s with --session-window-source db. No push, sync or
restart per window; a closed window keeps the region running instead of
crash-looping.

- Schema 62: append-only session_windows (4 h cap, no rewrites),
  load_session_window_v1 for the runtime group, admin_set_session_window_v1
  and admin_session_windows_v1 for a dedicated admin group role, granted and
  audited each migration run when EVO_PG_ADMIN_ROLE is set (aevolution_admin in
  DEV). Schema 61's views are revoked from the runtime group.
- RegionSessions admission switch: while closed every Hello is refused before
  signature work and closing closes open sessions (new sessions were still
  admitted after expiry before).
- Admin API: GET/POST /api/regions/<n>/session-window, window state in the
  regions list; the portal's session-window card with history.
- Git: REGION_SESSION_WINDOW and the pre-push refresh rule are removed; the
  policy check requires the database source and refuses a committed window.

Needs the new image and the aevolution_admin role (with the portal's login in
aevolution-admin-pg) before a sync.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-27 15:13:02 -04:00
co-authored by Claude Opus 5.5
parent 510ecaee80
commit 46c106409e
31 changed files with 807 additions and 93 deletions
+7 -7
View File
@@ -132,14 +132,14 @@ CASES = [
('non-RFC 1918 VIP without approval', lambda t: edit(t, ROUTE + 'service.yaml', '172.10.1.202',
'172.11.1.210'), 'internal address'),
# Review M9.8f P1: inline/JSON patches and namespace changes, seen only when rendered.
('session window longer than the server maximum', lambda t: inline_patch(
('session window committed to Git again', lambda t: inline_patch(
t, 'deploy/kubernetes/dev/kustomization.yaml',
env_patch('REGION_SESSION_WINDOW', 'dev-20261008T111342-32432:1791477222')),
'end within 4 h of it'),
('session window without an activation time', lambda t: inline_patch(
t, 'deploy/kubernetes/dev/kustomization.yaml',
env_patch('REGION_SESSION_WINDOW', 'dev-manual:1791477222')),
'end within 4 h of it'),
'the session window lives in SQL'),
('fixed session window argument', lambda t: edit(
t, 'deploy/kubernetes/region/base/deployment.yaml', '--session-window-source db',
'--session-window "$REGION_SESSION_LISTEN"'),
'session window is read from SQL'),
('inline patch: synthetic inputs on', lambda t: inline_patch(
t, 'deploy/kubernetes/dev/kustomization.yaml', env_patch('REGION_INPUTS', 'development-v1')),
'sessions must be dev only with the route'),
@@ -155,7 +155,7 @@ CASES = [
{'kind': 'Deployment', 'name': 'evo-region'}), 'container ports must be'),
('JSON patch: second listener argument', lambda t: inline_patch(
t, DEV, '- op: add\n path: /spec/template/spec/containers/0/args/-\n value: --m10-listen 0.0.0.0:7401\n',
{'kind': 'Deployment', 'name': 'evo-region'}), 'one M10 listener and absolute session window'),
{'kind': 'Deployment', 'name': 'evo-region'}), 'one M10 listener whose session window is read from SQL'),
('namespace transformation', lambda t: edit(t, DEV, 'namespace: evolution-dev', 'namespace: evolution-stage'),
'expected evolution-dev'),
('inline quota patch in stage', lambda t: inline_patch(