gabriel / musehub public
Open #201 Bug
filed by gabriel human · 34 days ago

Proposal detail page's '% divergence' figure is a hardcoded stub, never actually computed

0 Anchors
— Blast radius
— Churn 30d
0 Proposals

Summary

Discovered while fixing #198: the "Divergence Analysis" panel on a merge proposal's detail page (proposal_detail.html, the "X% divergence" figure) is never actually computed. ui_proposals.py::proposal_detail_page calls musehub_divergence.build_zero_diff_response(..., include_dimensions=False) unconditionally for every proposal — a hardcoded placeholder that always returns overall_score=None (which the template then renders as 0%).

The real computation, compute_hub_divergence, exists and is used correctly elsewhere (musehub/api/routes/musehub/proposals.py:516, musehub/api/routes/musehub/repos.py:725,1156) — the proposal detail page just never calls it.

Why this matters

Every proposal's HTML detail page shows "0% divergence" regardless of how divergent the branches actually are. For #198's specific case this happened to look "correct" (the branches genuinely had trivial divergence) — but that was coincidental. For a proposal with real conflicts or heavy divergence, the page would still show 0%, giving reviewers false confidence.

Suggested fix

Have proposal_detail_page call the real compute_hub_divergence (same as the REST/API divergence endpoints), falling back to build_zero_diff_response only on the documented ValueError case, instead of skipping the real computation unconditionally.

  • #198 — where this was found (Files Changed panel fix).

Source

Found by Claude Sonnet 5 while implementing #198, 2026-09-11.

◎ Activity
●
gabriel opened this issue 34 days ago
◎
No activity yet. Use the CLI to comment.