Repository navigation
refactor(guest): share Linux no-replace publication fallback - #637
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. Reviewed September 23, 2026, 7:55 AM ET / 11:55 UTC (Revision 2). ClawSweeper reviewWhat this changesShares 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 Review scores
Verification
How this fits togetherThe 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]
Before merge
Agent review detailsSecurityNone. Review metrics
Technical reviewBest 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. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
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
renameat2is 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 checkpasses 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.