test(cli): measure supervisor cleanup time in a fixed namespace (#1873) #1929

Merged
jason.woltje merged 2 commits from org-cleanup-time into refactor 2026-11-11 10:19:29 +00:00
Owner

Tests only (#1873): a dedicated cleanup-duration test for the tester supervisor, closing the gap #1928 left.

  • New case-cleanup-time.test.mjs runs both shipped supervisor copies (Case 1 and case2) on a real timeout and measures cleanup from finish() entry to supervisor exit, through timing2's observer and strict parser. Bound: under 0.5 s.
  • It runs inside an unprivileged user/PID/mount namespace (unshare --map-root-user --pid --mount-proc) so the /proc inventory stays small and fixed. Missing namespace support fails with a named prerequisite, never a skip.
  • The probe checks status 81, empty streams, leader and descendant in one session, and no live session member before the namespace exits, so teardown cannot fake a pass.
  • No change to packages/*/src, scripts/ or roles/. Old acceptance files untouched.

Proof: 2 s and 1 s finish delays fail the new test (they pass timing2's tests on BASE). A skipped descendant kill fails. Samples: alone max 0.11 s, under organization plus bus load max 0.13 s. The Opus reviewer ran 187 paired-load and 79 bus-only file runs with no flake.

Known limits, recorded: delays under 0.5 s pass (0.4 s shown). The namespace hides host-size cost. On this ~2,000-process host a healthy cleanup takes 0.97 to 2.13 s against about 2 s of production headroom, and a per-entry slowdown passes every test. That is a shipped problem in clean_session, taken up as a separate lane.

Lane: Sol. Review: Opus, changes 4 (one P2, three P3), fixed in comments and failure text. Lane gate on 634294063: cli 1488/0, test-case2 21/0. Lead check on 634294063: the new file, the timing fixture test and Case 1 run alone together, 65/0 at load about 10.

Tests only (#1873): a dedicated cleanup-duration test for the tester supervisor, closing the gap #1928 left. - New `case-cleanup-time.test.mjs` runs both shipped supervisor copies (Case 1 and case2) on a real timeout and measures cleanup from `finish()` entry to supervisor exit, through timing2's observer and strict parser. Bound: under 0.5 s. - It runs inside an unprivileged user/PID/mount namespace (`unshare --map-root-user --pid --mount-proc`) so the /proc inventory stays small and fixed. Missing namespace support fails with a named prerequisite, never a skip. - The probe checks status 81, empty streams, leader and descendant in one session, and no live session member before the namespace exits, so teardown cannot fake a pass. - No change to packages/*/src, scripts/ or roles/. Old acceptance files untouched. Proof: 2 s and 1 s finish delays fail the new test (they pass timing2's tests on BASE). A skipped descendant kill fails. Samples: alone max 0.11 s, under organization plus bus load max 0.13 s. The Opus reviewer ran 187 paired-load and 79 bus-only file runs with no flake. Known limits, recorded: delays under 0.5 s pass (0.4 s shown). The namespace hides host-size cost. On this ~2,000-process host a healthy cleanup takes 0.97 to 2.13 s against about 2 s of production headroom, and a per-entry slowdown passes every test. That is a shipped problem in `clean_session`, taken up as a separate lane. Lane: Sol. Review: Opus, changes 4 (one P2, three P3), fixed in comments and failure text. Lane gate on 634294063: cli 1488/0, test-case2 21/0. Lead check on 634294063: the new file, the timing fixture test and Case 1 run alone together, 65/0 at load about 10.
jason.woltje added 2 commits 2026-11-11 10:19:25 +00:00
jason.woltje merged commit 6342940634 into refactor 2026-11-11 10:19:29 +00:00
Sign in to join this conversation.