Repository navigation
fix(update): name the database when migration attribution refuses - #184399
Conversation
Candidate Doctor refused with 'SQLite migration source changed after update capture.' and a generic 'publication could not be verified' warning, which hid both the database and the cause. The weekly Update Migration matrix (9.34 -> main legacy-operator-state) could not be triaged from its diagnostics.
|
🦞👀 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 adds the database pathname and underlying error to SQLite migration-attribution refusal diagnostics. Example: Candidate Doctor rejects the captured database /srv/openclaw/state/openclaw.sqlite during an update.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR provides a useful, narrowly scoped diagnostic improvement that current main lacks; no actionable correctness or security defect was found. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe update migration-attribution owner checks captured database generations around Doctor migrations and sends refusal details to the update warning and failure-report owners. flowchart TD
A[Installed updater capture] --> B[Candidate Doctor]
B --> C[SQLite migration attribution]
C --> D[Generation mismatch error]
D --> E[Restoration warning]
D --> F[Failure fact redaction]
F --> G[Exported diagnostic]
Technical reviewBest possible solution: Retain the existing attribution owner and refusal behavior while exposing the database and cause through the existing diagnostic pipeline. Do we have a high-confidence way to reproduce the issue? Current-main source directly shows the omitted pathname and discarded cause; the PR also reports the affected published-driver update scenario, but no target code was executed during this review. Is this the best way to solve the issue? The patch is the smallest complete diagnostic repair: both production hunks serve the stated problem and reuse the existing warning, error-formatting, and redaction owners. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 798570bc460f. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +2, Tests 0. Total +2 across 2 files. Added test files: 0. View PR surface stats
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 October 26, 2026, 4:47 AM ET / 08:47 UTC. |
|
Merged via squash.
|
…enclaw#184399) Candidate Doctor refused with 'SQLite migration source changed after update capture.' and a generic 'publication could not be verified' warning, which hid both the database and the cause. The weekly Update Migration matrix (9.34 -> main legacy-operator-state) could not be triaged from its diagnostics.
What Problem This Solves
Fixes: when candidate Doctor refuses migration attribution during
openclaw update, the update report says only that "SQLite migration source changed after update capture" and that "publication could not be verified", without naming the database or the cause.User Impact
Operators and maintainers can see which state database the update could not attribute (for example
state/openclaw.sqlite) and why, both in the Doctor failure fact and in the "Automatic database restoration cannot attribute migration writes" warning. Paths stay subject to the existing support-bundle redaction at egress. No behavior change otherwise.Why This Change Was Made
The weekly Update Migration matrix has failed on the 2026.9.34 (extended-stable) to main
legacy-operator-statecell for two weeks, and itsfailure.jsoncould not say which database refused. With this change the refusal names the database, which identified the shared state database as the one whose generation the 9.33-line updater recorded in its older physical format. The direct-update fix for that is tracked separately.Evidence
src/infra/update-doctor-migration-attribution.test.ts: 12/12 pass locally.legacy-operator-state: the captured Doctor result now readsSQLite migration publication could not be verified: SQLite migration source changed after update capture: <state>/state/openclaw.sqlite(the failure fact shows[redacted-path]).