Skip to content

feat(review): pure linked-issue satisfaction assessment builder (advisory finding) #2172

Description

@JSONbored

Add the deterministic-shaped, AI-backed ANALYSIS core of #1961: given the already-fetched linked-issue text and the PR diff/title, produce a bounded advisory result {status: addressed|partial|unaddressed, rationale, confidence}. Pure function + prompt composition only — NO gate wiring, NO disposition change (that stays maintainer-only). Fail-safe: no issue text or model error yields no finding, and a low confidence never emits an 'unaddressed' call.

Deliverables

  • New src/services/linked-issue-satisfaction.ts exporting an assessment builder that takes {issueText, prTitle, prBody, diff} and returns a public-safe {status, rationale, confidence} | null
  • Confidence gate constant (mirror ai-review.ts AI_DEFAULT_CONFIDENCE handling in src/services/ai-review.ts:384) so an 'unaddressed' verdict below the floor degrades to no finding
  • Fail-safe guards: empty/absent issue text, malformed model output, or thrown error all return null (never throw into the caller)
  • Public-safe rationale filtering reusing the existing public-safe helper used by composeInlineFindings
  • Unit tests covering every branch: each status, empty issue, low-confidence suppression, model-error path, both sides of the confidence floor (97% branch-counted)

References

  • src/review/linked-issue-hard-rules.ts:1
  • src/review/grounding-wire.ts
  • src/services/ai-review.ts:384
  • src/services/ai-review.ts:215

Part of #1961.


size: S · held for later release (gittensor:feature once activated)

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions