improvement(execution): multiple response blocks#3918
improvement(execution): multiple response blocks#3918icecrasher321 wants to merge 2 commits intostagingfrom
Conversation
PR SummaryMedium Risk Overview Multiple Reviewed by Cursor Bugbot for commit 33aa581. Configure here. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR removes the single-instance constraint on the Response block and implements a "first response wins" policy for workflows that place Response blocks on multiple branches (e.g., after a Router or Condition). The execution engine gains a Key changes:
Confidence Score: 5/5Safe to merge — implementation is correct, well-tested, and documentation is updated to reflect the new semantics. All identified findings are P2 or informational. The core logic (responseOutputLocked flag, first-wins policy, error suppression for locked state, fast-path no-op for late completions) is correct and covered by thorough tests. No regressions to existing paths are introduced. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[run: processQueue loop] --> B{stoppedEarlyFlag or errorFlag?}
B -- Yes --> C[waitForAllExecutions]
B -- No --> D[dequeue & executeNodeAsync]
D --> E[nodeOrchestrator.executeNode]
E --> F[withQueueLock: handleNodeCompletion]
F --> G{stoppedEarlyFlag && responseOutputLocked?}
G -- Yes --> H[early return — no-op]
G -- No --> I{isPauseMetadata?}
I -- Yes --> J[register pause, return]
I -- No --> K[nodeOrchestrator.handleNodeCompletion]
K --> L{isResponseBlock?}
L -- Yes --> M{responseOutputLocked?}
M -- No --> N[lock finalOutput, set responseOutputLocked=true]
N --> O[set stoppedEarlyFlag=true, return]
M -- Yes --> O
L -- No --> P{isFinalOutput && !responseOutputLocked?}
P -- Yes --> Q[set finalOutput]
P -- No --> R[processOutgoingEdges, addMultipleToQueue]
Q --> R
C --> S{errorFlag && !responseOutputLocked?}
S -- Yes --> T[throw error]
S -- No --> U[return success result with locked finalOutput]
Reviews (2): Last reviewed commit: "address comments" | Re-trigger Greptile |
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 33aa581. Configure here.
Summary
Type of Change
Testing
Tested manually
Checklist