Repository navigation
fix(ci): extend the rust-cache blob-size fix to the quality and windows jobs - #196
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
The Swatinem/rust-cache@v2 restore hangs 25+ minutes on the large target/ blob (job 121317250103, 2026-10-26) and occupies the self-hosted runner for the whole duration, starving the whole CI queue. PR #183 already fixed the Build job with a new -notarget cache key plus cache-targets: "false". This applies the same treatment to the quality, windows-build-test and windows-cross-check jobs so their restores miss fast instead of downloading the oversized blob. tx-agent: jcode tx-validated: manual tx-scope: ci tx-intent: stop the oversized rust-cache restore from hanging and blocking the runner
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.
|
| Layer / File(s) | Summary |
|---|---|
Disable target-directory caching .github/workflows/ci.yml |
Quality Guardrails, Build & Test, Windows Build & Test, and Windows Cross-Target Check use -notarget cache keys and disable target caching. Cargo crate caching remains enabled. |
Increase Build & Test timeouts .github/workflows/ci.yml |
The job timeout increases from 120 to 240 minutes. The library and binary test compilation timeout increases from 900 to 3300 seconds, and the retention-readiness cohort timeout increases from 600 to 1800 seconds. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Possibly related issues
- fix(ci): 900s compile-test timeout is too tight on a cache miss and reports a false failure #161 — The issue concerns the library and binary test compilation timeout, which this change raises to 3300 seconds.
- fix(ci): Build & Test (desk-linux) cannot go green on a cold cache: compile budget 900s and retention-cohort budget 600s both too tight #182 — The issue concerns the Build & Test timeout increases included in this change.
- fix(ci): retention-readiness cohort 600s timeout is too tight on a cold cache #176 — The issue concerns the retention-readiness timeout, which this change raises to 1800 seconds.
- Build & Test (desk-linux): 2GB rust-cache blob aborts restore at ~600s, so PR branches can never go green #167 — The issue concerns target-directory cache restores; this change disables target caching and updates the cache key.
- fix(ci): Build & Test (desk-linux) 900s compile budget is too tight on a cold cache (PR #169 branch) #188 — The issue concerns the compilation timeout increase included in this change.
- fix(ci): Build & Test (desk-linux) 600s retention cohort budget is too tight on a cold cache (PR #179 branch) #189 — The issue concerns the retention-readiness timeout increase included in this change.
Possibly related PRs
- KooshaPari/KCode#190 — It changes the same Build & Test timeouts included in this PR.
Suggested reviewers: 1jehuang
Merge Risk: 
Minimal · up to bc4a2
-
No actionable merge-blocking issue is identified; the CI changes are ready for normal validation.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Title check
-
Explanation
The title names the change: it extends the rust-cache blob-size fix (the -notarget cache key and cache-targets: "false") to the quality and Windows jobs. The changeset matches this. It is a single, specific sentence, and it follows the conventional commit style. The title does not mention the timeout increases, which are a secondary part of the change.
Full details: Description check
-
Explanation
The description states the purpose and scope of the change: it extends the rust-cache blob-size fix to the quality, windows-build-test, and windows-cross-check jobs. It lists the cache key changes, the reason for them (the restore step hangs on the oversized target/ blob), and the dependency on PR
#183. This is related to the changeset, so the check passes.
Full details: Linked Issues check
-
Explanation
Issue
#195requires the-notargetkey suffix andcache-targets: "false"forquality,windows-build-test, andwindows-cross-check. The diff applies these settings to all three jobs. It leavescache-all-crates: "true"unchanged in the two Windows jobs, and the existingqualitysetting remains unchanged.
Full details: Docstring Coverage
-
Explanation
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)
-
Full details: Out of Scope Changes check
-
Explanation
The whole-PR diff also changes the Build & Test job, which issue
#195identifies as existing partial work from PR#183rather than a requested job. It changestimeout-minutesfrom 120 to 240, the compile timeout from 900 to 3300 seconds, the retention-readiness timeout from 600 to 1800 seconds, and the Build cache key andcache-targetssetting. These changes are not required for the three jobs in issue#195.Resolution
Land PR
#183separately or remove its Build & Test cache and timeout changes from this pull request. Keep the changes forquality,windows-build-test, andwindows-cross-check.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
✨ Simplify code
-
- Commit to this branch
- Create a new PR
-
- 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.
Comment @coderabbitai help to get the list of available commands.
| with: | ||
| key: quality-ubuntu | ||
| # The ~881 MB `quality-ubuntu` blob hung for 26+ minutes in CI job | ||
| # 121317250103 (2026-10-26), blocking the self-hosted runner the |
There was a problem hiding this comment.
SUGGESTION: Comment cites CI job 121317250103, but per the PR description that job was the quality job, not a Windows job. Either cite each job's own ID or omit the specific job ID to avoid confusion during debugging.
| - uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| key: windows-latest | ||
| # The old blob's restore hung for 26+ minutes in CI job 121317250103 |
There was a problem hiding this comment.
SUGGESTION: Comment cites CI job 121317250103, but per the PR description that job was the quality job, not this windows-build-test job. Either cite the correct job ID or omit the specific job ID.
| with: | ||
| key: windows-cross-check | ||
| # The ~688 MB `windows-cross-check` blob hung for 26+ minutes in CI | ||
| # job 121317250103 (2026-10-26), blocking the self-hosted runner the |
There was a problem hiding this comment.
SUGGESTION: Comment cites CI job 121317250103, but per the PR description that job was the quality job (windows-cross-check had cache ids 9209952731/9293606805). Either cite the correct job ID or omit the specific job ID.
Code Review SummaryStatus: 1 Issues Found | Recommendation: Merge (address suggestion before or with merge) Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (1 files)
The PR is functionally correct: all three cache blocks use unique Fix these issues in Kilo Cloud Reviewed by free · Input: 75.8K · Output: 16.7K · Cached: 225.5K |
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 #195
What
Extends the rust-cache blob-size fix from PR #183 to the three remaining CI jobs that still restore the oversized
target/blob.qualityquality-ubuntuquality-ubuntu-notargetcache-targets: "false"windows-build-testwindows-latestwindows-latest-notargetcache-targets: "false"windows-cross-checkwindows-cross-checkwindows-cross-check-notargetcache-targets: "false"cache-all-crates: "true"is kept as-is in all three jobs (it only affects WHICH crates are cached, not thetarget/blob size).Why
The
Swatinem/rust-cache@v2RESTORE step hangs for 25+ minutes on the large blob and, while it hangs, occupies the self-hosted runner, starving the entire CI queue.Run Swatinem/rust-cache@v2from 01:08:17 for 26 minutes with nocargo/rustcrunning anywhere on the host (load average ~8). The runner's child was therust-cachenode process sitting idle. The runner was blocked the whole time, so every other KCode run stayed queued.in_progresssince 01:36:00 in thequalityjob.quality-ubuntu~881 MB (cache id 9211749432),windows-cross-check~688 MB (cache ids 9209952731 / 9293606805).The
-notargetkey suffix makes the restore miss fast ("No cache found") instead of downloading the oversized blob, andcache-targets: "false"ensures the workspacetarget/dir is never cached or restored. Note thatcache-targetsdoes not participate in the cache key, so the new key suffix is what actually forces the miss.Relationship to PR #183
This branch is based on PR #183's branch (
fix/ci-cold-cache-build-green), which already applies the identical-notargetkey pluscache-targets: "false"treatment to the Build job.PR #183 must land first. Until it does, this PR's diff against
masterincludes PR #183's Build-job change as well. Once #183 is merged intomaster, this PR reduces to exactly the three cache-key changes shown in the table above.The Build job's cache block is byte-identical to PR #183's version here and is not modified by this PR.
Validation
git diff origin/fix/ci-cold-cache-build-green...fix/ci-cache-blob-size-all-jobs --stattouches only.github/workflows/ci.yml.stablepinoccurrences.run_with_timeout.pyortimeout-minutesvalue was changed (the diff against the base branch contains none).-notargetkeys do not exist onmaster, so they are unique and unused..github/workflows/ci.ymlparses as valid YAML.git merge-tree --write-tree origin/master fix/ci-cache-blob-size-all-jobsis clean.git merge-tree --write-tree origin/fix/ci-cold-cache-build-green fix/ci-cache-blob-size-all-jobsis clean (this branch is a descendant of the base).CodeAnt-AI Description
Keep CI checks moving when Rust build caches are oversized
What Changed
Impact
✅ Fewer CI checks stalled on cache restores✅ Less time waiting for self-hosted runners✅ Cold Linux builds have time to complete💡 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.