Repository navigation
fix(backup): runtime pin store is archived as opaque bytes with a warning on every backup - #197809
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 Summary: ✅ CompletedThis 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 changesRegister the runtime pin database for verified SQLite snapshots and preserve its private parent directory during backup. Example: Back up control/services.sqlite containing gateway runtimePath /synthetic/node.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: current main still misses this owned database, and the focused fix introduces no identified correctness defect. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe backup inventory classifies state files before SQLite capture and archive traversal; registered databases become verified snapshots that the existing restore command extracts. flowchart LR
A[Runtime pin store] --> B[Backup resource inventory]
B --> C[Verified SQLite snapshot]
C --> D[Backup archive]
E[Private directory metadata] --> D
D --> F[Backup restore]
Technical reviewBest possible solution: Use the existing managed SQLite snapshot pipeline for runtime pins while retaining opaque handling for unrelated databases. Do we have a high-confidence way to reproduce the issue? Current-main ownership discovery deterministically classifies this unregistered SQLite path as opaque; the submitted test reports the matching base failure, but this review executed no reproduction. Is this the best way to solve the issue? This is the smallest complete fix: register the existing owner, propagate its internal role, and reuse private-directory ordering without adding another capture path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7b75336b789c. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +16, Tests +43. Total +59 across 5 files. Added test files: 1. 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:
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 12, 2026, 11:05 AM ET / 16:05 UTC. |
|
Merged via squash auto-merge.
|
What Problem This Solves
Fixes: every
openclaw backup create(and backups taken around updates) warnsSQLite file archived as opaque bytes without a live snapshot or integrity checks: <state>/control/services.sqliteonce the Gateway has a runtime pin store.User Impact
User impact: the managed-service runtime pin store is now backed up like the other OpenClaw-owned SQLite stores: as a verified snapshot with integrity checks, restored with its private
control/directory mode, and without the warning. No configuration change or user action is needed. Released versions are not affected; the store was introduced on main after 2026.11.3 was cut.Why This Change Was Made
The runtime pin store (
control/services.sqlite, added in #172703) is an OpenClaw-owned database, but backup only registers the global, client credential, quarantine and agent databases as core SQLite sources. Every other.sqlitefile under the state directory falls through to the opaque path, so this store was copied as raw bytes without a snapshot. This registers it as a core database with its ownservicesrole, the same way the client credential store is handled, including emitting its private parent directory before snapshot entries create implicit tar parents. Update capture already covered this store; only backup missed it.Evidence
src/infra/backup-create.runtime-pins.test.ts: writes a pin through the realwithDaemonRuntimePinStorewriter, backs up, restores, and checks no opaque warning, restored rows,integrity_check = ok, and a 0700control/directory. Red on the base (Received: ["SQLite file archived as opaque bytes ... state/control/services.sqlite"]), green with the fix.tsgo:coreclean; test-lines ratchet OK (+43 of 400 allowance).$autoreview(P2) scoped-clean; independent read-only Codex review: no findings.Found by the daily update-reliability sweep while reviewing backup output on main.