You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
impl(backups): mesh leg — laptop-local DBs → Turso backup homes (inventory + appropriateness line) #13459
Parent: #9093 (backup mesh) · Program: #8983 · Design: doc/2026-11-23T16-34-18Z_design_backup_mesh/note.md (landed with the #9093 design PR).
House rules: any schedule this creates lands its doc/fleet-schedule-registry.md row in the same PR; secrets by name only (Bitwarden at runtime, repo-archive pattern); builds/tests run via remote dispatch, never on the laptop or sandbox.
Scope
Laptop-local databases that hold real state and are not already covered by an existing leg land in the mesh via a Turso backup home, per the design's appropriateness line (§6): a local DB qualifies when it is SQL-shaped, modest in size, and has no other off-laptop copy. Candidates to disposition by name at implementation time: the pm-aggregator's local stores not covered by dashboard-backup, local atlas working DBs not covered by atlas-backup, and any SQLite state under the fleet tools' state dirs. Explicitly NOT this leg: the OpenCode session DB (own leg, gated on research #9094) and anything already covered by repo-archive / laptop-state / dashboard / atlas backups (no double coverage).
Terms (from the design)
Each qualifying DB gets a Turso home (laptop-backup-<name>); a scheduled export/import replaces the home's contents wholesale, weekly, staggered with the D1 leg.
The inventory is the deliverable's first half: every laptop-local DB found is listed as qualifying, already-covered (naming the covering leg), or excluded-with-reason. An unlisted DB is a finding, not a silent skip.
Acceptance
The laptop-local DB inventory is posted on this issue with a per-DB disposition (qualifying / already-covered-by / excluded-because).
Each qualifying DB's Turso home exists and receives its weekly import; one import record per DB posted.
Restore verification: one qualifying DB restored from its Turso home to a scratch path and opened successfully (integrity check + row counts vs source manifest). Recorded on this issue.
Schedule registry row updated in the implementation PR.
Fresh check: #13459 is open, has no hold label, and has no earlier triage verdict. The backup-mesh design is on origin/main; its §4 and §6 make the Class E inventory the first dependency. The OpenCode research gate applies to #13462, not this laptop-local DB leg.
First implementation step: enumerate every in-scope laptop-local database and post a per-DB disposition on this issue: qualifying, already-covered-by (name the leg), or excluded-because (state the reason), applying all four §6 appropriateness criteria. Do not create Turso homes or schedules in this step.
Packet: queue task 21383, “Step 1 of #13459: inventory laptop-local databases and apply the appropriateness line,” enqueued in repo-health-code-pilot. It carries the inventory acceptance and explicitly excludes home/schedule implementation.
The full #13459 acceptance remains in force for subsequent work, including weekly Turso imports and restore verification from a Turso home to a scratch path with integrity and row-count checks against the source manifest.
Step 1 supplementary inventory: closing the open item + corrections (task 21383, lane oc-code-02)
Re-ran read-only discovery over the fleet/tool state dirs on 2026-11-23. Scope: the dirs named in this issue and design §6 (~/.local/state/pm-*, ~/.local/state/fleet, ~/.local/state/mcpx, ~/.opencode-mem, ~/.local/share/t3code, ~/.local/share/ready-for-agent, ~/.openclaw, ~/atlas, ~/.local/share/opencode, ~/.local/share/claude) plus a no-DB finding under ~/tools. Sidecars (-wal/-shm/-journal), scratch (opencode/tmp/*, backup-dir copies, .bak), browser caches and desktop-app states (atuin/mcfly/kilo/lootbox/activitywatch/evolution/nautilus/fff/furtherance) are outside the fleet/tool scope and recorded here as such — not silent skips.
Corrections to the first inventory table
DB
Change
~/.local/state/pm-projector/projector.db (284 MB)
already-covered-by pm-dashboard-backup (was: qualifies). pm-dashboard-backup.sh carries a pmp_links-only export — the only non-rebuildable table — as a conditionally-required manifest member; the rest of the DB is a rebuildable projection, never archived. No Turso home needed.
~/.local/share/opencode/opencode-local.db (14 MB)
already-covered-by opencode-db-backup (was: unlisted). opencode-db-backup.sh: opencode-local.db rides along when present.
New dispositions (were unlisted or undispositioned)
Index over the laptop's own sessions/ dir, like the mcpx log index. Verify regenerability at implementation; if verification fails this becomes qualifying.
Unchanged (confirmed)
user-prompts.db, fleet/metadata.db, statev2.sqlite, ready-for-agent.db qualify; mcpx/logs/index.db excluded (regenerable); pm-metadata.sqlite already-covered by pm-dashboard-backup (verify at implementation); opencode.db already-covered by opencode-db-backup, out of this leg (#13462, gated on #9094).
Step-1 acceptance check
Every in-scope laptop-local DB enumerated with exactly one disposition above (plus the first table as corrected).
§6 appropriateness line applied per row (SQL-shaped + modest + no off-laptop copy + wholesale-replace OK = qualifies).
No Turso homes, schedules, or restore runs created in this step.
Activity
developing-today commentedon Nov 23, 2026
CODE-4903
dezren39 commentedon Nov 23, 2026
🤖 Agent note · triaged — task 21375 (lane agent-next-25-local)
Fresh check: #13459 is open, has no hold label, and has no earlier triage verdict. The backup-mesh design is on
origin/main; its §4 and §6 make the Class E inventory the first dependency. The OpenCode research gate applies to #13462, not this laptop-local DB leg.First implementation step: enumerate every in-scope laptop-local database and post a per-DB disposition on this issue: qualifying, already-covered-by (name the leg), or excluded-because (state the reason), applying all four §6 appropriateness criteria. Do not create Turso homes or schedules in this step.
Packet: queue task 21383, “Step 1 of #13459: inventory laptop-local databases and apply the appropriateness line,” enqueued in
repo-health-code-pilot. It carries the inventory acceptance and explicitly excludes home/schedule implementation.The full #13459 acceptance remains in force for subsequent work, including weekly Turso imports and restore verification from a Turso home to a scratch path with integrity and row-count checks against the source manifest.
dezren39 commentedon Nov 23, 2026
Step 1 inventory: laptop-local databases (task 21383, lane code-j)
Read-only inventory against
nixos/home/laptop-backups.nix. Sizes fromls -laon 2026-11-23.~/.local/state/pm-projector/projector.dbpm-stack-db-backup.shdumps it before creating a home.~/.opencode-mem/data/user-prompts.db~/.local/state/opencode, so not covered by laptop-state.~/.local/state/fleet/metadata.db~/.local/share/t3code/userdata/statev2.sqlite~/.local/share/ready-for-agent/ready-for-agent.db~/.local/state/mcpx/logs/index.db~/.local/state/pm-aggregator/pm-metadata.sqlitePM_AGG_STORE_BACKEND=tursoexport rides the dashboard job.~/.local/share/opencode/opencode.dbNot yet dispositioned: Muse per-session cron DBs (treated as excluded unless real state; to confirm).
Not done in this step: no Turso homes (
laptop-backup-<name>), no schedules, no restore verification. Those are the next steps of this issue.dezren39 commentedon Nov 23, 2026
Step 1 supplementary inventory: closing the open item + corrections (task 21383, lane oc-code-02)
Re-ran read-only discovery over the fleet/tool state dirs on 2026-11-23. Scope: the dirs named in this issue and design §6 (
~/.local/state/pm-*,~/.local/state/fleet,~/.local/state/mcpx,~/.opencode-mem,~/.local/share/t3code,~/.local/share/ready-for-agent,~/.openclaw,~/atlas,~/.local/share/opencode,~/.local/share/claude) plus a no-DB finding under~/tools. Sidecars (-wal/-shm/-journal), scratch (opencode/tmp/*, backup-dir copies,.bak), browser caches and desktop-app states (atuin/mcfly/kilo/lootbox/activitywatch/evolution/nautilus/fff/furtherance) are outside the fleet/tool scope and recorded here as such — not silent skips.Corrections to the first inventory table
~/.local/state/pm-projector/projector.db(284 MB)pm-dashboard-backup.shcarries apmp_links-only export — the only non-rebuildable table — as a conditionally-required manifest member; the rest of the DB is a rebuildable projection, never archived. No Turso home needed.~/.local/share/opencode/opencode-local.db(14 MB)opencode-db-backup.sh:opencode-local.dbrides along when present.New dispositions (were unlisted or undispositioned)
~/.opencode-mem/data/ai-sessions.db+user-profiles.db+metadata.db+skills.dbuser-prompts.db; tiny active companion state, no leg covers them. Step 2 decides one home vs per-DB homes.~/.local/share/t3code/userdata/state.sqlite(+server-owner.sqlite, 0 B)statev2.sqlite; no leg covers it.~/.openclaw/acpx/codex-home/*.sqlite(queue/logs/state/goals/memories) +agents/*/openclaw-agent.sqlite~/.openclawexcept scratchtmp/; per-session cron DBs ride it. This closes the undispositioned item.~/atlas/**staging/scratch copiesatlas.dbrides atlas-backup; staging/scratch copies are regenerable.~/.local/share/claude/session-index.db(598 MB) +session-names.dbsessions/dir, like the mcpx log index. Verify regenerability at implementation; if verification fails this becomes qualifying.Unchanged (confirmed)
user-prompts.db,fleet/metadata.db,statev2.sqlite,ready-for-agent.dbqualify;mcpx/logs/index.dbexcluded (regenerable);pm-metadata.sqlitealready-covered by pm-dashboard-backup (verify at implementation);opencode.dbalready-covered by opencode-db-backup, out of this leg (#13462, gated on #9094).Step-1 acceptance check
Follow-up for steps 2–5 remains #13474.