Repository navigation
fix(update): avoid false migration refusals on older upgrades - #190179
Conversation
Preserve the installed updater's SQLite WAL family during initial plugin cohort discovery before Doctor admits its capture. Keep the native journal recheck at configuration publication. Co-authored-by: steipete <[email protected]>
|
Codex review: blocked before merge. What this changesThis PR preserves SQLite files during initial plugin recovery discovery so older updaters do not falsely refuse migration. Example: The installed 2026.9.36 updater invokes the candidate Doctor.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenanceRegression provenance — verified: source commit Merge readiness⛔ Blocked before merge - 1 item remains This PR provides a focused repair for a current upgrade failure, with no introduced defects found; maintainers should consolidate it with the equivalent open repair at #190176. Priority: P1 Decision needed
Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe candidate Doctor reads the updater's recovery journal before database admission; later configuration publication rereads current journal rows and checks live ownership before recording changes. flowchart TD
A[Installed updater capture] --> B[Candidate Doctor]
B --> C[Artifact preserving journal reader]
C --> D[Database capture admission]
D --> E[Doctor repairs]
E --> F[Current journal and ownership checks]
F --> G[Configuration publication]
Technical reviewBest possible solution: Land one equivalent repair using the existing artifact-preserving reader while retaining fresh publication checks and the physical-generation regression. Do we have a high-confidence way to reproduce the issue? Current source opens the live SQLite database before Doctor admission, and the linked sibling records a failing published-2026.10.9 upgrade; this read-only review ran no target code. Is this the best way to solve the issue? The change is the smallest complete repair: reuse the existing snapshot reader for discovery without weakening migration attribution or later publication authority. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a93c259fda08. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource 0, Tests +19, Docs +4, Other +2. Total +25 across 4 files. Added test files: 0. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
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 November 1, 2026, 4:10 AM ET / 09:10 UTC. |
|
Merged via squash.
|
|
🦞👀 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. |
…aw#190179) Preserve the installed updater's SQLite WAL family during initial plugin cohort discovery before Doctor admits its capture. Keep the native journal recheck at configuration publication. Co-authored-by: steipete <[email protected]>
Related: #188978
What Problem This Solves
An update driven by released 2026.9.36 can fail in the installed candidate Doctor with
SQLite migration source changed after update capture, then leave the older updater unable to finish reporting.User Impact
Doctor setup preserves the older updater's physical SQLite capture, so a recovery-journal lookup cannot itself cause a false migration refusal.
Why This Change Was Made
Initial plugin-cohort discovery now uses the existing artifact-preserving reader before Doctor admits the capture. The fresh native journal read and live ownership checks at configuration publication remain in place. This uses the existing snapshot owner and its inspection-copy cost.
Evidence
Real published 2026.9.36 → pinned main
ba1f8c05821a: candidate canary Doctor passed; installed Doctor failed on capture attribution. The base updater then reached its unchanged 1,500-second command timeout without final JSON. Configured-plugin and legacy-state flows independently reproduced the same Doctor failure.New owning-boundary regression is RED on pinned production because discovery changes the captured physical SQLite generation before the callback; the identical test is GREEN with this change.
All 36 cohort/attribution tests pass, including real-write, same-content-commit and replaced-file refusal controls. Scoped production/test types, type-aware lint, default formatter parity, docs listing and diff checks pass.
Full canonical package from
61e79b266b8dpassed inventory and import-integrity checks with 391 declarations. All three fresh published 2026.9.36 upgrades to this exact package PASS: base, configured plugins, and legacy operator state. Each recorded update success, exact build replacement, state survival and Gateway probes/status. The legacy flow also passed cron ownership, agent turn, plugin/UI, no-op update and backup/rollback checks.Fresh independent shared Codex autoreview of the final local diff against
ba1f8c05821a, P0–P2: complete/scoped-clean, no findings. The reviewed file bytes match commit61e79b266b8d.The exact +19 test-line allocation covers this raw SQLite capture regression; the shared ceiling is unchanged.
Exact-head CI run 41290862424, attempt 1, is successful on
61e79b266b8d: 58 successful checks, 65 planned skips and one neutral result, with no pending or failed checks; the enforced aggregate also passed.Canonical repair for the authorized update-reliability campaign: this PR. Hosted review found no introduced defects and identified the equivalent human-owned #190176. This bot-authored PR carries the campaign's full three-flow extended-stable replay, independent review and fully green exact-head CI. The production repair is equivalent; the requested steipete co-author credit is preserved, and the sibling's branch remains untouched.