Repository navigation
fix(decisions): fold a re-mined decision into the record that already holds it - #5221
Conversation
… holds it Every update re-mines recent PR and commit bodies. Each pass rewords the title and picks its own span, and the span decides the files and quote the id derives from, so the id moved and a new record was minted for a decision already stored. On repowise-dev/repowise, 462 mined records held 187 decisions, with up to 11 copies of one sentence. Title dedup needs equal titles, the lane fold (#2753) pairs PR with commit lanes only, and semantic dedup needs a real embedder, so none of them caught it. Ingest now folds an incoming decision with no title match into a stored or in-batch record of the same lane that cites a common evidence commit and says the same thing: one decision text opens the other, or their content words overlap at least 0.75 with the same negations. The stored id is kept, the arrival accretes as evidence, and a same-lane rewording does not retitle the record. Shared evidence alone never folds: one PR states several decisions. The id repair that runs at the head of every index folds copies stored before this, with a merged alias so an old id still resolves. The keeper is the accepted record, then one with a status a person set, then the oldest. Accepted, person-set and reviewed records are never folded away, and needs_split bundles are held out on both paths. Replayed on the showcase store: 462 records to 187, 95 copies fold into the 41 accepted records, and no two accepted records match each other.
|
Worth a look: 1 thing to check below.
✅ Health of changed files: 7.7 → 8.0 (+0.3; structure +0.3) Average full file score (structure and history) of 6 changed code files, weighted by size before this PR; not the repository score. Patch coverage 95.4% (105 of 110 changed executable lines covered) 5 uncovered changed lines in 2 files
Report from this run for
Settings and updatesSilence one PR with |
…ion text "holds one message per worker" and "holds two messages per worker" reduced to the same content words, so two rulings folded into one record.
Every update re-mines recent PR and commit bodies. Each pass rewords the title and picks its own span, and the span decides the files and quote the decision id derives from, so a decision already stored came back under a new id. On this repository, 462 mined records held 187 decisions, with up to 11 copies of one sentence. Title dedup needs equal titles, the lane fold (#2753) pairs PR with commit lanes only, and semantic dedup needs an embedder, so none of them caught it.
What changed
mergedalias so old ids still resolve.needs_splitbundles are left alone.Measured on this repository's decisions
Kept apart: three distinct decisions from one commit, two tuning rules that share numbers, a bundled span vs one of its claims, and a negated ruling. Paraphrases with no shared wording are not merged.
Verification
tests/unit/persistence/test_decision_reworded_duplicates.py(new, 30 cases from real duplicate clusters), plustest_decision_lane_fold.pyfixtures corrected where two distinct decisions had copied text.get_why: 391 passed.