fix(engine): diffFilePriority's vendored-directory pattern misses vendored/third_party/third-party/bower_components/jspm_packages - #7540
Conversation
…dored/third_party/third-party/bower_components/jspm_packages
diffFilePriority's priority-4 ("least-useful-to-review, never real collision
evidence") directory alternation only matched vendor (singular), while the
sibling isVendoredFileFrom matcher in path-matchers.ts already recognized
vendored, third_party, third-party, bower_components, and jspm_packages too.
A file shared between two unrelated PRs under one of those paths was ranked
priority 0 (ordinary source) instead of 4, inflating sharesMeaningfulFile's
collision/duplicate-cluster signal on exactly the kind of vendored-artifact
path both call sites' own doc comments say should be excluded.
Closes JSONbored#7526
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-20 21:37:51 UTC
Review summary Nits — 4 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
…lure) The previous CI run's Codecov upload step failed on both shards with "gpg: no valid OpenPGP data found" / "Can't check signature: No public key" -- a transient Codecov CLI key-server issue during a narrow ~10s window, unrelated to this PR's code (a separate PR's run minutes earlier uploaded successfully with the identical action). Empty commit to force a fresh CI run since re-running the existing workflow run requires admin rights on JSONbored/loopover this account doesn't have.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7540 +/- ##
==========================================
- Coverage 88.47% 88.47% -0.01%
==========================================
Files 720 720
Lines 75733 75733
Branches 22547 22548 +1
==========================================
- Hits 67008 67004 -4
Misses 7679 7679
- Partials 1046 1050 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Summary
diffFilePriority's priority-4 ("least-useful-to-review, never real collision evidence") directory alternation only matchedvendor(singular), while the siblingisVendoredFileFrommatcher inpackages/loopover-engine/src/signals/path-matchers.tsalready recognizesvendor,vendored,third_party,third-party,bower_components, andjspm_packages.path-matchers.tshad this full set from its original creation (feat(signals): add slop path matchers and non-substantive-padding signal (#561) #752/feat(signals): classify build and CI configuration files in path-matchers (#561) #1045) and later additions (fix(signals): classify bower_components and jspm_packages as vendored #2777 addedbower_components/jspm_packages) with no corresponding update todiff-file-priority.ts— the two matchers silently drifted apart.third_party/foo.js,vendored/bar.js, orbower_components/baz.jswas ranked priority 0 ("ordinary source") instead of 4, sosharesMeaningfulFile(both call sites:packages/loopover-engine/src/signals/engine.tsandpackages/loopover-engine/src/signals/predicted-gate-engine.ts) treated it as real collision evidence — inflating the collision/duplicate-cluster signal on exactly the kind of vendored-artifact path both call sites' own doc comments say should be excluded.diffFilePriority's directory alternation to the fullisVendoredFileFromset, with a code comment cross-referencingpath-matchers.tsas the source of truth to keep in sync. No other branches ofdiffFilePriority(lockfile/doc/test) were touched, per the issue's stated scope.src/review/review-diff.tsandsrc/review/review-grounding.tscarry their own host-side copies ofdiffFilePrioritywith the identical gap, but are out of scope for this issue (not referenced in its Requirements/Links) andscripts/check-engine-parity.ts's twin-pair drift check only verifies marker presence (not byte-identical bodies) for this pair, so this scoped fix doesn't trip it.Tests
packages/loopover-engine/test/diff-file-priority.test.ts: added a case asserting priority 4 for a path under each newly-added directory name (vendored/x.js,third_party/x.js,third-party/x.js,bower_components/x.js,jspm_packages/x.js), plus asharesMeaningfulFileregression test confirming a file shared only underthird_party//bower_components/no longer counts as meaningful collision evidence.Validation
npm run test --workspace @loopover/engine— 594/594 passingnpm run build --workspace @loopover/engine && npm run typecheck— cleannpm run engine-parity:drift-check— ok, 5 hand-duplicated file pairs agreenpm run test:engine-parity && npm run test:live-gate-parity && npm run test:driver-parity— all passingnpm run db:migrations:check && npm run db:schema-drift:check && npm run selfhost:env-reference:check && npm run miner:env-reference:check && npm run selfhost:validate-observability && npm run command-reference:check && npm run docs:drift-check && npm run manifest:drift-check— all cleannpm run cf-typegen:check— no driftnpm run actionlint— cleangit diff --check— cleanCloses #7526