-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Flaky: CodexModelsPerformanceTests workspace-scale budget too tight for CI runners #2579
Copy link
Copy link
Closed
Labels
P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:not-repro-on-mainClawSweeper found high-confidence evidence that this issue no longer reproduces on main.ClawSweeper found high-confidence evidence that this issue no longer reproduces on main.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.Thin issue quality; more reproduction proof or environment detail is needed.
Description
Metadata
Metadata
Assignees
Labels
P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:not-repro-on-mainClawSweeper found high-confidence evidence that this issue no longer reproduces on main.ClawSweeper found high-confidence evidence that this issue no longer reproduces on main.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.Thin issue quality; more reproduction proof or environment detail is needed.
Summary
CodexModelsPerformanceTests."workspace scale snapshot build stays within end to end budget"fails intermittently onswift-test-macosbecause its 1.5s wall-clock budget leaves too little headroom over what CI runners actually spend.Observed on PR #2468, whose diff does not touch the measured code path:
Over budget by 35ms — 2.3%.
Evidence that it's runner variance
Same test, same measured code path, three runs within ~50 minutes of each other:
mainfix/claude-startup-auto-clifeature/upcoming-resets-scheduleThat's a 2× spread on identical work. The test runs 1 warmup + 3 measured builds and asserts the median is under 1.5s, so the
mainrun at 4.747s total is already spending roughly 1.19s per build — only ~25% under the limit. A loaded runner closes that gap.The same branch also passed the same shard a few hours earlier, at sha
d2c20da3(run 30738241213, all macOS shards green). The onlySources/CodexBarCore/file touched between that green run and the red one isProviders/ProviderFetchPlan.swift— none ofCodexLocalProjectUsageIndexer.swift,CodexLocalProjectUsageModels.swift, orCodexLocalProjectUsageProjection.swiftchanged. The measured code path is identical across the pass and the fail.For contrast, the same test on local Apple Silicon:
~0.13s per build — over 10× headroom. The budget is calibrated closer to dev hardware than to CI runners.
Why it doesn't self-heal
.github/workflows/ci.yml:150setsCODEXBAR_TEST_RETRY_NON_TIMEOUT_FAILURES=0. The harness detects the failure (First-pass failed groups: 1) but only retries timeouts, so a 35ms perf blip fails the shard and the whole PR outright.Suggested fixes
Roughly in order of preference:
CODEXBAR_TEST_RETRY_NON_TIMEOUT_FAILURES=0, so a single unlucky sample doesn't red-flag an unrelated PR.Happy to send a PR for whichever direction you prefer.
Test introduced in 5c571d7 ("Test and document workspace indexing").