fix(console): match child-workflow inner blocks by instanceId when reconciling dropped SSE events#4575
Conversation
…conciling dropped SSE events
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Updates and expands tests to reflect the new identity semantics and adds a new Reviewed by Cursor Bugbot for commit 5754939. Configure here. |
Greptile SummaryThis PR fixes a bug where child-workflow inner blocks could get stuck
Confidence Score: 5/5Safe to merge — the change is a targeted single-function fix with no side effects outside the reconciliation path, and is well-covered by both updated unit tests and a new real-store integration test. The rename from static blockId to per-invocation instanceId is applied consistently in all three call sites (reconcileChildTraceSpans, spanConsoleIdentity, findConsoleEntryForSpan) and the recursive depth case. The integration test directly validates the store mutation end-to-end, covering the exact regression shape. No changed code touches auth, persistence, or network paths. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[reconcileFinalBlockLogs] --> B{runningEntry found?}
B -- yes --> C[updateConsole: flip isRunning to false]
B -- no --> D[skip top-level update]
C --> E{childWorkflowInstanceId present?}
D --> E
E -- no --> F[skip child reconcile]
E -- yes --> G[reconcileChildTraceSpans using instanceId]
G --> H[findConsoleEntryForSpan by instanceId plus span identity]
H --> I[updateConsole span entry with childWorkflowBlockId equals instanceId]
I --> J{span has children?}
J -- yes --> K[recursive call using matchingEntry.childWorkflowInstanceId or parent instanceId]
K --> G
J -- no --> L[done]
Reviews (2): Last reviewed commit: "fix(console): drop noisy warn when recon..." | Re-trigger Greptile |
|
@greptile |
|
@cursor review |
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 5754939. Configure here.
Summary
isRunning: true(manifested as 34.57s wall-clock duration +value undefinedonsetProjectsetc.) when ablock:completedSSE event was dropped in transitreconcileChildTraceSpansmatched entries against the parent's static nodeId, but inner-block entries store the per-invocation instanceId (set server-side viachildWorkflowContext.parentBlockId). Strict equality always failed → rescue silently no-op'd →finishRunningEntrieswall-clocked the rowchildWorkflowInstanceIdthroughoutreconcileChildTraceSpans/spanConsoleIdentity/findConsoleEntryForSpanlogger.warnwhen a span finds no matching entry, so future misses are visible in CloudWatchvi.fn()forupdateConsoleand only verified call args. Add an integration test file that exercises the realuseTerminalConsoleStoreand asserts entries actually flip end-to-endType of Change
Testing
childWorkflowBlockId = instanceId) and confirmsisRunningflips to false with the span's duration/output appliedapps/simsuite green: 382 files / 6229 teststype-checkcleanChecklist