Repository navigation
fix(backup): allow backups while the gateway is running - #119782
Conversation
Reported by @AgentSolomon in #119757. Fixes #119757 Punchcard-Session: amber-meadow-timber-8r
|
@clawsweeper re-review Please review exact head |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Codex review: needs maintainer review before merge. Reviewed August 5, 2026, 10:41 PM ET / August 6, 2026, 02:41 UTC. ClawSweeper reviewWhat this changesThe PR excludes disposable gateway and device coordinator SQLite lock files from backup discovery and archiving so backups can run while the gateway is active. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep this maintainer PR open. The exact-head patch is a coherent root-boundary repair with no actionable code finding, but it is behind current main and its exact-head checks are still running. Priority: P2 Review scores
Verification
How this fits togetherBackup creation discovers state files, safely snapshots durable SQLite databases, and writes a verified archive. Gateway and device coordinators create disposable SQLite lock files that must be excluded before the durable-data backup path begins. flowchart LR
A[Running gateway] --> B[Coordinator lock databases]
C[Backup discovery] --> D[Transient SQLite classifier]
B --> D
D -->|exclude transient files| E[Durable SQLite snapshot]
E --> F[Verified backup archive]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +18, Tests +174. Total +192 across 6 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the shared classifier after a clean current-main validation, preserving its exact producer-name and authoritative-root boundary rather than using a broad Do we have a high-confidence way to reproduce the issue? Yes—source establishes that current main classifies the held coordinator SQLite file as a snapshot input, while its producer holds that file for the gateway lifetime. The linked report independently supplies the observed locked-database failure on an official beta build. Is this the best way to solve the issue? Yes—the shared classifier at the backup volatile-file boundary is the narrowest maintainable fix because it covers discovery and archive filtering while retaining lock-shaped durable databases outside authoritative coordinator roots. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c37ba84f662a. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Current-base validation is complete for the remaining owner/rank-up move.
This satisfies the requested equivalent current-base validation without rebasing or changing the reviewed head. |
|
Merged via squash.
|
Reported by @AgentSolomon in openclaw#119757. Fixes openclaw#119757 Punchcard-Session: amber-meadow-timber-8r
…cope * origin/main: (24 commits) fix(backup): skip transient gateway lock databases (openclaw#119782) test(agents): use canonical auth session fixtures (openclaw#119821) fix(memory): keep QMD file hints after stale docid misses (issue openclaw#113041) (openclaw#113515) test(doctor): align fast-path repair contracts (openclaw#119812) perf(agents): index subagent recovery ownership (openclaw#119793) fix(gateway): keep chat startup off catalog discovery (openclaw#119742) fix(test): keep TUI PTY suites in their owner lane (openclaw#119787) docs: correct dashboard auth precedence (openclaw#119785) docs: document control ui owner handoff fix: grant host-authorized control ui owner access fix(worktrees): preserve registered roots during orphan cleanup (openclaw#119709) fix(matrix): prevent shared client key collisions (openclaw#119667) fix(diagnostics-otel): propagate exported span context (openclaw#112283) fix(worker): isolate state observer failures (openclaw#117507) fix(qa): attest realized profile executions (openclaw#119761) fix(gateway): finish successful sessions after timestamp races (openclaw#119752) fix(agents): fence restart recovery lifecycle (openclaw#119776) fix(ui): preserve chat history and active run timing (openclaw#119729) improve(ollama): reduce inactive startup cost (openclaw#119745) improve(gateway): defer inactive plugin runtime imports (openclaw#119733) ...
Fixes #119757
Reported by @AgentSolomon in #119757.
What Problem This Solves
Fixes an issue where operators running
openclaw backup create --verifywhile the gateway was active could not create a backup because the gateway's disposable SQLite coordination database remained locked.Why This Change Was Made
The backup volatile-file boundary now owns one canonical SQLite transient classifier. It excludes exact gateway and device coordinator database names only inside the authoritative CLI and managed-service lock directories, while retaining durable SQLite databases with similar names elsewhere. Reindex scratch databases remain excluded across discovery, archive creation, and verification.
No config, plugin SDK, protocol, SQLite schema, migration, or feature boundary changes are introduced.
User Impact
Operators can create and verify a backup while the gateway is running. Durable application and plugin SQLite data remains included.
Release-note context: live backups now omit disposable gateway/device coordination databases and their sidecars instead of failing on their locks. Per repository policy, this context is recorded here rather than editing
CHANGELOG.md.Evidence
e8c677384149687aebe7c1774b79e77cf3d75a701281a3de3ff6559db7432b05src/infra/backup-volatile-filter.test.ts: 52 passedsrc/infra/backup-create.test.ts: 70 passedsrc/commands/backup-verify.test.ts: 28 passed, 1 platform-specific skipoxlintandgit diff --check: passed..agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --max-priority P1patch is correct, confidence0.9; TruffleHog clean.Maintainer Notes
src/infra/backup-volatile-filter.ts, consumed by backup discovery and tar filtering; verification shares only the reindex transient contract.+49/-31(+18net), justified by the authoritative dual-lock-directory ownership boundary and shared classifier.+179/-5(+174net).Punchcard-Session: amber-meadow-timber-8r