Files

3.4 KiB

Source timing repairs — Mos1864

Goal: fix641/642/643 with all prior assertions retained, one independent Codex review, quiet full gate4, authorized green landing. Base:193774d755c71b3fc41c62e6bde559838c736a57. Scope selected directly by Mos1864; execute inline without approval stops. #657/#658 remain OPEN backlog (comments1317/1318), not landing blockers.

1.641: first inject ETIMEDOUT in existing interpreter io test and require distinct interpreter-probe-timeout. Keep existing1000ms production bound and every interpreter safety check; classify unavailable evidence separately from unsafe evidence. Historical load failure is preserved. Timeout injection supplies deterministic evidence without sleeping or widening deadline. 2.642: preserve real socket test/name/assertions; replace5ms/30ms scheduling race with scoped owned-server Socket.setTimeout observer and virtual idle clock. Deferred actual halt/resume entry signals precede clock advance. Native clients/proof/Broker/socket data remain real. Advancing30ms while admitted must preserve async reply; reversion to ordinary timeout must fail. 3.643: change fixture script execution to async spawn/close, no arbitrary inner deadline. Explicit awaits preserve phase order and result assertions. Track owned children; cleanup closes/reaps before root removal. Keep outer whole-gate limits and existing long integration test deadline. No external callers import setup. 4. Run focused tests plus appropriate package suites; compare original assertions after stripping await-only syntax. One independent Codex review in its own thread; fix source-caused important findings, no extra design approval loop. 5. Fullgate4 after load1<2 and no competing gate/heavy tests, same pin/editor/skip/FED/priority/hook rules. Preserve outputs. Redgate blocks; unrelated pre-existing review defect gets task and does notblock. Land reviewed288 plus reviewed330/331 only when own gates pass.

Preflight: tasks1/2 share bus suite only; task3 independent. No shared changed interface. Existing public/authority/schema/config behavior preserved except exact interpreter timeout classification. No scheduler changes or longer deadlines.

Verification: injected641 old error regression RED thenGREEN.642 manual-clock testGREEN; removing special verb branch alone survives because existing generic-Promise branch also extends correctly; replacing ALL async timeout extensions with ordinary timeout gives named request-timeout RED; restored source.643 entire original18 cases+newheld-readiness control PASS; combined39/39, zero skip/cancel/fail. Every156 original copy assertion retained modulo await/grouping/whitespace. No product server change. Fixture teardown owns isolated child process groups; abort/close is observed before root removal.

Final review: ONE independent Codex thread mcp:9245555c-5430-42f9-8afc-f77a70fc09ee completed. P2 introduced detached child escape on external gate TERM accepted. Extracted fixture runner into tests/fixtures/owned-child.mjs; installed fixture-scoped process termination handling across active pools, killing only captured groups and waiting close before exit; handlers removed on ordinary teardown. Actual owned outer/descendant readiness→TERM regression RED (descendant survives), thenGREEN; all40 affected testsGREEN, zero anomaly. No second review. No minor finding deferred. Wholebus1035GREEN is before fixture-only extraction; fullgate4 will verify final wholecandidate.