Skip to content

feat(review): add review.auto_review config container + parseReviewConfig/reviewConfigToJson round-trip #2058

Description

@JSONbored

Foundation for #1954: introduce a new review.auto_review sub-mapping on FocusManifestReviewConfig with an empty/default shape that round-trips through parseReviewConfig and reviewConfigToJson byte-identically when absent. No predicate logic yet — just the parsed container + a pure decideReviewEligibility(config, prFacts) shell that always returns eligible, so subsequent predicate PRs each add one branch. Default unset ⇒ every PR reviewed exactly as today.

Deliverables

  • Add an autoReview field (typed shape with all predicate knobs defaulting to off/empty) to FocusManifestReviewConfig in src/signals/focus-manifest.ts:124
  • Extend parseReviewConfig (src/signals/focus-manifest.ts:653) to parse review.auto_review as a mapping (warn + ignore on non-mapping), include it in the empty literal (src/signals/focus-manifest.ts:654) and the present computation (src/signals/focus-manifest.ts:681)
  • Extend reviewConfigToJson (src/signals/focus-manifest.ts:835) to emit auto_review only when a knob is set (absent ⇒ omitted key ⇒ byte-identical)
  • Add a pure decideReviewEligibility(autoReview, facts): { eligible: boolean; skipReason: string | null } shell (returns eligible=true always) in a new src/review/review-eligibility.ts module
  • Unit tests: absent/empty round-trip is byte-identical, non-mapping warns+ignores, shell returns eligible; cover both branches of every ??/optional (97% branch-counted)

References

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

Part of #1954.


size: S · gittensor:feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 1.25x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions