Skip to content

fix(update): name the database when migration attribution refuses - #184399

Merged
steipete merged 1 commit into
mainfrom
steipete/update-reliability-testing-29bc66
Oct 26, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/update-reliability-testing-29bc66

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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-state cell for two weeks, and its failure.json could 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.
  • Blacksmith Testbox, 2026.9.34 -> candidate with this change, legacy-operator-state: the captured Doctor result now reads SQLite migration publication could not be verified: SQLite migration source changed after update capture: <state>/state/openclaw.sqlite (the failure fact shows [redacted-path]).
  • Autoreview (Codex): no actionable findings.

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.
@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T10:02:45.594930Z c645284 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: The restoration warning says only that SQLite migration publication could not be verified.
  • After: The warning includes the source-generation mismatch and /srv/openclaw/state/openclaw.sqlite; exported failure facts retain existing path redaction.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, correct diagnostic repair with reported shipped-update output; supporting tests retain rejection coverage but do not explicitly assert the appended pathname or propagated warning cause.
Proof confidence 🐚 platinum hermit (4/6) This maintainer-authored PR is outside the ordinary contributor proof gate; its body reports the changed diagnostic from a 2026.9.34-to-candidate Testbox update and the redacted failure fact.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An operator investigating an update refusal cannot identify the affected database or underlying attribution failure from the restoration warning.
Reason: The maintainer-authored direction addresses an observed diagnostic gap with two localized message changes and no new policy or configuration.

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
Reviewed head: c6452841f6c4d20f41489344efeb432123f20cbf

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • SQLite migration refusal diagnostics keeps the original intent (8f62210: The credential cutover retained native migration custody and generation-bound rollback attribution; its generic refusal text accompanied conservative rejection of unverifiable publication.)
  • Existing migration rejection tests keeps the original intent (test(core): remove low-value tests (batch d538) #183629: Prior test-reduction work consolidated fixtures while retaining distinct lifecycle and failure contracts; this PR adjusts existing expectations without adding scaffolding.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Verified introduced change: The introduced hunks change two diagnostic strings and update existing rejection assertions; they leave migration admission, authority checks, publication, and cleanup unchanged. (src/infra/update-doctor-migration-attribution.ts:246, c6452841f6c4)
  • Current-main behavior: Fetched main retains the generic refusal strings, so the diagnostic improvement remains distinct work. (src/infra/update-doctor-migration-attribution.ts:246, 798570bc460f)
  • Existing warning and privacy owners: capture.refuse forwards the supplied cause into the restoration warning, while failure facts use the existing diagnostic redactor that removes absolute-path suffixes. (src/infra/update-doctor-result.ts:268, c6452841f6c4)
  • Reported production-path result: The fully read PR body reports a 2026.9.34-to-candidate Testbox update whose captured Doctor diagnostic includes the source database and cause, with the failure fact showing [redacted-path]. This supports the diagnostic change, not successful completion of the underlying update. (c6452841f6c4)
  • Separate compatibility repair: fix(update): restore direct updates from extended-stable 2026.9.33 #182129 addresses legacy physical-versus-content fingerprints and migration custody; it does not supersede this focused diagnostic improvement.
  • Feature history: Merged history identifies Peter Steinberger across the SQLite attribution implementation, lifecycle refactor, and read-only-probe repair. Following earlier history encountered an unavailable creation-boundary object; no earlier introduction is inferred. (src/infra/update-doctor-migration-attribution.ts:246, 8f622108e000)

PR surface

Source +2, Tests 0. Total +2 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 4 2 +2
Tests 1 2 2 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 6 4 +2

Labels

Label changes:

  • add P3: This improves operator diagnostics without changing whether an update, migration, or restoration proceeds.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This improves operator diagnostics without changing whether an update, migration, or restoration proceeds.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 26, 2026, 4:47 AM ET / 08:47 UTC.

@steipete
steipete merged commit ca81195 into main Oct 26, 2026
141 checks passed
@steipete
steipete deleted the steipete/update-reliability-testing-29bc66 branch October 26, 2026 12:39
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 27, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant