Skip to content

fix(ci): keep cross-target Cargo tools out of cache - #254

Closed
KooshaPari wants to merge 3 commits into
masterfrom
ci/xwin-cache-nobin-20261106
Closed

KooshaPari wants to merge 3 commits into
masterfrom
ci/xwin-cache-nobin-20261106

Conversation

@KooshaPari

@KooshaPari KooshaPari commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

User description

Problem

The Windows cross-target job restores Cargo binaries and install metadata from rust-cache before installing cargo-xwin. In two successive jobs on desk-kcode-2, a binary-containing cache was restored and cargo-xwin 0.23.1 was then replaced by a rebuilt 0.24.0 at the same Git revision, taking approximately 78 and 64 seconds in the install step. The logs do not establish whether those archives supplied the older executable; other writers may have done so. Related to #167.

This change excludes Cargo binaries and install metadata from this job's cache and changes the cache key so its restore prefix cannot match the old binary-containing archive. The existing cargo-xwin install command remains unchanged and continues to check its upstream Git source.

Validation

  • Parsed the workflow and checked that the cross-target cache inputs are the only semantic changes; the old and new restore prefixes do not overlap.
  • git diff --check passed. Swatinem rust-cache v2 source was reviewed for cache path and key construction.
  • Independent source review found no correctness blocker.

The first run will miss the previous registry cache. The effect on install time, disk I/O, and job success needs a naturally scheduled CI run; no performance improvement is claimed yet.


CodeAnt-AI Description

Keep cached Cargo binaries out of Windows cross-target CI

What Changed

  • Windows cross-target CI no longer restores or saves Cargo-installed binaries
  • A new cache key prevents this job from matching older caches that may contain binaries

Impact

✅ Windows cross-checks skip cached Cargo binaries
✅ Old binary-containing caches are bypassed
✅ Cargo tools are installed fresh in this job

💡 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:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

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:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

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.

Part of #167

tx-agent: codex
tx-validated: test
Copilot AI balanced review requested due to automatic review settings November 7, 2026 00:55
@codeant-ai

codeant-ai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

CodeAnt  CodeAnt Review Status

✅  Review completed

Status Commit Started (UTC) Finished (UTC)
✅  #8eecd Incremental review completed 8c70f67 Nov 07, 2026 · 08:18 08:18
✅  #56513 Incremental review completed 1853037 Nov 07, 2026 · 03:52 03:53
✅  #9feaf Reviewed your PR 515fa04 Nov 07, 2026 · 00:55 00:56

@codeant-ai

codeant-ai Bot commented Nov 7, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary

The Windows cross-target job disables binary caching with cache-bin: "false" and changes its cache key to windows-cross-check-notarget-nobin. The cargo-xwin install command remains unchanged.

Must Fix

No blocking issue is evident in the supplied diff. Current review findings: not available.

Should Fix

No non-blocking issue is evident in the supplied diff.

Consider

CI and test results: not available. The install-time and cache effects remain untested pending a CI run.

Approve / Request Changes

Approve with notes. The diff makes the intended cache configuration change. CI results are not available.

The Windows cross-check workflow changes its cache key to include a -nobin suffix and disables binary caching. The other cache settings remain unchanged.

Changes: Windows Cross-Check Cache

Layer / File(s) Summary
Update Windows cross-check cache settings
.github/workflows/ci.yml
The cache key gains a -nobin suffix, and cache-bin is set to false. The other cache settings remain unchanged.

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Bug fix

Possibly related PRs

  • KooshaPari/KCode#196: PR #196 adds the -notarget cache key; this change extends the Windows cross-check cache configuration.

Suggested labels: size:XS

Suggested reviewers: 1jehuang

Merge Risk: Minimal · up to 515fa

The cache change presents no identified merge blocker. The first run may miss the previous cache; installation-time and job-success effects remain unmeasured.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title clearly describes the change to exclude Cargo tools from the cross-target CI cache.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description states the problem (Windows cross-target job restores Cargo binaries and install metadata from rust-cache, leading to cargo-xwin being replaced in two successive jobs), the change (exc…
Full details: Description check

Explanation

The description states the problem (Windows cross-target job restores Cargo binaries and install metadata from rust-cache, leading to cargo-xwin being replaced in two successive jobs), the change (excluding Cargo binaries and install metadata from the cache and changing the cache key to prevent restore-prefix matches), and validation steps. It directly relates to the changeset in .github/workflows/ci.yml, which adds cache-bin: "false" and changes the key from windows-cross-check-notarget to windows-cross-check-notarget-nobin. The CodeAnt-AI boilerplate is extra but does not make the description off-topic.

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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: ed9a1306-4907-4942-915c-8fa212a87d07
Commits

Reviewing files that changed from the base of the PR and between 57d6779 and 515fa04.

Files selected for processing: 1

  • .github/workflows/ci.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Recent review details

Context from checks skipped due to timeout: 10

  • GitHub Check: Require Linked Issue
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: Build & Test (desk-linux)
  • GitHub Check: Quality Guardrails
  • GitHub Check: Windows Cross-Target Check (Linux)
  • GitHub Check: Release Automation
  • GitHub Check: Security preflight (Linux)
  • GitHub Check: TypeScript SDK
  • GitHub Check: Format
  • GitHub Check: Kilo Code Review
Additional context used

zizmor (1.31.1)

.github/workflows/ci.yml

[warning] 1-998: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block

(excessive-permissions)

[warning] 913-970: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block

(excessive-permissions)

@codeant-ai codeant-ai Bot added the size:XS This PR changes 0-9 lines, ignoring generated files label Nov 7, 2026
@codeant-ai

codeant-ai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

CodeAnt  CodeAnt PR Risk

🟢  Low Risk

  • The PR appears safe to merge; no actionable issues were identified in the review.

Assessed commit: 8c70f67e7c96

Comment thread .github/workflows/ci.yml
key: windows-cross-check-notarget-nobin
cache-all-crates: "true"
cache-targets: "false"
cache-bin: "false"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Verify cache-bin is a recognized input for the pinned Swatinem/rust-cache@v2. GitHub Actions silently ignores unknown with keys (at most a warning), so an incorrect name would leave Cargo-installed binaries cached and defeat the stated goal of this PR. Confirm the exact input name against the action's action.yml for the version in use; if the toggle differs (e.g. it is not supported), gate the binary cache via cache-directories or the action's documented option instead.

@kilo-code-bot

kilo-code-bot Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
.github/workflows/ci.yml 939 Verify cache-bin is a recognized input for Swatinem/rust-cache@v2; unknown inputs are silently ignored, which would leave Cargo binaries cached.
Files Reviewed (1 files)
  • .github/workflows/ci.yml - 1 issue

Fix these issues in Kilo Cloud


Reviewed by free · Input: 55K · Output: 2K · Cached: 209.3K

@sonarqubecloud

sonarqubecloud Bot commented Nov 7, 2026

Copy link
Copy Markdown

KooshaPari added a commit that referenced this pull request Nov 12, 2026
…254)

The Windows cross-target job restored a cache that included target/*/bin, so
cargo-xwin tool binaries came back stale from a cache entry written by a
different job. cache-bin: "false" plus the -nobin key isolates that restore.

tx-agent: jcode
tx-validated: none
tx-scope: .github/workflows/ci.yml
tx-intent: merge PR #254 after the desk runner repair
tx-lane: wJ:p7
@KooshaPari KooshaPari closed this Nov 12, 2026
@KooshaPari
KooshaPari deleted the ci/xwin-cache-nobin-20261106 branch November 27, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants