fix(sdk): root @flow span must use kind=flow_root #33

Merged
timur merged 1 commit from fix/root-flow-span-kind into development 2026-05-14 10:16:04 +00:00
Owner

Caught by an E2E driver after #32 merge: the entry @flow’s wrapper was emitting kind="step" for the root span instead of "flow_root", because the boot stub calls the wrapper directly (not _open_root_span). Fix detects the no-parent case and sets kind="flow_root" in both the cache-hit and fresh-execution branches.

Verified end-to-end: 4 driver scripts pass after the fix, including a new spankind_demo asserting {flow_root: 2, step: 4} after pause+resume.

Caught by an E2E driver after #32 merge: the entry @flow’s wrapper was emitting kind="step" for the root span instead of "flow_root", because the boot stub calls the wrapper directly (not _open_root_span). Fix detects the no-parent case and sets kind="flow_root" in both the cache-hit and fresh-execution branches. Verified end-to-end: 4 driver scripts pass after the fix, including a new spankind_demo asserting `{flow_root: 2, step: 4}` after pause+resume.
The entry @flow's wrapper opens the root span of every Play (the boot
stub calls the wrapper directly, not _open_root_span). Before this
fix the wrapper unconditionally used kind="step", so the root span
landed with the wrong kind and the UI couldn't distinguish it from
nested step spans.

Detect the no-parent case and set kind="flow_root" in that branch
(both for cache-hit replayed spans and for fresh executions).
Verified by the new spankind_demo E2E driver.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
timur merged commit ef3296d834 into development 2026-05-14 10:16:04 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_logic!33
No description provided.