Skip to content

chore(hermit): share one CARGO_HOME across worktrees - #8250

Merged
wpfleger96 merged 1 commit into
mainfrom
wpfleger/hermit-shared-cargo-home
Oct 10, 2026
Merged

wpfleger96 merged 1 commit into
mainfrom
wpfleger/hermit-shared-cargo-home

Conversation

@wpfleger96

Copy link
Copy Markdown
Member

🤖 Hermit defaults CARGO_HOME to each checkout's .hermit/rust, so every worktree sees dependency sources at a different absolute path. sccache keys Rust compiles on those paths, which means the same dependency built in two worktrees almost never hits the cache. This pins CARGO_HOME to ${HOME}/.cargo in bin/hermit.hcl, the same setting buzz-app already uses.

CI also lines up better: the workflows that activate Hermit and cache ~/.cargo/registry / ~/.cargo/git were caching a directory cargo wasn't using (cargo wrote to $GITHUB_WORKSPACE/.hermit/rust). With this change those cache paths are where cargo actually puts the registry and git checkouts. The MESH_ROOT lookups in _ci-desktop-macos.yml, release.yml, and signed-macos-canary.yml already read ${CARGO_HOME:-$HOME/.cargo}, so they follow either way.

Hermit defaulted CARGO_HOME to each checkout's .hermit/rust, so dependency sources sat at a different absolute path per worktree and sccache could not reuse dependency compiles between them. Pinning it to ${HOME}/.cargo matches buzz-app.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
@wpfleger96
wpfleger96 requested a review from a team as a code owner October 10, 2026 16:43
@wpfleger96
wpfleger96 deployed to codex-review October 10, 2026 16:43 — with GitHub Actions Active
@github-actions github-actions Bot added the codex-security-review-current The posted Codex security review matches its recorded range. label Oct 10, 2026
@github-actions

Copy link
Copy Markdown

🔐 Codex Security Review

Note: This is an automated, security-focused review generated by Codex.
Use it as a supplement to human review; false positives are possible.

Scope

  • Exact PR diff: 326e2301cb4b1edcb8a72d01ac4b19a83545365f...968ef4698bb7f44a0385a8b057cfe06bcda28c5e
  • Model: gpt-6.1-sol

💡 Click "edited" above to see earlier reviews for this PR.


Review Summary

Overall Risk: NONE

The PR sets Hermit's CARGO_HOME to the user's shared Cargo directory. Inspection of the change and its CI consumers found no concrete security, correctness, or reliability issues.

Findings

No concrete security, correctness, or reliability findings were identified.

Notes

  • Review was limited to read-only inspection. Scripts, builds, and tests were not executed.

Generated by Codex Security Review |
Requested by: @wpfleger96 |
Workflow run

@wpfleger96
wpfleger96 enabled auto-merge (squash) October 10, 2026 16:48

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

No blocking findings. Reviewed 968ef4698bb7f44a0385a8b057cfe06bcda28c5e against 326e2301cb4b1edcb8a72d01ac4b19a83545365f. Comment only, not approval.

  • Verified Hermit activation and bin/hermit env CARGO_HOME resolve to $HOME/.cargo at this head. bin/cargo --version and offline cargo metadata --no-deps succeed; the reported target directory remains worktree-local. The setting matches buzz-app, the explicit registry/git cache paths, and the three MESH_ROOT lookups that already honor CARGO_HOME.
  • This intentionally shares Cargo home configuration and credentials as well as dependency downloads; it does not itself select a shared target directory. Existing user-level Cargo settings now apply, which is normal for the chosen standard home.
  • Validation limit: runtime CI jobs were skipped by path selection. I did not run a full build or measure cross-worktree sccache hit rates, so the performance gain is not quantified by this review.

Carl, an automated reviewer, commenting via Wes’s GitHub account.

@wpfleger96
wpfleger96 merged commit 845fc16 into main Oct 10, 2026
36 checks passed
@wpfleger96
wpfleger96 deleted the wpfleger/hermit-shared-cargo-home branch October 10, 2026 16:50

This branch was successfully deployed

1 active deployment
codex-review — 968ef469 Deployed Oct 10, 2026 by wpfleger96 via Run Codex Security Review #7667
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex-security-review-current The posted Codex security review matches its recorded range.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants