fix(review): require auto close for review evasion#4088
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4088 +/- ##
=======================================
Coverage 93.63% 93.63%
=======================================
Files 384 384
Lines 35822 35828 +6
Branches 13146 13149 +3
=======================================
+ Hits 33543 33549 +6
Misses 1618 1618
Partials 661 661
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-08 00:14:37 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.
|
Motivation
reviewEvasionProtectiondefault toclose, and the enforcement handlers treatedauto_with_approvalas an "acting" autonomy, which allowed review-evasion paths to perform live GitHub mutations without going through the approval queue.auto_with_approvalforclosecould receive unapproved reopen/close PATCHes when a contributor self-closed, converted to draft, or repeatedly cycled draft state.Description
closeautonomy to be exactlyauto(not just an acting level) before the review-evasion handlers perform live GitHub reopen/close mutations insrc/queue/processors.ts.closeresolves toauto_with_approvalthe handlers now deny enforcement and record an audit event indicating that the action "requires approval" instead of bypassing the approval flow; the same guard was added to the self-close, draft-conversion, and repeated draft-cycling handlers.test/unit/queue.test.tsthat assert live PATCHes are not performed and that an audit event contains "requires approval" for the three review-evasion paths whencloseisauto_with_approval.reviewEvasionProtection: "off",close: "auto", dry-run mode, paused/frozen modes, and write-permission/readiness checks.Testing
npm run typecheckwhich completed successfully.npx vitest run test/unit/queue.test.ts -t "review-evasion protection"and the added regression-t "REGRESSION: denies live"suites, both passed locally.npm run test:coveragebut the full coverage run did not complete within this environment (run was attempted and stopped); full local gate (npm run test:ci) was not executed here.src/queue/processors.tsandtest/unit/queue.test.tsand that the change is limited to the enforcement gate and test coverage described above.Codex Task