Skip to content

test(review): auto_review round-trip and precedence matrix - #3683

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
luciferlive112116:test/review-auto-review-matrix-2071
Jul 6, 2026
Merged

test(review): auto_review round-trip and precedence matrix#3683
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
luciferlive112116:test/review-auto-review-matrix-2071

Conversation

@luciferlive112116

Copy link
Copy Markdown
Contributor

Closes #2071

Summary

Add consolidated test/unit/auto-review-config-matrix.test.ts covering the #2071 deliverables:

  • reviewConfigToJson omit-when-default + per-field / all-knobs round-trip
  • Malformed auto_review config (non-mapping, non-list globs, negative ints) ⇒ warn + defaults
  • evaluateAutoReviewSkipReason predicate-precedence matrix (draft > author > title > base > commit threshold)
  • decideReviewEligibility alignment with ignore_authors (incl. skipReason: null on eligible paths)

Test-only; no src/ changes.

Scope

Validation

  • git diff --check
  • npm run typecheck
  • npx vitest run test/unit/auto-review-config-matrix.test.ts (21/21 pass)
  • Full CI suite deferred to GitHub Actions

Safety

  • No secrets, no runtime behavior changes, no UI changes.

UI Evidence

N/A — test-only.

Notes

Locks #1954 review.auto_review knob behavior in one matrix file instead of scattering assertions across focus-manifest.test.ts. Prior closed #3682 retargeted here because #2096 is closed and no longer satisfies the linked-issue gate.

Made with Cursor

Consolidated pure tests for review.auto_review parse/serialize round-trip, malformed-config warnings, evaluateAutoReviewSkipReason precedence, and decideReviewEligibility alignment.

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

Copy link
Copy Markdown
Contributor

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

@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.34%. Comparing base (bdc5870) to head (0a45ad1).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3683   +/-   ##
=======================================
  Coverage   93.34%   93.34%           
=======================================
  Files         315      315           
  Lines       32129    32129           
  Branches    11780    11780           
=======================================
  Hits        29991    29991           
  Misses       1507     1507           
  Partials      631      631           
🚀 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 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:51:45 UTC

1 file · 1 AI reviewer · no blockers · readiness 80/100 · CI green · clean

⏸️ Suggested Action - Manual Review

Review summary
This is a well-scoped, test-only addition consolidating auto_review config round-trip, malformed-input handling, and skip-reason precedence checks into one matrix file, closing #2071 as claimed. The tests exercise real exported symbols (parseFocusManifest, reviewConfigToJson, evaluateAutoReviewSkipReason, decideReviewEligibility, EMPTY_AUTO_REVIEW_CONFIG) from src/signals/focus-manifest and src/review/review-eligibility, and CI (including codecov/patch and validate-code) already passed on this exact commit, so the assertions are driving real code paths rather than fabricated ones. No src/ changes are present, so there's no risk of behavior drift — this simply locks in existing behavior with tests.

Nits — 5 non-blocking
  • The malformed-config test for a non-mapping `auto_review: "nope"` (test/unit/auto-review-config-matrix.test.ts:53-61) only checks the warning message and resulting defaults/eligibility but doesn't assert `reviewConfigToJson` still round-trips to null for the reset config, unlike the other malformed cases — consider adding that assertion for symmetry.
  • The precedence matrix (lines 88-160) covers draft/author/title/base/commit-threshold ordering well, but doesn't include a case where `ignoreTitleKeywords` uses case-insensitive matching explicitly called out (config uses lowercase 'wip' vs input 'WIP: bump deps') — worth a one-line comment noting that's intentional case-insensitivity coverage, since it's easy to misread as a typo.
  • Test file has no top-level `describe` grouping tying all four suites together under the test(review): unit tests for the auto_review eligibility parser round-trip + decideReviewEligibility matrix #2071 umbrella; minor organizational nit only, not blocking given each suite already tags the issue number.
  • Consider asserting `reviewConfigToJson` output for the non-mapping malformed case too (test/unit/auto-review-config-matrix.test.ts:53), matching the symmetry of the round-trip suite above it.
  • If `evaluateAutoReviewSkipReason`'s title-keyword matching is intentionally case-insensitive, a short inline comment near the 'WIP title' precedence case (line 119) would help future readers avoid seeing it as a bug.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #2071, #3682
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 (2 linked issues).
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: 173 registered-repo PR(s), 90 merged, 20 issue(s).
Contributor context ✅ Confirmed Gittensor contributor luciferlive112116; Gittensor profile; 173 PR(s), 20 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: luciferlive112116
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: JavaScript, MDX, Python, Rust, TypeScript
  • Official Gittensor activity: 173 PR(s), 20 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 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 c4c977b 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.

test(review): unit tests for the auto_review eligibility parser round-trip + decideReviewEligibility matrix

1 participant