Skip to content

fix: proposal dedup misses cross-category and boilerplate-diluted duplicates - #544

Open
essentialbit wants to merge 3 commits into
mainfrom
fix/proposal-dedup-category-and-series-id-20260801
Open

fix: proposal dedup misses cross-category and boilerplate-diluted duplicates#544
essentialbit wants to merge 3 commits into
mainfrom
fix/proposal-dedup-category-and-series-id-20260801

Conversation

@essentialbit

Copy link
Copy Markdown
Owner

Summary

  • memory_store._find_similar_proposal() hard-filtered dedup candidates by exact category match, but the category taxonomy has drifted over the project's life (free-text macro-signal vs later structured l2_pattern_intelligence slugs) — so two proposals for the same idea filed under different category eras never got compared at all.
  • Even without the category gate, pure Jaccard word-overlap on the real stored description text was too easily diluted by this codebase's shared proposal-template boilerplate ("FRED series", "already shipped", "distinct from the existing...") — the real duplicate pair scored 0.274 (below the 0.3 threshold) while an unrelated proposal scored 0.307 against the same target.
  • Root-caused live: issue NY Fed Weekly Economic Index (WEI) — real-time weekly GDP-growth proxy badge #543 (2026-08-01) duplicated issue NY Fed Weekly Economic Index (FRED WEI) real-time growth nowcast badge #484 (2026-07-21), both proposing a FRED WEI weekly-economic-index badge.

Fix

  • Drop the category hard-filter (kept as a param for API stability, no longer used to gate candidates).
  • Add a precise shared-FRED-series-ID check (regex on this codebase's recurring "FRED series X" idiom) as a strong same-idea signal independent of the Jaccard threshold. Deliberately narrow — not a general ticker/acronym extractor, since short all-caps acronyms like CPI/GDP/FSI recur across nearly every proposal and would false-positive if treated as identifiers on their own.

Test plan

Note: issues #484 and #543 (the real duplicate pair that surfaced this bug) are left open for the user to consolidate/close — sensor policy is to flag duplicates, not bulk-close them unilaterally.

🤖 Generated with headless FredAI sensor cycle

Saifodius and others added 2 commits August 1, 2026 17:00
…luted duplicates

_find_similar_proposal() hard-filtered candidates by exact category match
before computing Jaccard overlap, and the category taxonomy has drifted
over time (free-text like "macro-signal" vs later structured
"l2_pattern_intelligence" slugs) -- so two proposals for the same idea
filed months apart under different category conventions were never even
compared. On real data (not the GitHub-rendered issue body) the pure
word-overlap on the actual duplicate pair was 0.274, just under the 0.3
threshold, while an unrelated proposal scored 0.307 against the same
target from shared macro-badge template boilerplate alone.

Root-caused live: issue #543 (2026-08-01) duplicated issue #484
(2026-07-21), both proposing a FRED WEI weekly-economic-index badge.

Fix: drop the category filter (still accepted for API stability, no
longer used to gate candidates), and add a precise shared-FRED-series-ID
check as a strong same-idea signal independent of the Jaccard threshold,
since this codebase's proposals consistently name their data source as
"FRED series X". Verified against a scratch copy of the live DB (never
touched directly): the real duplicate now correctly dedupes, and a
genuinely distinct FRED-series proposal still gets its own new id.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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