feat(dev-safety): Phase 6 of #185 — wire together, document, full dry-run
Closes out musehub staging #185.
1. sandbox-refresh now always takes a snapshot-store.sh backup of canonical first (refresh_sandbox() gained a backup_base param, calls backup.create_snapshot() before cloning) — cheap insurance even though the sandbox clone itself never touches canonical. 2 new tests (snapshot created on refresh; refresh still works when backup_base is left at its default). All 8 pre-existing sandbox tests updated to pass an explicit tmp_path-based backup_base so the automated test suite never writes into the real ~/dev/backups during a normal test run.
2. docs/agent-guide.md's "muse vs muse-dev" section gains a "Where to actually do muse-dev testing" subsection pointing at the now-complete sandbox + backup tooling, replacing the old ad hoc manual `cp -r` backup habit — the directory (~/dev/backups) stays the storage root, but what goes into it is now automated, timestamped, rotated, and (for bundles) verified at creation time.
3. tests/test_phase6_acceptance.py — the full dry-run acceptance test the ticket calls for, tying every phase together in one flow against a real scratch muse repo: refresh a sandbox (verifies it snapshots first), corrupt the sandbox on purpose, confirm canonical `muse verify` stays green throughout, corrupt canonical itself and restore via snapshot, corrupt again and restore via bundle — both restores confirmed via `muse verify` passing and head_commit_id matching the pre-corruption state exactly.
66 tests total across all six phases, all passing. Manually re-verified against the real ~/ecosystem/muse: sandbox-refresh now visibly produces a new real snapshot backup before cloning, and canonical verify stays clean throughout.
Semantic Changes
37 symbols
Files Changed
+1
~3
1174 in snapshot
0 comments
muse hub commit comment sha256:408631a8dc866047a2cff7440933b461af5abd4b55e755599765e433abceb88b --body "your comment"
No comments yet. Be the first to start the discussion.