Repository navigation
fix: retire cancelled SQLite snapshot copies - #185443
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR makes cancelled SQLite copy children use their surviving owner's allocated directory so cleanup can retire it safely. Example: A SQLite inspection is cancelled after its native copy child starts staging files.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR repairs a concrete snapshot ownership failure still present on main. No actionable introduced defect was found; the failed UI visibility check remains unattributed. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherSQLite inspection callers request private snapshots through the staging owner, which allocates token-protected directories, supervises native copy children, and retires their files after readers and children finish. flowchart TD
A[SQLite inspection caller] --> B[Snapshot staging owner]
B --> C[Surviving token session]
B --> D[Native copy child]
E[Source SQLite database] --> D
D --> F[Owner allocated private snapshot]
C --> F
B --> G[Joined cleanup and retirement]
Technical reviewBest possible solution: Keep directory and token retirement with the existing surviving owner while copy children manage only their payload files. Do we have a high-confidence way to reproduce the issue? The base source shows the nested allocation and token-retirement mismatch, and the PR records a deterministic real-process base failure; no target code was executed during this review. Is this the best way to solve the issue? The patch fixes the allocation producer using existing lifecycle owners, preserves direct-worker contracts, and retains bounded retry and cleanup-error behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e5aa4489f728. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +73, Tests +107. Total +180 across 11 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 27, 2026, 12:37 AM ET / 04:37 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
What Problem This Solves
Fixes snapshot-cleanup failures when a SQLite read is cancelled while its native child is preparing a private copy.
User Impact
Cancelled reads retire their private snapshots without leaving an unretirable directory or surfacing an unknown-token cleanup error. The source database stays untouched.
Why This Change Was Made
The native copy child created another staging directory beneath the surviving staging owner’s tokenized directory. Killing that child between directory creation and token creation left a nested directory the owner could not safely retire. The child now fills the directory the surviving owner already allocated. Failed copy attempts discard only their known payload files before a retry; directory and token retirement stay with the existing owner.
Direct snapshot modes, cancellation deadlines, SIGKILL behavior, source-family validation, and reader fences retain their existing contracts. No configuration, schema, or migration change is required.
Evidence
Claude native session catalog > shows catalog header affordances only for hover or keyboard-visible focusin mocked shard 2/7. That exact test also fails on completed scheduled main run 40445322734. The tested merge leaves the mocked UI and harness trees unchanged. Landing uses the native inherited-failure route; CI remains failed.Changed-file LOC: production 2,854 → 2,927 (+73); tests 1,901 → 2,008 (+107). The added runtime code makes the existing ownership distinction explicit; the regression drives the real worker boundary without a production test seam.
Found while validating #185369. No CI runtime reduction is claimed for this correctness repair.