feat: store raw DomainOp types and full op payload; remove lossy mapping
Replaces the _op_to_muse_op collapse (insert→add, replace/patch→modify) with full-fidelity storage. The structured delta algebra is Muse's special sauce — collapsing it at the DB boundary loses the semantic distinction between replace (atomic swap), patch (container with child_ops), and mutate (field-level changes with stable entity identity).
Changes: - Migration 0018: add op_payload JSON column to musehub_symbol_history_entries; widen musehub_symbol_intel.op from String(16) to String(32) - Model: add op_payload Mapped[dict|None] to MusehubSymbolHistoryEntry - Indexer: delete _op_to_muse_op; store op literal verbatim (insert, replace, patch, mutate, move, delete, directory_rename); build op_payload as op dict minus op/address/child_ops keys; fix hash_occurrence filter to match insert/ replace/patch/mutate - load_symbol_history: pass op_payload through from DB - ui_symbols.py: update op=='add' guard to op=='insert' - Template: render all 7 raw op types with correct badges and dot colours - Tests: replace TestOpToMuseOp (deleted function) with TestRawOpStorage (6 tests covering insert, replace, patch, mutate, rename, payload exclusion) - docs/db-management.md: new agent runbook for migrations, backfills, container topology, and common mistakes
0 comments
muse hub commit comment sha256:216ceb7bd277c270a76962446b1620b842bd3cbbb209686cbc7ebb1e7f5a8acf --body "your comment"
No comments yet. Be the first to start the discussion.