Repository navigation
fix(ci): give the retention-readiness cohort a cold-compile budget so the desk-linux build can go green - #183
Conversation
tx-agent: jcode tx-validated: manual tx-scope: .github/workflows/ci.yml (build job only) tx-intent: Make Build & Test (desk-linux) able to restore its cache and go green on PR branches The Build & Test (desk-linux) job's rust-cache blob was 2,029,470,155 bytes. Every restore attempt aborted at a ~600s cap (617s / 605s / 600s across jobs 119054392243, 119055460640, 119065565800) at 37.4% / 39.7% / 44.0% and fell through to "No cache found", so the job always ran cold, so the 900s compile cap killed it, so the save step was skipped. GitHub caches are ref-scoped and PR refs (refs/pull/N/merge) cannot read refs/heads/master, so the loop repeats. target/ is the dominant contributor: this is the only job that puts a release build, a --lib --bins test compile, and eight integration/e2e compiles into one target dir. Per Swatinem/rust-cache action.yml, cache-targets:false caches only the cargo registry, which is provably under the 687,972,881 bytes that job 119062133759 already restored successfully. cache-all-crates was evaluated and is the wrong lever: src/save.ts calls cleanRegistry(pkgs, crates !== "true"), so cache-all-crates:"true" skips the registry cleanup and keeps MORE. This job already uses the pruning default. Timeouts raised because the job is now intentionally cold: Build cold 2453s, compile cold ~2990s. Co-Authored-By: Jcode <[email protected]>
…pin it The previous rust-cache key (v0-rust-desk-linux-stablepin-build-...) had a 2,029,470,155-byte entry stuck on refs/heads/master. Even with cache-targets: "false" flipped on, the key was identical so actions/cache attempted to restore the 2GB blob and aborted at ~600s (37-44%). The post-step save was then SKIPPED because the key was immutable per (key, ref), so master remained pinned forever and every fresh PR paid the same doomed download. Suffix the key with -notarget. This propagates into both the primary key and the restore-key prefix, and matches no legacy entry -- the doomed restore is never attempted and the save reserves a fresh slot. tx-agent: jcode tx-validated: manual tx-scope: .github/workflows/ci.yml tx-intent: make the build job's rust-cache use a new key so cache-targets:false can actually take effect
The Build & Test (desk-linux) job cannot go green on a cold cache because the retention-readiness cohort budget is 600s while that step pays a full cold compile of the jcode-app-core lib-test harness. The harness stays cold at that point: the workspace declares no `default-members`, so `cargo test --lib --bins --no-run` builds only the default member `kcode` and never pre-builds the cohort crates' harnesses. Run 39672218586 / job 119472777140 hit exit 124 at 600s on exactly this. Raise that one budget to 1800s and record why. The cohort itself still runs in under a second once the harness is built; 1800s covers the one-time cold compile and nothing more. Based on #168 (fix/ci-build-cache-blob-size), which already carries the 3300s compile budget and the 240-minute job cap, so this branch is a strict superset of #177 (fix/ci-retention-cohort-timeout), which can be closed without merging. tx-agent: jcode tx-validated: manual tx-scope: .github/workflows/ci.yml
🤖 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 · |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📜 Recent review details
📝 Summary
Merge Risk: ⚪ Minimal · up to
|
CodeAnt PR Risk: Low Risk
Assessed commit: |
…s jobs (#196) Closes #195 The `Swatinem/rust-cache@v2` restore hangs for 25+ minutes on the oversized build-cache blob, and while it hangs it occupies the self-hosted runner, starving the entire CI queue. PR #183 fixed the Build job, but the `quality`, `windows-build-test` and `windows-cross-check` jobs use their own cache keys and were still hanging (observed: job 121317250103 sat in the restore step for 26 minutes with no cargo running on the host, blocking every other run). Give those three jobs the same treatment: a fresh `-notarget` key plus `cache-targets: "false"`, so the restore misses fast instead of downloading the oversized target/ directory. Co-Authored-By: jcode <[email protected]>
Resolves the ci.yml conflict introduced by #183 and #196 landing first. All three conflict hunks were comment-only -- both sides already agreed on every semantic value (job timeout-minutes 240, compile 3300s, retention cohort 1800s, and the identical sequence of every other budget). The resolution keeps master's comment text, which is now the canonical wording for the merged cache and timeout fixes, and re-applies this branch's one semantic change: the workspace-wide clippy gate. The diff against master is exactly one line: cargo clippy --all-targets --all-features -> cargo clippy --workspace --all-targets --all-features tx-agent: jcode tx-validated: none tx-scope: ci workflow tx-intent: Resolve the ci.yml conflict with the merged cache and timeout fixes
Resolves the ci.yml conflict introduced by #183, #196 and #190 landing first. All three conflict hunks were comment-only: both sides already agreed on every semantic value, and the clippy gate line this branch introduces is already on master via #190. The resolved ci.yml is byte-identical to master. The branch's remaining diff against master is exactly its lint fixes. tx-agent: jcode tx-validated: none tx-scope: ci workflow tx-intent: Resolve the ci.yml conflict after the clippy and cache fixes landed
Resolves the ci.yml conflict introduced by #183, #196, #190 and #198 landing first. All three conflict hunks were comment-only -- both sides already agreed on every semantic value, and the timeout and cache fixes this branch carried are now on master. The resolved ci.yml is byte-identical to master. The branch's remaining diff against master is exactly the dictation test budget change. tx-agent: jcode tx-validated: none tx-scope: ci workflow tx-intent: Resolve the ci.yml conflict after the timeout and cache fixes landed
User description
Closes #182
What
Raises the
Build & Test (desk-linux)retention-readiness cohort budget from600s to 1800s, and refreshes the two comments that described the old numbers.
One semantic change to a budget. Nothing else:
Run deterministic retention-readiness cohort6001800Compile library and binary tests33003300(unchanged, from #168)timeout-minutes240240(unchanged, from #168)Every other
run_with_timeout.pyvalue in the file is byte-identical: theeight remaining
600cohort budgets, the900provider-matrix budget, and the3300compile budget.Why 1800
The retention step is not just running slow, it is compiling the
jcode-app-corelib-test harness cold, every cache-miss run. That harness isnever pre-built by the compile step directly above it, because
cargo metadatareportsworkspace_default_members = 1-- onlykcode. Theroot
Cargo.tomldeclares nodefault-memberskey, so cargo defaults to theroot package alone and
cargo test --lib --bins --no-runbuilds justkcode'stest targets, never the cohort crates' harnesses.
Observed: run 39672218586 / job 119472777140 hit exit 124 at 600s on exactly
this compile.
The cohort itself still runs in under a second once the harness exists, so 1800s
covers the one-time cold compile and nothing more. This is a budget fix, not a
performance fix.
Relationship to #168 and #177
This branch is based on #168 (
fix/ci-build-cache-blob-size) atb24ec59031709802e54c6d17628b357c622bb15d, with one commit on top. #168already carries the
3300compile budget, the240-minute job cap, and therust-cache blob-size fix.
This branch is therefore a strict superset of #177
(
fix/ci-retention-cohort-timeout), which raises the same retention budget butbranches from
master-- where the compile budget is still900. #177 thereforefails earlier than the original bug, at step 7 compile with exit 124, and never
reaches the retention step. The two branches also conflict with each other on the
identical
timeout-minutesline.#177 can be closed without merging once this lands.
Scope and validation
Scope is
.github/workflows/ci.ymlonly. No Rust source, no tests, no Cargomanifest, no other workflow file.
crates/is untouched.Validated by static inspection only (no cargo builds -- the host disk is
saturated and CI is live):
git diff origin/master...HEAD --stat-> only.github/workflows/ci.ymlrun_with_timeout.pyvalue diffed line-by-line against the base; theonly value delta is
600->1800yaml.safe_loadparses the merged tree; jobtimeout-minutesstill240,compile step still
3300git merge-tree --write-tree origin/master HEAD-> clean (exit 0)git merge-tree --write-tree origin/fix/ci-build-cache-blob-size HEAD-> clean(exit 0);
merge-base --is-ancestorconfirms the base is a direct ancestorb24ec5903before and after, confirmed viagit ls-remote-- published history not rewrittenNot done
No cargo/test run. This branch changes CI timeouts only and has no runtime
effect on the binary. The actual proof is a green
Build & Test (desk-linux)run on a cold cache.
CodeAnt-AI Description
Keep desk-linux build checks running when the build cache is cold
What Changed
Impact
✅ Fewer desk-linux CI failures from cache restore timeouts✅ Cold builds have time to finish compiling✅ Retention-readiness checks can finish on a cold run💡 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.