feat(tools) activate Pass 5 historical proposal collision detection - #440
Conversation
Applies the check-duplicates.py half of PR #268, adapted onto current main since the branch predated the check-claims.py test-infrastructure and jaccard-similarity work that has since landed. wires in the historical-proposal collision pass that fetch_historical_proposals already gathered but the analyzer never used, and strips parenthetical qualifiers before normalizing a term so a queue entry named X (Embedded) still collides with a bare historical X. - check-duplicates.py. normalize_term drops a trailing parenthetical before the rest of the normalization runs. analyze_repository maps every historical proposal not currently published by its normalized slug, then checks every queue entry's name, slug, and aliases against that map, appending a HISTORICAL_PROPOSAL_COLLISION entry on a match. main prints these under a distinct [HISTORICAL COLLISION] label so they read differently from a live queue-vs-published collision. - check-duplicates-test.py. two new normalize_term regression cases (a parenthetical qualifier, and confirming near-neighbor terms like Rate Limiting and Throttling stay distinct), plus two tests for the new pass, one live against the real repository and one with a mocked historical entry matching a real current queue slug.
|
REVIEWED. Approve. 197-line diff across two files, single-pass review. Traced normalize_term's new parenthetical-strip against the original Ran the real checker against the live repository before writing this python3 tools/check-duplicates-test.py. 9 of 9 pass. py_compile and |
Summary
Applies the
check-duplicates.pyhalf of PR #268, adapted ontocurrent main. The original branch predated the
check-claims.pytest-infrastructure work (#439) and the jaccard-similarity threshold
pruning that has since landed on
check-duplicates-test.py, so thediff could not apply cleanly. This branch carries forward the same
intended feature, reviewed and re-verified against the current file
shapes.
Wires the historical-proposal collision pass.
fetch_historical_proposalsalready gathered commit history for entries that were once proposed
and never published, but
analyze_repositorynever checked the queueagainst it. Now a queue entry whose name, slug, or any alias
normalizes to match an unpublished historical proposal's slug surfaces
as a
HISTORICAL_PROPOSAL_COLLISION, printed under a distinct[HISTORICAL COLLISION]label so it reads differently from a livequeue-vs-published collision.
normalize_termalso now strips a trailing parenthetical qualifierbefore the rest of normalization runs, so
Producer-Consumer (Embedded)and a bare
Producer-Consumercorrectly collide whileRate Limitingand
Throttlingcorrectly stay distinct.Verification
python3 tools/check-duplicates-test.py. 9 of 9 tests pass (5existing, 4 new)
finds the one genuine queue-vs-published collision (
windowingvsvirtual-list) and reports zero historical collisions, since noneof the 3 remaining queue entries match anything in the fetched
history right now
matches a real current queue entry (
windowing), confirmed toactually trigger a
HISTORICAL_PROPOSAL_COLLISIONrather thantrivially passing against an empty result
py_compileandruff checkboth clean on both touched filesTest plan