gabriel / musehub public
feat BREAKING main #16 / 33
AI Agent gabriel · 36 days ago · May 9, 2026 · Diff

feat: cross-repo and ref-pinned symbol anchors

Anchors previously only resolved to the issue's own repo at main. Filing issue #38 exposed this — the bridge.py fix lived in gabriel/muse but the anchor was stored in gabriel/musehub, generating a broken URL.

New anchor grammar: owner/repo::file/path.py::Symbol@ref cross-repo, ref-pinned file/path.py::Symbol@ref same-repo, ref-pinned file/path.py::Symbol same-repo (unchanged)

Disambiguation: 'owner/repo' is exactly one slash, no dots in either segment. File paths always have an extension or multiple path components, so 'gabriel/muse' is a repo slug but 'src/billing.py' is a file path.

New service: musehub/services/symbol_anchor.py SymbolAnchorRef dataclass — owner, repo, file_path, symbol_name, ref parse_symbol_anchor(raw) — pure parser, no I/O blob_url(base, default_owner, default_repo) — resolves to correct repo display_label() — cross-repo anchors prefix with 'owner/repo::'

Template wiring: parse_symbol_anchor registered as Jinja2 global in _templates.py issue_detail.html uses parser instead of raw split('::') Cross-repo anchors get isd-anchor--cross-repo class and owner/repo prefix

45 tests passing (27 unit + 18 SSR integration).

sha256:fc451e2dc8f414c220717efbc79cbb5dcacd39f8fa131fa068ba62a7399687a4 sha
sha256:4c154bcb185fddbcae1446f51df21653dc7991663cfc025f6910df8bcaf34de8 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:fc451e2dc8f414c220717efbc79cbb5dcacd39f8fa131fa068ba62a7399687a4 --body "your comment"