Skip to content

fix(review): rank long-form doc extensions in diffFilePriority#3335

Merged
gittensory-orb[bot] merged 1 commit into
JSONbored:mainfrom
jimcody1995:fix/review-diff-longform-doc-priority
Jul 5, 2026
Merged

fix(review): rank long-form doc extensions in diffFilePriority#3335
gittensory-orb[bot] merged 1 commit into
JSONbored:mainfrom
jimcody1995:fix/review-diff-longform-doc-priority

Conversation

@jimcody1995

Copy link
Copy Markdown
Contributor

Summary

  • Extend diffFilePriority in review-grounding.ts and review-diff.ts to treat .markdown and .asciidoc (plus existing .adoc) as docs priority 2, not source 0.
  • Mirrors the long-form doc spellings already recognized in rag.ts, path-matchers.ts, and review-enrichment analysis-context.ts (feat(enrichment): classify long-form doc extensions as docs #3329).
  • On large PRs with a tight diff budget, GUIDE.markdown or docs/spec.asciidoc no longer displace real source files.

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 an issue, or this is small enough that the summary explains why an issue is not needed.

Validation

  • git diff --check
  • npm run actionlint (via npm run test:ci)
  • npm run typecheck (via npm run test:ci)
  • 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 (via npm run test:ci)
  • npm run build:mcp (via npm run test:ci)
  • npm run test:mcp-pack (via npm run test:ci)
  • npm run ui:openapi:check (via npm run test:ci)
  • npm run ui:lint (via npm run test:ci)
  • npm run ui:typecheck (via npm run test:ci)
  • npm run ui:build (via npm run test:ci)
  • 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:

  • Full gate run as npm run test:ci on Node 22 before push.

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

N/A — backend review diff ordering only; no visible UI change.

Notes

Conflict avoidance: Touches only src/review/review-grounding.ts, src/review/review-diff.ts, and their unit tests. Verified zero file overlap with open PRs (#3316 dart classifiers, #3304 mega, #3333/#3332 secret-scan, #3322 unsafe-any, #3331 engine, #3314 miner, #3315/#3313/#3310 selfhost, #3305 enrichment-wire, #3281 grafana, #3255 queue). Should merge cleanly after any of those land without rebase.

Made with Cursor

GUIDE.markdown and spec.asciidoc were treated as source(0) under a tight
diff budget, displacing real code. Align review-grounding and review-diff
with rag.ts and path-matchers doc spellings.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jimcody1995 jimcody1995 requested a review from JSONbored as a code owner July 5, 2026 03:49
@superagent-security

Copy link
Copy Markdown

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

@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3335   +/-   ##
=======================================
  Coverage   93.87%   93.87%           
=======================================
  Files         277      277           
  Lines       30522    30522           
  Branches    11114    11114           
=======================================
  Hits        28654    28654           
  Misses       1211     1211           
  Partials      657      657           
Files with missing lines Coverage Δ
src/review/review-diff.ts 90.90% <100.00%> (ø)
src/review/review-grounding.ts 92.85% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gittensory-orb gittensory-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.5x multiplier. label Jul 5, 2026
@gittensory-orb

gittensory-orb Bot commented Jul 5, 2026

Copy link
Copy Markdown

Warning

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

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-05 03:54:03 UTC

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

⏸️ Suggested Action - Manual Review

Review summary
This change correctly extends both copies of diffFilePriority so .markdown and .asciidoc now rank with other documentation files instead of source, and the added unit coverage exercises the real exported functions in both review-diff and review-grounding. The behavior matches the stated budget-ordering goal: long-form docs no longer compete with source files before tests/generated/lockfiles are deprioritized. The notable maintenance risk is that this classifier is still duplicated in two source files, which is why the same regex and test had to be changed twice.

Nits — 3 non-blocking
  • nit: src/review/review-diff.ts:25 and src/review/review-grounding.ts:115 still duplicate the same diffFilePriority regex, so future extension drift remains easy even though this PR updates both copies correctly.
  • src/review/review-diff.ts:22 and src/review/review-grounding.ts:112: consider moving the shared priority classifier or at least the docs-extension regex into one helper so the next doc-extension fix does not need parallel edits and duplicate tests.
  • 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: 46 registered-repo PR(s), 23 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jimcody1995; Gittensor profile; 46 PR(s), 0 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: jimcody1995
  • 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: 46 PR(s), 0 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

@gittensory-orb gittensory-orb Bot left a comment

Copy link
Copy Markdown

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.

@gittensory-orb gittensory-orb Bot merged commit 9ff086e into JSONbored:main Jul 5, 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.5x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant