Skip to content

fix(automation)!: a triggered flow whose fan-out or earlier branch reaches a subflow or map whose child can suspend is not armed - #39144

Merged
os-zhuang merged 10 commits into
mainfrom
claude/issue-38876-arming-decline
Dec 3, 2026
Merged

os-zhuang merged 10 commits into
mainfrom
claude/issue-38876-arming-decline

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #38876

Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: none — no page under skills/** teaches the fan-out or sequential pause shapes or the region decline this sits beside (git grep suspending_subflow_in_region, fans out: 0 hits); content/docs/automation/flows.mdx names the new cause

BREAKING (narrowing). FROM: a trigger-declaring flow arms when, on its top-level graph or that of any flow its top-level calls reach (at any depth), a subflow / map node whose child flow can suspend sits beside another pausing branch of one fan-out, or on a conditioned / isDefault branch the engine takes before another out-edge of the same node. TO: that flow still registers and saves, but is NOT armed — _status reads bound: false, unboundCause: suspending_subflow_on_branch, with a reason naming the branching node, the call, the child and where it suspends; one warn is logged. Fix: chain the call and the other pausing step onto one branch, or make the call's branch the last one its node takes, or republish the child without a node that suspends.

维护者速读

  • 用户能看到什么变化:流程作者在激活带触发器的流程时,如果某个分叉的两条分支都会停下来等待(其中一条是调用一个会等待审批或计时的子流程),包括它调用的子流程里、不论隔几层,或者先走的一条分支调用了这种子流程而后面还有分支要走,这个流程仍能保存,但不再被激活,状态页写明原因和改法;以前它会被激活,每次触发都先开出审批再失败。
  • 为什么做:补上"子流程挂起导致分支丢失"这张卡的第二道关(第一道是已合并的运行时报错),按你选定的方案,引擎直接复用发布检查里同一套分支判断,不另写一份。
  • 出错会怎样:误判时,一个本来正常的触发式流程不会被激活、触发不再运行,但流程本身不丢、状态页写明原因;回退本次合并即可恢复,现有示例与测试场景里命中数为零。
  • 要你做什么:无。

What changes

Maintainer ruling 7336647907 on decision 7334609326 (verbatim 「38876 选 A」): one traversal model, shared by the parse and the engine; no engine copy. This is the ARMING half of the card; the run-time half landed as #39030.

  • Spec, one traversal. packages/spec/src/automation/flow-concurrent-pause.ts: concurrentPauseRefusals / sequentialPauseRefusals now take a FlowPauseReading — a list of node types (what the parse hands, FLOW_PAUSE_CAPABLE_NODE_TYPES, unchanged call sites in flow.zod.ts) or a predicate over a node (FlowPauseNodeView: id, type, config). One walk, one grouping, one pass model; the list form is normalised to a predicate. Each refusal also carries shape ('concurrent' | 'decision_without_fallback' | 'sequential'; the engine's sentence for the decision group prescribes marking one branch edge isDefault: true), nodeId, branches (edge + pausing nodes reached) and, for the sequential reading, untaken, so the engine composes its own sentence without re-reading the graph. Exported from @objectstack/spec/automation (barrel line in automation/index.ts).
  • Spec, one cause. FLOW_UNBOUND_CAUSES gains suspending_subflow_on_branch, with its jsdoc (owner, remedy). The type-identity pin in automation-service.test.ts moves with it.
  • Engine. New subflow-branch-guard.ts: branchSuspendingCall(flows, name, callKey) asks the two spec readings with "an always-pausing type, or a subflow / map whose child can suspend" (suspendingNode, the arming reader the region and save-notice halves use), and returns the first refusal that names such a call. EnablementFacet.declineOntoBranchSuspendingCall sits beside declineOntoRegionSuspendingCall, records on the new subflowBranchDeclinedFlows, warns once per reason. By maintainer ruling 7360068553, branchSuspendingCall also reads every flow the armed flow's top-level calls reach, at any depth, cycle-safe through flowCallKey (ownBranchSuspendingCall is one flow's own reading); the trap carries holder and through, and the reason names both. The region half stays one level deep, with one sentence in subflow-region-guard.ts saying why. Wiring sites (the region decline's, mirrored): engine.ts (field, stub, describeUnboundReason host, rejudgeSubflowCallers host, extensions-host closure, three host getters), engine-extensions-facet.ts (activateFlowTrigger: after the region half), subflow-guards.ts (rejudgeSubflowCallers: early-out and the transitive re-judge), flow-definitions.ts (describeUnboundReason after the region cause; withdrawFlow), engine-flow-slots-facet.ts (moveFlowRecords), engine-registration-facet.ts (withdrawFlowKey). engine.ts 7783 → 7808 lines (facade ceiling 7835).
  • Migration. New ADR-0087 semantic entry packages/spec/src/migrations/entries/semantic/19.flow-branch-suspending-subflow-not-armed.ts (D3 structured TODO; no other entry touched). It covers the flow's own graph and every flow its calls reach, reworded in place, no sibling entry.
  • Docs. content/docs/automation/flows.mdx: one paragraph after the run-time refusal naming the activation decline.
  • Studio (ui/). ui/packages/app-shell/src/views/metadata-admin/previews/flow-problems.ts (one row for the new cause; the pin flow-problems.runStatus-11779.test.ts requires it), ui/packages/i18n/src/namespaces/studio/en.ts and zh.ts (one string each). The root changeset carries @object-ui/app-shell and @object-ui/i18n (patch) and the designer-row sentence; there is no ui/.changeset/ file.
  • Generated. packages/spec/api-surface/automation.json, packages/spec/export-origins/automation.json (+6 each: the new exports), via check:generated --fix.
  • Gate ledger (outside the declared file surface, declared here). scripts/tenant-audit-census.mjs: one UNTYPED_RECEIVERS row for this.subflowBranchDeclinedFlows in engine-enablement-facet.ts, mirroring the four sibling *DeclinedFlows rows; the census reds without it and prescribes exactly this row.

Read first (by risk): packages/spec/src/automation/flow-concurrent-pause.ts (pausePredicate, pauseGraph — the parse's verdicts must not move); packages/services/service-automation/src/subflow-branch-guard.ts (branchSuspendingCall); packages/services/service-automation/src/subflow-guards.ts (rejudgeSubflowCallers).

Tests

Head 25e0722e29 (fix round 3, prose only; counts unchanged from ceee5295a1, fix round 2, ruling B): service-automation 305 files / 4544 tests; plugin-approvals 147 / 2365; spec src/automation src/contracts src/migrations 113 / 2603; subflow-branch-arming-38876.test.ts 24/24, of which 9 are the deep walk (nested concurrent with and without a fault edge, nested sequential, depth three, re-judge on grandchild and on child change, a two-flow call cycle arms, two controls). Earlier rounds: head 78a83a170 (origin/main 4374517d0 merged in via scripts/pm/os-regen-merge.sh, no conflict; generated artifacts re-checked up to date). Full suites at 8eda4969c (the pre-merge head), and re-run after the merge where the incoming commits touch the same packages:

  • pnpm --filter @objectstack/service-automation exec vitest run --maxWorkers=2 at 8eda4969c → Test Files 305 passed (305), Tests 4531 passed (4531); at 78a83a170 the four files the merge and this diff share (subflow-branch-arming-38876, flow-registration-checks, subflow-region-suspension, branch-suspension-refusal) → 4 files / 111 tests passed. New subflow-branch-arming-38876.test.ts 14/14 through registerFlow + trigger activation on the real engine: concurrent subflow and map beside a wait, two concurrent calls, three sequential shapes (conditioned before conditioned, isDefault before unconditional, conditioned before unconditional), re-judge on child registration (armed → declined → armed), a child two calls away, withdraw drops the record; controls: no child registered, children that run through, one pausing call beside a synchronous branch or taken last, a region body (keeps suspending_subflow_in_region), a parse-refused shape (refused at registerFlow, never declined).
  • pnpm --filter @objectstack/plugin-approvals exec vitest run --maxWorkers=2 at 78a83a170 → 147 files / 2365 tests passed. flow-route.integration.test.ts gains a nested [#38876] the arming door describe (15 cases) over the run-time half's real-approval-child shapes: 5 declined (concurrent subflow, concurrent map, two subflows, sequential conditioned, sequential isDefault), 10 controls (no child registered; children that run straight through).
  • pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/automation src/contracts src/migrations at 78a83a170 → 113 files / 2603 tests passed (the rest of the spec suite: CI). Every existing case of flow-concurrent-pause.test.ts runs unchanged through FlowSchema; new describe: list form equals the same-types predicate over 7 shapes (non-vacuous), structured fields, a predicate counting a suspending subflow refuses the concurrent and both sequential shapes the parse accepts, controls.
  • Typecheck: spec, service-automation (incl. check:test-typecheck), plugin-approvals exit 0.
Ablations (scripts/ablation-replace.mjs, dist rebuilt, preflight)
  • A — engine decline neutered (engine-enablement-facet.ts, branchSuspendingCall(...) → undefined; blob 2d0f56ada0 → 5033715fa5; marker in 2 built files): subflow-branch-arming-38876.test.ts 9 failed / 5 passed (every decline red, every control green); integration -t "arming door" 5 failed / 10 passed. Restored: blob == HEAD, git diff HEAD empty, rebuilt, --absent exit 0, tree clean.
  • C — decision group shape (round 1): spec 1 red, engine 1 red. Restored with a blob/diff proof.
  • D — deep walk (topLevelCallKeys iterates nothing; blob f3bbd6c30a → 074347b1f0; marker in 2 built files): engine 6 failed / 18 passed, exactly the six nested cases; the cycle, both controls and the 15 one-level cases stay green. Restored: blob == HEAD, git diff HEAD empty, rebuilt, --absent exit 0, tree clean.
  • B — spec predicate parameter ignored (pausePredicate: a predicate reads as "nothing pauses"; marker in 2 built spec files): flow-concurrent-pause.test.ts 3 failed / 55 passed (the three predicate cases red; every parse case green — the parse does not read the predicate path); engine subflow-branch-arming-38876.test.ts 9 failed / 5 passed. A first attempt used a constant comparison the bundler folded, so its dist preflight failed and that leg's engine reading was discarded and re-run with a surviving marker. Restored: blob == HEAD, rebuilt, --absent exit 0, tree clean.
Gates

At 25e0722e29: 146 families, all 146 exit 0, --ran 146/146; CI 67 success / 0 failure, Check Changeset included; dogfood battery success. Earlier, node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack at 78a83a170: 143 families, all 143 exit 0 (exit captured before any pipe; the same 143 were also all green at 8eda4969c). --ran: "Run reconciliation — 143 derived, 143 run, 0 NOT-MEASURED, 0 UNRUN." First passes found: check-tenant-audit-census exit 1 (fixed: the ledger row above); check-plugin-teardown-shape --self-test exit 3 (shallow clone: fixture commit fetched); four exit 1/3 prerequisites (check:skill-examples, check:dual-build-cjs-loads, check:i18n, the CLI guidance test) cleared by pnpm build (124 tasks). check:query-options-erasure 396 s. check-platform-checklist not owed (no export renamed or removed).

Acceptance notes

  • Corpus: every flow under examples/ (38: app-showcase 33, app-todo 4, app-crm 1; 4 carry a subflow / map), docs/qa/scenarios/builds/order_to_cash.json (9) and docs/qa/platform-checklist/areas/automation.json (4), judged by branchSuspendingCall over each set: 0 hits.
  • The gate reads the armed flow's own top-level graph and that of every flow its top-level calls reach, at any depth. It re-judges whenever a flow those calls reach is registered, so an armed caller is un-armed when a child or grandchild is registered or republished with a node that suspends (pinned, armed → declined → armed). Met only by the run-time branch refusal (fix(automation): a branch whose subflow or map child parks, where the run cannot park, fails the run instead of dropping work #39030): a run started without a trigger; the shape held in a flow reached only through calls inside region bodies (a region-body call whose child can suspend is itself declined at arming, by the region half, one level deep); and a pausing node type a plugin registers.
  • Premise of ruling 7360068553, measured before building through registerFlow + execute: nested concurrent answered paused, then failed the parent even with a fault edge; nested sequential failed at once, or routed through a fault edge as a success. Both armed before this change.
  • Gate order: the branch half runs after the region half, so a flow with a region-nested suspending call keeps suspending_subflow_in_region (pinned); describeUnboundReason reads the records in the same order.
  • The parse's messages and paths are byte-identical; refusals gained fields only.

Verification

pnpm --filter @objectstack/service-automation exec vitest run --maxWorkers=2 src/subflow-branch-arming-38876.test.ts → 24 passed; the first case shows a fan-out to a wait and a subflow whose child waits registering with bound: false, unboundCause: suspending_subflow_on_branch.


Generated by Claude Code

@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Dec 2, 2026
@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/service-automation, @objectstack/spec, touching 68 documentable anchor(s). ⚠️ 4 changed file(s) yielded no anchor (packages/services/service-automation/src/subflow-region-guard.ts, packages/spec/api-surface/automation.json, packages/spec/export-origins/automation.json, …), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

4 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/ai/actions-as-tools.mdx (via nodeId (symbol, a field of interface BranchSuspendingCall; a field of interface ConcurrentPauseRefusal))
  • content/docs/automation/approvals.mdx (via nodeId (symbol, a field of interface BranchSuspendingCall; a field of interface ConcurrentPauseRefusal))
  • content/docs/automation/flows.mdx _(via nodeId (symbol, a field of interface BranchSuspendingCall; a field of interface ConcurrentPauseRefusal), suspending_subflow_on_branch (literal, a string literal in FLOW_UNBOUND_CAUSES; a string literal in describeUnboundReason), /api/v1/automation/status (route, a path literal in acceptanceCriteria))
  • content/docs/kernel/cluster.mdx (via AutomationEngine (symbol, a top-level class), nodeId (symbol, a field of interface BranchSuspendingCall; a field of interface ConcurrentPauseRefusal))

⛔ 4 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v16.mdx (via AutomationEngine (symbol, a top-level class))
  • content/docs/releases/v17/17-0.mdx (via AutomationEngine (symbol, a top-level class), nodeId (symbol, a field of interface BranchSuspendingCall; a field of interface ConcurrentPauseRefusal))
  • content/docs/releases/v17/17-1.mdx (via nodeId (symbol, a field of interface BranchSuspendingCall; a field of interface ConcurrentPauseRefusal))
  • content/docs/releases/v17/17-6.mdx _(via AutomationEngine (symbol, a top-level class), /api/v1/automation/status (route, a path literal in acceptanceCriteria))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 4 changed file(s) yielded no anchor (packages/services/service-automation/src/subflow-region-guard.ts, packages/spec/api-surface/automation.json, packages/spec/export-origins/automation.json, …) — pages documenting those are invisible to this run
  • 10 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 71 of 255 client-bound route-ledger rows — the other 184 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 184: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 60 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 183 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json f1df7a8f4c408734a4a77e6fb83a92b6f286177c → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 9de41dcf9c222e85d680232b3b399f94798bec06 — the merge of head 25e0722e2938114dcff7a568bdfcdc3406c251b4 into base f1df7a8f4c408734a4a77e6fb83a92b6f286177c, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 9de41dcf9c222e85d680232b3b399f94798bec06 && git checkout 9de41dcf9c222e85d680232b3b399f94798bec06
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin f1df7a8f4c408734a4a77e6fb83a92b6f286177c 25e0722e2938114dcff7a568bdfcdc3406c251b4 && git checkout -B drift-repro f1df7a8f4c408734a4a77e6fb83a92b6f286177c && git merge --no-ff 25e0722e2938114dcff7a568bdfcdc3406c251b4

node scripts/docs-audit/affected-docs.mjs --json f1df7a8f4c408734a4a77e6fb83a92b6f286177c

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs f1df7a8f4c408734a4a77e6fb83a92b6f286177c → pass the list as
args.docs, on the commit named under Which tree this was computed on.

…on_branch unbound cause (#38876)

Claude-Session: https://claude.ai/code/session_01QSeKYnRnHBkY5SFRAUFpzs
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2

Contract-review-claim: session_01QSeKYnrQ7UMtHofKQVjcH2 · head 51e71d5 · 2026-12-02T15:00Z

First record. Faces: the published schema (non-test packages/spec/src/**: automation/flow-concurrent-pause.ts, automation/index.ts, contracts/automation-service.ts, the 19.flow-branch-suspending-subflow-not-armed semantic entry) and the narrowing declaration Clause-②: no (narrowing). Tier CONTRACT_REVIEW_TIER, full ①–④. Ruling A 7336647907.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 51e71d58d36388b89cc91fa4de63a8bee8f9fd9b
Local-runs: none
Scope: packages/spec/src/automation/flow-concurrent-pause.ts, packages/spec/src/automation/index.ts, packages/spec/src/contracts/automation-service.ts, packages/spec/src/migrations/entries/semantic/19.flow-branch-suspending-subflow-not-armed.ts + packages/services/service-automation/src/subflow-branch-guard.ts, packages/services/service-automation/src/engine-enablement-facet.ts, packages/services/service-automation/src/engine-extensions-facet.ts, packages/services/service-automation/src/engine-flow-slots-facet.ts, packages/services/service-automation/src/engine-registration-facet.ts, packages/services/service-automation/src/engine.ts, packages/services/service-automation/src/flow-definitions.ts, packages/services/service-automation/src/subflow-guards.ts, scripts/tenant-audit-census.mjs, ui/packages/app-shell/src/views/metadata-admin/previews/flow-problems.ts, ui/packages/i18n/src/namespaces/studio/en.ts, ui/packages/i18n/src/namespaces/studio/zh.ts, packages/services/service-automation/src/subflow-branch-arming-38876.test.ts, packages/plugins/plugin-approvals/src/flow-route.integration.test.ts, packages/spec/src/automation/flow-concurrent-pause.test.ts, packages/spec/src/contracts/automation-service.test.ts, packages/spec/api-surface/automation.json, packages/spec/export-origins/automation.json
Security-touching: no
Rule-change-verified: none

PR #39144 (draft, author objectstack-fleet[bot]), card #38876, Ruling A 7336647907, dev report 7349469809. Merge base 4374517d02e69f63bb71fe81a9e8fb96e4645e10; 25 files, +875 / -33. Read: the card body and all 11 comments, the PR body and file list, the net diff, the head's files through git show, and the cited code outside the diff (subflow-notice-guard.ts, subflow-region-guard.ts, branch-suspension-refusal.ts, registerFlow, withdrawFlow, moveFlowRecords, activateFlowTrigger, the subflow and map config schemas). Nothing was built, run or re-run. Check-runs on this head, read from the API: 76 runs, 67 success, 9 skipped, 0 failed; Dogfood battery (opt-in) and its three shards, Test Core, Test UI, Lint & Repo Gates, Check Changeset and Governed Surface Queue Guard are all success. No .claude/** path is in the diff. No changed hunk teaches permission, sharing, credential, token or authentication behaviour.

Result: no must-fix; two should-fix (S1, S2); four nits (N1 to N4).

① Derived judgments

  1. concurrentPauseRefusals / sequentialPauseRefusals now take a FlowPauseReading. Right. On the merge base the file was not in the automation barrel and no exports entry reaches it, so the two functions had one caller, flow.zod.ts, and no published signature. The "signature change" is therefore a new export, not a change to a published one. flow.zod.ts is not in the diff and still hands FLOW_PAUSE_CAPABLE_NODE_TYPES, a readonly string list, which the union accepts. The list form is normalised to a predicate that asks list.includes(node.type), the test the old code ran inline, so the parse's verdicts cannot move; path and the message templates are unchanged apart from a local rename. Callers at head: flow.zod.ts (list) and subflow-branch-guard.ts (predicate), nothing else in packages, ui, apps or examples.
  2. Six names become public on @objectstack/spec/automation. Right, and it is a widening of the public surface. export * of the file publishes concurrentPauseRefusals, sequentialPauseRefusals, ConcurrentPauseRefusal, FlowPauseReading, FlowPauseNodeView, FlowPauseEdgeRef. api-surface/automation.json and export-origins/automation.json each gain exactly those six; the generated JSON agrees with the exports. The root entry does not re-export the barrel, so no other surface file moves.
  3. Refusals gain shape, nodeId, branches, untaken. Right as far as it goes; one gap, S2. The type was unexported before, so the three new required fields break no producer. The parse reads only path and message. The structured form drops one fact the message carries: whether a concurrent refusal is the fan-out group or the decision-without-fallback group (unclaimedDefault). See S2.
  4. FLOW_UNBOUND_CAUSES gains suspending_subflow_on_branch. Right. The only producer is describeUnboundReason. Consumers: the type-identity pin in automation-service.test.ts (moved); the designer table UNBOUND_CAUSE_KEYS in flow-problems.ts, a string-keyed map with a fallback, made exhaustive by the pin flow-problems.runStatus-11779.test.ts, which iterates the tuple (row added); the studio i18n namespace, which has two locales, en and zh (both added); packages/verify/src/flow-run.ts, which branches on deployment_policy alone and treats every other cause as a defect, so the new cause is classed correctly with no edit. No exhaustive switch over the type exists in the tree. The client SDK and /_status pass the contract type through. The member sits after suspending_subflow_in_region, the gate's order.
  5. The ADR-0087 entry. Right in shape; one sentence wrong, S1. File 19.flow-branch-suspending-subflow-not-armed.ts, id equal to the file's slug, the five SemanticMigration fields, no conversionIds (no mechanical edit exists) and no relevantWhen. Omitting relevantWhen is correct: the field is for a surface that lives only under top-level stack keys, flows are also registered at run time, and no sibling flow entry carries it. PROTOCOL_VERSION is 19.0.0 and the package is 19.0.0-next.3, so 19 is the open major and the entry belongs on it, beside its two parse siblings.
  6. The arm-set shrinks; the accept-set does not. FlowSchema is untouched: the flow still parses, saves and registers. What changes is activateFlowTrigger. That is the narrowing the ruling named.

② Semver level

  • It is a narrowing. On the merge base activateFlowTrigger had no branch half, so a trigger-declaring flow of either shape armed. At head it is declined. Stated plainly, because the changeset's "Why" reads stronger than the code: the reading is "can suspend" (suspendingNode: a pausing node reachable from the child's start), and edge conditions are judged as if all may hold. A flow whose child pauses only on some runs, a map over a list that is sometimes empty, or two conditioned edges that exclude each other, completed its runs before and no longer starts. That over-approximation is the ruled model and the ruled reader, the same one the region half uses, and the changeset and the entry both say "can suspend", so it is declared. It is the real capability taken away and the reason the battery was owed.
  • Level and carriers match what the diff publishes. @objectstack/spec minor and @objectstack/service-automation minor: a narrowed kind takes at least minor on each package the diff moves. The changeset carries both declaration lines, a BREAKING paragraph with FROM, TO and the one-line fix, and exactly one adr-0087 marker, registered flow-branch-suspending-subflow-not-armed, which names the entry's id. The PR title carries !. The PR body carries the two lines and a Skills-docs: line. Check Changeset and Lint & Repo Gates are green on this head; the registration and no-major gates that read these lines run in the lint workflow.
  • Metadata-protocol: narrowed: accepted as ruled. Nothing an author writes is refused at the parse, so the kind rests on "a requirement tightened" (what a trigger-declaring flow must satisfy to be armed). Ruling A fixed the value.
  • N2 (nit) — the head of Clause-②: no (narrowing) under-declares. The arm is right. But the line's question is whether the card widens the accept-set or enlarges the public surface, and this diff adds six exports and one member of a closed published vocabulary. The retried_callout_in_subflow precedent, the same pairing of a decline with a new cause, declared yes (narrowing). Nothing downstream changes either way: the level follows the kind, the arm brings BREAKING and the marker, and the review is at contract tier on the schema face already. The string came from the ruling record and the claim, so the dev copied it correctly. The seat decides whether to amend the two carriers.
  • ui/.changeset/38876-… names @object-ui/app-shell and @object-ui/i18n, both patch, with Clause-②: no and Metadata-protocol: none. Correct for a display row and two strings.

③ Boundary flags

  • open_questions[0], the ui row and strings in this PR: keep (option A). The pin iterates FLOW_UNBOUND_CAUSES, so the contract member alone reds a required check on this PR. A closed-vocabulary member and the consumer row its pin demands are one change; option B would make this PR's required check depend on a second PR. The three ui files are in scope above and agree with the contract's wording.
  • open_questions[1], needs:dogfood-battery hung through the relay: no state to change (option A). The dispatch named the label, so the dev's stroke was delegated. What the landing door reads is the battery's result on the final head, and it is success on 51e71d58d3, three shards included.
  • Deviation, the census row: correct. The receiver is this.subflowBranchDeclinedFlows in engine-enablement-facet.ts; its writes are set and delete on a process-local map on the engine instance, so engine: false is right and no tenant predicate is owed. "Untyped" is the census's word for a receiver whose type its classifier cannot read through the facet host, not a statement about tenancy. The ledger's header says shrink-only and this row grows it, as the four sibling rows did; the durable fix is a classifier that reads that host shape. Follow-up at the seat's discretion, not this PR's.
  • Deviation, the contract file's own type pin moved: correct, it is the same ruled member.
  • Out-of-scope note, the vacuous getFlow assertion: confirmed at head, subflow-region-suspension.test.ts lines 163 and 476 assert toBeDefined() on a promise. Pre-existing and test-only; the new file awaits it. Not this PR's; a filing-gate matter for the seat.
  • l1-face, two packages touched without a changeset. @object-ui/i18n is named in the ui changeset. @objectstack/plugin-approvals changes one test file and its files are dist, README.md, CHANGELOG.md, so it publishes nothing and needs none.
  • PR body is stale (the dev declared it; the seat patches it). "Not touched here" under Acceptance notes contradicts the tree, which adds the designer row; What changes lacks the ui files; Tests and Gates cite 78a83a170. I judged the tree.
  • SQL push-down: the diff adds no query, no id materialisation and no in-app join. branchSuspendingCall reads registered flow definitions in memory. Nothing to push down.
  • Author: objectstack-fleet[bot], so no named-login note is owed.

④ Design judgment

flow-concurrent-pause.ts — holds against Ruling A. One traversal, parameterised by a predicate; the parse keeps its population; the engine has no walk of its own for this. The first consumer asks both readings with "an always-pausing type, or a subflow / map whose child suspendingNode says can suspend", which is the ruled population word for word.

automation/index.ts — holds. The barrel line publishes exactly the six names.

contracts/automation-service.ts — holds. The jsdoc states the two shapes, the top-level scope, why the run would fail, and three remedies. One remedy does not fit one sub-shape; that is S2's.

The semantic entry — holds in surface, replacement and acceptance criteria; S1 on reason.

Implementing files against the contract.

  • Order. activateFlowTrigger: disabled-subflow, notice, region, branch, retry. describeUnboundReason reads the records in that order. A flow with a region-nested call and a branch shape is stopped at the region half, never reaches the branch half, and reports suspending_subflow_in_region (pinned). A branch record left from before an earlier half began declining is shadowed by that half's record, and is rewritten or deleted the next time the branch half is asked. One cause per row.
  • Withdrawal. withdrawFlow deletes the record; withdrawFlowKey passes the map; moveFlowRecords moves it with the key and re-asks the gate under the new key. No stale record survives those three. A record can outlive a flow that loses its trigger or is switched off, because the gate returns before the halves; describeUnboundReason returns nothing for such a flow, so it is never reported. That is the four sibling maps' behaviour too.
  • Tenant. The map is keyed by the flow's slot key, the key flows and boundFlowTriggers use, and is read only for names enumerated from this.flows. It is exactly as tenant-correct as flows itself.
  • Re-judge. registerFlow calls rejudgeSubflowCallers on every registration; the early-out counts the new map; a bound transitive caller is re-offered when branchSuspendingCall now finds a trap, an unbound one when the map holds it.

Break attempts.

  • A child two calls away. suspendingNode follows the child's own top-level calls with cycle protection, and transitiveSubflowCallers re-offers the grandparent when the grandchild registers. Declined (pinned).
  • A child re-registered after the parent armed. Deactivated and declined on the child's registration; armed again when the child stops suspending (pinned: armed, declined, armed).
  • Boot order. The halves run before the trigger lookup, and registerTrigger re-asks every flow. Load order does not matter.
  • A map whose child suspends. map reads the same config.flowName; neither config has a detached mode. Declined (pinned).
  • A call taken last, or beside a synchronous branch. Not declined (pinned). No false positive there.
  • A label-picking node. An approval with two approve edges, one to a call and one to a wait, is one group. Declined, correctly.
  • A refusal with no call on it. Skipped by the loop; and such a flow is the parse's, so it never registered.
  • A false positive beyond the ruling. The engine declines only on a refusal that names a call whose child can suspend. A registered flow has no refusal under the type list alone, so every refusal the wider predicate adds has a call that is necessary to it. The remaining over-approximation is the model's own, discussed in ②.
  • The shape inside a called child. A triggered parent with one clean path to a child that has no trigger, where the child holds the fan-out, arms. The decline reads the armed flow's own top-level graph, one level deep, as the region half does. The entry's surface says "top-level graph", so the code agrees with the contract. But the region half's limit rests on a recorded ruling (automation: the region refusal leaves its child run uncancelled with only a warn when the suspension chain cannot be read, and a region call reached through a child's top-level call still arms #29166, option B) whose reason, a routable child failure, only partly carries: here the parent can already be parked when the child's late branch fails it. The run-time door still fails it by name. This is outside Ruling A, so it is not a finding on the code; it is the second residual S1 asks the entry to name, and a follow-up decision for the seat to file.
  • A child withdrawn. The caller stays declined until the next registration event, naming a child that is gone. Pre-existing for all four halves; not this PR's.

Findings.

S1 (should-fix) — the entry's reason misstates what the gate reaches. Its last sentence opens "Not reached by this gate, and met at run time only:" and then lists "a child registered after the caller armed is re-judged on registration". That case is reached: the caller is deactivated and declined when the child registers (rejudgeSubflowCallers, pinned). The sentence contradicts itself, and it leaves out the two real residuals: a run started without a trigger (the gate is the arming gate), and the shape inside a called child's own graph (one level deep). reason is the entry's load-bearing prose and ships as the upgrade guide. Fix: name what is reached (a caller is re-judged, and can be un-armed, when a flow its calls reach is registered) and what is not (non-trigger starts, the shape in a child, a plugin pausing type). The same wrong half is in the changeset ("A child registered after the caller armed is still met by the run-time branch refusal") and in flows.mdx ("a child registered after the flow armed is met by the run-time error above"). Those are the seat's prose; they tell an operator the flow stays armed when in fact a later republish of a child can stop it firing.

S2 (should-fix) — the decline gives a wrong reason and a wrong remedy for a decision without a fallback edge. concurrentPauseRefusals returns one refusal kind for two groups: a real fan-out, and a decision that declares config.conditions with no edge labelled default or marked isDefault (unclaimedDefault), whose branches run together only on a run that matches no condition. The message tells them apart and prescribes the fallback edge; the structured fields do not carry the difference, so the jsdoc claim that they "say the same thing structurally" is false for that group. describeBranchSuspendingCall then says of a routing decision that it "fans out to branches that run together" and prescribes "Chain 'x' and the other pausing step one after another on a single branch". The shape is plausible: a decision routing to two approval subflows, or to an approval and a subflow, with conditions that cover every record and no default edge. It armed before and is declined now, which is within the ruled model, since the parse refuses its twin. But an author who follows the sentence chains two alternative approvals into two required ones, and the fix that keeps the intent, marking one edge isDefault: true, is not offered. Fix: carry the group on the refusal (a flag or a third shape value), have the engine's sentence and the contract jsdoc's remedy list say it, and pin the case.

N1 (nit) — ConcurrentPauseRefusal is now a published name for a type whose shape may be sequential, and untaken is optional rather than tied to the shape. Renaming it, or making it a discriminated union, is free while 19 is on next and breaking afterwards. Naturally done with S2, which touches the type.

N2 (nit) — see ②: the Clause-② head.

N3 (nit) — the engine's sequential sentence offers "make that branch the last" and "chain" but not the parse's third move for mutually exclusive branches, a decision. The entry's replacement has it.

N4 (nit) — the ledger row grows a shrink-only ledger; see ③.

A new head that closes S1 and S2 is a substantive head: this reviewer reads the delta, and the battery is owed again on it.

Implemented-by: claude/issue-38876-arming-decline
Reviewed-by: session_01QSeKYnrQ7UMtHofKQVjcH2

VERDICT: PASS

…efusal group with its own remedy; the arming entry names what the gate reaches (#38876)

Claude-Session: https://claude.ai/code/session_01QSeKYnRnHBkY5SFRAUFpzs
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2

Contract-review-hold: session_01QSeKYnrQ7UMtHofKQVjcH2 · head 88faa54 · the maintainer has not yet ruled A/B/C on the nested-subflow arming residual (analysis 7350608453); B folds a code change into this PR · until the maintainer answers on #38876

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2

Contract-review-hold: session_01QSeKYnrQ7UMtHofKQVjcH2 · head 88faa54 · the maintainer ruled B (7360068553 on #38876) and the fold is dispatched to the dev as fix round 2 on this PR · until the dev's fix-round-2 head is pushed and reported

…n; the region decline stays one level deep (#38876)

Claude-Session: https://claude.ai/code/session_01QSeKYnRnHBkY5SFRAUFpzs
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2

Contract-review-claim: session_01QSeKYnrQ7UMtHofKQVjcH2 · head ceee529 · 2026-12-02T23:22Z

Delta record at CONTRACT_REVIEW_TIER, by the same isolated reviewer as the earlier records on this PR, over fix round 2 (ruling B 7360068553, report 7361888966 on #38876, 88faa547aa..ceee5295a1).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: ceee5295a146e663a3f2ec1d9934d62064f6ebc7
Local-runs: none
Scope: packages/spec/src/automation/flow-concurrent-pause.ts, packages/spec/src/automation/index.ts, packages/spec/src/contracts/automation-service.ts, packages/spec/src/migrations/entries/semantic/19.flow-branch-suspending-subflow-not-armed.ts + packages/services/service-automation/src/subflow-branch-guard.ts, packages/services/service-automation/src/engine-enablement-facet.ts, packages/services/service-automation/src/engine-extensions-facet.ts, packages/services/service-automation/src/engine-flow-slots-facet.ts, packages/services/service-automation/src/engine-registration-facet.ts, packages/services/service-automation/src/engine.ts, packages/services/service-automation/src/flow-definitions.ts, packages/services/service-automation/src/subflow-guards.ts, scripts/tenant-audit-census.mjs, ui/packages/app-shell/src/views/metadata-admin/previews/flow-problems.ts, ui/packages/i18n/src/namespaces/studio/en.ts, ui/packages/i18n/src/namespaces/studio/zh.ts, packages/services/service-automation/src/subflow-branch-arming-38876.test.ts, packages/plugins/plugin-approvals/src/flow-route.integration.test.ts, packages/spec/src/automation/flow-concurrent-pause.test.ts, packages/spec/src/contracts/automation-service.test.ts, packages/spec/api-surface/automation.json, packages/spec/export-origins/automation.json, packages/services/service-automation/src/subflow-region-guard.ts
Security-touching: no
Rule-change-verified: none

Delta of record 7350002763 (PASS at 51e71d58d3, S1 and S2 open; N1 to N4), same reviewer session, read at 2026-12-02T23:33Z. No record exists at 88faa547aa: that head carries two Contract-review-hold lines (7356125914, 7360100231) and was never read. So this record judges both fix rounds together, 51e71d58d3..ceee5295a1 (10 files, +333/−51), and the round-2 step 88faa547aa..ceee5295a1 (8 files, +243/−41) inside it. Merge base still 4374517d02; PR 26 files, +1157/−33, draft, head unmoved at read time. Read: ruling 7360068553 in full, analysis 7350608453, dev reports 7352820631 and 7361888966 (as claims), the net diff, subflow-branch-guard.ts whole at the head, the cited code outside the diff (suspendingNode, transitiveSubflowCallers, rejudgeSubflowCallers, subflow-node.ts, entry 18.flow-node-unreachable-refused, ui/AGENTS.md, docs/releases-maintenance.md, the root .changeset/config.json), and the PR body as it stands. Nothing was built or run. Check-runs on this head, from the API: 80 runs, 69 success, 11 skipped, 0 failed; Check Changeset, Dogfood Regression Gate, Dogfood battery (opt-in) and its three shards, and Spec property liveness are success. No .claude/** path is in the diff; no changed hunk teaches permission, sharing, credential, token or authentication behaviour.

① Derived judgments

  • The walk is deep and cycle-safe — TRUE. branchSuspendingCall reads the armed flow's own graph (ownBranchSuspendingCall, the old body), then each flow its top-level subflow / map nodes call, depth first in declaration order. One seen set, keyed through flowCallKey as a run dispatches the call, reads each flow once. A trap exists on the walk exactly when some reachable flow's own reading is defined, and the walk asks every reachable flow once, so the shared set loses nothing and a cycle ends. A missing child ends its arm. A call inside a region body is not followed.
  • holder and through are carried and named — TRUE. The trap carries both; the sentence opens "the flow it calls, 'HOLDER' (reached through 'A' → 'HOLDER'): its node" when the chain is longer than one flow, and the warn names "the branches of 'HOLDER'". A one-flow trap reads as before.
  • Cause, record and re-judge unchanged — TRUE. engine.ts, engine-extensions-facet.ts, engine-flow-slots-facet.ts, engine-registration-facet.ts, flow-definitions.ts and subflow-guards.ts do not move in the delta. One cause, one decline map, the same gate order, the same describeUnboundReason order. rejudgeSubflowCallers already offered every transitive caller on each registration, so the deep reading needed no new wiring; engine-enablement-facet.ts moves in its warn text only.
  • Region half one level deep — TRUE. regionSuspendingCall is untouched; subflow-region-guard.ts gains the one ruled sentence (4 comment lines), and it states the real difference: a region refusal is synchronous and routable, the branch failure can arrive after the parent parked.
  • Pins — TRUE for every shape the ruling names. Nested concurrent with and without a fault edge, nested sequential, depth three (p_parent → c_mid → d_deep), re-judge on a grandchild change and on a child change (armed, declined, armed), a two-flow call cycle that arms, a control child with one wait, a control child whose loop body calls a suspending flow. 24 cases in the file, 9 of them the deep walk. Ablation D (the walk follows nothing) is reported red on exactly the six nested cases; not re-run here. Not pinned: a nested decision_without_fallback, and a chain that passes through a map. Both run the same lines as pinned cases (the prefix is built once for all three shapes; topLevelCallKeys reads the two node types alike).
  • Premise measurement — credible, not re-measured. The scratch test is gone and this review runs nothing. The reported readings agree with the code: a child's concurrent shape is refused by the late watch after the parent parked, and failAncestors fails the parent, which no fault edge on the call catches; a child's sequential shape fails the child at once, subflow-node.ts returns a failure, and a fault edge routes it. One arm of analysis 7350608453 (both suspensions collected at once) was not observed; the direction does not change.
  • The nested sequential shape behind a fault edge is now declined though its run ended as a success before. Inside the ruling, which names both shapes, and said in the entry's reason and the changeset.
  • Entry 19.flow-branch-suspending-subflow-not-armed, reworded in place — true against the code, one loose clause (N6). surface ("its own top-level graph AND the top-level graph of every flow its top-level calls reach, at any depth", "a called flow need not declare a trigger") is what the walk does. reason ("re-judged whenever a flow its calls reach is registered") is what rejudgeSubflowCallers does. replacement carries the isDefault: true fix. No sibling entry; one marker in the changeset.
  • FLOW_UNBOUND_CAUSES jsdoc, the changeset FROM line, flows.mdx — TRUE. Each says "at any depth" and names the holder and the calls; the changeset FROM line and the PR body's BREAKING line agree.
  • Generated JSON — unchanged in the delta, and no export name moves in it. The third shape value is a member of a type this PR introduces.
  • S1 and S2 are closed, judged here for the first time. S1: the entry, the changeset, flows.mdx and the guard header now say the gate re-judges on a child's registration and un-arms an armed caller. S2: shape has the third value decision_without_fallback, set by the spec where the group has no claimed fallback; the engine's sentence prescribes isDefault: true; the cause jsdoc and the entry carry the fix; one spec pin and one engine pin with a control. The stated residual (the sequential no-match pass on such a decision keeps sequential) is the parse's own reading and is accepted.
  • SQL push-down — none owed. The walk reads registered flows in memory. Its cost per registration grows with the flows a caller reaches, the same class as the retry half's recursion.
  • PR body against the diff — matches, with two stale words (N9). The file groups, the three shape values, the deep walk, holder / through, the region sentence, the ui files, the ledger row, engine.ts 7783 to 7808 lines (measured), 24 cases of which 9 deep (counted) and the round labels all agree with the tree.

② Semver level

  • @objectstack/spec minor and @objectstack/service-automation minor stand. Round 2 adds no export, no key and no cause; it widens the set of flows the same decline reaches. That is the same narrowing, larger, and the FROM line says so.
  • ! stands: an armed flow can stop being armed on upgrade, now also through a child's graph.
  • Metadata-protocol: narrowed stands. Clause-②: no (narrowing) is kept as ruling 7360068553 fixes it; the remark of N2 on its head is unchanged and needs no act.
  • The ui entry's own level (@object-ui/app-shell patch, @object-ui/i18n patch, Clause-②: no, Metadata-protocol: none) is right for one row and two strings. Its home is not (N8).

③ Boundary flags

  • Files outside the claim. packages/spec/src/automation/index.ts: inside the claim's "export barrel if the export needs it", needed by Ruling A, unchanged in the delta. scripts/tenant-audit-census.mjs: one UNTYPED_RECEIVERS row the census prescribes, engine: false, correct; N4 unchanged. flow-problems.ts and the two i18n files: required by the pin flow-problems.runStatus-11779.test.ts, one row and one string each. Each is justified.
  • ui/.changeset/38876-branch-suspending-subflow-unbound-cause.md is in the wrong home (N8). ui/AGENTS.md line 187 puts changesets in the root .changeset/ and forbids new entries under ui/.changeset/; docs/releases-maintenance.md says the root config does not read that directory. Check Changeset is green because it reads the root, where this PR has its entry. My first record passed this file without holding it to that rule; that was an omission of mine.
  • Unreachable calls are followed (the dev's deviation) — acceptable, not a defect (N7). topLevelCallKeys reads every top-level subflow / map node, reachable from start or not. The spec readings at level one already read every node the same way, so the half is consistent with itself. A flow with an unreachable top-level node is refused at every authoring door by flow-node-unreachable, so only a stored legacy row or a direct registerFlow can hold one. The result is a loud, reversible decline that names the chain. It differs from suspendingNode, which reads from start only, and the docblock does not say so.
  • Re-judge covers the edges the walk follows. transitiveSubflowCallers reads subflowTargets, which is no narrower than the top-level calls, so a caller declined through any chain is offered again when a flow on it registers (pinned for child and grandchild).
  • No new published name, no new error code, no HTTP shape change. /_status gains longer reason text under the same cause.

④ Design judgment

  • subflow-branch-guard.ts. The split into ownBranchSuspendingCall and a small walk is the least code that meets the ruling, and it keeps the spec traversal the only reader of a graph. First-found order is deterministic, so the reason text and the once-per-reason warn are stable. Break attempts: a diamond (one child reached twice) is read once and loses nothing; a cycle arms (pinned); a holder with no trigger declines its caller (pinned); a child that only waits does not decline (pinned); a region-body call in the child is not followed (pinned); a holder reached only through an unreachable call declines (N7).
  • describeBranchSuspendingCall. The decision_without_fallback sentence is right and keeps the routing. The sequential sentence now always ends with the decision move, which does not fit every node (N5).
  • flow-concurrent-pause.ts. shape is derived in the one place that knows the group; the parse's messages and paths do not move; the jsdoc now says the message is derived, never stored.
  • Entry and changeset. Honest about what changed and why the chain is read whole. One clause groups a thing under "run time only" that an arming half does judge (N6).
  • Pins. Each nested case asserts the reason text, the cause and the warn; the re-judge cases assert three states. The two unpinned corners in ① share lines with pinned ones.

Findings:

No must-fix, no should-fix.

  • S1: closed.
  • S2: closed.
  • N3: closed.
  • N1, N2, N4: unchanged, left as accepted by the seat.
  • N5 (nit): the engine's sequential sentence always ends "or, where only one of the branches should run, route them through a decision". The parse has three endings: on a decision with mode: 'inclusive' it says to delete the mode, on a first-match decision it says to mark the sibling isDefault: true, and only elsewhere it says to route through a decision. On a node that is already a decision the engine's third move misleads; the first two moves stay right. Left for a follow-up, since the fix moves a reviewed file.
  • N6 (nit): the entry's reason lists "a call inside a region body, which the region decline judges one level deep" under "met at run time only". A region-body call whose child can suspend is declined at arming by the region half. What only the run meets is the branch shape in a flow reached solely through region-body calls. The PR body's Acceptance notes repeat the clause; the changeset lists one case where the entry lists three. Prose faces.
  • N7 (nit): topLevelCallKeys follows calls that start cannot reach, and its docblock does not say so. Accepted as a deviation: it can only bite a row the authoring rule already refuses, though entry 18.flow-node-unreachable-refused says such stored rows "arm and run as before", and one of them may now be declined through this walk. One docblock line in a follow-up would record the choice.
  • N8 (nit): ui/.changeset/38876-branch-suspending-subflow-unbound-cause.md sits where the root config does not read it, against ui/AGENTS.md line 187. No version is lost: @object-ui/i18n is in the fixed group and @object-ui/app-shell is private. The changelog line is lost. Move the entry to the root .changeset/ (a second file, or its two packages and its sentence folded into the existing one) before landing; a prose face, the seat's. ui/.changeset/32526-retried-callout-unbound-cause.md and 35719-inbox-reject-requires-reason.md on main have the same fault and are not this PR's.
  • N9 (nit): the PR body's Gates block says "CI 67 success"; the head now reads 69 success, 11 skipped, 0 failed. The first bullet of 维护者速读 stacks two parentheticals so that "包括它调用的子流程里,不论隔几层" comes before the clause it qualifies. Prose face.

Implemented-by: claude/issue-38876-arming-decline
Reviewed-by: session_01QSeKYnrQ7UMtHofKQVjcH2

VERDICT: PASS

… entry names what only the run meets (#38876)

Claude-Session: https://claude.ai/code/session_01QSeKYnRnHBkY5SFRAUFpzs
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2

Contract-review-claim: session_01QSeKYnrQ7UMtHofKQVjcH2 · head 25e0722 · 2026-12-03T00:29Z

Delta record at CONTRACT_REVIEW_TIER, by the same isolated reviewer that wrote 7362158969, over fix round 3 (report 7363232800 on #38876, ceee5295a1..25e0722e29: N6, N7, N8).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 25e0722e2938114dcff7a568bdfcdc3406c251b4
Local-runs: none
Scope: packages/spec/src/automation/flow-concurrent-pause.ts, packages/spec/src/automation/index.ts, packages/spec/src/contracts/automation-service.ts, packages/spec/src/migrations/entries/semantic/19.flow-branch-suspending-subflow-not-armed.ts + packages/services/service-automation/src/subflow-branch-guard.ts, packages/services/service-automation/src/engine-enablement-facet.ts, packages/services/service-automation/src/engine-extensions-facet.ts, packages/services/service-automation/src/engine-flow-slots-facet.ts, packages/services/service-automation/src/engine-registration-facet.ts, packages/services/service-automation/src/engine.ts, packages/services/service-automation/src/flow-definitions.ts, packages/services/service-automation/src/subflow-guards.ts, scripts/tenant-audit-census.mjs, ui/packages/app-shell/src/views/metadata-admin/previews/flow-problems.ts, ui/packages/i18n/src/namespaces/studio/en.ts, ui/packages/i18n/src/namespaces/studio/zh.ts, packages/services/service-automation/src/subflow-branch-arming-38876.test.ts, packages/plugins/plugin-approvals/src/flow-route.integration.test.ts, packages/spec/src/automation/flow-concurrent-pause.test.ts, packages/spec/src/contracts/automation-service.test.ts, packages/spec/api-surface/automation.json, packages/spec/export-origins/automation.json, packages/services/service-automation/src/subflow-region-guard.ts
Security-touching: no
Rule-change-verified: none

Delta of record 7362158969 (PASS at ceee5295a1, nothing open; N5 to N9), same reviewer session, read at 2026-12-03T00:32Z. What moved: one commit, ceee5295a1..25e0722e29, 4 files, +16/−15: the root changeset, subflow-branch-guard.ts, entry 19.flow-branch-suspending-subflow-not-armed, and ui/.changeset/38876-branch-suspending-subflow-unbound-cause.md deleted. Merge base still 4374517d02; PR 25 files, +1158/−33, draft, head unmoved at read time. Read: dev report 7363232800 (as claims), the whole delta, the root .changeset/config.json, and the PR body as it stands. Nothing was built or run. Check-runs on this head, from the API: 80 runs, 68 success, 11 skipped, 0 failed, 1 in progress. The one in progress is a second Check Changeset run started after the body edit; the first Check Changeset run on this head is success. Dogfood battery (opt-in), Test Core and its 12 shards, Lint & Repo Gates and Governed Surface Queue Guard are success. No .claude/** path is in the diff; no changed hunk teaches permission, sharing, credential, token or authentication behaviour.

① Derived judgments

  • N8, the ui changeset joins the root one — TRUE. The root file's frontmatter gains '@object-ui/app-shell': patch and '@object-ui/i18n': patch, and its body gains one paragraph with the ui file's sentence. The ui file is gone; no 38876 file remains under ui/.changeset/.
  • N6, the residual lists — TRUE against the code. The entry's reason, the changeset and the guard header now name three cases the run alone meets: a run started without a trigger; the shape held in a flow reached only through calls inside region bodies; a pausing node type a plugin registers. The parenthesis says a region-body call whose child can suspend is declined at arming by the region half, one level deep. That is what the code does: the walk follows top-level calls only, and the region half reads the armed flow's own region bodies. The case left to the run is a holder behind a region-body call in a called flow. The entry and the changeset now list the same three.
  • N7, the docblock — TRUE. topLevelCallKeys now says it reads calls "reachable from its start or not" and names it a deliberate over-approximation, the parse's any-path reading. The function body does not move.
  • Nothing else moved — TRUE. The two hunks in subflow-branch-guard.ts are comment lines only (every changed line sits inside a block comment). The entry moves in its reason string only. No test, no export, no generated JSON moves; api-surface/automation.json is byte-identical to the last head. No generated page copies the entry's text.
  • The changeset's lead for the residual list is narrower than the entry's (N10). Not measured here.
  • PR body against the diff — matches. The ui bullet no longer names a changeset file and says the root one carries both packages. The Acceptance bullet carries the three-case list. The head line reads 25e0722e29, "prose only", which is fair: comments, one entry string, one changeset. The 速读 bullet reads in order now. The body's "CI 67 success" is a count at writing time; the API reads 68 success and one run in progress.
  • SQL push-down — none owed. No query and no code path moves.

② Semver level

  • The frontmatter parses against the config. Both names are workspace packages, neither is on the ignore list, and main already carries root changesets that name each of them. @object-ui/i18n is in the fixed group, so it takes the group's version, which the @objectstack/spec minor sets. @object-ui/app-shell is private and outside the fixed group; privatePackages is version: true, tag: false, so it is versioned and gets its changelog line, with no publish. Check Changeset passed on this head.
  • Levels are right. Patch for one designer row and two strings. @objectstack/spec minor and @objectstack/service-automation minor stand, as do !, Clause-②: no (narrowing) and Metadata-protocol: narrowed: one file, one declaration, and the ui part adds no surface.
  • One effect of folding. The changelogs of the two ui packages will carry the whole entry, the BREAKING line included. That is the cost of one file over two, and it is accurate about the release.

③ Boundary flags

  • The round moves two reviewed files, the guard and the entry, for prose alone. That is why this delta was owed; the battery is green on the new head.
  • No file outside the claim is added. The surface shrinks by one file.

④ Design judgment

  • .changeset/38876-branch-suspending-subflow-arming.md. One file in the directory the root config reads is the right home. The added paragraph is plain about what a Studio user sees.
  • Entry reason. The new clause and its parenthesis read as one: at level one the region half declines, deeper the run meets it. Break attempt: a holder called from the armed flow's own loop body. The region half declines that at arming, as the parenthesis says, so the clause does not promise a run-time refusal where an arming one happens first.
  • subflow-branch-guard.ts. The header and the docblock now state the two choices a later reader would otherwise have to rediscover.

Findings:

No must-fix, no should-fix.

  • N6: closed.
  • N7: closed.
  • N8: closed.
  • N9: closed.
  • N5: unchanged, left for a follow-up as filed.
  • N1, N2, N4: unchanged.
  • N10 (nit): the changeset and the PR body open the residual list with "Met only by the run-time branch refusal". The entry says only that the engine "fails the run by name". For a holder behind a region-body call, the region refusal may answer before the branch refusal; which one does was not measured. The entry's wording is the safe one. Prose face, optional.

Implemented-by: claude/issue-38876-arming-decline
Reviewed-by: session_01QSeKYnrQ7UMtHofKQVjcH2

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2

L1 ACCEPT · PR #39144 (#38876) · head 25e0722e2938114dcff7a568bdfcdc3406c251b4 · read 2026-12-03T00:33Z

席位核对

ACCEPT · repo:objectstack@os-justin · head 25e0722e2938114dcff7a568bdfcdc3406c251b4

  1. Shape. Fixes #38876, the arming half; the run-time half landed as fix(automation): a branch whose subflow or map child parks, where the run cannot park, fails the run instead of dropping work #39030. The ! title, Clause-②: no (narrowing) and Metadata-protocol: narrowed stand. The ADR-0087 semantic entry 19.flow-branch-suspending-subflow-not-armed is registered in the diff.
  2. Rulings. The PR follows ruling A, 7336647907 (one traversal model shared by the parse and the engine), and ruling B, 7360068553 (the branch half reads down the call chain at any depth, cycle-safe; the region half stays one level deep). Ruling B's premise was measured before building, on the real engine: nested concurrent paused, then failed the parent even with a fault edge; nested sequential failed at once or routed through a fault edge as a success. No fork.
  3. Contract review. The delta records 7362158969 (rounds 1 and 2; S1 and S2 closed) and 7363308591 (round 3; N6–N9 closed) read PASS at CONTRACT_REVIEW_TIER. The last one is at this head. Open nits: N1, N2, N4 and N5 unchanged, plus the new N10 (prose). They go to the review follow-ups card after merge.
  4. Tests. service-automation: 305 files, 4544 tests. plugin-approvals: 147 files, 2365 tests. Spec dirs: 113 files, 2603 tests. The engine file has 24/24, nine of them deep-walk cases. Ablation A (decline neutered), B (predicate ignored), C (decision group) and D (deep walk: exactly the six nested cases red) were each restored with a blob/diff proof.
  5. The l1-face changeset flag is cleared by reading. The only @objectstack/plugin-approvals file is src/flow-route.integration.test.ts, a test. Check Changeset is success at this head. The ui changeset is folded into the root one (N8).
  6. Gates at this head. 146 derived families, all exit 0 (--ran 146/146). CI: 69 success, 11 expected skip, 0 failed. Mergeable clean. The dogfood battery is success on this head (the land guard's narrowing gate). check-governed-merges: NOT governed, 1191 lines.
  7. Body. The seat applied the corrections from reports 7361888966 and 7363232800 and the review's N9. Read back identical.

Clause-②: no (narrowing) · Metadata-protocol: narrowed

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2

Landing · 2026-12-03T00:33Z · PR #39144. The seat ACCEPT is above. Contract review PASS 7363308591 is at the same head. CI is green and the dogfood battery is success on this head. Not governed (1191 lines). The narrowing is landed through the queue by the seat.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review December 3, 2026 00:34
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge December 3, 2026 00:34
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Dec 3, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Dec 3, 2026
@os-justin
os-justin marked this pull request as draft December 3, 2026 01:02
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2

维护者速读(交接 · 2026-12-03T01:03Z)

Head-sha: 25e0722e2938114dcff7a568bdfcdc3406c251b4

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Dec 3, 2026
@objectstack-fleet
objectstack-fleet Bot requested a review from os-zhuang December 3, 2026 01:04
@os-zhuang
os-zhuang marked this pull request as ready for review December 3, 2026 01:05
@os-zhuang
os-zhuang added this pull request to the merge queue Dec 3, 2026
Merged via the queue into main with commit dbf6d27 Dec 3, 2026
89 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-38876-arming-decline branch December 3, 2026 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation needs:dogfood-battery pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flows: a fan-out to an approval and a subflow whose child pauses loses the parent branch continuation (the subflow branch never resumes)

3 participants