8000 fix(op): fall back to the remote cache for patched-build dependencies by gominimal-aw-bot[bot] · Pull Request #2054 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix(op): fall back to the remote cache for patched-build dependencies - #2054

Merged
norrietaylor merged 5 commits into
mainfrom
inbox-patch/fix/patched-build-remote-cache-77515450608e5276
Oct 7, 2026
Merged

norrietaylor merged 5 commits into
mainfrom
inbox-patch/fix/patched-build-remote-cache-77515450608e5276

Conversation

@gominimal-aw-bot
@gominimal-aw-bot gominimal-aw-bot Bot commented Oct 7, 2026 •
Copy link
Copy Markdown
Contributor

Routing-Key: inbox-route/I_kwDOSUhdos8AAAABVcZQJQ

patched-build resolved every dependency only from the local cache and reported a missing dependency with no remote-cache fallback. This gives op::PatchedBuild an optional remote cache: local resolution (by name, then by spec hash) still wins, and only a miss in both local caches falls through to RemoteCache::materialize before the dependency is reported missing.

Callers (mip, minimald) pass their context's remote cache when use_remote_cache() is enabled, honoring the opt-out. The error text now says where to look.

Verification

  • cargo fmt --all --check — passed
  • cargo clippy --workspace --all-targets --locked -- -D warnings — passed
  • cargo test --locked -p op — 35 passed
  • cargo test --locked -p mip — 12 passed
  • cargo test --locked -p minimald — 857 passed; 11 pre-existing failures in privileged network-namespace tests (net::switch, rpc name-surface binding), unrelated to this change

Summary by CodeRabbit

  • New Features
    • Patched builds can now retrieve dependencies from the remote cache when remote caching is enabled.
    • Dependencies already available in the local cache continue to take precedence.
  • Bug Fixes
    • Missing dependencies are now reported when they cannot be found locally or in the remote cache. Remote cache initialization errors are surfaced as build errors.

patched-build resolved every dependency only from the local cache and
reported a missing dependency with no remote-cache fallback. Give
PatchedBuild an optional remote cache: keep local by-name/spec-hash
resolution first, then materialize a miss from the remote cache before
reporting it missing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@gominimal-aw-bot
gominimal-aw-bot Bot requested a review from a team as a code owner October 7, 2026 07:24
@gominimal-aw-bot gominimal-aw-bot Bot added the agent:fix Agentic fix PR eligible for review iteration; min-aw's worker-iterate gates on it. label Oct 7, 2026
@coderabbitai
coderabbitai Bot commented Oct 7, 2026 •
Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

  • Run on-demand review

This review includes 5 billable files and costs up to $1.25.

Or wait 13 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 19fbe6b3-1a8d-4aa8-8d9b-1fea6766ddc7
📥 Commits

Reviewing files that changed from the base of the PR and between a558026 and c2cfdae.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • crates/mctx/src/env.rs
  • crates/minimald/src/env.rs
  • crates/mip/src/cmd_pkg_patched_build.rs
  • crates/op/Cargo.toml
  • crates/op/src/patched.rs
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

The EnvChannel patched-pkg path still handed PatchedBuild no remote cache,
so it kept the local-only behaviour this PR removes for mip and minimald.
Honour use_remote_cache() there too.
@norrietaylor norrietaylor changed the title fix: Fall back to remote cache for patched-build dependencies fix(op): fall back to the remote cache for patched-build dependencies Oct 7, 2026
@norrietaylor
Copy link
Copy Markdown
Member

/review

@minimal-foundry
minimal-foundry Bot commented Oct 7, 2026 •
Copy link
Copy Markdown
Contributor

Approved: no findings at c2cfdaecb8fd.

Nothing to do.

Clobber: none: git log -5 -- crates/op/src/patched.rs shows the three commits are this feature's own progression, no revert of unrelated work.

…ence

A dependency absent from the remote cache is an expected miss already named
in the final error, so only warn on real fetch failures. Assert that a
remote-resolved dependency lands in the local cache as fetched, and test
that local builds win over remote-cache entries.
@norrietaylor
Copy link
Copy Markdown
Member

/review

@gominimal-aw-bot gominimal-aw-bot Bot added the agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch label Oct 7, 2026
@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

minimal-review — advisory review

Verdict COMMENT — 1 finding, 1 inline.

Comment thread crates/op/src/patched.rs Resolved
@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

minimal-review — advisory review

Verdict COMMENT — 2 findings, 2 inline.

Comment thread crates/op/src/patched.rs Resolved
Comment thread crates/op/src/patched.rs Resolved
A dependency the remote index lists but that cannot be fetched or verified
is not absent, so name it under its own 'could not fetch' clause with the
error instead of folding it into 'could not find'.
@norrietaylor
Copy link
Copy Markdown
Member

/review

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

minimal-review — approved

Verdict APPROVE — No findings.

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 7, 2026
@norrietaylor
norrietaylor added this pull request to the merge queue Oct 7, 2026
Merged via the queue into main with commit 5e84271 Oct 7, 2026
37 checks passed
@norrietaylor
norrietaylor deleted the inbox-patch/fix/patched-build-remote-cache-77515450608e5276 branch October 7, 2026 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:fix Agentic fix PR eligible for review iteration; min-aw's worker-iterate gates on it. agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0