Post-Phase-10 — backup-service path fix + docs/USER_GUIDE.md#8
Merged
Conversation
backup-service.ts now sources the DB path from the live
better-sqlite3 handle (getDb().name) rather than re-reading
config.dbPath. The two values are always equal in production,
but the test harness installs a tmp DB and the route's
loadConfig() returned the host's real path, causing
ENOENT during create + filepath/id undefined during
delete + restore. Same fix applied to the restoreBackup
swap path. Production behaviour unchanged.
docs/USER_GUIDE.md (792 lines) — task-oriented walkthrough:
1. Install — npm / install.sh / Docker / source
2. First launch — wizard prompts, what each one writes,
where the bearer token shows up
3. Tour of the UI — every sidebar group, every page,
header chrome, offline banner, mobile
4. Common workflows — deploy agent · approve task ·
diagnose with Doctor · take + restore
backup · adjust budget after auto-pause ·
schedule a heartbeat · add a model key ·
chase a budget anomaly
5. CLI reference — every subcommand + every env var
6. Keyboard shortcuts — palette, jump-actions, G-then-X chord
7. Configuration — config.json keys + every file under
~/.clawcontrol/ with mode + role
8. Backups — what's in an archive, schedule + retention,
manual + UI + DR paths
9. Updates — 8-stage install pipeline, auto-install
10. One-click scaling — listInstances / createInstance /
stopInstance / getInstanceHealth
11. Going to production — admin token, host binding, supervisor
choice, off-host backups, logging,
doctor as a CI smoke test
12. Troubleshooting — symptoms → causes → fixes for the failure
modes ops actually hit
13. FAQ — port discrepancy, no-OpenClaw mode, adapter
and Doctor extension points, multi-instance,
package-name override, where to file bugs
Verified:
pnpm typecheck → clean
pnpm test → 28 server + 15 ui = 43 passing
pnpm build → server bundle 2.4 MB · UI 90.3 KB gzip JS
cold boot via CLI → server up in ~1 s, REST + WS smoke tests
green, graceful stop via SIGTERM (8 s grace)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
backup-service.ts now sources the DB path from the live better-sqlite3 handle (getDb().name) rather than re-reading config.dbPath. The two values are always equal in production, but the test harness installs a tmp DB and the route's loadConfig() returned the host's real path, causing ENOENT during create + filepath/id undefined during delete + restore. Same fix applied to the restoreBackup swap path. Production behaviour unchanged.
docs/USER_GUIDE.md (792 lines) — task-oriented walkthrough:
where the bearer token shows up
header chrome, offline banner, mobile
diagnose with Doctor · take + restore
backup · adjust budget after auto-pause ·
schedule a heartbeat · add a model key ·
chase a budget anomaly
~/.clawcontrol/ with mode + role
manual + UI + DR paths
stopInstance / getInstanceHealth
choice, off-host backups, logging,
doctor as a CI smoke test
modes ops actually hit
and Doctor extension points, multi-instance,
package-name override, where to file bugs
Verified:
pnpm typecheck → clean
pnpm test → 28 server + 15 ui = 43 passing
pnpm build → server bundle 2.4 MB · UI 90.3 KB gzip JS
cold boot via CLI → server up in ~1 s, REST + WS smoke tests
green, graceful stop via SIGTERM (8 s grace)