feat(code): Phase 3 — .muse/indices/ infrastructure and muse index command
New module muse/core/indices.py: - symbol_history index: address → chronological event timeline (commit_id, op, content_id, body_hash, signature_id per event) - hash_occurrence index: body_hash → list of addresses that share it - load/save helpers for both indexes - index_info() for status reporting - All indexes: schema_version:1, updated_at timestamp, fully rebuildable
New command muse index (multi-command Typer app): - muse index status: show present/absent/corrupt status and entry counts - muse index rebuild: walk full commit history to rebuild symbol_history and/or hash_occurrence; --index NAME for selective rebuild
Design: - Indexes are derived, optional, and fully rebuildable — zero impact on repository correctness if absent - symbol_history enables O(1) lineage/symbol-log instead of O(commits) scan - hash_occurrence enables O(1) clone detection and hash= queries - Incremental updates can be wired into the commit hook in a future phase
mypy: 0 errors · typing_audit: 0 violations · pytest: 797 passed.
Comments
0No comments yet. Be the first to start the discussion.