Skip to content

feat(review): skip auto-review of docs-only PRs via review.auto_review.skip_docs_only - #3691

Closed
pekar9781 wants to merge 3 commits into
JSONbored:mainfrom
pekar9781:feat/auto-review-skip-docs-only-2063
Closed

feat(review): skip auto-review of docs-only PRs via review.auto_review.skip_docs_only#3691
pekar9781 wants to merge 3 commits into
JSONbored:mainfrom
pekar9781:feat/auto-review-skip-docs-only-2063

Conversation

@pekar9781

Copy link
Copy Markdown
Contributor

Closes #2063

Summary

  • Parse review.auto_review.skip_docs_only and round-trip it through reviewConfigToJson.
  • Extend decideReviewEligibility and evaluateAutoReviewSkipReason with a docs-only branch using isDocsOnlyChangedPaths (empty file lists stay eligible).
  • Thread changed paths through the public-surface and AI auto-review skip paths, loading stored PR files when the knob is on and paths are not yet cached.

Test plan

  • npm run typecheck
  • Unit tests for parser round-trip, eligibility matrix, wiring, and queue gate/regate paths

Made with Cursor

…w.skip_docs_only

Add manifest parsing and eligibility checks so PRs whose changed files are
all docs can bypass the review path when the knob is enabled.

Co-authored-by: Cursor <cursoragent@cursor.com>
@pekar9781
pekar9781 requested a review from JSONbored as a code owner July 6, 2026 04:23
@superagent-security

Copy link
Copy Markdown
Contributor

🚨 Contributor flagged. Click here for more info: Superagent Dashboard

@superagent-security superagent-security Bot added the contributor:flagged Contributor flagged for review by trust analysis. label Jul 6, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

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

Reconcile with the merged JSONbored#3690 base while keeping public-surface
eligibility, stored-file fallback, and isDocsOnlyChangedPaths wiring.

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.65217% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 93.35%. Comparing base (7a6ebab) to head (b5486f2).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/review/changed-files-classify.ts 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3691      +/-   ##
==========================================
- Coverage   93.35%   93.35%   -0.01%     
==========================================
  Files         315      315              
  Lines       32191    32204      +13     
  Branches    11809    11815       +6     
==========================================
+ Hits        30053    30065      +12     
  Misses       1507     1507              
- Partials      631      632       +1     
Files with missing lines Coverage Δ
src/queue/processors.ts 94.08% <100.00%> (+0.01%) ⬆️
src/review/review-eligibility.ts 100.00% <100.00%> (ø)
src/signals/focus-manifest.ts 99.08% <100.00%> (-0.01%) ⬇️
src/review/changed-files-classify.ts 87.50% <66.66%> (-12.50%) ⬇️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…3693)

Keep docs-only path fallback in resolveAutoReviewSkipForPullRequest while
incorporating max_added_lines/max_files wiring. Fix base-branch precedence
test by disabling skipDocsOnly for that case.

Co-authored-by: Cursor <cursoragent@cursor.com>
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 6, 2026
@loopover-orb

loopover-orb Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Caution

🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥

🛑 Gittensory review result - reject/close recommended

Review updated: 2026-07-06 04:55:38 UTC

10 files · 1 AI reviewer · 1 blocker · readiness 80/100 · CI failing · unstable

🛑 Suggested Action - Reject/Close

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.

Review summary
This PR adds a config-driven docs-only auto-review skip: a new isDocsOnlyChangedPaths helper (fail-safe eligible on empty paths) is threaded through both the AI-review skip path (evaluateAutoReviewSkipReason) and the eligibility/visibility path (decideReviewEligibility), with lazy-loading of stored PR files only when skip_docs_only is on and paths aren't already cached. The wiring in processors.ts is careful (config-gated fetch, no unconditional extra query) and the round-trip parsing/serialization and eligibility matrix are well covered by new unit tests. One thing worth double-checking: the modified queue.test.ts regate-pr test now asserts on the `github_app.pr_visibility_skipped` audit event with detail `docs_only` instead of the previously-asserted `github_app.ai_review_auto_review_skipped` event, so confirm the AI-review-skip audit path still fires as expected for docs-only PRs and wasn't silently dropped from coverage.

Nits — 5 non-blocking
  • src/review/review-eligibility.ts: the docs-only branch hardcodes matchedPattern: "docs-only" as a literal rather than an actual matched glob/pattern, overloading a field whose other use (ignored_author) holds a real matched pattern — consider a distinct field or null.
  • codecov/patch is at 95.65% against a 99% target; given the two independent docs-only code paths (evaluateAutoReviewSkipReason and decideReviewEligibility), worth confirming both true/false branches of the new `skipDocsOnly === true && changedPaths.length === 0` lazy-fetch guard in processors.ts are exercised.
  • test/unit/queue.test.ts:3312 switched its audit-event assertion target from `github_app.ai_review_auto_review_skipped` to `github_app.pr_visibility_skipped` — worth a one-line comment noting why, since it silently changes what the regression test guards.
  • Add/confirm a test where changedPathsForEligibility is already non-empty from pr.changedFiles (no listPullRequestFiles fallback call) to lock in the 'skip redundant fetch' behavior in maybePublishPrPublicSurface (src/queue/processors.ts).
  • Consider consolidating the two independent docs-only checks (evaluateAutoReviewSkipReason in focus-manifest.ts and decideReviewEligibility in review-eligibility.ts) into one call site if both are meant to always agree, to avoid future drift between the AI-review skip and the visibility/gate skip decisions.

Why this is blocked

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.

CI checks failing

  • codecov/patch — 95.65% of diff hit (target 99.00%)
Signal Result Evidence
Code review ❌ 1 blocker 1 reviewer
Linked issue ✅ Linked #2063
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 ❌ 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: 1089 registered-repo PR(s), 746 merged, 41 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jony376; Gittensor profile; 1089 PR(s), 41 issue(s).
Gate result ❌ Blocking Repo-configured hard blocker found.
Review context
  • Author: jony376
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: TypeScript, Python, JavaScript, Rust, MDX, Clojure, Cuda, Dart
  • Official Gittensor activity: 1089 PR(s), 41 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Await review-lane availability.
  • Refresh registry data or choose a registered active repo.
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 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Gittensory is closing this pull request on the maintainer's behalf (CI is failing (codecov/patch); No linked issue detected). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

@loopover-orb loopover-orb Bot closed this Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor:flagged Contributor flagged for review by trust analysis. gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(review): skip auto-review of docs-only PRs via review.auto_review.skip_docs_only

1 participant