test: harden three load-sensitive tests found by a local CI mirror - #862
Conversation
- native-claude-contract: give the SIGKILL-escalation child 2s to install its SIGTERM handler before the timeout fires. - mcp-probe-service: await service.settle() before asserting plugin-data teardown, like the rest of the file. - eval-project: seed agent-bundle/eval from suite.ts and assertions.ts instead of the src/eval barrel; Jiti discovery with the module cache off took ~30s per suite load on the barrel, past eval admission deadlines.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
A local mirror of main's CI on
4f62216f30, run on a heavily loaded 96-core host, turned up three tests that fail under load. All three changes are test-only, so no changeset is needed (!tests/**). Hosted CI run 36190395499 on the same commit was green; these fixes harden tests, they don't repair a red main.native-claude-contract.test.ts: the SIGKILL-escalation case used a 300 ms timeout. The SIGTERM could arrive before the child had installed its ignore handler, so SIGTERM killed the child and the test sawSIGTERMinstead ofSIGKILL(Node 26). The timeout is now 2 s.mcp-probe-service.test.ts:probe()waits at most 50 ms for plugin-data teardown by design, andsettle()is the barrier for it. The test now awaitssettle()before asserting, like the other tests in the file.support/eval-project.ts: the seededagent-bundle/evalre-exported the wholesrc/eval/index.tsbarrel. Jiti loads it with the module cache off, and measured load times were 29.0 s for the barrel, 3.9 s forsuite.ts, and 0.1 s forassertions.ts. That pushed eval admission past its deadlines inagent-api/dev-artifact-serviceon Node 22.19. The seed now re-exports onlydefineEvalSuite,expectOutcome, andexpectSkillActivation.Local verification (after the fix)
test:uniton the two files gives 36 passed, 1 skipped.test:integration:runon agent-api, dev-artifact-service, and eval-* gives 128 passed, 0 failed. rslint andtsc --noEmitare clean.