8000 fix: Do not fabricate missing read-only patch sources by gominimal-aw-bot[bot] · Pull Request #1540 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix: Do not fabricate missing read-only patch sources - #1540

Merged
norrietaylor merged 1 commit into
mainfrom
inbox-patch/fix/ro-patch-mapping-create-if-missing-7d4cc0cc03cd60b2
Sep 18, 2026
Merged

norrietaylor merged 1 commit into
mainfrom
inbox-patch/fix/ro-patch-mapping-create-if-missing-7d4cc0cc03cd60b2

Conversation

@gominimal-aw-bot
@gominimal-aw-bot gominimal-aw-bot Bot commented Sep 18, 2026 •
Copy link
Copy Markdown
Contributor

Routing-Key: inbox-route/I_kwDOSUhdos8AAAABR5q2SQ

Read-only patch mappings consume a source that must already exist, but to_fs_mappings set create_if_missing unconditionally, so a missing ro path was silently created as an empty directory and the task ran against nothing, exiting 0. Derive the flag from the mapping mode: false for ro, true for rw. sandbox2 already errors when create_if_missing is false, so a missing ro source now fails at spawn naming the host path.

Verification

cargo fmt --all --check --manifest-path target/Cargo.toml — ok
cargo clippy --workspace --locked --manifest-path target/Cargo.toml -- -D warnings — ok
cargo build --workspace --locked --manifest-path target/Cargo.toml — ok
cargo test --workspace --locked --manifest-path target/Cargo.toml — ok (2 pre-existing checkouts failures on unmodified main: git clone collisions in /tmp)
cargo test -p mfile — 65 passed, 0 failed (includes new to_fs_mappings_derives_create_if_missing_from_the_mode)

Summary by CodeRabbit

  • Bug Fixes
    • Read-only file and directory mappings no longer create missing paths.
    • Read-write mappings continue to create missing paths when needed.
    • Added regression coverage for both file and directory mapping scenarios.

Read-only patch mappings consume a source that must already exist, but
to_fs_mappings set create_if_missing unconditionally, so a missing ro
path was silently created as an empty directory and the task ran against
nothing, exiting 0. Derive the flag from the mapping mode: false for ro,
true for rw. sandbox2 already errors when create_if_missing is false, so
a missing ro source now fails at spawn naming the host path.
@gominimal-aw-bot
gominimal-aw-bot Bot requested a review from a team as a code owner September 18, 2026 07:34
@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 Sep 18, 2026
@coderabbitai
coderabbitai Bot commented Sep 18, 2026 •
Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Essentials

Run ID: fb6cde78-904d-42b7-b3af-e456bb593db4

📥 Commits

Reviewing files that changed from the base of the PR and between cb384e3 and 3e11d1c.

📒 Files selected for processing (1)
  • crates/mfile/src/lib.rs

Included review availability: 2 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


📝 Walkthrough

Walkthrough

EnvPatches::to_fs_mappings now creates missing paths only for ReadWrite mappings. Regression tests cover read-only and read-write directory and file mappings.

Changes

Filesystem mapping behavior

Layer / File(s) Summary
Mapping creation settings and regression coverage
crates/mfile/src/lib.rs
create_if_missing is false for read-only mappings and true for read-write mappings. Tests cover both directory and file mappings.

Priority: ⬇️ Low

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

Change: Bug fix

Suggested reviewers: bryan-minimal

Merge Risk: ⚪ Minimal · up to 3e11d

The mapping change correctly distinguishes missing read-only and read-write sources, with coverage for both files and directories.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: preventing missing read-only patch sources from being created. It follows the Conventional Commit format, although the summary uses an initia…
Description check ✅ Passed The description explains the problem, implementation, expected behavior, and verification results. It provides equivalent content for the required Summary and Testing sections. It does not include the…
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 1 files.
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
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

A rabbit checks each mapped path,
Read-only stays untouched at last.
Read-write paths may now appear,
Files and folders behave clear.
Tests hop twice and close the case.

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

@gominimal-aw-bot gominimal-aw-bot Bot added the agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch label Sep 18, 2026
@norrietaylor norrietaylor reopened this Sep 18, 2026
@norrietaylor
norrietaylor enabled auto-merge (squash) September 18, 2026 21:11
@norrietaylor
norrietaylor merged commit fbef9a6 into main Sep 18, 2026
62 checks passed
@norrietaylor
norrietaylor deleted the inbox-patch/fix/ro-patch-mapping-create-if-missing-7d4cc0cc03cd60b2 branch September 18, 2026 21:21
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0