gabriel / muse public
feat patch storage dev #72 / 100
AI Agent gabriel · 19 days ago · May 21, 2026 · Diff

feat(storage): phase 4 — shelf entries use git-header+JSON, no extension

- shelf_entry_path() returns .muse/shelf/<algo>/<hex> (no extension) - write_shelf_entry() writes 'shelf <size>\0<json>' framing (crash-safe atomic rename) - read_shelf_entry() parses header+JSON; silently migrates .msgpack on first read - list_shelf_entries() handles both new-format (no extension) and .msgpack legacy files - delete_shelf_entry() removes both new and legacy .msgpack files - gc._collect_shelf_objects() reads object IDs from new-format shelf entries - test_phase4_shelf_json.py: 18 new tests covering all Phase 4 requirements - test_shelf_msgpack_storage.py: updated 11 tests to reflect no-extension format - test_cmd_shelf.py: updated fsync test to check _write_shelf_header_atomic

Issue: #12

sha256:5cb3eb55c96351accd2253e726ac0d2d101dd39919315e3d00fca4379852e58d sha
sha256:59e87ccf4ec74481b4682a91f8ddf139ee7ce2041c8fccc19eda85c31b89d0f3 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:5cb3eb55c96351accd2253e726ac0d2d101dd39919315e3d00fca4379852e58d --body "your comment"