feat(decisions): remove code_comment harvest, source gating, sticky dismissals#773
Conversation
…smissals Closes #751. - Remove the index-time repo-wide code_comment rationale harvest (Source 8). The query-time live-grep miner already serves the same comments fresh in get_answer/get_why, so the stored records added noise without information: a 2.5k-file repo regenerated ~1,500 proposals on every reindex. - Drain still-proposed code_comment rows on the next init/update (all three persist paths, including index-only), keeping confirmed/dismissed rows. - decisions.sources config section: any remaining extraction source can be disabled per repo in .repowise/config.yaml. - Sticky dismissals: dismiss sets a terminal dismissed status instead of deleting, and bulk_upsert_decisions never resurrects a dismissed row or walks a confirmed active decision back to proposed on re-extraction. - Decision CLI subcommands (show/confirm/dismiss/deprecate) now accept the 8-char id prefixes that decision list prints. Dogfood: proposed queue dropped 2,710 -> 971 after one update; zero code_comment rows or orphaned evidence/links remain; dismissals persist. Claude-Session: https://claude.ai/code/session_01AbCVfR5FFEvDxRvJU7DmsW
|
✅ Health: 7.6 (unchanged) 📋 At a glance Files & modules (2)
🩹 Review priority (files here with the most recent bug-fix history — defects cluster, so review these first)
🔎 More signals (3)🔥 Hotspots touched (5)
2 more
🔗 Hidden coupling (2 files)
💀 Dead code (2 findings)
📊 Full report · ⭐ Star Repowise · 📥 Install bot · Last updated 2026-07-11 05:54 UTC |
…smissals (#773) Closes #751. - Remove the index-time repo-wide code_comment rationale harvest (Source 8). The query-time live-grep miner already serves the same comments fresh in get_answer/get_why, so the stored records added noise without information: a 2.5k-file repo regenerated ~1,500 proposals on every reindex. - Drain still-proposed code_comment rows on the next init/update (all three persist paths, including index-only), keeping confirmed/dismissed rows. - decisions.sources config section: any remaining extraction source can be disabled per repo in .repowise/config.yaml. - Sticky dismissals: dismiss sets a terminal dismissed status instead of deleting, and bulk_upsert_decisions never resurrects a dismissed row or walks a confirmed active decision back to proposed on re-extraction. - Decision CLI subcommands (show/confirm/dismiss/deprecate) now accept the 8-char id prefixes that decision list prints. Dogfood: proposed queue dropped 2,710 -> 971 after one update; zero code_comment rows or orphaned evidence/links remain; dismissals persist.
Closes #751.
What changed
Removed the index-time code_comment harvest (Source 8). The repo-wide rationale-comment scan stored each matching comment verbatim as a proposed decision at floored confidence. The query-time live-grep miner already serves the same comments fresh inside get_answer and get_why, so the stored records added review burden without adding information: on a ~2.5k-file repo every reindex regenerated ~1,500 proposals. The shared heuristics module (rationale_comments.py) stays; the live miner is now its only consumer.
One-shot drain of the legacy backlog. Still-proposed code_comment rows (plus their evidence, edges, and node links) are deleted on the next init or update. This runs on all three persist paths, including index-only updates, so post-commit-hook users get the cleanup too. Confirmed and dismissed rows are kept.
decisions.sources config gate. Any remaining extraction source can be disabled per repo:
Unknown or stale keys are ignored. Documented in CONFIG.md.
Sticky dismissals.
repowise decision dismissnow sets a terminaldismissedstatus instead of deleting the row, andbulk_upsert_decisionstreats those rows as tombstones: no headline promotion, no evidence accretion, never re-proposed. The same guard stops a re-extraction from walking a confirmedactivedecision back toproposed(previously a re-harvest tied the stored source rank and flipped it). Dismissed rows are hidden from listings and dashboards unless explicitly requested.CLI id prefixes.
decision show/confirm/dismiss/deprecatenow accept the 8-char id prefixes thatdecision listprints (they previously required the full 32-char id, which the CLI never displays).Validation
Dogfood on this repo: proposed queue dropped from 2,710 to 971 after one
repowise update; zero code_comment rows or orphaned child rows remain; a dismissed decision stays dismissed and its tombstone is visible viadecision show. Full unit suite green (6,921 passed), plus new tests for the source gate, sticky statuses, and the purge.