Skip to content

ci: preserve Rust cache restore prefixes - #806

Merged
proerror77 merged 1 commit into
mainfrom
codex/rust-cache-restore-prefix
Aug 10, 2026
Merged

proerror77 merged 1 commit into
mainfrom
codex/rust-cache-restore-prefix

Conversation

@proerror77

@proerror77 proerror77 commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Change contract

Remove the duplicate Cargo.lock hash from the three Rust cache user keys used by Research image binaries, manual research-runner rebuilds, and Rust Workspace. Swatinem/rust-cache@v2 keeps its own Rust environment and lockfile hashes, so this restores the stable fallback prefix across lockfile changes without weakening full-key invalidation.

Issue relationship

None

Out of scope

  • CI-3b save-if behavior
  • sccache setup or routing
  • CI selectors
  • Other Rust cache lanes

Dependencies and merge order

None. Base: origin/main at 2fb07d94c245f71ac6508fe12ebbe416118a3eba.

Focused validation

  • Red contract check failed on the old hash-suffixed keys.
  • .github/scripts/test-acr-publish-workflow.sh passes after the change.
  • actionlint v1.7.8 passes for ploy-ci.yml, acr-publish.yml, and ci.yml.
  • git diff --check passes.
  • Exact agent-worktree-preflight.sh currently exits 141 at its pre-existing git worktree list --porcelain | awk ... exit pipeline under pipefail; running the same check without the early pipe close returns verdict=ok for this worktree and ownership record.
  • add-rust-environment-hash-key remains at the action's documented default true. It is not written explicitly because this repository's pinned actionlint metadata rejects that otherwise valid action input.

Rollout and rollback

No production runtime mutation. After merge, observe the next lockfile-changing main run: the cache may restore by the stable Rust-environment prefix while still saving under the action-computed full lockfile key. Rollback is a revert of this PR.

Scope exception

None.

Summary by CodeRabbit

  • Bug Fixes

    • Improved build-cache consistency across continuous integration, publishing, and deployment workflows.
    • Prevented redundant dependency-lockfile hashing, helping cache restores remain stable and efficient.
  • Tests

    • Enhanced workflow validation to verify required paths and consistent cache-key configuration across automated build processes.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 893d915f-a61f-4cc9-bc7b-a9315d746280

📥 Commits

Reviewing files that changed from the base of the PR and between fd22f93 and 7cbb344.

📒 Files selected for processing (5)
  • .github/scripts/test-acr-publish-workflow.sh
  • .github/workflows/acr-publish.yml
  • .github/workflows/ci.yml
  • .github/workflows/ploy-ci.yml
  • agent-worktree.yml

📝 Walkthrough

Walkthrough

The change removes redundant Cargo.lock hashing from Rust cache keys in three workflows. The ACR workflow contract test now validates stable cache keys and rejects duplicate lockfile hashing. Worktree metadata now targets the cache-prefix task.

Changes

Rust cache stabilization

Layer / File(s) Summary
Update Rust workflow cache keys
.github/workflows/acr-publish.yml, .github/workflows/ci.yml, .github/workflows/ploy-ci.yml
Rust cache keys now use Rust and sccache versions without Cargo.lock hashes.
Validate cache key contracts
.github/scripts/test-acr-publish-workflow.sh, agent-worktree.yml
The contract test validates cache keys across the ACR, deploy, and CI workflows. Worktree metadata now targets the Rust cache-prefix task and its permitted files.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: preserving Rust cache restore prefixes.
Description check ✅ Passed The description includes all required sections and provides the change rationale, validation results, scope, rollout, and rollback details.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/rust-cache-restore-prefix

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

Comment @coderabbitai help to get the list of available commands.

@proerror77
proerror77 force-pushed the codex/rust-cache-restore-prefix branch from 5ebcda4 to 7cbb344 Compare August 10, 2026 13:05
@proerror77
proerror77 enabled auto-merge (squash) August 10, 2026 13:09
@proerror77
proerror77 merged commit 5449753 into main Aug 10, 2026
47 checks passed
@proerror77
proerror77 deleted the codex/rust-cache-restore-prefix branch August 10, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant