Skip to content

feat(review): skip auto-review when a configured label is present via review.auto_review.skip_labels - #3686

Merged
loopover-orb[bot] merged 3 commits into
JSONbored:mainfrom
bohdansolovie:feat/review-auto-review-skip-labels-2062-v3
Jul 6, 2026
Merged

feat(review): skip auto-review when a configured label is present via review.auto_review.skip_labels#3686
loopover-orb[bot] merged 3 commits into
JSONbored:mainfrom
bohdansolovie:feat/review-auto-review-skip-labels-2062-v3

Conversation

@bohdansolovie

Copy link
Copy Markdown
Contributor

Summary

  • Add review.auto_review.skip_labels to the focus manifest so maintainers can skip AI auto-review when a PR carries a matching label (case-insensitive).
  • Wire label checks through evaluateAutoReviewSkipReason / resolvePullRequestAutoReviewSkipReason and the queue processor, emitting review skipped (label) audit events.
  • Add unit, wiring, and queue integration tests including branch coverage for parse warnings, non-matching labels, and omitted pr.labels.

Fixes #2062

Test plan

  • npx tsc -p tsconfig.json --noEmit
  • focus-manifest parse/evaluate/round-trip tests for skip_labels
  • auto-review-wiring tests for resolver defaults and resolveAutoReviewSkipForPullRequest
  • queue.test.ts integration test for label-based skip + audit detail

Made with Cursor

bohdansolovie and others added 3 commits July 6, 2026 05:31
Add review.auto_review.skip_labels so PRs carrying matching labels bypass AI review, with case-insensitive matching and manifest round-trip.

Fixes JSONbored#2062
Add queue integration, wiring, and round-trip tests so label-based
auto-review skips are exercised end-to-end.

Co-authored-by: Cursor <cursoragent@cursor.com>
Exercise empty-config/non-matching label paths, non-string parse
warnings, omitted labels defaults, and undefined pr.labels wiring.

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

Copy link
Copy Markdown
Contributor

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

@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

Warning

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

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-06 03:59:20 UTC

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

⏸️ Suggested Action - Manual Review

Review summary
This PR adds `review.auto_review.skip_labels`, a config-driven, case-insensitive PR-label skip for AI auto-review, wired consistently through focus-manifest parsing (parseAutoReviewSkipLabels with dedup, cap, and public-safe-text validation), evaluateAutoReviewSkipReason, resolvePullRequestAutoReviewSkipReason, and the queue processor's PR record. The implementation mirrors the existing ignoreTitleKeywords/ignoreAuthors patterns closely, correctly defaults missing labels to an empty array at both wiring sites, and ships parse/evaluate/round-trip/queue-integration tests covering the added branches. This is a clean, narrowly-scoped, config-first feature that closes the linked issue #2062.

Nits — 6 non-blocking
  • src/queue/processors.ts: `maybePublishPrPublicSurface` passes `pr.labels` through without an explicit `?? []` at the call site (relying on the default inside `resolveAutoReviewSkipForPullRequest`) — worth a one-line comment or an explicit fallback there too so the two call sites don't silently diverge if one is refactored independently.
  • The external secret scanner flagged test/unit/queue.test.ts:3272, but this is `GITHUB_APP_PRIVATE_KEY: await generatePrivateKeyPem()`, a test-generated key, not a real leaked secret — no action needed.
  • test/unit/focus-manifest.test.ts: consider also asserting the exact cap value (e.g. `expect(MAX_PATH_INSTRUCTIONS).toBe(50)`) rather than only the resulting length, to make the 50-entry expectation self-documenting if the shared constant ever changes for an unrelated field.
  • Double check that PR label sync (webhook payload / detail-sync) always populates `pr.labels` before `resolveAutoReviewSkipForPullRequest` runs, since a stale or unsynced labels array would silently disable the skip; a one-line note in the AutoReviewEligibilityInput doc comment about this dependency would help future maintainers.
  • Since `skipLabels` reuses `MAX_PATH_INSTRUCTIONS` as its cap, consider a dedicated constant name (e.g. `MAX_SKIP_LABELS`) if the two lists are ever expected to have independently-tunable limits.
  • 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 ✅ Linked #2062
Related work ⚠️ 1 scoped overlap Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High 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: 331 registered-repo PR(s), 195 merged, 8 issue(s).
Contributor context ✅ Confirmed Gittensor contributor bohdansolovie; Gittensor profile; 331 PR(s), 8 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: bohdansolovie
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: Python, C++, JavaScript
  • Official Gittensor activity: 331 PR(s), 8 issue(s).
  • Related work: Titles/paths share 8 meaningful terms. (issue #2051, issue #2063)
Contributor next steps
  • Review top overlaps.
  • Add a concise scope and risk note.
  • Await review-lane availability.
  • Refresh registry data or choose a registered active repo.
  • Check active issues and PRs before submitting.
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

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.35%. Comparing base (bdc5870) to head (8ec1347).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3686   +/-   ##
=======================================
  Coverage   93.34%   93.35%           
=======================================
  Files         315      315           
  Lines       32129    32157   +28     
  Branches    11780    11791   +11     
=======================================
+ Hits        29991    30019   +28     
  Misses       1507     1507           
  Partials      631      631           
Files with missing lines Coverage Δ
src/queue/processors.ts 94.05% <100.00%> (+<0.01%) ⬆️
src/signals/focus-manifest.ts 99.07% <100.00%> (+0.02%) ⬆️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@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 d333463 into JSONbored:main Jul 6, 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.

feat(review): skip auto-review when a configured label is present via review.auto_review.skip_labels

1 participant