Skip to content

test: stop the permutation-selection contract test failing on a slow vitest list - #301

Merged
christian-byrne merged 1 commit into
mainfrom
cbyrne/permutation-selection-spawn-timeout
Nov 5, 2026
Merged

christian-byrne merged 1 commit into
mainfrom
cbyrne/permutation-selection-spawn-timeout

Conversation

@christian-byrne

Copy link
Copy Markdown
Contributor

test/permutation-selection.test.ts spawns vitest list with a 10 s kill. On a loaded machine the cold collection took longer, the child was killed (status: null), and "test selects both representative cases, and only those cases" failed during a full npm test, though it passes alone on the same tree. The contract was fine; the budget was not.

  • Spawn kill raised to 60 s, kept only as a hang guard; the test's own timeout is sized to match.
  • Asserts result.error is undefined first, so a real kill now reads as a timeout instead of a contract failure.

Test-only; no package code changes. npx vitest run test/permutation-selection.test.ts, lint and typecheck pass.

…imeout, not a 10 s budget

Under machine load the cold vitest list collection exceeded 10 s, the child
was killed with status null, and the scheduling-contract test failed though
the contract held (it passes alone on the same tree). Raise the kill to 60 s,
size the test timeout to match, and assert no spawn error first so a real
kill reads as a timeout.
@github-actions github-actions Bot added the risk:R1 PR risk grade (advisory shadow check; grader-owned) label Nov 1, 2026
@coderabbitai

coderabbitai Bot commented Nov 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 1 billable file and costs up to $0.25.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 47 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 105 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 15324fd and 8118812.

Files selected for processing: 1
  • test/permutation-selection.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@jaeone94 jaeone94 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The 60s kill is now only a hang guard, and checking result.error first means a real kill reads as a timeout, not a contract failure.

@jaeone94 jaeone94 assigned christian-byrne and unassigned jaeone94 Nov 2, 2026
@christian-byrne
christian-byrne merged commit 39454db into main Nov 5, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:R1 PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants