Skip to content

test: suite no longer races a starved runner (0.0.60) - #65

Merged
okisdev merged 5 commits into
mainfrom
test/starved-runner-budgets
Sep 20, 2026
Merged

okisdev merged 5 commits into
mainfrom
test/starved-runner-budgets

Conversation

@okisdev

@okisdev okisdev commented Sep 20, 2026

Copy link
Copy Markdown
Owner

summary

  • test only release: no product code changes. the suite no longer depends on a freshly spawned process beating a sub second wall clock budget, the class behind the chronic red test (macos-latest, 22) job (flaky: codex companion process tests fail on the macos-latest node 22 job under load #64). 0.0.59 fixed the codex late close window and the monitors' handler order, and main still went red on tests/job-collect.test.mjs does not infer terminal state from prose, which gave a spawned fake companion capMs: 100
  • every millisecond budget of 500 or less across eighteen test files was classified as safe (the budget only has to expire, a poll interval, or pure data) or racy, and about twenty racy sites were fixed: collector caps of 100 and 150ms become 2000ms; two lifecycle cases write an explicitly expired record instead of waiting for 1ms to pass; monitor and stats cases wait for the announced ledger, the state file or the tagged output instead of sleeping 200 to 400ms; codex background ordering delays and stdout against stderr gaps grow, and the second interrupt case waits on the fake's interrupt file; grok handshake, sandbox event and truncation ordering budgets grow to 2000ms; the jev client timeout case keeps the 2500ms product timeout and widens its headroom
  • the flagship warning cap case seeded 604 records through the locked record writer, which shells out to ps on every write and made that one case take 40 seconds on an idle machine; seeding is a plain file write now, and the codex harness watchdog for a companion run moves from 20 to 60 seconds
  • the grok lock case from flaky: grok-state-lock 'concurrent reapers serialize after a lock owner is killed' fails under load #62 gives its four serialized updater children a 20000ms lock timeout instead of 10000ms. that is a hardening against starvation, not a confirmed root cause, since the original failure left no assertion output
  • the largest single diff is tests/fusion-stats.test.mjs (a helper that runs the monitor until its state file or tagged output appears, replacing a fixed 400ms spawnSync timeout); everything else is a few lines per file, plus the 0.0.60 release (changelog and the seven version fields)

test plan

already verified

  • npm test idle on the merged tree -> 1200 tests, 1199 pass, 0 fail, 1 skipped (the existing skip), 123 seconds
  • full suite under CPU saturation (one self limiting busy loop per core, 18 cores): the first loaded run after the sweep passed every timing case and failed only the two flagship cases; after those fixes the same loaded run -> 1200 tests, 1199 pass, 0 fail, 1 skipped, 338 seconds
  • each of the six file groups was rerun in a full environment before merging: 24/24, 142/142, 190/190, 83/83, 227 pass with 1 platform skip, 280/280
  • node --test tests/plugin-versions.test.mjs tests/verified-versions.test.mjs tests/codex-companion.test.mjs after the version bump -> 106/106

reviewer should verify

  • watch test (macos-latest, 22) on this PR and on main's push run after the merge; both should be green on the first attempt

notes

@okisdev
okisdev merged commit 3ba11f8 into main Sep 20, 2026
6 checks passed
@okisdev
okisdev deleted the test/starved-runner-budgets branch September 20, 2026 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant