You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(agent): deny approve/merge when a live manual-review hold exists (#3472) (#3483)
Two independent plan-and-execute passes can evaluate the same PR head
(a webhook re-review racing a regate-repair/sweep pass): the loser of
the AI-review lock holds the PR for manual review (label + assign),
while the winner's own slower AI review later resolves cleanly and
stages approve/merge from a plan-time snapshot that predates the
hold. Neither the per-PR actuation lock nor the executor's freshness
guard checks the PR's live labels, so the hold was silently bypassed.
Add a live guard immediately before approve/merge that re-checks the
same freshness fetch for the configured manual-review label and
denies the action if it's present -- self-scoping to the same head
(a new commit already fails freshness first) with no new locking or
persistence required.
Closes#3482
it("REGRESSION (#3472 split-brain): LIVE merge is denied when the default manual-review label is present on the live PR, even though the plan itself computed a clean merge",async()=>{
371
+
constenv=createTestEnv({});
372
+
// Simulates a sibling pass (e.g. a webhook re-review) publishing a manual-review hold WHILE this pass's own
373
+
// gate evaluation was still in flight -- the plan below was computed before that hold existed, so only the
374
+
// executor's live re-check (not the plan) can catch it.
it("the manual-review hold guard is scoped to approve/merge only -- a label/close/assign action is unaffected by the live manual-review label",async()=>{
0 commit comments