fix(review): prevent manual-review label from freezing AI review across head changes - #3550
fix(review): prevent manual-review label from freezing AI review across head changes#3550JSONbored wants to merge 1 commit into
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-05 16:49:27 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 5 non-blocking
Concerns raised — review before merging
Review context
Contributor next steps
Signal definitions
🟩 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.
|
|
Noting for the record, since this closed on merge-conflict grounds rather than the substantive one: this PR's fix hardcodes the manual-review freeze off entirely ( |
Motivation
manual-reviewlabel could cause the agent to reuse a previously published AI review for a different head SHA, allowing stale findings to be applied after a contributor push and creating an authorization bypass risk.getLatestPublishedAiReviewignored head SHA when selecting a published review and the queue logic treated the label itself as a freeze predicate that suppressed fresh review eligibility.Description
headShaingetLatestPublishedAiReview, and returnnullfor null/absent heads so only same-head published reviews are reused.manual-reviewlabel no longer suppresses the normal head+fingerprint cache / fresh-review path in the queue processor (maybePublishPrPublicSurface).test/unit/ai-review-cache.test.tsandtest/unit/queue.test.tsto assert that published reviews from different head SHAs are not returned and that a contributor push with a sticky label goes through the fresh-review flow when appropriate.Testing
npx vitest run test/unit/ai-review-cache.test.ts test/unit/queue.test.ts -t "maintainer-gated freeze|freeze-owner|LatestPublished|manual-review label alone", and all selected tests passed.npx vitest run test/unit/auto-review-wiring.test.tsandnpm run typecheck, both completed successfully.git diff --checkwhich reported no issues;npm audit --audit-level=moderatefailed due to a registry403 Forbiddenin this environment (audit request error) and is noted but unrelated to the logic changes.Codex Task