Skip to content

fix(orb): sync diffFilePriority vendored-directory regex across twin copies - #8723

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
joaovictor91123:fix/diff-file-priority-vendored-twins-8648
Jul 26, 2026
Merged

fix(orb): sync diffFilePriority vendored-directory regex across twin copies#8723
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
joaovictor91123:fix/diff-file-priority-vendored-twins-8648

Conversation

@joaovictor91123

Copy link
Copy Markdown
Contributor

Summary

  • Sync src/review/review-diff.ts and src/review/review-grounding.ts diffFilePriority vendored-directory regexes to the already-fixed canonical pattern in packages/loopover-engine/src/review/diff-file-priority.ts (adds vendored, third_party, third-party, bower_components, jspm_packages).
  • Strengthen scripts/check-engine-parity.ts by adding the exact regex body as a shared marker and registering review-grounding.ts as a second named twin pair so CI catches future divergence.
  • Add unit coverage in both twin test suites for the five previously-missing directories, plus a parity regression proving a stale host regex fails the marker check.

Closes #8648

Scope

  • The PR title follows type(scope): short summary Conventional Commit format, for example fix(api): restore profile access checks.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves (e.g. Closes #123) — a linked open issue is required for every contributor PR.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally; codecov/patch requires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • Skipped monorepo-wide UI/MCP/workers/actionlint/audit checks: this PR only touches src/review twin diffFilePriority copies, scripts/check-engine-parity.ts, and their unit tests. Validated with a tsx smoke harness covering both twin priority classifications, all named twin-pair marker presence (including the new grounding pair), and the stale-regex failure path. Full codecov/patch + vitest will run in CI (local Node is v24; repo engines pin Node 22).

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks.
  • Visible UI changes include a UI Evidence section below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

UI Evidence

Not applicable — no visible UI changes.

State / title JPG/PNG evidence
N/A

Notes

  • Fork main was hard-synced to upstream main (ca9afd91) before branching.
  • Duplicate check before push/open: no open PRs referenced #8648 or overlapping diffFilePriority/vendored titles.

@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

1 similar comment
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.79%. Comparing base (ca9afd9) to head (1097eb5).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8723   +/-   ##
=======================================
  Coverage   93.79%   93.79%           
=======================================
  Files         797      797           
  Lines       79478    79478           
  Branches    24079    24079           
=======================================
  Hits        74543    74543           
  Misses       3563     3563           
  Partials     1372     1372           
Flag Coverage Δ
backend 95.06% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/review/review-diff.ts 96.00% <100.00%> (ø)
src/review/review-grounding.ts 98.98% <100.00%> (ø)

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 26, 2026
@loopover-orb

loopover-orb Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-26 01:19:12 UTC

6 files · 1 AI reviewer · no blockers · readiness 98/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR syncs the vendored-directory regex in both host copies of diffFilePriority (review-diff.ts, review-grounding.ts) to match the already-fixed canonical engine copy in packages/loopover-engine/src/review/diff-file-priority.ts, adding vendored/third_party/third-party/bower_components/jspm_packages. It also registers review-grounding.ts as a second named twin pair in check-engine-parity.ts and adds the exact regex body as a marker so CI catches future drift, plus a regression test proving a stale host regex fails the marker check. The fix is correctly traced to its root (both host copies previously had the pre-#7526 regex while the engine copy was already fixed) and the new tests exercise real paths (vendored/lib.js etc.) against the actual diffFilePriority function, not a fabricated scenario.

Nits — 2 non-blocking
  • scripts/check-engine-parity.ts:83 the DIFF_FILE_PRIORITY_GROUNDING_TWIN_PAIR reuses engineFileName: "diff-file-priority.ts" pointing at the same engine file as DIFF_FILE_PRIORITY_TWIN_PAIR — correct given both host copies share one engine source of truth, but worth a one-line comment noting this is intentional (two host twins, one engine original) since it looks at first glance like a copy-paste mistake.
  • None beyond the existing nit — the change is narrow, well-tested, and matches its stated intent.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #8648
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 (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 161 registered-repo PR(s), 73 merged, 5 issue(s).
Contributor context ✅ Confirmed Gittensor contributor joaovictor91123; Gittensor profile; 161 PR(s), 5 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
Both twin files' regexes now match the canonical fixed pattern (adding vendored/third_party/third-party/bower_components/jspm_packages), the parity script gains a regex-body marker and a new named twin pair for review-grounding.ts, and both test suites plus the parity test add coverage for the five directory names and a regression guard against reintroduced divergence.

Review context
  • Author: joaovictor91123
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, JavaScript, MDX, TypeScript, C++, CSS, Rust
  • Official Gittensor activity: 161 PR(s), 5 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
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.
🧪 Chat with LoopOver

Ask 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.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

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.

  • Re-run LoopOver 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.

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

@loopover-orb
loopover-orb Bot merged commit fac2222 into JSONbored:main Jul 26, 2026
8 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.

fix(orb): diffFilePriority's vendored-directory regex is stale in both src/review twin copies

1 participant