Repository navigation
fix(update): preserve replaced clone directories - #147544
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: blocked before merge. Reviewed September 18, 2026, 10:05 PM ET / September 19, 2026, 02:05 UTC (Revision 6). ClawSweeper reviewWhat this changesThe updater preserves clone directories replaced during validation and removes inherited Gateway process markers from native recovery commands while retaining service selectors. Merge readiness⛔ Blocked before merge - 3 items remain This remains useful work: current main and the latest release lack the directory protections. The latest commit addresses the recovery failure observed during validation, but complete recovery qualification remains pending. Maintainer authorship and the protected label also preclude cleanup closure. Priority: P2 Review scores
Verification
How this fits togetherWhen switching to a source installation, the updater validates a staged Git clone before publishing it. Failed updates use the retained installation and native service commands to recover the previous Gateway. flowchart TD
A[Source update request] --> B[Stage Git clone]
B --> C[Validate candidate]
C --> D{Directory identities match}
D -->|Yes| E[Publish checkout]
D -->|No| F[Preserve replacement and refuse]
F --> G[Recover previous Gateway]
G --> H[Verify service readiness]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +36, Tests +63, Docs +4. Total +103 across 5 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep ownership checks in the clone transaction and reuse the native-command sanitizer, with published-driver upgrade evidence establishing successful publication and healthy recovery after refusal. Do we have a high-confidence way to reproduce the issue? Yes, from source: replacing the staged directory during validation reaches current main's unconditional recursive cleanup; the added regression exercises that boundary. This review did not execute the scenario. Is this the best way to solve the issue? Yes, the patch extends the existing transaction and reuses the existing environment sanitizer without adding competing owners; full update recovery qualification remains necessary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9904ad65e096. 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 (5 earlier review cycles)
|
f64b19c to
c697923
Compare
|
Merged via squash.
|
* fix(update): preserve replaced clone directories * fix(update): keep native recovery commands outside service identity --------- Co-authored-by: Jason (Json) <[email protected]>
Related: #144836. Prerequisite for #147562.
What Problem This Solves
A clone destination or staging directory replaced during update validation could be overwritten or recursively removed. Refusing publication also exposed a macOS recovery failure after the previous Gateway had stopped.
User Impact
The clone transaction checks retained directory identities before publication and cleanup, preserving replacements observed at those boundaries. Native recovery commands retain the intended service selectors without inheriting Gateway process-membership markers.
Why This Change Was Made
Keep clone ownership checks in the existing transaction and reuse the updater's existing marker sanitizer for external native commands. Contributor ancestry from @RomneyDa is preserved. This does not claim atomic compare-and-delete protection against arbitrary concurrent filesystem mutations.
Evidence