Skip to content

service-automation: a durable suspension inside a structured region (loop / parallel branch / try_catch) must fail the run with a named error, not leave progress state and report success — runtime half of #15646 ruling D #18881

Description

@hotlong

Filed by the director seat (objectstack #12708, summon #24, session_01Wj1HUjzyeiBQ8atRf1ZhaL) executing decision batch #153 item 1 — maintainer 「其他同意」 to D on #15646. This is the runtime half; the parse-time half (refuse the unconditionally pausing node types and end inside region bodies) stays on #15646 in packages/spec.

The defect this half closes

#15646's reproduction: loop { try_catch { map(pausing sub-flow) } } — the map's child suspends durably, the region's progress state is left behind, later iterations skip, and the run reports success with summary.failed = 0 and ran = []. Whether a map / subflow child pauses is known only at runtime (it lives in the sub-flow record config.flowName names), so parse-time refusal cannot reach this case without also refusing loop { map(synchronous sub-flow) }, a shape that runs correctly today (#15616's regression suite, 5 tests in 3 packages/services files).

Ruling frame — ⛔ not re-adjudicable by the dev

  1. When a node contained in a structured region body (loop, a parallel branch, try_catch's try or catch, at any depth) durably suspends, the engine fails the run with a named, structured error that carries the region node id, the suspending node id and the sub-flow name — the loud form of [P2] engine ADR: durable pause inside structured regions (unlock topology-level parallel approvals / waits / subflows) #3267's ruling 禁 (structured regions do not carry a durable pause). ⛔ Never success with nothing run; ⛔ never a warning-level log.
  2. Nothing changes for a region whose nodes complete synchronously: loop { map(synchronous) } and service-automation: a map node inside a loop body runs its collection ONCE — iterations 2..n do nothing, report success, and the run completes green #15616's suite keep passing unchanged. ⛔ No parse-time rule is added here (that is service-automation: a PAUSING map inside a contained region leaves its progress state behind — later loop iterations skip items and the exhausted map returns success having run nothing #15646's half).
  3. The error is surfaced where a run's terminal failure already is (run status + summary.failed), so an operator and a client see it the way they see any failed run.

Acceptance

Refs

#15646 (ruling D, batch #153 item 1) · #3267 (禁) · #15616 · #15788 · #16134 (region walk precedent)

Dedup terms: region durable pause runtime refusal, map inside loop suspends, progress state left behind, summary.failed silent success


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions