@@ -39,11 +39,14 @@ Two-part oracle (audit blocker 2: a 502-only assertion cannot prove cleanup):
3939
40401 . Endpoint activation test: upstream at unreachable port, long ` connectTimeoutMs ` ;
4141 assert 502 — drives the exact reject path (` fetch ` catch) the fix touches.
42- 2 . Deterministic cleanup assertion: unit-level test around ` clearableDeadline `
43- itself (tests/ for src/lib/abort.ts) or a spyable seam — assert the timer is
44- cleared after the reject path (e.g. ` clear() ` called / no pending timer). If a
45- seam is disproportionate, a fake-timer or ` clearTimeout ` spy on the unit level
46- is acceptable; the endpoint test alone does NOT satisfy the criterion.
42+ 2 . Deterministic cleanup assertion (WP2-P amendment, concrete seam): extract
43+ ` fetchWithHeaderDeadline(input, init, timeoutMs, parent?, makeDeadline = clearableDeadline) `
44+ in src/server/claude-messages.ts — it owns try/catch/finally and GUARANTEES
45+ ` deadline.clear() ` in ` finally ` ; returns ` {upstream} | {expired:true} | {error} ` .
46+ ` anthropicNativePassthrough ` consumes it. Unit tests drive the helper directly with
47+ a spy ` makeDeadline ` factory asserting ` clear() ` fires exactly once on all three
48+ paths: success, reject (unreachable port), timeout (didExpire). The endpoint 502
49+ test remains as activation evidence for the wired path.
4750
4851## PR 137 integration checks
4952
@@ -62,6 +65,9 @@ Two-part oracle (audit blocker 2: a 502-only assertion cannot prove cleanup):
6265 inventory ALL errors, fix each by restoring/adding ` t(...) ` + locale keys in
6366 ` gui/src/i18n/{en,ko,de,zh}.ts ` per PR 137 conventions (allowlist only where PR 137
6467 itself allowlists). Re-run lint to 0 errors.
68+ - Delegation (WP2-P amendment): the i18n remediation slice is dispatched to a
69+ gpt-5.6-sol worker with write scope gui/** ONLY (disjoint from main agent's
70+ src/server + tests/ slice). Main agent owns all git merges/commits/push.
6571- ` bun run build:gui ` must succeed (release prepublishOnly depends on it).
6672
6773## Accept criteria
0 commit comments