feat(automation): surface structured-region body steps in run observability (#1505)#1580
Merged
Conversation
…bility (#1505) loop / parallel / try_catch ran their body, branch and handler regions against a region-local step log that was discarded, so listRuns/getRun showed the container as a single opaque step. runRegion() now RETURNS its body steps and the container folds them into the parent run log via a new NodeExecutionResult.childSteps field, appended right after the container's own step. Each surfaced step is tagged with its immediate container via three new optional fields on ExecutionStepLogSchema (and the engine's StepLogEntry): - parentNodeId: enclosing loop/parallel/try_catch node - iteration: zero-based loop iteration or parallel branch index - regionKind: loop-body | parallel-branch | try | catch Tagging fills only undefined fields, so nested regions keep each step's innermost container. Failed try-attempt partial steps stay unsurfaced (preserves try_catch retry semantics). Fully additive. +4 tests across loop/parallel/try_catch. Resolves the ADR-0031 #1505 / TODO(#1479) follow-up. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Resolves the ADR-0031 follow-up #1505 (the
TODO(#1479)inengine.ts).Problem
loop/parallel/try_catchexecuted their body / branch / handler regions viaAutomationEngine.runRegion(), which ran them against a region-localStepLogEntry[]that was discarded. Run logs (listRuns/getRun) therefore showed the container as a single opaque step — the per-iteration / per-branch / handler steps that actually ran were invisible for debugging and audit.Change
runRegion()now returns its body steps instead of dropping them.NodeExecutionResult.childStepslets a container node hand those steps back;executeNode()appends them to the parent run log right after the container's own step.ExecutionStepLogSchema(spec) and the engine'sStepLogEntrytag each surfaced step with its immediate container:parentNodeId— the enclosingloop/parallel/try_catchnodeiteration— zero-based loop iteration or parallel branch indexregionKind—loop-body|parallel-branch|try|catchTagging fills only fields left undefined, so nested regions keep each step's innermost container. A failed try-region attempt's partial steps stay unsurfaced, preserving
try_catchretry semantics. Fully additive — existing run logs/consumers unaffected.Tests
+4 (
162total in service-automation): loop surfaces per-iteration steps with index; parallel tags branch index; try_catch tagstryandcatchregions.@objectstack/specexecution + automation suites green.🤖 Generated with Claude Code