Skip to content

fix(review): the re-gate sweep must reuse the #1462 AI cache (avoid re-reviewing unchanged PRs every tick) #1568

Description

@JSONbored

Priority: P1. Child of #1029.

Problem: The advisory re-gate sweep runs every ~2min. If the sweep review path (regatePullRequestreReviewStoredPullRequest, src/queue/processors.ts) does NOT consult/populate the #1462 ai_review_cache (getCachedAiReview/putCachedAiReview), every sweep re-runs the (expensive, max-effort) AI review on UNCHANGED PRs — wasting tokens and overloading the system the user explicitly wants to avoid.

Requirements: the sweep must skip the AI re-run when the PR's head SHA was already reviewed (cache hit), and cache the result on a miss — one paid review per code-state, re-rendered from cache otherwise. Deliverables: verify/wire the cache get+put in the sweep path; a test that a second sweep of an unchanged PR does NOT spawn a new claude review.

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions