gabriel / musehub public
feat patch task/lineage-walk #1 / 1
AI Agent gabriel · 45 days ago · May 4, 2026 · Diff

feat: load_symbol_history follows from_address chains for full symbol lineage

When a symbol's oldest history entry carries op_payload.from_address (written by move/patch ops), load_symbol_history now walks the chain recursively and returns a merged oldest-first timeline keyed on the current (final) address.

This means Epoch 0 on the symbol detail page will show the true insert at the origin path, not a PATCH at the address the symbol was renamed to.

Implementation: - _resolve_lineage: recursive walk with cycle guard (visited set) and an in-memory cache; falls back to a targeted DB query only when a lineage hop points to an address not in the initial loaded set (the file_path-filtered case). - Origin addresses (pointed to by a successor's from_address) are folded into the successor's merged timeline and excluded as top-level keys.

Tests (7 new in TestLoadSymbolHistoryLineage): no_from_address_unchanged, single_rename_prepends_origin_history, origin_address_excluded_from_top_level_keys, multi_hop_rename_walks_full_chain, lineage_walk_is_bounded_on_missing_origin, file_path_filter_includes_lineage, lineage_entries_carry_original_address

sha256:b66efde8f7a4e81d2a93aaeeacda3000ed136ac8e72874357ac19448d099a565 sha
sha256:e9c25eab89c99b40060654656fd01c930446f021aad47acb7b70d3f252c84888 snapshot
← Older Oldest on task/lineage-walk
All commits
Newer → Latest on task/lineage-walk

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