Repository navigation
fix: preserve updates after read-only SQLite probes - #182032
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. |
50e8022 to
d6fbcaa
Compare
|
Codex review: blocked before merge. What this changesThis PR lets candidate Doctor recognize an empty SQLite WAL index appearing or disappearing without changing the installed updater’s fingerprint format. Example: A captured WAL database contains retained.value = 7, and a read-only probe creates an empty shared-memory index before migration.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep this useful maintainer-authored repair open: current main still rejects harmless empty WAL-index transitions, and no concrete introduced correctness defect was found. Priority: P1 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe updater captures database generations, candidate Doctor checks them before migrations, and migration receipts let the updater distinguish owned changes from unrelated writes. flowchart TD
A[Installed updater capture] --> B[Recorded database fingerprint]
B --> C[Candidate Doctor admission]
D[Current SQLite family] --> E[Shared generation owner]
E --> C
C --> F[Exclusive migration]
F --> G[Write receipt and rollback checks]
Technical reviewBest possible solution: Keep equivalence recognition in the existing generation owner while preserving legacy fingerprints, strict exclusive custody, and migration receipts. Do we have a high-confidence way to reproduce the issue? Current-main hashing distinguishes absent and zero-write WAL indexes, and migration admission requires exact equality; the supplied real-SQLite regression fixtures exercise both transitions, but no target code was run during this review. Is this the best way to solve the issue? The patch is a focused repair: it shares the existing observation implementation, accepts only the evidenced empty-index equivalence, and leaves exclusive reads and post-migration checks strict. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 24adbb81e0a3. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +40, Tests +104, Docs +7. Total +151 across 4 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 23, 2026, 8:35 PM ET / October 24, 2026, 00:35 UTC. |
|
The requested upgrade proof is complete on Keeping the small exclusive-mode spy assertion: it guards the specific prohibition on opening and closing a raw source file descriptor while SQLite owns POSIX locks. A successful The three UI failures were separately reproduced with the same selectors on unchanged base @clawsweeper re-review |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
What Problem This Solves
Fixes updates from published stable stopping in post-activation Doctor with
SQLite migration source changed after update capture.after a read-only SQLite probe, even though the captured database contents are unchanged.User Impact
Read-only probes no longer prevent the candidate from migrating preserved SQLite state. Changed database contents or write evidence still refuse migration and automatic restoration. This is a candidate-side repair, so an older installed updater can benefit without a new handoff protocol.
Why This Change Was Made
Opening a cold WAL database can create a zero-write shared-memory index; closing its last writable reader can remove it. The candidate now recognizes only those two equivalent observations, bound to the same file identity and committed content, before acquiring native exclusion. Legacy fingerprints stay byte-for-byte compatible, and exclusive handles, postimages, and native close keep their strict checks.
Evidence
The two real SQLite regressions fail on unchanged main and exercise migration plus close attribution with the fix. Additional checks cover retained exclusive custody and reject outside commits, including a write followed by restoration of the original value. The migration suite passes all 12 tests; the generation suite passes all 21 tests. Core and infra-test typechecks and independent review are clean.
The real published 2026.10.6 updater now completes against the packed candidate in an isolated npm prefix: exit 0, durable run status
succeeded, all three agents migrate from schema 25 to 32 and shared state from 20 to 31, and memory/cache table hashes remain identical. The replay restores the failed run’s stable pre-activation backup; isolated paths and update-ledger rows differ. The latest published stable has no PostgreSQL state support, so this is a stable-created SQLite upgrade.All three final-head PostgreSQL CI shards actually ran and passed (1,143 tests, 37 existing skips); local shards 1 and 2 also passed. CI run 40044349319 has three unrelated UI failures, each reproduced with the same test and selector on unchanged base
a69cf566: directory-race folder navigation, downloads second-file selection, and file-link “Show in Files” filter selection. The update-only diff does not change their inputs. These remain recorded as inherited failures.Release-note context: the next candidate must contain this repair for updates from 2026.10.6; it fixes the candidate-side migration check while retaining the shipped updater’s fingerprint and handoff protocol.
The shared observation owner adds 40 net production lines; regression coverage adds 104 lines and the update contract adds seven. No protocol, configuration, or schema was added.