Refuse session windows beyond the server's 4-hour maximum in deploy policy
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 3m31s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s

A window ending 5.2 h after start (b2f224d) put evo-region into a
crashloop (error m10-window-too-long); the server only sees it at
startup. The deploy policy now requires REGION_SESSION_WINDOW to name its
UTC activation and end within 4 h of it, with two selftest cases (one is
the b2f224d value). DEPLOYMENT.md documents the follow-on quarantine:
syncs recorded as Deployment-only run no hooks, so a promoted build is
never retained; the provision hook is re-run from the rendered manifest.
VALIDATION records the incident and the recovery.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-08 07:41:06 -04:00
co-authored by Claude Opus 5.5
parent 4a72897679
commit 47b84bce74
4 changed files with 76 additions and 0 deletions
+14
View File
@@ -687,6 +687,20 @@ for overlay, docs in renders.items():
check(text.count('--m10-listen') == 1 and '--m10-listen "$REGION_SESSION_LISTEN"' in text
and '--session-window "$REGION_SESSION_WINDOW"' in text,
f'{where}: one M10 listener and absolute session window, addressed only by GitOps env')
# The server refuses a window ending more than 4 h after it starts
# (SessionWindow::max_duration_seconds) and exits in a loop. The id carries
# its UTC activation (dev-YYYYMMDDTHHMMSS-...); the expiry must fall within
# 4 h of it. Checked here because the server sees it only at startup.
window = env.get('REGION_SESSION_WINDOW') or ''
if route_active and window:
import calendar, re, time
m = re.fullmatch(r'[0-9A-Za-z._-]*?(\d{8}T\d{6})Z?[0-9A-Za-z._-]*:(\d+)', window)
ok = False
if m:
start = calendar.timegm(time.strptime(m.group(1), '%Y%m%dT%H%M%S'))
ok = start < int(m.group(2)) <= start + 4 * 60 * 60
check(ok, f'{where}: REGION_SESSION_WINDOW must name its UTC activation and end '
'within 4 h of it (the server maximum)')
else:
check('--m10-listen' not in text and '--synthetic-inputs' not in text,
f'{where}: only evo-server may listen for sessions')
+8
View File
@@ -106,6 +106,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(
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'),
('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'),