Skip to content

test(automation)+showcase: nested control-flow composition#1716

Merged
os-zhuang merged 1 commit into
mainfrom
feat-nested-composition-tests-showcase
Jun 11, 2026
Merged

test(automation)+showcase: nested control-flow composition#1716
os-zhuang merged 1 commit into
mainfrom
feat-nested-composition-tests-showcase

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Summary

Single-construct tests cover loop / parallel / try_catch in isolation; nothing exercised their interactions when nested. This adds both the deterministic proof and a worked composite showcase example (the recommendation from the "should we add more complex flows?" discussion — value is in composition, not more single-concept coverage).

Engine tests — nested-composition.test.ts (+3)

  • parallel inside loop: the loop iterator is visible to a node in a nested parallel branch (scope flows in); step folding tags each step with its innermost container (leaf → parallel-branch/inner_par; the parallel node → loop-body/outer_loop); the after-block continuation runs once.
  • loop inside try_catch: deepest step folds to the loop, the loop folds to the try region.
  • scope propagation: a mutation made deep inside nested regions is visible to the after-block (regions run in the enclosing scope; last iteration wins).

Showcase — showcase_project_escalation

On health → red: a decision branches on severity → the critical path runs a parallel alert block then a try/catch incident push (catch logs the failure); the normal path sends one notification; both converge. Combines decision + parallel + try_catch with converging edges in one realistic flow.

Test plan

  • Full service-automation suite 180 green (177 + 3).
  • Browser-verified live: critical path ran start → triage → alert(parallel ×2, tagged parallel-branch) → push_incident(http failed → catch tagged catch) → converge, completed; normal path (budget ≤ 200k) took the single-notify branch and skipped parallel/try_catch; the designer renders the nested structure with correct construct icons (diamond/fork/shield) + conditional edges; the Runs panel shows the folded nesting.

🤖 Generated with Claude Code

Single-construct tests cover loop/parallel/try_catch in isolation; nothing
exercised their INTERACTIONS when nested. Adds both the deterministic proof
and a worked composite example.

Engine tests (nested-composition.test.ts, +3):
- parallel INSIDE loop: the loop iterator is visible to a node in a nested
  parallel branch (scope flows in); step folding tags each step with its
  INNERMOST container (leaf → parallel-branch/inner_par; the parallel node →
  loop-body/outer_loop); the after-block continuation runs once.
- loop INSIDE try_catch: deepest step folds to the loop, the loop folds to the
  try region.
- a mutation made deep inside nested regions is visible to the after-block
  (regions run in the enclosing scope; last iteration wins).

Showcase (showcase_project_escalation): on health → red, decision branches on
severity → critical path runs a parallel alert block then a try/catch incident
push (catch logs the failure); normal path sends one notification; both
converge. Combines decision + parallel + try_catch with converging edges in one
realistic flow.

Full automation suite 180 green. Browser-verified: critical path ran
start→triage→alert(parallel ×2)→push_incident(catch on http failure)→converge;
normal path took the single-notify branch; the designer renders the nested
structure with correct construct icons + conditional edges.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 11, 2026 7:52am

Request Review

@os-zhuang os-zhuang merged commit 3291633 into main Jun 11, 2026
12 checks passed
@os-zhuang os-zhuang deleted the feat-nested-composition-tests-showcase branch June 11, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant