Skip to content

fix: candidate-extract.jq's overlap() is now a symmetric, multiplicity-free Jaccard (c9a4) - #46

Open
talgolan wants to merge 1 commit into
mainfrom
worktree-determinism-phase-5-backlog-mechanics
Open

fix: candidate-extract.jq's overlap() is now a symmetric, multiplicity-free Jaccard (c9a4)#46
talgolan wants to merge 1 commit into
mainfrom
worktree-determinism-phase-5-backlog-mechanics

Conversation

@talgolan

@talgolan talgolan commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • overlap() in hooks/lib/candidate-extract.jq had a numerator/denominator mismatch: the numerator counted one side's title words with multiplicity while the denominator was the deduped union, so overlap(A;B) != overlap(B;A) and short/similar titles scored above the 0.7 dedup threshold when they shouldn't (vitest/jest scored 0.909). A new dedup_key also strips the retry-burst heuristic's shared title-template suffix before scoring, so two distinct retry-bursts sharing that suffix no longer over-merge (was 0.722).
  • Closes backlog item c9a4.

This was originally Task 1 of a 6-task Determinism Phase 5 plan (meta/superpowers/plans/2026-09-07-determinism-phase-5-backlog-mechanics.md). Tasks 2-6 were abandoned mid-run: they built backlog-item.sh's tag-mint/renumber mechanics and BACKLOG.md-tag-convention wiring in primer.md/end-session.md, all premised on .session-continuity/BACKLOG.md staying the backlog store — moot now that the backlog store is migrating to GitHub Issues. This commit is unrelated to backlog storage either way and stands on its own.

Full task + fix-round + re-review cycle completed via subagent-driven-development: task review approved with one Important, plan-mandated finding (a test that never actually exercised overlap()'s merge path), fixed in a follow-up round, re-review confirmed addressed with no new breakage.

Test plan

  • zsh meta/superpowers/validation/2026-09-01-candidate-extract-smoke.zsh — 34/34 passing (31 pre-existing + 3 new c9a4 regression assertions: suffix-over-merge stays distinct, symmetric scoring, genuine near-duplicates still merge).
  • Full meta/superpowers/validation/*.zsh suite run against this branch: all green except two pre-existing failures unrelated to this diff (stale count-pins in learnings-index-smoke.zsh/render-smoke.zsh against real BACKLOG.md/LEARNINGS.md entry counts — confirmed by diff scope that this commit never touches those files).

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant