Skip to content

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

Description

@JSONbored

Test-only hardening for #1954. Once the predicate branches land, add a consolidated test matrix that exercises decideReviewEligibility across every predicate combination and asserts the review.auto_review parse/serialize round-trip is lossless and byte-identical when absent. Deterministic; pure-function tests — an ideal good-first-issue.

Deliverables

  • Round-trip tests: parseReviewConfig ∘ reviewConfigToJson is identity for representative auto_review mappings; absent ⇒ omitted key (src/signals/focus-manifest.ts:653,835)
  • Predicate-precedence matrix for decideReviewEligibility (src/review/review-eligibility.ts): when multiple predicates fire, assert the documented skipReason precedence is stable
  • Malformed-config tests: non-mapping auto_review, non-list globs, negative ints ⇒ warn + default (byte-identical eligible)
  • Ensure 97% branch coverage on src/review/review-eligibility.ts including the all-eligible fall-through

References

  • src/review/review-eligibility.ts
  • src/signals/focus-manifest.ts:653
  • src/signals/focus-manifest.ts:835
  • #1954

Part of #1954.


size: S · gittensor:bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.help wantedExtra attention is needed

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions