Repository navigation
fix(automation)!: a triggered flow whose fan-out or earlier branch reaches a subflow or map whose child can suspend is not armed - #39144
Conversation
…nch (#38876) Claude-Session: https://claude.ai/code/session_01QSeKYnRnHBkY5SFRAUFpzs Co-authored-by: Claude <noreply@anthropic.com>
…and trigger activation (#38876) Claude-Session: https://claude.ai/code/session_01QSeKYnRnHBkY5SFRAUFpzs Co-authored-by: Claude <noreply@anthropic.com>
…nch arming decline (#38876) Claude-Session: https://claude.ai/code/session_01QSeKYnRnHBkY5SFRAUFpzs Co-authored-by: Claude <noreply@anthropic.com>
… for the pause readings export (#38876) Claude-Session: https://claude.ai/code/session_01QSeKYnRnHBkY5SFRAUFpzs Co-authored-by: Claude <noreply@anthropic.com>
…t audit census (#38876) Claude-Session: https://claude.ai/code/session_01QSeKYnRnHBkY5SFRAUFpzs Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 2 package(s): 4 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 4 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 183 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # 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
|
…on_branch unbound cause (#38876) Claude-Session: https://claude.ai/code/session_01QSeKYnRnHBkY5SFRAUFpzs Co-authored-by: Claude <noreply@anthropic.com>
|
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 |
|
repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2 Contract reviewServed-tier: PR #39144 (draft, author Result: no must-fix; two should-fix (S1, S2); four nits (N1 to N4). ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
The semantic entry — holds in surface, replacement and acceptance criteria; S1 on Implementing files against the contract.
Break attempts.
Findings. S1 (should-fix) — the entry's S2 (should-fix) — the decline gives a wrong reason and a wrong remedy for a decision without a fallback edge. N1 (nit) — N2 (nit) — see ②: the 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 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: 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>
|
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 |
|
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>
|
repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2 Contract-review-claim: session_01QSeKYnrQ7UMtHofKQVjcH2 · head ceee529 · 2026-12-02T23:22Z Delta record at |
|
repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2 Contract reviewServed-tier: Delta of record 7350002763 (PASS at ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Findings: No must-fix, no should-fix.
Implemented-by: 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>
|
repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2 Contract-review-claim: session_01QSeKYnrQ7UMtHofKQVjcH2 · head 25e0722 · 2026-12-03T00:29Z Delta record at |
|
repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2 Contract reviewServed-tier: Delta of record 7362158969 (PASS at ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Findings: No must-fix, no should-fix.
Implemented-by: VERDICT: PASS |
|
repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2 L1 ACCEPT · PR #39144 (#38876) · head 席位核对ACCEPT · repo:objectstack@os-justin · head
|
|
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. |
|
repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2 维护者速读(交接 · 2026-12-03T01:03Z)
Head-sha: |
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 grepsuspending_subflow_in_region,fans out: 0 hits);content/docs/automation/flows.mdxnames the new cause维护者速读
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.
packages/spec/src/automation/flow-concurrent-pause.ts:concurrentPauseRefusals/sequentialPauseRefusalsnow take aFlowPauseReading— a list of node types (what the parse hands,FLOW_PAUSE_CAPABLE_NODE_TYPES, unchanged call sites inflow.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 carriesshape('concurrent' | 'decision_without_fallback' | 'sequential'; the engine's sentence for the decision group prescribes marking one branch edgeisDefault: 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 inautomation/index.ts).FLOW_UNBOUND_CAUSESgainssuspending_subflow_on_branch, with its jsdoc (owner, remedy). The type-identity pin inautomation-service.test.tsmoves with it.subflow-branch-guard.ts:branchSuspendingCall(flows, name, callKey)asks the two spec readings with "an always-pausing type, or asubflow/mapwhose 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.declineOntoBranchSuspendingCallsits besidedeclineOntoRegionSuspendingCall, records on the newsubflowBranchDeclinedFlows, warns once per reason. By maintainer ruling 7360068553,branchSuspendingCallalso reads every flow the armed flow's top-level calls reach, at any depth, cycle-safe throughflowCallKey(ownBranchSuspendingCallis one flow's own reading); the trap carriesholderandthrough, and the reason names both. The region half stays one level deep, with one sentence insubflow-region-guard.tssaying why. Wiring sites (the region decline's, mirrored):engine.ts(field, stub,describeUnboundReasonhost,rejudgeSubflowCallershost, 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(describeUnboundReasonafter the region cause;withdrawFlow),engine-flow-slots-facet.ts(moveFlowRecords),engine-registration-facet.ts(withdrawFlowKey).engine.ts7783 → 7808 lines (facade ceiling 7835).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.content/docs/automation/flows.mdx: one paragraph after the run-time refusal naming the activation decline.ui/packages/app-shell/src/views/metadata-admin/previews/flow-problems.ts(one row for the new cause; the pinflow-problems.runStatus-11779.test.tsrequires it),ui/packages/i18n/src/namespaces/studio/en.tsandzh.ts(one string each). The root changeset carries@object-ui/app-shelland@object-ui/i18n(patch) and the designer-row sentence; there is noui/.changeset/file.packages/spec/api-surface/automation.json,packages/spec/export-origins/automation.json(+6 each: the new exports), viacheck:generated --fix.scripts/tenant-audit-census.mjs: oneUNTYPED_RECEIVERSrow forthis.subflowBranchDeclinedFlowsinengine-enablement-facet.ts, mirroring the four sibling*DeclinedFlowsrows; 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 fromceee5295a1, fix round 2, ruling B): service-automation 305 files / 4544 tests; plugin-approvals 147 / 2365; specsrc/automation src/contracts src/migrations113 / 2603;subflow-branch-arming-38876.test.ts24/24, of which 9 are the deep walk (nested concurrent with and without afaultedge, nested sequential, depth three, re-judge on grandchild and on child change, a two-flow call cycle arms, two controls). Earlier rounds: head78a83a170(origin/main4374517d0merged in viascripts/pm/os-regen-merge.sh, no conflict; generated artifacts re-checked up to date). Full suites at8eda4969c(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=2at8eda4969c→ Test Files 305 passed (305), Tests 4531 passed (4531); at78a83a170the 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. Newsubflow-branch-arming-38876.test.ts14/14 throughregisterFlow+ trigger activation on the real engine: concurrentsubflowandmapbeside await, two concurrent calls, three sequential shapes (conditioned before conditioned,isDefaultbefore 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 (keepssuspending_subflow_in_region), a parse-refused shape (refused atregisterFlow, never declined).pnpm --filter @objectstack/plugin-approvals exec vitest run --maxWorkers=2at78a83a170→ 147 files / 2365 tests passed.flow-route.integration.test.tsgains a nested[#38876] the arming doordescribe (15 cases) over the run-time half's real-approval-child shapes: 5 declined (concurrent subflow, concurrent map, two subflows, sequential conditioned, sequentialisDefault), 10 controls (no child registered; children that run straight through).pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/automation src/contracts src/migrationsat78a83a170→ 113 files / 2603 tests passed (the rest of the spec suite: CI). Every existing case offlow-concurrent-pause.test.tsruns unchanged throughFlowSchema; new describe: list form equals the same-types predicate over 7 shapes (non-vacuous), structured fields, a predicate counting a suspendingsubflowrefuses the concurrent and both sequential shapes the parse accepts, controls.check:test-typecheck), plugin-approvals exit 0.Ablations (scripts/ablation-replace.mjs, dist rebuilt, preflight)
engine-enablement-facet.ts,branchSuspendingCall(...)→undefined; blob 2d0f56ada0 → 5033715fa5; marker in 2 built files):subflow-branch-arming-38876.test.ts9 failed / 5 passed (every decline red, every control green); integration-t "arming door"5 failed / 10 passed. Restored: blob == HEAD,git diff HEADempty, rebuilt,--absentexit 0, tree clean.topLevelCallKeysiterates 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 HEADempty, rebuilt,--absentexit 0, tree clean.pausePredicate: a predicate reads as "nothing pauses"; marker in 2 built spec files):flow-concurrent-pause.test.ts3 failed / 55 passed (the three predicate cases red; every parse case green — the parse does not read the predicate path); enginesubflow-branch-arming-38876.test.ts9 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,--absentexit 0, tree clean.Gates
At
25e0722e29: 146 families, all 146 exit 0,--ran146/146; CI 67 success / 0 failure,Check Changesetincluded; dogfood battery success. Earlier,node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackat78a83a170: 143 families, all 143 exit 0 (exit captured before any pipe; the same 143 were also all green at8eda4969c).--ran: "Run reconciliation — 143 derived, 143 run, 0 NOT-MEASURED, 0 UNRUN." First passes found:check-tenant-audit-censusexit 1 (fixed: the ledger row above);check-plugin-teardown-shape --self-testexit 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 bypnpm build(124 tasks).check:query-options-erasure396 s.check-platform-checklistnot owed (no export renamed or removed).Acceptance notes
examples/(38: app-showcase 33, app-todo 4, app-crm 1; 4 carry asubflow/map),docs/qa/scenarios/builds/order_to_cash.json(9) anddocs/qa/platform-checklist/areas/automation.json(4), judged bybranchSuspendingCallover each set: 0 hits.registerFlow+ execute: nested concurrent answeredpaused, then failed the parent even with afaultedge; nested sequential failed at once, or routed through afaultedge as a success. Both armed before this change.suspending_subflow_in_region(pinned);describeUnboundReasonreads the records in the same order.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 awaitand asubflowwhose child waits registering withbound: false,unboundCause: suspending_subflow_on_branch.Generated by Claude Code