Fix the review step so a finished plan can complete and finished work isn't re-checked forever#5460
Open
andrescera wants to merge 2 commits into
Open
Conversation
Add REJECT_VERDICT_PATTERN and export classifyFinalWaveVerdict() returning 'approve' | 'reject' | 'missing'. Keeps shouldPauseForFinalWaveApproval semantics for the approve path. Exposes the classification so T12 can escalate on 'missing' instead of looping forever. Add buildMissingVerdictEscalation() and buildAdvanceDirective() builders to verification-reminders.ts. The escalation message names the task and says the boulder is paused; the advance directive is short and does not contain 4-phase content.
… tasks (C) When a final-review task completes with no clear verdict, set waitingForFinalWaveApproval=true (stops idle-event auto-re-drive) and emit buildMissingVerdictEscalation() toast + system reminder. Fire-and- stop, not await. (D) Add verifiedTaskKeys: Set<string> to SessionState. Before emitting the heavy 4-phase completion gate, check if the task is already checked or already in verifiedTaskKeys; if so, emit buildAdvanceDirective() instead. Clear verifiedTaskKeys on plan change. Also route background_output retrievals of already-handled tasks to the lightweight path (no 4-phase reminder for result retrievals).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix the review step so a finished plan can complete and finished work isn't re-checked forever
The problem. After the assistant finishes a piece of work and hands it to a reviewer, two things went wrong. First, if a reviewer's reply didn't contain a clear approve-or-reject decision, the plan could get stuck permanently: it would never be considered finished, and the assistant would keep trying with no way out. Second, once a part of the plan was done, the assistant could fall back into re-checking that same finished work again and again, repeating the same review instead of moving on to what was left.
When it started. The strict approve check was introduced in v3.12.0 (commit 04b0c6f); the repeated re-checking of completed work comes from the completion-enforcement behavior added in v3.11.0 (commit bf8d0ff) and extended in v3.14.1 (commit 6e700e0).
The solution. When a reviewer doesn't give a clear decision, the assistant now pauses and asks you to confirm or re-run the review, instead of silently looping forever. And once a piece of work is verified and marked done, the assistant no longer re-reviews it - it moves on to the next unfinished part, or wraps up if nothing is left.
Summary by cubic
Stops infinite review loops and prevents re-verifying finished work so plans can complete. Pauses on unclear final-review verdicts and guides you to confirm or re-run the review.
waitingForFinalWaveApproval, show a toast, and send a short escalation with steps to confirm or re-run.verifiedTaskKeystracks this and resets on plan change (also used forbackground_outputretrievals).classifyFinalWaveVerdict()for reuse and to avoid false re-drives.Written for commit f7aa7d3. Summary will update on new commits.