Skip to content

fix(tests): keep the runner host's CHECK_HOST_* limits out of the check CLI fixture - #1884

Merged
devswha merged 1 commit into
mainfrom
fix/check-test-host-limits
Oct 24, 2026
Merged

devswha merged 1 commit into
mainfrom
fix/check-test-host-limits

Conversation

@devswha

@devswha devswha commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Fixes #1875.

What failed

scripts/check.test.ts › "check CLI teardown" tests timed out in Fast checks on the self-hosted runners under load: #1871 at 150 s ("bounds interrupted draining…"), #1848 at 90 s ("removes implicit state…": the nested check exited 1 after waiting out the fixture's CHECK_WAIT_SECONDS=90 for a slot).

Root cause

Since #1839, check.ts main() runs applyHostLimits(process.env): a runner host's CHECK_HOST_MAX_RUNS (5 on the P620) overrides CHECK_MAX_RUNS. The fixture builds its nested checks' environment from ...process.env and sets CHECK_MAX_RUNS: "8" so its throwaway runs get a slot beside the PC's real runs (#1225). In a runner container the inherited CHECK_HOST_MAX_RUNS=5 silently took that back, so they queued for the host's 5 slots behind its real CI runs.

Fix (test only)

The fixture drops every CHECK_HOST_* name (HOST_LIMITS) from the nested environment, as it already drops CHECK_DIR and the GitHub event variables.

Proof

  • Deliberate reproduction on a private CHECK_LOCK_PORT with slot 1 held by a stand-in run and CHECK_HOST_MAX_RUNS=1: main fails after 90.5 s with Expected: 0, Received: 1, as in feat(alerts): share one pane mute across alert channels #1848; this passes in 0.9 s.
  • The whole "check CLI teardown" group, 32 runs, 4 at a time, under the same held slot and host limit: 0 failures.
  • bun run check fast: passed (6393 pass, 0 fail).
  • Reviewed by omo-native-code-reviewer (approve, no blockers: no other test starts check.ts main() with a herdr slot and inherits the host limits). Test-only: no Codex review, per the lane's policy.

Part of the flaky-tests lane.

…ck CLI fixture

"check CLI teardown" tests timed out in Fast checks on the self-hosted runners under load
(#1871 at 150 s, #1848 at 90 s: the nested check exited 1 after waiting out the fixture's
CHECK_WAIT_SECONDS=90 for a slot).

Since #1839, check.ts main() applies a runner host's CHECK_HOST_MAX_RUNS over CHECK_MAX_RUNS.
The fixture builds the nested checks' environment from process.env and asks for
CHECK_MAX_RUNS=8 so its throwaway runs get a slot beside the PC's real runs (#1225); on a runner
container the inherited CHECK_HOST_MAX_RUNS=5 took that back, so they queued behind the host's
real CI runs for its 5 slots. The fixture now drops every CHECK_HOST_* name (HOST_LIMITS).

Reproduced on a private CHECK_LOCK_PORT with slot 1 held by a stand-in run and
CHECK_HOST_MAX_RUNS=1: main fails after 90.5 s with "Expected: 0, Received: 1", as in #1848;
this passes in 0.9 s.

Fixes #1875
@coderabbitai

coderabbitai Bot commented Oct 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 11 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between d3eefef and 7b41cc1.

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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devswha

devswha commented Oct 24, 2026

Copy link
Copy Markdown
Owner Author

CodeRabbit's review was rate-limited ("Review limit reached"), so no CodeRabbit review ran on this PR. The review below stands in for it.

omo-native-code-reviewer: APPROVE, no blockers. It confirmed the cause (main() applies applyHostLimits(process.env) before maxRuns()), that dropping all four CHECK_HOST_* names is harmless for these fixtures, that no other test starts check.ts main() with a herdr slot and inherits them, and that CHECK_MAX_RUNS=8 leaves room beside a 5-slot host. Low, not changed: fixture runs share the default lock port with real runs (intentional since #1225).
Test-only: no Codex review, per the lane's review policy.

@devswha

devswha commented Oct 24, 2026

Copy link
Copy Markdown
Owner Author

Merge pass review-work report. Overall: PASSED. This PR changes a test only. Under the maintainer's token rule, it merges on the code review, the merge pass's own check and CI, without the gate reviewer.

Lane Verdict
Code review (omo-native-code-reviewer, programming + remove-ai-slops) PASS (CLEAR)
Merge pass's own check scripts/check.test.ts 56 pass; typecheck passes; git merge-tree is clean against main and against #1872, which shares this file

Reproduced locally: one slot held on a private CHECK_LOCK_PORT with CHECK_HOST_MAX_RUNS=1.

Version Result Time
Without the fix fails Expected: 0 / Received: 1, as in #1848 90.7 s
With the fix passes 2.3 s

What was checked

  • HOST_LIMITS is imported from check.ts, which is the list applyHostLimits reads. A new CHECK_HOST_* name is therefore dropped from the fixture automatically.
  • No other nested-check test can be held up by host limits:
    • one sets CHECK_HOST_MAX_RUNS on purpose;
    • one never takes a herdr slot;
    • two never run main().

Follow-up (LOW): nested runs still inherit the outer run's shard and worker counts, which is harmless here.

All required checks are green, and no review thread is open.

CodeRabbit did not review this PR (rate-limited or skipped). The reviews above stand in for it.

@devswha
devswha merged commit 03bd5e5 into main Oct 24, 2026
10 checks passed
@devswha
devswha deleted the fix/check-test-host-limits branch October 24, 2026 14:37
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.

Flaky: check CLI teardown tests wait for the runner host's slots (CHECK_HOST_MAX_RUNS leaks into the fixture)

1 participant