Repository navigation
fix(ci): give the test-binary compile step real headroom on a cache miss - #164
KooshaPari wants to merge 2 commits into
Conversation
Run 39523965735 (2026-10-21) failed at "Compile library and binary tests"
with exit 124 (timeout-killed mid-compile at 909s, last logged crate
crypto-bigint v0.5.5). The preceding rust-cache restore step recorded an
auth-header error, so the build ran fully cold. The warm-cache baseline
on the same step (run 39390720989, 2026-10-20) was 634s against a 900s
cap -- a 70.4% utilization that left almost no headroom; the cold-cache
Build step ran 2453s vs 520s warm (a 4.7x ratio), so the cold-compile
cost of compiling every crate's --lib --bins test harness comfortably
exceeds 900s.
Two surgical edits to .github/workflows/ci.yml:
1. Add `cache-all-crates: "true"` to the build job's rust-cache step.
Matches the other three jobs (quality, windows-build-test,
windows-cross-check) that already cache every crate. Defense in
depth -- a future cache miss rehydrates faster instead of
re-downloading 200+ registry crates on every cold job.
2. Raise the "Compile library and binary tests" step timeout from 900s
to 2400s. This is a timeout RELAXATION for a provably-too-tight
budget, not a gate weakening:
- 2400s ~= 3.79x warm-cache cost (634s), matching the empirical
4.7x cold:warm ratio observed on the Build step.
- Worst-case job wall-clock (Build cold 2453 + Compile cold 2400 +
downstream ~1500 + overhead) ~= 6900s = 115m, fits inside the
job-level timeout-minutes: 120 (= 7200s).
- The step still gates the job on exit 124 if the compile genuinely
hangs; no assertion, gate, or test step was removed, skipped, or
weakened.
Did NOT consider RUSTC_WRAPPER=sccache: the existing comment at the
Build step documents its incompatibility with this exact --lib --bins
target (sccache emits rlibs stamped <unknown rustc version> that the
non-sccache test compile rejects with E0514). Preserved verbatim.
tx-agent: jcode
tx-validated: none
🤖 CodeAnt AI — Review Status
|
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
Warning Review limit reachedYou'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 48 minutes. View limit details
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. Comment |
Orchestrator note: job-budget correction in flightA follow-up commit is being added to this branch. The first commit's job-wall-clock arithmetic omitted the Measured cold-cache worst case (run against a job-level Why this matters more than a timeoutThe job-level timeout would cancel the job. Every downstream test step (retention cohort, pty cohort, embedding cohort, TUI library tests, provider matrix, e2e, warning budget, security preflight) would be reported SKIPPED rather than FAILED. A green compile step with a cancelled job reads as "the compile passed" while every actual test never ran — the exact gate-dropping outcome this issue forbids. The follow-up commit will raise the job budget to fit the true cold worst case and correct the explanatory comment to state the real arithmetic. No test step will be removed, skipped, or reordered, and no gate will be weakened. |
CodeAnt PR Risk: Low Risk
Assessed commit: |
There was a problem hiding this comment.
WARNING: The downstream budget figure in this comment (~1500s) does not match the sum of the downstream step timeout caps in this same job. After the compile step, the remaining run_with_timeout.py calls total 7500s (eleven 600s steps plus the 900s integration-test compile step), so the worst-case sum of step timeouts is Compile 2400 + downstream 7500 = 9900s (plus the unbounded Build step) — which already exceeds the job-level timeout-minutes: 120 (7200s) on its own. The 900s → 2400s step timeout itself is well supported by the evidence cited and is a safe relaxation, but the 'fits inside the job-level budget' justification is not supported by the stated arithmetic. Either correct the downstream figure, or clarify that it reflects measured runtime rather than the sum of the step timeout caps.
| # took 2453s cold (vs 520s warm, a ~4.7x ratio), so the cold-cache | ||
| # cost of compiling every crate's `--lib --bins` test harness comfortably | ||
| # exceeds 900s. 2400s keeps the step inside the job-level budget | ||
| # (Build=2453 + Compile=2400 + downstream ~1500 = 6353s = 106m, well |
There was a problem hiding this comment.
WARNING: The downstream budget estimate in this comment (~1500s) does not match the sum of the downstream step timeout caps in this same job. After the compile step, the remaining run_with_timeout.py calls total 7500s (eleven 600s steps plus the 900s integration-test compile step), so the worst-case sum of step timeouts is Compile 2400 + downstream 7500 = 9900s (plus the unbounded Build step) — which already exceeds the job-level timeout-minutes: 120 (7200s) on its own. The 900s → 2400s step timeout itself is well supported by the evidence cited and is a safe relaxation, but the 'fits inside the job-level budget' justification is not supported by the stated arithmetic. Either correct the downstream figure, or clarify that it reflects measured runtime rather than the sum of the step timeout caps.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 file)
Previous Review Summary (commit 35f638d)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 35f638d)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (1 file)
Reviewed by free · Input: 42.5K · Output: 2.6K · Cached: 260.9K |
…he save The previous PR commit (35f638d) raised the "Compile library and binary tests" step from 900s to 2400s and argued the cold worst case was ~115m, fitting inside the 120m job-level budget. That arithmetic was wrong on two counts: 1. It omitted the `Post Run Swatinem/rust-cache@v2` step. Re-verified from the green run 39390720989 (Build & Test 118521303106) that step ran 08:54:51 -> 09:28:53 = 2042s = 34.1m. Job-level `timeout-minutes: 120` covers the entire job including post steps. 2. It underestimated the cold Compile cost. Re-verified from cold run 39523965735 (Build & Test 118974171983): Build cold = 2453s vs warm 520s = 4.7x ratio. Warm Compile:Build ratio is 634/520 = 1.219, so cold Compile extrapolates to 2453 * 1.219 ~ 2990s. 2400s would still kill the step mid-compile with exit 124 in cold mode, failing the job and reporting every downstream test step (retention cohort, pty cohort, embedding cohort, TUI lib tests, 4 audit B-7b lib tests, integration compile, provider matrix, e2e, warning budget, security preflight) as SKIPPED rather than FAILED. That is the silent-gate-drop failure mode issue #161 / PR #164 explicitly forbid. Cold worst case with the corrected budgets (all measured or soundly extrapolated, all in seconds): setup (checkout + toolchain + failed cache-restore 735s + mold) 814 Build (cold, measured) 2453 Compile (extrapolated cold cap with 10% margin) 3300 downstream (green baseline, steps 8-22 summed: 267+187+147 +13+422+24+65+66+14+135+226+51+228+18 = 1863) 1863 post-cache-save (green baseline) 2042 post-checkout 8 TOTAL 10480 = 174.7m vs new job cap 240m = 14400s: 37% (65m) margin. Warm baseline 5106s still leaves 75% headroom under the new cap. Edits: jobs.build-and-test-desktop timeout-minutes: 120 -> 240 jobs.build-and-test-desktop Compile step timeout: 2400 -> 3300 Updated the explanatory YAML comments on both to spell out the math including the post-cache-save step and the cold Compile extrapolation, and to state the failure mode (exit 124 -> SKIPPED, not FAILED) that PR #164 is designed to prevent. Did NOT change anything else: no test step removed, skipped, reordered, or weakened; no gate relaxed; the `Build` step's `RUSTC_WRAPPER=sccache` warning comment preserved verbatim; all other jobs (`quality`, `format`, `typescript-sdk`, `windows-*`, `setup-friction`) untouched. The `cache-all-crates: "true"` change from 35f638d is kept. tx-agent: jcode tx-validated: lint
…olved conflicts The recomputed residuals (recomputed against origin/master 2aea04d via git merge-tree --write-tree) now cover 12 open PRs in the KCode stack. The four PRs previously flagged as needing hand-resolved conflicts (#140, #127, #157, #158) have already been merged against origin/master by a parallel agent as real 2-parent merge commits at d6e4cfa, b6508e6, 264c09a, and 47b42e2 respectively; merge-tree reports zero conflict markers for all four. Two new PRs (#163 transport pipe-stem, #164 CI timeout headroom) extend the stack to 12. The CI Quality Guardrails clippy gate has a coverage gap that no existing PR fixes: the command is 'cargo clippy --all-targets --all-features -- -D warnings' with no --workspace, so exactly one workspace member (jcode-sdk) is unreachable from the root package and is never linted. In the green run id 39390720989 the cargo test -p jcode-sdk parity step still emitted the 'never used' warning for the Subscriber alias at crates/jcode-sdk/src/client.rs:330. The --workspace change is NOT a no-op and may surface additional pre-existing violations; this is recorded as an OPEN RISK, not a resolved fact. The KCode self-hosted runner desk-kcode-1 wedged on 2026-10-21 in the Build & Test (desk-linux) job of run 39530002307. Root cause: the desk WSL2 instance is capped by .wslconfig at memory=16GB (not the 64GB the Windows host has), was competing with a 1h43m orphaned cargo llvm-cov --workspace job, and the Build step in .github/workflows/ci.yml has no per-step run_with_timeout.py wrapper. Remediation (terminating the orphan) brought memory from 13.9/16 GB to 9.4/16 GB and recovered the runner. Detailed conflict resolutions and the runner wedge root-cause analysis moved to a new companion file 05a_MERGE_EVIDENCE.md so the plan itself fits the 500-line cap. tx-agent: jcode tx-validated: manual tx-scope: docs/sessions/2026-10-19-orchestration-governance/ tx-intent: Refresh the merge plan against recomputed 12-PR residuals + 4 applied conflict resolutions + clippy coverage gap + runner wedge
… plan (#375) * docs(sessions): add cross-harness orchestration governance proposal Proposes 4 enforcement mechanisms for the "Always Subagent — main context is management-only" operator directive (2026-10-11 21:08); records the 2026-10-19 manual cross-harness propagation of the rule to all 4 derivative AGENTS.md copies (codex, forge, kcode, helioslite); lists operator-approved next steps (none yet; each mechanism awaiting decision). tx-agent: jcode tx-validated: manual tx-task: governance-2026-10-19 tx-scope: docs/sessions/2026-10-19-orchestration-governance tx-intent: capture the cross-harness propagation decision + enforcement backlog in the repo * docs(sessions): add fix-forward merge integration plan for the KCode PR stack tx-agent: jcode tx-validated: manual tx-task: governance-2026-10-19 tx-scope: docs/sessions/2026-10-19-orchestration-governance tx-intent: give the operator a no-force-push merge order for PRs #152/#127/#140/#148/#129/#132/#134/#150/#145 * docs(ci): rebuild the merge integration plan against master 2aea04d tx-agent: jcode tx-validated: manual tx-task: 143 tx-scope: docs/sessions/2026-10-19-orchestration-governance tx-intent: replace the stale 2026-10-19 PR stack plan with one built from current master ground truth * docs(ci): rebuild the merge integration plan against master 2aea04d tx-agent: jcode tx-validated: manual tx-task: 143 tx-scope: docs/sessions/2026-10-19-orchestration-governance tx-intent: replace the stale 2026-10-19 PR stack plan with one built from current master ground truth * docs(merge): refresh the merge plan with the recomputed stack and resolved conflicts The recomputed residuals (recomputed against origin/master 2aea04d via git merge-tree --write-tree) now cover 12 open PRs in the KCode stack. The four PRs previously flagged as needing hand-resolved conflicts (#140, #127, #157, #158) have already been merged against origin/master by a parallel agent as real 2-parent merge commits at d6e4cfa, b6508e6, 264c09a, and 47b42e2 respectively; merge-tree reports zero conflict markers for all four. Two new PRs (#163 transport pipe-stem, #164 CI timeout headroom) extend the stack to 12. The CI Quality Guardrails clippy gate has a coverage gap that no existing PR fixes: the command is 'cargo clippy --all-targets --all-features -- -D warnings' with no --workspace, so exactly one workspace member (jcode-sdk) is unreachable from the root package and is never linted. In the green run id 39390720989 the cargo test -p jcode-sdk parity step still emitted the 'never used' warning for the Subscriber alias at crates/jcode-sdk/src/client.rs:330. The --workspace change is NOT a no-op and may surface additional pre-existing violations; this is recorded as an OPEN RISK, not a resolved fact. The KCode self-hosted runner desk-kcode-1 wedged on 2026-10-21 in the Build & Test (desk-linux) job of run 39530002307. Root cause: the desk WSL2 instance is capped by .wslconfig at memory=16GB (not the 64GB the Windows host has), was competing with a 1h43m orphaned cargo llvm-cov --workspace job, and the Build step in .github/workflows/ci.yml has no per-step run_with_timeout.py wrapper. Remediation (terminating the orphan) brought memory from 13.9/16 GB to 9.4/16 GB and recovered the runner. Detailed conflict resolutions and the runner wedge root-cause analysis moved to a new companion file 05a_MERGE_EVIDENCE.md so the plan itself fits the 500-line cap. tx-agent: jcode tx-validated: manual tx-scope: docs/sessions/2026-10-19-orchestration-governance/ tx-intent: Refresh the merge plan against recomputed 12-PR residuals + 4 applied conflict resolutions + clippy coverage gap + runner wedge
User description
Summary
The
buildjob reports a false failure on a cache miss: the compile step is killed by its own timeout, not by a compile error.Evidence
39523965735(2026-10-21):rust-cacheloggedFailed to restore: Server failed to authenticate the request, so the job ran fully cold.Buildstep took 2453s cold vs 520s warm (~4.7x).Compile library and binary testswas killed at ~909s with exit 124 while still compiling transitive deps (last crate:crypto-bigint v0.5.5).39390720989the same step took 634s against a 900s cap (70.4% utilization, under 30% headroom). At the observed 4.7x cold:warm ratio, the cold cost of this step exceeds 900s. The budget was never sufficient on a cache miss.Changes (both in
.github/workflows/ci.yml,buildjob only)timeout-minutes: 120(7200s). The step still aborts the job on exit 124 if the compile genuinely hangs.cache-all-crates: "true"to the build job rust-cache step, matching thequality,windows-build-test, andwindows-cross-checkjobs that already do this. Defense in depth for future transient cache misses.Explicitly not done
RUSTC_WRAPPER=sccacheis not re-exported: the existing comment at theBuildstep documents that sccache emitted artifacts stamped<unknown rustc version>that the non-sccache test compile rejected withE0514. Preserved verbatim.No assertion, gate, or test step is removed, skipped, or weakened. The
quality,fmt,typescript-sdk,windows-*, andsetup-frictionjobs are untouched.Closes #161
CodeAnt-AI Description
Prevent CI compile jobs from timing out on cache misses
What Changed
Impact
✅ Fewer CI failures on cold caches✅ Faster recovery after cache misses💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.