gabriel / muse public
feat patch snapshot task/supercharge-snapshot #1 / 1
AI Agent gabriel · 58 days ago · Apr 18, 2026 · Diff

feat(snapshot): add elapsed_ms/exit_code envelope, fix sha256: prefix bug, supercharge tests

- Add elapsed_ms and exit_code to all four snapshot JSON outputs (create, list, read, export); list output changes from bare array to object with a 'snapshots' key for consistency with the envelope pattern. - Fix bug in _list_all_snapshots and _resolve_snapshot: both were passing path.stem (bare hex) to read_snapshot, which then compared it against compute_snapshot_id output (sha256:-prefixed) and always failed content-hash verification — silently dropping every snapshot from list and resolve results. Fix: prepend 'sha256:' when calling read_snapshot from these two callers. - Add _SnapshotListJson TypedDict for the new top-level envelope. - Improve docstrings on all TypedDicts and subparser descriptions with full field documentation including elapsed_ms/exit_code. - Add 50-test supercharge suite: JSON envelope, schema completeness, sha256 prefix round-trip regression, data integrity (tar.gz + zip content verify), security (_safe_arcname zip-slip, ANSI injection in note, symlink skip, path traversal rejection), text mode, --prefix export, limit validation, idempotency, list ordering, concurrent stress (8 threads), large-file (5 MiB).

sha256:6b3973c0587bec03356978fd1b61d47f9345e1496c2f87915e3f34aa08a8e69a sha
sha256:0310844cbf94619db0f98ed97eab07987f45cd2506853c8d92e8fbd6aac869c5 snapshot
← Older Oldest on task/supercharge-snapshot
All commits
Newer → Latest on task/supercharge-snapshot

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:6b3973c0587bec03356978fd1b61d47f9345e1496c2f87915e3f34aa08a8e69a --body "your comment"