Repository navigation
fix(ci): recognize recorded mirror generations after inode reuse - #160192
vincentkoc wants to merge 1 commit into
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 maintainer review before merge. Reviewed September 28, 2026, 2:23 AM ET / 06:23 UTC. ClawSweeper reviewWhat this changesThe PR changes Crabbox source-mirror recovery to retire an old disposal record when a verified successor reuses its slot inode, and adds four filesystem regression cases. Merge readiness✅ Ready for maintainer review Current main still uses inode identity before checking the recorded mirror generation, so this PR addresses a distinct remaining recovery defect. The focused change and regression scenarios show no actionable introduced bug. Priority: P2 Review scores
Verification
How this fits togetherCrabbox prepares source copies for remote tests and reuses private mirror slots between runs. After an interrupted disposal, staging recovery reads the slot, receipt, and disposal record to decide what can be removed without disturbing a later allocation. flowchart LR
A[Source checkout] --> B[Mirror allocation]
B --> C[Slot and receipt]
C --> D[Interrupted disposal]
D --> E[Recovery under allocation lock]
E --> F{Verified successor?}
F -->|Yes| G[Retire old record]
F -->|No| H[Check old slot identity]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +62, Other -2. Total +60 across 2 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep generation-aware cleanup in the staging recovery owner while preserving receipt validation, the allocation lock, and refusal of unknown or same-generation replacements. Do we have a high-confidence way to reproduce the issue? Yes. The added fixture preserves an actual old slot inode, reallocates it with a production-generated successor receipt, and invokes the staging recovery wrapper; the PR reports baseline failure and patched success, though this read-only review did not rerun it. Is this the best way to solve the issue? Yes. Checking the recorded generation under the existing allocation lock addresses inode reuse while retaining identity checks for the old generation and refusals for unknown replacements. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3b8ed47b09e6. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Related: #160010
Source-mirror recovery treated a directory inode as a generation ID. If the filesystem reused that inode after disposal, a valid successor was mistaken for the old slot and recovery refused to retire the old disposal record.
Under the existing allocation lock, recovery now validates the recorded generation first. A valid successor preserves its slot, contents and lock while only the exact old disposal record is removed. Same-generation disposal still requires the original identity; unknown replacements retain the existing refusals. Production +7/-9; tests +62/-0.
Validation at
080d21c85a1f6e3ac5fd7ce5d77404e537e2d1cc: deterministic real-filesystem regression failed all four receipt/lock combinations against the original source and passed with this change. All 13 relevant recovery/replacement tests passed (22.61 s wrapper); scripts typechecking, production typed lint, formatting and whitespace passed. Complete bounded Testbox comparison took 58.64 s. A fresh P0–P2 review found no actionable defect.The fixture retains and reallocates the actual empty inode; the production allocator generates the new ID and receipt. It also holds a real SQLite slot lock during successor recovery. No production receipt, success response, or filesystem identity is mocked.