Skip to content

fix(executor): selected outputs no longer fail runs that call a child workflow - #10232

Merged
waleedlatif1 merged 2 commits into
stagingfrom
fix/child-workflow-output-selectors
Nov 20, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
fix/child-workflow-output-selectors

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

sim workflows run --select-output done.data (and any sync execute with selectedOutputs) failed the whole run, after it executed and billed, whenever the workflow contained a child-workflow block: Nested output selector is missing its output path: done.data.

Cause: the sync path in executeWorkflowService validated and converted selectors to the executor's internal form, then built the snapshot from the caller's raw selectors. The child-workflow block parses internal-form selectors, read done.data as workflow done, block data, no path, and threw mid-run. The v1 execute route's non-SSE sync path never converted selectors at all.

Fix

  • Sync snapshot uses the converted selectors. A selector naming no parent block is still refused with 400 before the run (nothing executes or bills).
  • v1 sync path converts selectors leniently (unknown ones dropped with a warning, as v1 always ignored them).
  • selectChildOutputSelectors never throws: parent selectors are skipped, deeper ones passed on, child ones translated; unparseable/unknown ones are returned as ignored and logged.
  • The custom-block and max-SSE-depth child selection errors now drop the selection with a warning instead of failing an already-running run.

Tests: new integration test (real Postgres) through executeWorkflowOperation with a deployed parent → child workflow → response; fails without the fix. Unit test for the child-side tolerance alone.

🤖 Generated with Claude Code

… workflow

A sync run handed the caller's public `block.path` selectors to the executor
instead of the internal form it had already resolved, so the child-workflow
block parsed `done.data` as workflow `done`, block `data` and failed the run
after it executed and billed. The v2 execute service and the v1 sync path now
pass resolved selectors (v1 drops ones naming no block, as it always ignored
them), and the child-workflow block drops a selector it cannot apply with a
warning rather than failing the block.
@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 20, 2026 6:47am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Converts sync output selections before passing them to the executor. Child workflows now ignore selections they cannot serve instead of failing an admitted run.

  • Synchronous runs pass selected outputs to child workflows in the expected format.
  • Child workflows keep running when selected outputs cannot be used.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  Request[Caller output selections] --> Surface{Execution path}
  Surface -->|Shared service| Strict[Resolve selectors or reject before execution]
  Surface -->|v1 sync| Lenient[Resolve selectors and warn about rejected entries]
  Strict --> Snapshot[Snapshot with internal selectors]
  Lenient --> Snapshot
  Snapshot --> Parent[Run parent workflow]
  Parent --> Child[Translate child selections]
  Child --> Valid[Forward valid selections]
  Child --> Ignored[Warn and ignore unsupported selections]
Loading

Reviews (1) · Last reviewed commit: "fix(executor): selected outputs no longe..." · Reviewed by Greptile

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 7 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

… outputs

A child-workflow selector was admitted on a synchronous run but the response
projection only read parent block logs, so its key was silently missing from
blockOutputs. Read the child block's output from the trace spans its workflow
block carried back, matching by block ID or normalized name.
@waleedlatif1
waleedlatif1 merged commit 4a0f2e4 into staging Nov 20, 2026
82 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/child-workflow-output-selectors branch November 20, 2026 18:43

This branch was previously deployed

1 inactive deployment
Preview — 48dd9b92 Deployed Nov 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant