Repository navigation
fix(update): preserve successful startup writes for the next Doctor - #200260
Conversation
Record the existing activated-Gateway boot attribution on success as well as failure. Preserve refusal of changes that predate the boot window. Co-authored-by: RomneyDa <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Backport the successful-boot attribution fix from PR #200260. Adapt the existing boot-write adoption helper and its settlement call from #198268, without the unrelated canary-runtime changes. Canonical fix: 533a0fa. Helper provenance: e4a3093. Co-authored-by: RomneyDa <[email protected]>
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesRecord successful activated-Gateway startup writes so the next Doctor accepts them while preserving rejection of changes made before startup. Example: An update's successful startup probe initializes credentials.sqlite before a second Doctor runs.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep this PR open: it repairs a current update failure through the existing attribution owner, and no introduced correctness defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe update driver tracks captured database generations across Doctor and Gateway startup, passing accepted postimages to subsequent migration and rollback operations. flowchart TD
A[Captured database generations] --> B[First Doctor]
B --> C[Compare preboot generations]
C --> D[Activated Gateway startup]
D --> E[Record attributable postimage]
E --> F[Next Doctor]
E --> G[Rollback on failure]
Technical reviewBest possible solution: Use the existing boot-attribution owner for both startup outcomes while retaining its preboot generation check and sticky restoration refusals. Do we have a high-confidence way to reproduce the issue? The current-main condition leaves successful boot writes unattributed, and the next migration compares against that stale generation; the supplied recovery account and reported red/green SQLite regression support this path, but this review executed no target code. Is this the best way to solve the issue? This is the smallest complete production fix: remove the outcome restriction at the existing owner and retain two distinct acceptance/refusal regressions without adding state or another policy layer. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6a6007663b36. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource 0, Tests +56, Other +2. Total +58 across 3 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes: No label 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 16, 2026, 4:35 PM ET / 21:35 UTC. |
|
Merged via squash auto-merge.
|
Backport #200063, #200208, #200247, #200260 and #190065 to 2026.10.33. Preserve canonical source credit and maintenance-branch contracts. All selected exact-head checks passed except the inherited Docker plugin API mismatch; aggregate ci-gate reports that same cause. Landing authorized with this attributed pre-existing failure. Co-authored-by: Ayaan Zaidi <[email protected]> Co-authored-by: miguelbranco80 <[email protected]> Co-authored-by: Shakker <[email protected]> Co-authored-by: RomneyDa <[email protected]>
Merge current main, retaining successful-boot write attribution from #200260. Resolve the shared test imports and assert that pre-admission changes still migrate while disabling stale rollback. Co-authored-by: RomneyDa <[email protected]>
…penclaw#200260) Record the existing activated-Gateway boot attribution on success as well as failure. Preserve refusal of changes that predate the boot window. Co-authored-by: RomneyDa <[email protected]>
Related: #198268
What Problem This Solves
Fixes a subsequent update failing with
SQLite migration source changed after update capture: credentials.sqliteafter the activated Gateway startup check succeeds.User Impact
Updates can proceed through the second Doctor after their own successful startup probe initializes credential state. Unrelated changes made before that probe still cause migration to refuse. No schema, permission, or global integrity-policy changes.
Why This Change Was Made
The existing boot-write attribution from #198268 only records writes when startup fails. The same probe can legitimately initialize credential receipts and device identity on success. Extend that existing owner to record either outcome, retaining the pre-boot generation comparison and the existing accepted boot-window concurrency tradeoff.
Evidence
Full installed-package recovery proof
The release adaptation at
ee283073849efe6bd080fef53328a3a3ec72a6bfpasses the realpackage-publication-recoveryflow in isolated rootless Podman: published[email protected]→ authentic publication interruption → public repair → repeated repair → distinct next update (2026.11.6-first-hop.0). All assertions pass, including retained package bytes and authored settings. The rebuilt candidate tarball passes the canonical package integrity check; SHA25684d5c376381401786a597d62b9cab8e0d89353dbbbd493d47f1cebdef263c8f2. Full next-update result isstatus: ok, exit 0. This complements the main-branch regression tests; it does not claim main and release source are byte-identical. No integrity guard was disabled.