Skip to content

refactor(guest): share Linux no-replace publication fallback - #637

Merged
steipete merged 1 commit into
mainfrom
codex/guest-link-fallback-owner-20260923
Sep 23, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/guest-link-fallback-owner-20260923

Conversation

@steipete

@steipete steipete commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The guest no-replace rename fragment maintains the same descriptor-relative Linux hardlink fallback in two branches.

User Impact

No intended behavior change. Linux still falls back only when renameat2 is missing or reports an unsupported operation. Existing destinations remain protected, and macOS and terminal errors keep their existing behavior.

Why This Change Was Made

Route both eligible Linux cases to one hardlink operation, removing eight production lines without adding a helper or changing the standalone fragment's imports. Preserve syscall arguments, source-entry retention, and caller-owned cleanup.

Evidence

All 98 focused guest tests pass on macOS. Linux pnpm check passes 15,779 tests with 621 skips; matching native builds, both package smokes, and API checks pass. Installed Node/Bun consumers pass 72 complete guest operations and 24 standalone-fragment calls. Another 1,433 mocked scenarios preserve exact external call traces and errors. Lints, whitespace checks, and independent P2 review pass.

A single fixed 6,000-call comparison on a 16-vCPU AWS Linux guest using tmpfs found paired order-group changes from -1.55% to +1.23%, below its predefined material-regression gate. Independent recomputation verified every result. This measures Python startup plus guest-operation cost, not disk durability throughput; some individual-call maxima increased, so no speedup or equal-tail claim is made.

  • Tests added or updated when behavior changed
  • Security and compatibility impact considered
  • Changelog assessed: internal consolidation with unchanged public behavior
  • No credentials, private paths, private hosts, or sensitive contents included

@steipete
steipete requested a review from a team as a code owner September 23, 2026 11:40
@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 23, 2026
@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed September 23, 2026, 7:55 AM ET / 11:55 UTC (Revision 2).

ClawSweeper review

What this changes

Shares the Python guest’s Linux hardlink fallback between missing and unsupported native rename cases, with expanded error-path tests.

Merge readiness

⛔ Blocked before merge - 2 items remain

The focused consolidation remains useful and has no identified correctness defect. Updated Linux validation claims improve the evidence, but the previously requested fallback qualification transcript remains outstanding.

Priority: P3
Reviewed head: 025fe7edfb4c870ab3d51022d0342881e5426a75

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and appears correct; reported Linux execution improves confidence, but observable fallback results are still needed.
Proof confidence 🦐 gold shrimp (3/6) Needs stronger real behavior proof before merge: The updated body reports installed Linux Node/Bun runs through the guest program and standalone fragment, but does not show which calls reached the shared hardlink fallback or their destination-preservation and cleanup observations. The previous qualification-transcript request remains unresolved. No stored-data contract changes. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: The updated body reports installed Linux Node/Bun runs through the guest program and standalone fragment, but does not show which calls reached the shared hardlink fallback or their destination-preservation and cleanup observations. The previous qualification-transcript request remains unresolved. No stored-data contract changes. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 7 items Introduced control flow preserves existing behavior: The pinned diff consolidates two identical hardlink calls. Native success returns immediately; only Linux missing-function or unsupported-error cases reach the shared fallback. Syscall flags, directory descriptors, no-follow behavior, source retention, and terminal errors remain equivalent.
Documented boundary and unchanged callers: The standalone fragment requires caller-admitted descriptors and names and leaves Linux fallback source cleanup to its caller. Exclusive create retains post-publication inode verification and descriptor-relative cleanup. No authorization, exported signature, default, or persisted-format contract changes.
Focused regression coverage: Fallback-success coverage expands from two to five parameter cases; four additional cases reject fallback after Linux terminal errors or macOS failures. Existing tests cover destination races, payload preservation, link-count cleanup, and staging cleanup. The helper executes the exported Python program against temporary files with injected ctypes behavior; tests were inspected, not executed.
Findings None None.
Security None None.

How this fits together

The guest module exports Python source for filesystem operations inside Linux and macOS guests. Its publication fragment receives caller-admitted directory descriptors and names, then publishes without replacing an existing destination.

flowchart TD
 A[Admitted directories and names] --> B[Guest publication fragment]
 B --> C[Native no-replace rename]
 C -->|Success| D[Published destination]
 C -->|Linux missing or unsupported| E[Descriptor-relative hardlink]
 C -->|Other failure| F[Return error]
 E --> D
 D --> G[Caller identity checks and cleanup]
Loading

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: The updated body reports installed Linux Node/Bun runs through the guest program and standalone fragment, but does not show which calls reached the shared hardlink fallback or their destination-preservation and cleanup observations. The previous qualification-transcript request remains unresolved. No stored-data contract changes. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Complete next step (P2) - Attach after-change Linux qualification output showing missing/unsupported native rename reaching the fallback, preserved existing destinations, and caller cleanup. Terminal output or redacted logs count; screenshots or recordings are welcome when they show these observations. Redact credentials, private paths, IP addresses, and endpoints. Updating the PR body should trigger re-review; otherwise ask a maintainer to comment @clawsweeper re-review.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test delta Production +23/-31, net -8; tests +37/-2, net +35 The consolidation removes duplication and adds seven parameterized cases without growing production code.

Technical review

Best possible solution:

Maintain one Linux fallback while preserving no-replace publication, source retention, terminal errors, and caller-owned cleanup.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this PR removes source duplication rather than reporting broken behavior; inspection found no introduced failing path.

Is this the best way to solve the issue?

Yes: consolidating the identical fallback in its existing owner is narrow and preserves imports, public signatures, and caller responsibilities.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 02893a7bd455.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.

Label justifications:

  • P3: This is bounded internal cleanup with no intended public behavior change or reported urgent failure.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The updated body reports installed Linux Node/Bun runs through the guest program and standalone fragment, but does not show which calls reached the shared hardlink fallback or their destination-preservation and cleanup observations. The previous qualification-transcript request remains unresolved. No stored-data contract changes. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Introduced control flow preserves existing behavior: The pinned diff consolidates two identical hardlink calls. Native success returns immediately; only Linux missing-function or unsupported-error cases reach the shared fallback. Syscall flags, directory descriptors, no-follow behavior, source retention, and terminal errors remain equivalent. (src/guest-native-python.ts:34, 025fe7edfb4c)
  • Documented boundary and unchanged callers: The standalone fragment requires caller-admitted descriptors and names and leaves Linux fallback source cleanup to its caller. Exclusive create retains post-publication inode verification and descriptor-relative cleanup. No authorization, exported signature, default, or persisted-format contract changes. (docs/guest.md:36, 025fe7edfb4c)
  • Focused regression coverage: Fallback-success coverage expands from two to five parameter cases; four additional cases reject fallback after Linux terminal errors or macOS failures. Existing tests cover destination races, payload preservation, link-count cleanup, and staging cleanup. The helper executes the exported Python program against temporary files with injected ctypes behavior; tests were inspected, not executed. (test/guest-filesystem-publication.test.ts:65, 025fe7edfb4c)
  • Updated proof and previous review continuity: The complete supplied body, captured under sourceRevision 077a626346757ad1ef02e4b2222cdb93e9ee70385f6cfabe92c6c4efbf59d727, now reports 72 installed Node/Bun guest operations, 24 standalone-fragment calls, and a Linux tmpfs comparison. The live body matched. These are positive execution claims, but no transcript or artifact identifies fallback activation and observed collision preservation/source cleanup. The previous review at the same head requested that exact qualification evidence; discussion adds no such artifact. (025fe7edfb4c)
  • Consolidation remains absent from main and release: Both pinned main and latest release v0.18.2 retain the duplicated fallback bodies. The merged guest-engine PR feat(guest): share the Python guest filesystem engine #333 establishes the existing feature, not this consolidation. (src/guest-native-python.ts:34, ce8b64f3d697)
  • Merged feature history supports routing: Blame maps the retained function declaration to aad0142. Raw commit inspection records parent 31d2a93; comparing those trees shows the source file was added. GitHub verifies the associated guest-engine PR as merged. A deeper test-history traversal encountered an unavailable historical object; central source history was independently readable. (src/guest-native-python.ts:35, aad0142f5030)

Likely related people:

  • Peter Steinberger: Raw commit aad0142 adds src/guest-native-python.ts:35 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: aad0142f5030; files: src/guest-native-python.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Attach the reported Linux installed-package qualification transcript showing both fallback entry cases, existing-destination preservation, and source/staging cleanup.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-23T11:44:49.874Z sha 025fe7e :: needs real behavior proof before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Sep 23, 2026
@steipete
steipete merged commit 4d09ac1 into main Sep 23, 2026
39 checks passed
@vincentkoc
vincentkoc deleted the codex/guest-link-fallback-owner-20260923 branch September 25, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant