gabriel / muse public
feat BREAKING dev-safety feat/185-phase6-wire-together #1 / 1
AI Agent gabriel · 3 days ago · Sep 11, 2026 · Diff

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.

sha256:408631a8dc866047a2cff7440933b461af5abd4b55e755599765e433abceb88b sha
+24 ~13 symbols
4 changed · 1174 in snapshot files
sha256:b1fc41f90aed996f5a1241546999f150e2203788ad4f1e1b0e0ba8bfed69f99c snapshot
+24
symbols added
~13
symbols modified
4
files changed
1174
files in snapshot
0
dead code introduced
Semantic Changes 37 symbols
~ tests/test_phase6_acceptance.py .py 20 symbols added
+ MUSE variable variable MUSE L22–22
+ TestFullPipelineAcceptance class class TestFullPipelineAcceptance L64–119
+ test_sandbox_corruption_never_reaches_canonical_and_both_restores_work method method test_sandbox_corruption_never_reaches_canonical_and_both_restores_work L65–119
+ _corrupt_an_object function function _corrupt_an_object L47–55
+ _make_real_repo function function _make_real_repo L29–35
+ _require_muse function function _require_muse L59–61
+ _rev_parse function function _rev_parse L38–39
+ _run function function _run L25–26
+ _verify_all_ok function function _verify_all_ok L42–44
+ Path import import Path L14–14
+ create_bundle_backup import import create_bundle_backup L19–19
+ json import import json L10–10
+ list_snapshots import import list_snapshots L19–19
+ pytest import import pytest L16–16
+ refresh_sandbox import import refresh_sandbox L20–20
+ restore_from_bundle import import restore_from_bundle L19–19
+ restore_from_snapshot import import restore_from_snapshot L19–19
+ shutil import import shutil L11–11
+ subprocess import import subprocess L12–12
+ sys import import sys L13–13
~ docs/agent-guide.md .md 1 symbol added, 2 symbols modified
~ scripts/dev/sandbox.py .py 3 symbols modified
Files Changed
+1 ~3
1174 in snapshot
← Older Oldest on feat/185-phase6-wire-together
All commits
Newer → Latest on feat/185-phase6-wire-together

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:408631a8dc866047a2cff7440933b461af5abd4b55e755599765e433abceb88b --body "your comment"