Skip to content

fix(rees): classify bower_components and jspm_packages as vendored in provenance - #2799

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
glorydavid03023:fix/rees-vendored-bower-jspm
Jul 3, 2026
Merged

fix(rees): classify bower_components and jspm_packages as vendored in provenance#2799
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
glorydavid03023:fix/rees-vendored-bower-jspm

Conversation

@glorydavid03023

Copy link
Copy Markdown
Contributor

What

The rees provenance analyzer classifies a newly-added file as binary / vendored / source via classifyAddedFile. Its VENDORED_PATH_RE:

/(?:^|\/)(?:vendor|node_modules|third[_-]party|vendors)\//

recognizes vendor/node_modules/third_party but not bower_components (Bower) or jspm_packages (JSPM) — installed-dependency directories that are the same vendored case as node_modules.

Why it matters

#2777 (fix(signals): classify bower_components and jspm_packages as vendored) added exactly these to the server-side path classifier (src/signals/path-matchers.ts), with the rationale "the same vendored case as node_modules." But review-enrichment ships as a standalone package with its own inlined VENDORED_PATH_RE, so #2777's src/ change never reached it.

Consequence: a PR that commits a bower_components/ or jspm_packages/ tree has those files fall through to null (ordinary source) instead of "vendored", so the provenance analyzer treats committed third-party dependency code as reviewable contributor source — the exact misclassification #2777 fixed on the server side.

Fix

Add bower_components and jspm_packages to VENDORED_PATH_RE, mirroring the path-matchers vendored classifier. The pattern stays directory-segment anchored ((?:^|\/)…\//), so a source file merely named like the directory (src/bower_components.ts) is unaffected.

Tests

Adds review-enrichment/test/provenance.test.ts: bower/jspm trees now classify as vendored, the existing dirs still do (control), and directory-name lookalikes / plain source stay null. Fails on the pre-fix regex, passes with the fix.

… provenance

The provenance analyzer's VENDORED_PATH_RE recognized vendor/node_modules/third_party
but not bower_components (Bower) or jspm_packages (JSPM) — installed-dependency
directories that are the same vendored case as node_modules. JSONbored#2777 added exactly
these to the server-side path classifier (src/signals/path-matchers.ts), but
review-enrichment ships as a standalone package with its own copy, so the fix did
not reach it. A committed bower/jspm tree therefore fell through to null (ordinary
source) instead of "vendored", so the provenance analyzer treated vendored
third-party code as reviewable contributor source.

Add both directories to VENDORED_PATH_RE (directory-segment anchored, so a source
file merely named like the dir is unaffected). Adds a provenance regression.
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 3, 2026
@loopover-orb

loopover-orb Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-03 19:13:06 UTC

2 files · 1 AI reviewer · no blockers · readiness 73/100 · CI green · clean

⏸️ Suggested Action - Manual Review

Review summary
This PR correctly extends the REES provenance classifier so newly added files under `bower_components/` and `jspm_packages/` are treated the same as existing vendored dependency directories. The regex remains directory-segment anchored, so the added cases do not catch ordinary filenames such as `src/bower_components.ts`. The new test drives `classifyAddedFile` through the package's existing `dist` import convention and covers both the new positive cases and the important lookalike negative case.

Nits — 5 non-blocking
  • nit: `review-enrichment/src/analyzers/provenance.ts:21` carries a long explanatory comment that mostly repeats the PR rationale; this would be easier to maintain if shortened to the invariant and parity target.
  • nit: `review-enrichment/test/provenance.test.ts:17` puts the existing-directory control cases on one long line, which is harder to scan than the multiline style used just above.
  • `review-enrichment/src/analyzers/provenance.ts:24`: consider keeping the vendored directory names in the same order as `src/signals/path-matchers.ts`, or add a short comment that this list intentionally mirrors that classifier, to reduce future drift.
  • `review-enrichment/test/provenance.test.ts:17`: format the control path list across lines like the new cases so future additions stay reviewable.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (no linked issue context).
Validation posture ❌ 5/25 Preflight is holding this PR: the review lane is unavailable, so it is not ready for automated review.
Contributor workload ✅ 10/10 Author activity: 248 registered-repo PR(s), 152 merged, 10 issue(s).
Contributor context ✅ Confirmed Gittensor contributor glorydavid03023; Gittensor profile; 248 PR(s), 10 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: glorydavid03023
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: not available
  • Official Gittensor activity: 248 PR(s), 10 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Explain no-issue PR.
  • Await review-lane availability.
  • Refresh registry data or choose a registered active repo.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 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 Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gittensory approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 6023bdb into JSONbored:main Jul 3, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant