test(ci): widen the git-probe stall budget and its stall floor (BLO-22985) - #1850
Merged
Merged
Conversation
…2985) heartbeat-workspace-session.test.ts asserted the strict git-checkout probe returns in < 1500ms when the probe's own deadline is 200ms. Measured actual is 280ms, so the budget carried ~5x margin against a merge-queue runner that has produced 33% wall-clock overruns on this repo's timing tests. Widening the budget alone would have broken the invariant: the fake git only slept 5s, so a probe that ignored its timeout would have landed at ~5.1s against a 5s budget. Raise the stall to 20s in the same change, keeping a genuinely-hung probe 4x over the budget. Measured: healthy 280ms / budget 5000ms / ignored-timeout 20028ms. Refs BLO-22985 Co-Authored-By: Claude <noreply@anthropic.com>
Author
|
🔗 Paperclip issue: BLO-22985 |
1 similar comment
Author
|
🔗 Paperclip issue: BLO-22985 |
|
@ally head Requested a review from @allyblockcast directly (native GitHub review request, not just this comment) against current head |
Author
There was a problem hiding this comment.
Ally — Consolidated PR Review
Lenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex.
Reviewed head: 60a516c
Critical Issues (0)
Important Issues (0)
Suggestions (0)
Strengths
- The synthetic stall is widened to 20 seconds while the probe timeout remains 200ms, preserving a clear negative-control separation.
- The 5-second assertion gives the timeout-bound test meaningful runner-contention headroom without allowing the old ignored-timeout behavior to pass.
- Environment variables and temporary filesystem state are restored in
finally, keeping the test isolated from neighboring tests.
Recommended Action
- No Critical or Important issues found. The App-authored PR should receive this formal review as
COMMENTED.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thinking Path
Linked Issues or Issue Description
Refs BLO-22985 — CI reliability: hardcoded wall-clock budgets in server tests fail under CI load.
Sibling PRs from the same sweep, all currently in the merge queue: #1792, #1806, #1826. This PR touches a file none of them touch (verified by file-set intersection against all 56 queued PRs).
What Changed
server/src/__tests__/heartbeat-workspace-session.test.ts— "rejects when the git checkout probe stalls past its timeout":expect(Date.now() - startedAt).toBeLessThan(1_500)→5_000.gitstallsleep 5→sleep 20.The stall change is required, not incidental. The test proves the probe honours its 200ms deadline instead of waiting out the stalled
git. With the old 5s stall, a budget of 5s would have left a probe that ignored its timeout landing at ~5.1s against a 5s budget — i.e. widening alone would have quietly stopped catching the regression, which BLO-22985's AC3 explicitly forbids. Raising the stall restores the separation.Verification
AssertionError: expected 20028 to be less than 5000The negative control was run by temporarily setting
PAPERCLIP_STRICT_GIT_CHECKOUT_PROBE_TIMEOUT_MS = "30000"in the test and reverting it; it is empirical, not arithmetic. Test-file cap is the globaltestTimeout: 60_000, so the 20s stall fits with 3x headroom.Risks
Low risk; test-only, one test. Two failure modes considered:
--no-file-parallelism --maxWorkers=1intest:k8s-concurrency-chaos), so the extra 15s is on a single serialized path and only on the failing branch.No production code touched. No other budget in the file changed.
Model Used
Claude Opus 4.5 (
claude-opus-4-5), extended thinking, via Claude Code with tool use.Checklist
Fixes: #/Closes #/Refs #OR (b) described the issue in-PR following the relevant issue template