Skip to content

fix(plugin-approvals): a fan-out where one branch fails is abandoned, never approved, on the door and the reconciler - #39013

Merged
objectstack-fleet[bot] merged 20 commits into
mainfrom
claude/issue-38988-fanout-judge
Dec 2, 2026
Merged

objectstack-fleet[bot] merged 20 commits into
mainfrom
claude/issue-38988-fanout-judge

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Fixes #38988
Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:审批流程在审批后分成多条同时运行的分支、其中一条失败(或走到"拒绝"结束)时,记录不再被判为"已通过",而是判为作废并退回;系统自动判断与事后对账两处结论一致,时间线写明哪条分支没走完。
  • 行为变化(座位已认可 7334756396):审批流程中,如果读不到某个分支判断节点实际走了哪条路,系统会把这条记录退回到可重新提交的状态,而不是直接标成已批准;这种情况在一些没有并行分支的流程里也会出现。
  • 为什么做:落实你对"分支审批中一条分支失败怎么判"的裁决(判作废,不判通过);同时收掉该卡最后一项:运行结束后另一分支补写的失败,不再被当成"流程绕过失败继续走"。
  • 出错会怎样:主要影响审批后分支并行、且运行以失败或拒绝结束的流程(另见上一条:读不到判断节点走向时,没有并行分支的流程也可能退回);按审批结果分支(通过走一边、拒绝走另一边)的流程不受影响,已用测试守住;读法只会从"通过"变"作废",本改动可直接撤回。
  • 要你做什么:无。

What changes

@objectstack/plugin-approvals only. Per the maintainer's ruling 7329430078 on this card ("判作废"): for an approval flow that fans out where one branch fails, the result is abandoned, never approved.

Item 3 (N5's routed-failure half), approval-service.ts. The routed-failure reading leaves out a failure logged after the run's completedAt (loggedAfterEnd), as the stop reading does. A paused run has no end and is read as before. Applied alone this flips fork_fail_both to approved on the reconciler (measured, below), so it lands with the judge.

The fan-out-aware judge, new module approval-fanout-judge.ts. openBranchAtEnd answers whether a run that ended without completing (failed, cancelled, timed out, refused) left a branch of a fan-out open from which a step can still follow:

  • read off the flow: a node the run logged at the top level as a success by its end, whose out-edges taken together (no condition, not isDefault, not fault, one label) number two or more, at least one target logged after it by the end (so the group was taken); a target of that group with nothing logged after the node by the end is an open branch. A node that routes by its decision (an approval's approve / reject) takes one label, so the label it did not take is not open;
  • read off the log: a top-level step logged after the run's end is a branch open at it (also answers where the body cannot be read);
  • an open branch counts where its node is in the approval's stamped between-two-steps set.

runFlowBody reads the body under the run's key (getRunFlow, else getFlow), never throwing; openBranchWhy is the timeline sentence.

Call sites, approval-service.ts (+22 / -1). In placeApprovalRun's terminal arm: a refused run asks the judge before its "reached an end" return; any other non-completed run asks it after the stop reading, so an existing stop between two steps keeps its sentence (the #38691 pins). A run that ended before the latest request opened (answered) is not judged, as before. The answer is the ordinary endedWhy, so readCarryingRun and judgeApprovalAfterDoor abandon it by the existing path: the record is put back and the timeline names the branch. dag-traversal.ts, run-resume.ts and approval-node.ts are untouched.

With items 1 and 2 and the docblocks N2-N4 merged in #39000, this finishes the card's Done-when.

Tests

Red first on the real engine (kernel, ObjectQL, automation engine, approval node, sqlite), test commit 8d6993f over base f13adae

The last describe of approval-fanout-late-steps-38988.test.ts was the held reading (door approved, reconciler recalled); it now pins the ruled reading:

  • fork_fail_both, door and reconciler: AssertionError: the door: expected 'approved' to be 'recalled'
  • refused run with a branch still open (fork_refuse_fail), door and reconciler: AssertionError: the door: expected 'approved' to be 'recalled'
  • control label_fail (an approval routing by its decision, the branch not taken leads to the second step): green on base, green after.
  • Tests 2 failed | 3 passed (5)

Item 3 alone (the routed-failure filter, no judge): AssertionError: expected { finished: 1 } to deeply equal { abandoned: 1 } on both cells: the reconciler flips to approved, the flip the card held for.

Green at b744b4e
  • the three fan-out files (approval-fanout-judge-38988.test.ts 14 fixture cases, approval-fanout-late-steps-38988.test.ts, approval-fanout-stop-38691.test.ts): Test Files 3 passed (3), Tests 23 passed (23)
  • pnpm --filter @objectstack/plugin-approvals test (at 89be400; the merge of main after it touches no file of this package): Test Files 146 passed (146), Tests 2294 passed (2294), every 37767 后续:审批读取的 fan-out 判断与引擎注释收尾(N14–N17、N23、stopOf) #38691 pin included
  • pnpm --filter @objectstack/plugin-approvals typecheck: exit 0 (includes check:test-typecheck)
  • eslint on the four touched source files: exit 0
Ablations (on-disk mutation, restored by hash)
  • Routed-failure reading takes late steps again: Tests 2 failed | 7 passed (9), the reconciler names its node 'late' failed between two steps instead of the open branch.
  • The judge answers nothing: Tests 2 failed | 7 passed (9), expected { finished: 1 } to deeply equal { abandoned: 1 }.

Acceptance notes

Verification

Read first: approval-fanout-judge.ts openBranchAtEnd (the group-taken test and the label grouping); approval-service.ts placeApprovalRun terminal arm (where the judge sits relative to the stop reading); the last describe of approval-fanout-late-steps-38988.test.ts.

Two minutes: pnpm --filter @objectstack/plugin-approvals exec vitest run src/approval-fanout-late-steps-38988.test.ts shows 5 passed; the fan-out cells write recalled on both the door and the reconciler, the control writes approved.

Local gates at b744b4e: dispatch-gates.mjs --ran: 74 derived families accounted for, 72 run, 2 NOT-MEASURED (check:dual-build-cjs-loads, check:i18n: exit 3 PREREQUISITE NOT MET, a full workspace build; CI runs them).

Patch round 1 (contract review 7331212150, L1 7331234706)

  • M1: the judge follows each branch of a taken fan-out group to its frontier, the first node on it the run had not logged by its end, and counts the branch open where that node stands between two steps. Pinned on the real engine at the door and at the reconciler (fork_two_deep: fork → note1 → note2 (fails) → end; late1 → late2 (running) → second).
  • S1: a labelled group counts as taken only on a logged target no other group of the node names. Where two groups share the only logged target, neither is read. Real-engine control shared_notify (rejected, notify fails) stays rejected with no put-back line. Fixtures cover the unlabelled-group-on-a-labelled-node variant and the refusing-end variant.
  • S2: a skipped step is not read as the node having run (fixture).
  • N1: the run's end instant is read once. N2: the docblock says that edges with no label form one group of their own.
  • Q1 (own commit 0be5313): a run refused after the approval's latest request was rejected keeps rejected, even with another taken branch still open. Real-engine control reject_fork_refuse covers the door and the reconciler.

Acceptance note (Q1 reading): ruling 7329430078 says an approval whose fan-out has a failed branch is never marked approved with an approver missing. The seat confirmed the narrow reading: a rejection is an approver's decision, so when the latest request is rejected, the refused arm of the judge does not read the run, and rejected stays rejected. Only the refused arm skips; a failed, cancelled or timed-out run is judged as before.

Changeset: both sentences the review flagged are now true of the pinned cells, and the changeset states the Q1 reading.

Patch round 2 (contract review 7332253435, L1 7332267098)

The judge now reads what the platform records, and where a fact is not recorded it reads the branch as open (the put-back), never as nothing open.

  • M2: on a branch, a target of a conditional or default edge counts as decided only where the run logged a step for it after the visit, or the skipped step the engine writes for an edge it passed over. With neither, it is undecided or still running, and it is the frontier where it stands between two steps. A node that routes by a label, whose label is not recorded and is not shown by a target only one group names, reads every group. Pinned on the real engine at the door and at the reconciler (fork_decision: fork → note (fails) → end; late1 → dec → conditional → late2 (running) → second).
  • S3: an approval step's label is the decision on the request its visit opened (approved → approve, rejected → reject, returned → revise; pending, recalled or cancelled → every edge), read off sys_approval_request by run, node and opening time. Target ownership is kept only for other nodes that route by a label. Real-engine pins: approved_shared (approved, the shared target fails, prep running) → recalled; reject_audit (rejected, a downstream node the approve group also names fails) → stays rejected.
  • Verification gap closed in this round (d91d5c69 red first, 40b23f49 fix): target ownership was also applied to a node that routes by no label but whose out-edges carry labels. The engine runs every out-edge of such a node, but the judge read the fan-out as one branch and the door wrote approved with the second step never asked (real engine, labelled_fork). Ownership now applies only where the step's recorded nodeType is approval, or decision with conditions declared in the body. Any other node, custom ones included, reads every group.
  • N3: the code comment on the rejected guard says the guard is on the refused arm only, and why. The changeset says the same.

Where the judge still infers: the label a decision with conditions took (the step does not record it), and the label of an approval step with no request row in hand (an empty slate it approved itself). These are read off which targets logged. A conditional target's step is matched by node id, not by skippedBy.nodeId; the flow-registration gate that refuses two branches reaching a pausing node keeps that unambiguous for any target that leads to a step.

Acceptance notes:

  • The reconciler halves of fork_decision and approved_shared also pass on the round-1 code: the reconciler judges after the open branch has logged its late step, and the late-step half of the judge answers that. The door halves tell round 1 and round 2 apart, the same design as round 1's two-deep cell.
  • approved_shared stays green with S3 ablated, because M2's rule that an unreadable label reads every group already puts it back. S3 is carried by reject_audit and shared_notify, which go red without it.
  • A recall resumes the engine on reject while the request reads recalled, so the judge reads every edge of that visit. That errs toward open.

Patch round 3 (contract review 7333739245, L1 7333760961)

  • S4: on a node that chose a label the judge cannot read (a decision that declares conditions, or an approval step with no request row), a target only one label names now shows that label only if no other node the run logged before it has an edge of any kind into that target, fault included, and no other visit of the same node does either. Only then can this visit alone have run it. A target that a sibling branch, or another route, could have run is not evidence, and every group is read (toward open). Pinned red first on the real engine at the door and at the reconciler (dec_sibling: first (approved) → fork → {audit, dec}; dec: high → prep (running) → second, low → audit; dec answers high, and audit, run by the sibling, fails after dec logged). Result: recalled, with the timeline naming prep. Before the fix: approved.
  • S5: where the run's flow body cannot be read and no branch logged a step after the end, the judge cannot tell whether a branch was open, and the placement no longer reads that as nothing open. Within the reconciler's age bound it answers undetermined: nothing is written, and the marks stand. Past the bound, once the judgement before it read the same, it uses the rule rulings A3 and B2 set for a run that cannot be read (new stoodState kind body). The run has stopped at the step last decided. Where a step can follow that step, the approval is put back; where none can, it is finished. Pinned on the real engine: fork_fail_both with the open branch held so that it logs nothing and the body hidden after the run fails. First reconcile { undetermined: 1 }, not approved; aged reconcile { abandoned: 1 }, recalled, timeline says the flow cannot be read. Before the fix: { finished: 1 }.
  • N4: the docblock's list of where the judge still infers now names this case. On a node that chose a label the judge cannot read, its conditional and default edges are all read as undecided (toward open).
  • Changeset: the sentence "Where that cannot tell the labels apart, every branch counts" now holds, because a target another logged node could have run does not tell a label. The S5 rule is stated.

Acceptance notes:

  • The S5 rule lives at the call site of the fan-out judge in placeApprovalRun. It reuses the walk's existing aged/stands arguments and adds one stoodState kind. Unlike the walk's own placed path, the S5 rule writes no "flow did not continue" notice in the finished case; there the outcome is the plain mirror.
  • The reconciler half of dec_sibling also passes without the S4 guard, because prep logs late and the late-step half answers it. The door half tells the two apart, as in rounds 1 and 2.
  • Readings at 491eff0a (dev report 7334613265): red first at 40b23f49 (test commit 40b72514); fan-out files 41/41; plugin-approvals 146 files / 2319 tests; ablations S4 (2 cells red) and S5 (1 cell red); 74 derived gates all run, 0 NOT MEASURED.

Patch round 4 (contract review 7334730161, L1 7334739130, seat reading 7334756396)

  • S6, closed by the read-every-group rule the seat confirmed (7334756396): where the label a node took is not recorded (a decision that declares conditions, or an approval step with no request row), the judge reads every group of its out-edges, always. The evidence narrowing is removed rather than refined. That covers target ownership and the round-3 predecessor test (onlyFrom). A logged target is not knowledge of the label, and a decision that answers a label no edge carries makes the engine run every edge. The recorded label (an approval step's request decision, S3) still decides. Pinned red first on the real engine: dec_nodefault (dec declares high and low, neither holds, no default route; prep → second and tidy run together; tidy fails) → recalled at the door and at the reconciler, timeline naming prep; before: approved. Also dec_own_cond (dec answers high, whose own conditional edge reaches audit, which low names too; prep running, the sibling fails) → recalled at the door, timeline naming prep; before: approved.
  • S7, accepted as the cost of the rule (7334756396), pinned as a control: dec_low_notify (approved, first → dec; dec answers low → notify, which fails; high → second, followed by a third step). The record is put back (recalled), and the timeline names second, a branch that never ran. That is the direction ADR-0162 D5 tolerates as a resubmission. Note: the cell carries a third step because second must stand between two steps to be read as open; with second as the last step, nothing is open there and the record keeps approved.
  • Unit pins that asserted narrowing on an unrecorded label now expect every group to be read; each keeps a recorded-label case that still narrows. In the routes-by-decision cell, a decision with no label recorded now reads late, not nothing open. In the "only one label names it" cell, the case where only dec leads to audit now reads prep, not nothing open. In the cell where no target of a group was logged, an approval step with no request row now reads a, not nothing open.
  • Changeset: the bullet now states the rule and its cost, and that it never reads a branch the engine ran as finished.
  • origin/main merged at b7ecc146 (it carries the closed-ceremony-text fix, fix(scripts): tree-scaled git listings in two gate scripts read past the 1 MiB default buffer #39027). It touches no file of the package.

Acceptance note (seat's reading 7334756396): where a node's label is not recorded, the judge can put a record back after a branch the node did not take, also in a flow with no parallel branches (dec_low_notify). It never marks a record approved while a branch the engine ran could still lead to a step.

  • Readings at 8b6d5808 / b7ecc146 (dev report 7335581345): red first at 491eff0a (test commit 410f4073); fan-out files 46/46; plugin-approvals 146 files / 2322 tests; ablation (evidence narrowing put back) → 10 cells red; 74 derived gates run, 0 NOT MEASURED.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ

… and the reconciler, red first (#38988)

Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ
Co-authored-by: Claude <noreply@anthropic.com>
… never approved, on the door and the reconciler (#38988)

The routed-failure reading leaves out a failure logged after the run's end,
as the stop reading does. A new module, approval-fanout-judge.ts, reads
whether a run that ended without completing (a refusing end included) left
a branch of a fan-out open from which a step can still follow; the run is
then read as ended between two steps. approval-service.ts takes the call
sites only.

Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ
Co-authored-by: Claude <noreply@anthropic.com>
…dAt for the caller's late reading (#38988)

Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m 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 1 package(s): @objectstack/plugin-approvals, touching 25 documentable anchor(s).

15 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 FanOutStep))
  • content/docs/automation/approvals.mdx (via nodeId (symbol, a field of interface FanOutStep))
  • content/docs/automation/flows.mdx (via isDefault (symbol, a field of interface FanOutEdge), nodeId (symbol, a field of interface FanOutStep))
  • content/docs/kernel/cluster.mdx (via nodeId (symbol, a field of interface FanOutStep))
  • content/docs/kernel/services-checklist.mdx (via isDefault (symbol, a field of interface FanOutEdge))
  • content/docs/permissions/authentication.mdx (via isDefault (symbol, a field of interface FanOutEdge))
  • content/docs/permissions/authorization.mdx (via isDefault (symbol, a field of interface FanOutEdge))
  • content/docs/permissions/permission-metadata.mdx (via isDefault (symbol, a field of interface FanOutEdge))
  • content/docs/permissions/permission-sets.mdx (via isDefault (symbol, a field of interface FanOutEdge))
  • content/docs/permissions/positions.mdx (via isDefault (symbol, a field of interface FanOutEdge))
  • content/docs/permissions/profiles.mdx (via isDefault (symbol, a field of interface FanOutEdge))
  • content/docs/protocol/objectui/layout-dsl.mdx (via isDefault (symbol, a field of interface FanOutEdge))
  • content/docs/ui/apps.mdx (via isDefault (symbol, a field of interface FanOutEdge))
  • content/docs/ui/pages.mdx (via isDefault (symbol, a field of interface FanOutEdge))
  • content/docs/ui/print-pages.mdx (via isDefault (symbol, a field of interface FanOutEdge))

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

  • content/docs/releases/implementation-status.mdx (via isDefault (symbol, a field of interface FanOutEdge))
  • content/docs/releases/v13.mdx (via isDefault (symbol, a field of interface FanOutEdge))
  • content/docs/releases/v15.mdx (via isDefault (symbol, a field of interface FanOutEdge))
  • content/docs/releases/v17/17-0.mdx (via isDefault (symbol, a field of interface FanOutEdge), nodeId (symbol, a field of interface FanOutStep))
  • content/docs/releases/v17/17-1.mdx (via nodeId (symbol, a field of interface FanOutStep))
  • content/docs/releases/v17/17-5.mdx (via isDefault (symbol, a field of interface FanOutEdge))
  • content/docs/releases/v17/17-7.mdx (via isDefault (symbol, a field of interface FanOutEdge))
  • content/docs/releases/v18/18-0.mdx (via isDefault (symbol, a field of interface FanOutEdge))
  • content/docs/releases/v18/18-2.mdx (via isDefault (symbol, a field of interface FanOutEdge))

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
  • 9 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 71 of 254 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 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 — 6 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 c748e7dfd647ca9b4e679d59425f358c9ff84b04 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 5050b36a5d1e44639be767bd96a96a97344e8685 — the merge of head b7ecc1468a1ac225cdc8a70f124698e5de5b95e4 into base c748e7dfd647ca9b4e679d59425f358c9ff84b04, 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 5050b36a5d1e44639be767bd96a96a97344e8685 && git checkout 5050b36a5d1e44639be767bd96a96a97344e8685
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin c748e7dfd647ca9b4e679d59425f358c9ff84b04 b7ecc1468a1ac225cdc8a70f124698e5de5b95e4 && git checkout -B drift-repro c748e7dfd647ca9b4e679d59425f358c9ff84b04 && git merge --no-ff b7ecc1468a1ac225cdc8a70f124698e5de5b95e4

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

⚠️ 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 c748e7dfd647ca9b4e679d59425f358c9ff84b04 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ

Final green head · 2026-12-02T00:51Z · zone osa-data
Head-sha: b744b4e

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm

Contract-review-claim: session_01WGufzhGA3zoCFquQgku4pm · head b744b4e · 2026-12-02T00:53Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: b744b4edeaa2f7669048736f8ed7a9f5acc80d16
Local-runs: none

PR #39013 · card #38988 · reviewed 2026-12-02T00:59Z. Read: the card's body and all 8 comments (ruling 7329430078 included), the PR body, the net diff against main (5 files, +361/-31), and the check-runs on the head (none failed: every run is success or skipped; Test Core 12/12, Type Check, Lint & Repo Gates, Check Changeset, Governed Surface Queue Guard all success). No path of the diff is on the governed register; the seat asked for a design read because the diff changes an approval OUTCOME, so this record carries a Scope and a ④ beyond the declaration face's own sections.

Scope: packages/plugins/plugin-approvals/src/approval-fanout-judge.ts, packages/plugins/plugin-approvals/src/approval-service.ts (the placeApprovalRun and routed-failure hunks) + none. The two test files and the changeset were read only to judge these. Read, not reviewed: packages/services/service-automation/src/dag-traversal.ts (executeNode, traverseNext), packages/metadata-core/src/approval-opening.ts (the between-two-steps set), and stopOf, loggedAfterEnd, standsBetweenSteps, judgeApprovalAfterDoor in approval-service.ts.

① Derived judgments

  • No accept-set change: no schema, no authorable key, no validator. Right.
  • No public-surface change: approval-fanout-judge.ts is not exported from the package index, and the service takes call sites only (+22/-1). Right.
  • Outcome change, one way: a non-completed terminal run (failed, cancelled, timed out, refused) can now read endedWhy where it read finished, so a record that took approved or rejected takes the put-back. A completed run and a run that ended before the latest request opened are not judged. Right as far as the ruling goes; where the judge is wrong in each direction is in ④.
  • The routed-failure reading leaves out a failure logged after the run's completedAt. It lands with the judge, so the flip the card held it for (the reconciler reading fork_fail_both approved) does not occur on the pinned cells. Right.
  • The check-runs on the head are the gate verdicts: none failed.

② Semver level

@objectstack/plugin-approvals: patch matches what the diff publishes: a behaviour fix under a maintainer ruling, no API, no schema. Clause-②: no and Metadata-protocol: none stand, on the changeset and the PR body alike (precedent: .changeset/37766-abandoned-mirror.md). Two sentences of the changeset body are not true of the tree as it stands, "Both now read it the same way" (M1) and "the branch it did not take is not read as open" (S1); they are to be made true by the fixes, or reworded.

③ Boundary flags

④ Design judgment

The contract: ruling 7329430078, "When the run ends, any approval step on the other branch that has not finished counts as not done. The record is judged abandoned or withdrawn, and it is never marked approved with an approver missing."

M1 (must-fix) — a branch that logged its first node by the run's end and is still running is not read as open, so the door still writes approved with the next approver never asked. openBranchAtEnd reads a branch as open only where the fan-out's direct target logged nothing by the end. The engine logs a step when its node completes (dag-traversal.ts, the success steps.push after the executor returns), so a branch is in flight between any two of its nodes, not only before its first. Cell: fork fans out to note1, note2, end on one branch and late1, late2, second on the other; late1 completes, note2 fails while late2 is running. At the door: the group [note1, late1] has every target logged (the flow half is silent), no step is late yet (the log half is silent), the stop note2 is outside the set, so placeApprovalRun answers over with no endedWhy, the judgement is finished, the mirror writes approved and the marks are cleared, so the reconciler never reads the late step. Read without the door, the reconciler sees late2 logged late and abandons: the two disagree, which is the defect the PR sets out to end. The fixture "every branch of the fan-out was logged by the end: nothing is open" pins the shallow form of this reading. To close: read each branch of a taken group to its frontier (the first node on it the run had not logged by its end), count the branch open where that frontier node stands between two steps, and pin the two-deep cell on the real engine at the door and at the reconciler.

S1 (should-fix) — the "group was taken" test is not tied to the edge, so a label the node did not take can be read as an open fan-out; the docblock's "never invent one" and the changeset's "the branch it did not take is not read as open" do not hold. The targets.some(...) test over after counts a target logged after the node by ANY route. Cell: three steps; first has approve edges to second and notify, and a reject edge to the same notify; first is rejected and notify fails unrouted. The run is failed, the stop notify is outside the set, and the approve group reads as taken because notify was logged, so second (in the set, a step follows it) reads as an open branch: the record takes the put-back where it took rejected, and the timeline names a branch that never ran. The same holds for an unlabelled group on a node that claimed a label, and on every rejection routed to a refusing end, since a refused run is now judged. The error is in the direction ADR-0162 tolerates (a resubmission), but it is a new wrong outcome and a false timeline line. To close: for a node that routes by its decision, read only the group of the label it took (an approval step's decision is on its request), or refuse the read where two label groups share a logged target; pin the shared-target cell as a control.

S2 (should-fix) — a skipped step counts as the branch having logged. after is built from every top-level in-run step whatever its status, and the engine logs a skipped step for the target of a conditional or default edge it passed over (recordSkipped). A fan-out target that is also such a target reads as logged, so its open branch is missed, toward approved. To close: leave skipped steps out of after, with one fixture.

N1 (nit) — placeApprovalRun computes instantOf(run.completedAt) twice (ended, and again inside answered).

N2 (nit) — the docblock's "one label" clause does not say that an edge with no label forms a group of its own; the code comment on NO_LABEL does.

Held against the cited code, and standing: a completed run cannot have an open branch (Promise.all resolves only when every branch has); conditional, default and fault edges are sequential or exclusive in traverseNext and are rightly left out; the top-level-only read matches stopOf and the routed-failure reading; the judge runs after the stop reading on failed, cancelled and timed-out runs, so the #38691 sentences stand; a paused run is untouched; the late filter on the routed-failure reading is the same loggedAfterEnd the stop reading uses.

Implemented-by: claude/issue-38988-fanout-judge
Reviewed-by: session_01WGufzhGA3zoCFquQgku4pm

VERDICT: FAIL

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm

L1 review · PR #39013 (#38988) · head b744b4e · 2026-12-02T01:01Z

VERDICT: NOT ACCEPTED on this head. I adopt the contract-tier record 7331212150 (FAIL): M1 must-fix, and S1 and S2 should-fix. The fix head owes an L2 delta that names them closed, and an L1 delta.

  • Face. l1-face is CLEAN at b744b4e: 39 success, 18 expected skip, 0 failed, and mergeable_state is clean. Fixes #38988, Clause-②: no and Metadata-protocol: none stand. The contract-tier L2 was owed and has run, because this diff changes what the door and the reconciler write onto a record.

  • M1, checked against the code. openBranchAtEnd reads only a fan-out's DIRECT targets. The engine logs a step when its node completes. So consider a branch that logged its first node (late1) by the run's end and is still running its second (late2, before second):

    • The flow half finds every direct target logged after fork, so it sees no open target.
    • The log half has no late step yet, because late2 has not completed when the door judges.
    • The stop reading places the run at the failed branch's node, which leads to end and is not between steps.

    The result is that the door answers finished and mirrors approved with the second approver never asked. That is the outcome ruling 7329430078 forbids. The reconciler later reads late2 as late and abandons, so the door and the reconciler still disagree. The fix the record names is to read each taken branch to its frontier and pin the two-deep cell on the real engine.

  • S1 and S2. These are as graded in the record. S1: "the group was taken" counts a target logged after the node by any route, so a label the node did not take can read as open. S2: a skipped step counts as the branch having logged. Both changeset sentences the record names should be made true by the fix, or reworded.

  • Q1, for the seat (no grade from me). The judge treats a refusing end like a failure. Consider a run refused because a later approval was REJECTED and routed to a refusing end, while another taken branch that stands between steps is still open. That run now gets the put-back where it used to get the rejected mirror. The ruling as recorded speaks of a branch that fails, and of never marking approved with an approver missing. It does not say a rejected outcome is put back. If the maintainer's 「判作废」 covers that too, nothing changes. If not, the refused arm should skip when the latest request is rejected. Please confirm which reading applies before the fix head, because it decides whether this arm changes.

  • Accepted from the record. N1 (instantOf(run.completedAt) is computed twice) and N2 (the docblock does not say an unlabelled edge is its own group) are nits for the fix head if it touches those lines.

Next: the fix head, then the L2 delta from this lane's resumable reviewer, then the L1 delta. No landing before both.

…et label and a rejection to a refusing end, red first (#38988)

Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ
Co-authored-by: Claude <noreply@anthropic.com>
…ntier and ties a taken group to its own target (#38988)

M1: a branch is open where the first node on it the run had not logged by
its end stands between two steps, not only at the fan-out's direct target.
S1: a labelled group is read as taken only on a logged target no other
group of the node names. S2: a skipped step is no node that ran. N1: the
run's end instant is read once. N2: the docblock says an edge with no label
forms a group of its own.

Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ
Co-authored-by: Claude <noreply@anthropic.com>
…d stays rejected, with a branch still open (#38988)

The seat's confirmed reading of ruling 7329430078: the ruling is about a
record marked approved with an approver missing, and a rejection is an
approver's decision. The fan-out judge's refused arm does not read a run
whose approval's latest request is rejected.

Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ
Co-authored-by: Claude <noreply@anthropic.com>
…, label and rejection readings do (#38988)

Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/l and removed size/m labels Dec 2, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ

Final green head · patch round 1 · 2026-12-02T01:49Z · zone osa-data
Head-sha: 51ecf07

  • CI at this head: 39 success, 18 skipped, 0 failure, 0 running. Mergeable: clean. (Red rows on b0311d8, 7787060, 0be5313, b326d32 are lanes cancelled by the next push.)
  • Diff: 5 files, +531 / −31 (562 lines ≤ 3000). Not governed. Fixes #38988. Same file surface; approval-service.ts call sites only.
  • Closes contract review 7331212150 and L1 7331234706: M1 (frontier read per taken branch), S1 (a group is taken only on a logged target no other group names), S2 (skipped is not "ran"), N1, N2, and Q1 in its own commit 0be5313 (refused run whose latest request is rejected stays rejected; seat-confirmed narrow reading of ruling 7329430078). The PR body's "Patch round 1" section carries the detail and the Acceptance note.
  • Readings (dev report 7332100485): red first on the real engine against b744b4e code (3 failed / 5 passed: two-deep door approved ≠ recalled, shared_notify and reject_fork_refuse controls abandoned ≠ finished) and 4 fixture cells red; green: the three fan-out files 30/30, plugin-approvals 146 files / 2301 tests, label_fail and every 37767 后续:审批读取的 fan-out 判断与引擎注释收尾(N14–N17、N23、stopOf) #38691 pin green; one ablation per fix (M1, S1, S2, Q1) turns exactly its cells red. 74 derived gates: 72 exit 0, 2 NOT MEASURED (full workspace build; CI ran them).
  • Sent to osa-L1-a for the L2 delta and the L1 delta.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm

Contract-review-claim: session_01WGufzhGA3zoCFquQgku4pm · head 51ecf07 · 2026-12-02T01:51Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 51ecf071c27d194fdbbc5d535ef4f1e65b94c05b
Local-runs: none

Delta round 2 on PR #39013 · card #38988 · reviewed 2026-12-02T01:54Z. It follows record 7331212150 (FAIL on b744b4edeaa2f7669048736f8ed7a9f5acc80d16). Read: the head comment 7332160368, the dev report 7332100485, the PR body's "Patch round 1" section, the net diff against main at this head (5 files, +531/-31), the four fix commits (b0311d82, 77870609, 0be5313d, b326d32c) and the merge of main, which touches no file of this package, and the check-runs on the head (41 success, 20 skipped, none failed).

Scope: packages/plugins/plugin-approvals/src/approval-fanout-judge.ts, packages/plugins/plugin-approvals/src/approval-service.ts (the placeApprovalRun and routed-failure hunks) + none. The two test files and the changeset were read only to judge these. Read, not reviewed: packages/services/service-automation/src/dag-traversal.ts (executeNode, traverseNext).

M1: closed
S1: closed
S2: closed

N1 and N2 of round 1 are fixed as well (the run's end instant is read once; the docblock says edges with no label form one group of their own).

① Derived judgments

  • No accept-set change and no public-surface change, as in round 1: the module is not exported from the package index, and the service takes call sites only. Right.
  • The outcome change is still one way on the judged arms (toward the put-back), now narrower by the rejected guard on the refused arm. Right.
  • The check-runs on the head are the gate verdicts: none failed.

② Semver level

@objectstack/plugin-approvals: patch, Clause-②: no and Metadata-protocol: none stand. The rewritten changeset now says "every case pinned here" where it said "Both now read it the same way", which is true of the tree. Its sentence "follows each branch of a fan-out past the nodes it had already logged, to the first node it had not reached" is true only of branches made of unconditional edges (M2).

③ Boundary flags

  • open_questions: none in report 7332100485.
  • Deviation, the dev did not edit the PR body and handed the text to the seat: accepted; the body carries the "Patch round 1" section at this head.
  • Deviation, the worktree recreated from the existing local branch: accepted, nothing was reset and the head is the pushed one.
  • Out-of-scope note, the decision on the request would give the taken label exactly: not out of scope, it is the remedy of S3.
  • Q1, the seat's reading of ruling 7329430078 (commit 0be5313d): judged in ④; it holds. The reading is recorded in the PR body, the changeset and a code comment, and in no comment of its own on the card; the seat may want it there beside the ruling it reads.
  • File surface: held. SQL push-down: no new query, no id materialisation, no in-app join.

④ Design judgment

The contract: ruling 7329430078, "When the run ends, any approval step on the other branch that has not finished counts as not done. The record is judged abandoned or withdrawn, and it is never marked approved with an approver missing."

What closed, against the tree: the walk frontierOf follows a taken group's target through each later success to the first node the run had not logged, and the two-deep cell is pinned on the real engine at the door and the reconciler (M1 as stated). A labelled group is taken only on a logged target no other group of the node names, and the shared-target cell is pinned as a control (S1 as stated). A skipped step is left out of what counts as logged (S2).

M2 (must-fix) — the frontier walk stops, toward approved, at any node on the open branch whose continuation is not an unconditional edge. takenGroups builds groups from runsTogether edges only, so a node whose out-edges carry a condition or isDefault has no group, and frontierOf answers nothing for it. The engine awaits a conditional or default target inside traverseNext and logs its step only when it completes, so such a target is in flight exactly as late2 was in M1. Cell: fork fans out to note (fails, on the way to the end) and to late1, then a decision node dec, then by a conditional edge late2 (running), then second. At the door the log holds late1 and dec as successes and note as the failure; the walk reaches dec, finds no group, and openBranchAtEnd answers nothing; the stop note is outside the set; the judgement is finished and the mirror writes approved with second never asked. A decision between two approval steps is an ordinary shape (a step that applies above an amount). The same silence holds on the branch for a node that routes by a label and whose taken target has not logged yet: no target is logged, so no group reads as taken. To close: where the walk reaches a success whose continuation it cannot read, it must not answer "nothing open". For conditional and default edges, a target with neither a run step nor a skipped step logged after the visit is undecided or in flight, and counts as the frontier where it stands between two steps. Pin the decision cell on the real engine at the door and the reconciler.

S3 (should-fix) — target ownership is evidence of the label a node took, not knowledge of it, and it errs both ways. Toward approved: first has approve edges to prep and notify and a reject edge to the same notify; first is approved, notify fails while prep (which leads to second) is running. The only logged target is shared, no group reads as taken, and the door writes approved with second never asked; the docblock states this miss. Toward the put-back: approve leads to second and audit, reject leads to notify, and notify leads on to audit; rejected, audit fails; audit is named by one group only and was logged after the visit, so the approve group reads as taken and second reads as open on a failed run. For an approval step the decision is on its request, as the dev's own note says; reading it gives the taken label exactly and closes both. To close: take the label of an approval step from its request where the caller can hand it over, keep target ownership for other label-routing nodes, and pin the approved shared-target cell.

N3 (nit) — the code comment on the rejected guard and the changeset give a reason ("a rejection is an approver's decision") that would cover a failed, cancelled or timed-out run as well, while the guard is on the refused arm alone. The PR body says so; the comment could.

Q1, the rejected guard on the refused arm (0be5313d): it holds. latest is the approval's latest request, the guard is read only where the run's status is refused, and the answer it leaves is finished, which mirrors that request's own status, rejected. It opens no path to approved with an approver missing: where the latest request is approved, the refused arm is judged as before. A rejected request whose run failed, was cancelled or timed out with a branch open is still put back, as the stop reading already did before this PR for a stop between two steps.

Held against the cited code, and standing: a branch that reaches an end logs no step for it and the end stands outside the set, so a finished branch is not read as open; a branch that logged a failure ended there; the flow registration gate of #38838 refuses a fan-out of which two branches reach a pausing node, so two branches do not share a path to a step and the walk's seen set costs no reading; skipped steps, late steps and nested steps are all left out of logged.

Implemented-by: claude/issue-38988-fanout-judge
Reviewed-by: session_01WGufzhGA3zoCFquQgku4pm

VERDICT: FAIL

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm

L1 delta · PR #39013 (#38988) · b744b4e → 51ecf07 · 2026-12-02T01:55Z

VERDICT: NOT ACCEPTED on this head. I adopt the delta contract record 7332253435 (FAIL).

  • Closed. M1, S1 and S2 are closed, and N1 and N2 are fixed. frontierOf now walks a taken branch through its later successes, and the two-deep cell is pinned at the door and the reconciler on the real engine.
  • Q1 (commit 0be5313) holds. A refused run whose latest request is rejected skips the refused arm, so the record keeps the rejected mirror. The record finds no approved-with-approver-missing path opened by it. That matches the seat's narrow reading of ruling 7329430078.
  • M2 (must-fix, new). The frontier walk follows only unconditional, non-default edges. A decision (or a label-routing node) on the open branch, whose taken target is still running, ends the walk with nothing open, so the door still writes approved. This is the M1 class one node type further on. The record names the close: a conditional or default target with neither a run step nor a skipped step after the visit counts as the frontier where it stands between two steps. Pin the decision cell on the real engine.
  • S3 (should-fix, new). Reading the label an approval took from which targets logged is evidence, not knowledge, and it errs in both directions. The record gives a cell for each. The record's close is to read an approval step's decision off its request, which gives the label exactly. The dev's own out-of-scope note already names that route.
  • For the zone and the seat. Two rounds have now each found the same shape: an inference from logged steps that misses a node kind. Before a third patch, it is worth considering reading facts the platform already records (the request's decision for S3, skipped and visit steps for M2) rather than widening the inference again. The direction of error the ruling cares about is toward approved, and each miss so far has been in that direction.
  • N3 (nit). The rejected guard's comment gives a reason that would cover failed, cancelled and timed-out runs too, but the guard sits on the refused arm only.

Next: the fix head, then L2 delta round 3 and the L1 delta.

…oval step's label by its decision, red first (#38988)

Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ
Co-authored-by: Claude <noreply@anthropic.com>
…d an approval step's decision off what the platform records (#38988)

M2: on a branch, a conditional or default target with neither a step nor a
skipped step logged after the visit is undecided or running, and is read as
the frontier. A label-routing node whose label is not recorded and not shown
by a target only one group names reads every group (open), never none.
S3: an approval step's label is its request's decision, read exactly
(approvalStepLabels); target ownership stays for other label-routing nodes.

Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ
Co-authored-by: Claude <noreply@anthropic.com>
…arm only, and why (#38988)

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ

Final green head · patch round 2 · 2026-12-02T03:11Z · zone osa-data
Head-sha: 40b23f4

  • CI at this head: 39 success, 0 failure (the 2 rows running now are the PR-body guards re-run by this round's body edit). Diff: 5 files, +818 / −35 (853 lines ≤ 3000). Not governed. Fixes #38988. Same file surface.
  • Closes delta record 7332253435 and L1 7332267098: M2 (a conditional/default target with neither a run step nor a skipped step after the visit is the frontier), S3 (an approval step's label is its request's decision, read off sys_approval_request; target ownership only for other label-routing nodes), N3. Following the L1 steer, where a fact is not recorded the judge reads the branch as open. Verification found one more gap toward approved (labelled_fork: a node with labelled out-edges that chooses no label), red first in d91d5c6, fixed in 40b23f4: ownership applies only to a recorded approval step or a decision with conditions. The PR body's "Patch round 2" section lists what the judge reads and where it still infers.
  • Readings (dev report 7333601916; round-2 commits beec364..c877439 by the first dev, lost to a container restart before it reported, verified by a second dev): round-2 source reverse-applied on the head gives 8 failed / 29 passed (door halves of fork_decision and approved_shared write approved; reject_audit abandons); green: fan-out files 39/39, plugin-approvals 146 files / 2315 tests, label_fail, reject_fork_refuse, shared_notify and every 37767 后续:审批读取的 fan-out 判断与引擎注释收尾(N14–N17、N23、stopOf) #38691 pin green. Ablations (M2, S3, the new gate) each turn exactly their cells red. 74 derived gates: 72 exit 0, 2 NOT MEASURED (full workspace build; CI ran them).
  • Sent to osa-L1-a for L2 delta round 3 and the L1 delta.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm

Contract-review-claim: session_01WGufzhGA3zoCFquQgku4pm · head 40b23f4 · 2026-12-02T03:12Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 40b23f49047da4f29311dbac0f6ef2b6bd0bb91a
Local-runs: none

Delta round 3 on PR #39013 · card #38988 · reviewed 2026-12-02T03:16Z. It follows the round 2 record on 51ecf071c27d194fdbbc5d535ef4f1e65b94c05b (FAIL: M2, S3, N3). Read: the dev report 7333601916, the PR body's "Patch round 2" section, the dev's own change 51ecf071..40b23f49 under packages/plugins/plugin-approvals and .changeset, the net diff against main at this head (5 files, +818/-35), and the check-runs on the head (41 success, 20 skipped, none failed). The merge c877439b brought one file into the package, flow-route.integration.test.ts (from #38970 on main), which is not in the net diff; the engine's dag-traversal.ts is unchanged since round 2.

Scope: packages/plugins/plugin-approvals/src/approval-fanout-judge.ts, packages/plugins/plugin-approvals/src/approval-service.ts (the placeApprovalRun, readApprovalRun and routed-failure hunks) + none. The two test files and the changeset were read only to judge these. Read, not reviewed: packages/services/service-automation/src/dag-traversal.ts (executeNode, traverseNext), packages/services/service-automation/src/builtin/logic-nodes.ts (the decision executor), packages/spec/src/automation/approval.zod.ts (APPROVAL_BRANCH_LABELS).

M2: closed
S3: closed

N3 of round 2 is fixed as well (the comment on the rejected guard says it is on the refused arm only, and why).

① Derived judgments

  • No accept-set change and no public-surface change: the module is not exported from the package index; readApprovalRun and placeApprovalRun are private and gain one argument, the approval's requests, already read by the caller. Right.
  • The new import of APPROVAL_BRANCH_LABELS from @objectstack/spec/automation reads a published constant and adds none. Right.
  • The outcome change is one way on the judged arms (toward the put-back), narrowed by the rejected guard on the refused arm. Right, but for S4 and S5 below, where the old outcome (approved) still stands.
  • The check-runs on the head are the gate verdicts: none failed.

② Semver level

@objectstack/plugin-approvals: patch, Clause-②: no and Metadata-protocol: none stand. One sentence of the changeset is not true of the tree: for a decision that declares conditions, "Where that cannot tell the labels apart, every branch counts, which errs toward putting the record back" (S4: the reading can also pick the label not taken, toward approved).

③ Boundary flags

  • open_questions: none in report 7333601916.
  • Deviation, one single-file test run outside the verify lock: accepted, no effect on the tree.
  • Deviation, the PR body not edited by the dev: accepted; the body carries the "Patch round 2" section at this head.
  • Out-of-scope note, a recall resumes on the reject label while the request reads recalled, so every edge of that visit is read: accepted, toward open, and a recalled latest request is not judged by the door at all.
  • File surface: held. SQL push-down: no new query, no id materialisation, no in-app join; the label reading uses the request rows the judgement already holds.

④ Design judgment

The contract: ruling 7329430078, "When the run ends, any approval step on the other branch that has not finished counts as not done. The record is judged abandoned or withdrawn, and it is never marked approved with an approver missing."

What closed, against the tree. M2: following now reads the conditional and default edges of a visit, and a target with neither a run step nor a skipped step after the visit is followed as open; a label-routing node whose taken target has not logged shows no group, and then every group is read; the decision cell is pinned on the real engine at the door and the reconciler. S3: an approval step's label is read off the request its visit opened (approvalStepLabels), so both shared-target cells are exact, and both are pinned. The labelled fork the zone found (a node that chooses no label runs every group) matches traverseNext, which narrows to a label only where the executor answered one.

S4 (should-fix) — on a decision that declares conditions, target ownership can still pick the label the node did not take, toward approved, against the module's own sentence "where a fact is not recorded it reads the branch as open, never as nothing open". The decision's label is not recorded, so following narrows to the groups that show a logged target no other group OF THAT NODE names; a target logged by another route counts. Cell: first (approved) leads to fork; fork fans out to audit and to the decision dec; dec has the label high to prep (which leads to second) and the label low to the same audit; dec answers high, prep is running, and audit, run by the sibling branch, fails. The log holds dec as a success and audit as the failure after it. low shows its target, high shows none, so only low is read; its branch ended in the failure, nothing is open, the stop audit is outside the set, and the door writes approved with second never asked. The flow passes the gates of #38838 and #38970 (one branch reaches a pause). To close: narrow by ownership only where the logged target could not have been reached by another logged node (no other predecessor of it was logged), or read every group whenever the label is not recorded; pin the cell.

S5 (should-fix) — where the flow's body cannot be read, a branch that had logged nothing by the run's end is not seen, and the judge answers nothing open. openBranchAtEnd returns after the log half when edges is empty, and the log half sees only steps already logged late; the docblock's "This half also answers where the flow's body cannot be read" holds only once the open branch has logged. A failed, cancelled, timed-out or refused run whose flow is no longer registered when the reconciler reads it (the door did not judge, the other branch never logged) is then finished, toward approved. To close: on such a run with no readable body, answer that it cannot be told (undetermined within the age bound) instead of nothing open, or say in the docblock and the acceptance notes that this cell keeps the reading before the judge and have the seat accept it.

N4 (nit) — on a node that chose a label the judge could not read, conditional and default edges are all read as undecided, though the engine walks only the claimed label's edges and logs no skipped step for the rest. It errs toward open, as the docblock says of what is not recorded; the docblock's list of where it infers could name it.

Tried against the tree, and standing: an approval step logs its step as it pauses, after its request is written, so the request opened last by the step's completedAt is the visit's own, a second round of the same node included; a request not decided, or none opened by then, reads every edge (toward open); a resubmission resumes the revise node, which is not an approval step and chooses no label, so every group is read; a label no edge carries reads every edge, as the engine does; a completed run is not judged and cannot hold an open branch; a branch that reaches an end or logs a failure is ended; the walk's seen set costs no reading, since two branches that reach one pausing node are refused at registration. Q1 (the rejected guard on the refused arm) is unchanged and holds as judged in round 2.

Implemented-by: claude/issue-38988-fanout-judge
Reviewed-by: session_01WGufzhGA3zoCFquQgku4pm

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm

L1 delta · PR #39013 (#38988) · head 40b23f4 · 2026-12-02T03:18Z

REWORK. Contract L2 delta round 3 on this head is a PASS. It closes M2 and S3, but leaves S4 and S5 (should-fix) open (comment 7333739245), so the queue guard refuses this head. CI and the face are clean: l1-face CLEAN, checks 41 success, 20 expected skips, 0 failed, 0 pending, and mergeable_state is clean.

Before landing

  1. S4: fix it. Don't accept it as a deviation. I read it in the tree. In approval-fanout-judge.ts following, on a node that chooses a label with no label recorded, a group is kept when one of its targets is owned by that group alone among the node's groups and was logged after the visit (owners.get(t) === 1 && after(t, visit, true) >= 0). Being logged after the visit does not show that this node reached the target, because a sibling branch can log the same node. In the round 3 cell, decision dec takes high but low's target audit was run by the sibling, so high is dropped. Nothing reads as open, and the door writes approved while a step was never asked. That is the outcome ruling 7329430078 forbids, and it contradicts the module's own "a missing fact reads as open". Narrow by ownership only where no other logged route could have reached the target, or else read every group. Pin the cell.
  2. S5: fix it or have the seat accept it in writing. Where the flow body is unreadable (edges.length === 0), the judge returns after the log half, so a branch that had logged nothing by the run's end goes unseen. Either answer undetermined within the age bound, or state the limit in the docblock and changeset and get the seat's acceptance on the card.
  3. N4 is a nit. The docblock's list of where it still infers could name it.

Read and right on this head

  • M2 and S3 are closed as the record says. The labelled-fork fix (a node with labelled out-edges that picks no label runs every group) matches the engine. The merge c877439b brought nothing from main into the judged files.
  • Clause-②: no and patch stand.

Next: a fix head. I then run a round 4 delta at contract tier naming S4 and S5, and post an L1 delta.

…readable body, red first (#38988)

On the real engine at 40b23f4: a decision with conditions whose other
label names a node a sibling branch ran reads that label as taken, and the
door writes approved with the second step never asked; and where the flow's
body cannot be read and the open branch has logged nothing, the reconciler
answers finished.

Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ
Co-authored-by: Claude <noreply@anthropic.com>
… label's evidence, and an unreadable body is not nothing open (#38988)

S4: on a node that chose a label not recorded, a target only one label
names shows that label only where no other node the run logged before it
has an edge into it (nor another visit of the node); otherwise every group
is read, toward open.
S5: where the run's flow body cannot be read and no branch logged after the
end, the placement answers undetermined within the age bound, and past it,
where the judgement before read the same, places the run at the step last
decided (stoodState 'body'), the rule for a run that cannot be read.
N4: the docblock names the label-chosen-but-unread case.

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ

Final green head · patch round 3 · 2026-12-02T04:10Z · zone osa-data
Head-sha: 491eff0

  • CI at this head: 39 success, 18 skipped, 0 failure (rows running now are the PR-body guards re-run by this round's body edit). Diff: 5 files, +991 / −38 (1029 lines ≤ 3000). Not governed. Fixes #38988. Same file surface.
  • Closes contract review 7333739245 (S4, S5 open) and L1 7333760961: S4 (a target another logged node, or another visit of the same node, has an edge into is no label evidence; every group is read, toward open), S5 (an unreadable flow body is undetermined within the age bound; past it, placed by the A3/B2 rule at the step last decided, new stoodState kind body), N4 docblock. The PR body's "Patch round 3" section states each rule and its pin.
  • Readings (dev report 7334613265): red first at 40b23f49 (test commit 40b72514: dec_sibling door half wrote approved; unreadable-body cell gave { finished: 1 }); green: fan-out files 41/41, plugin-approvals 146 files / 2319 tests, every earlier pin. Ablations: S4 guard dropped → 2 cells red; S5 answer dropped → 1 cell red. 74 derived gates run, 0 NOT MEASURED.
  • One deviation, inside the declared file: S5 adds one kind to the closed stoodState union in approval-service.ts (beyond call sites only); in the finished case it writes no "flow did not continue" notice.
  • Sent to osa-L1-a for the round 4 L2 delta and the L1 delta. Landing waits for both on this head, and for repo gates: check-closed-ceremony-text dies with ENOBUFS (git ls-files output past the 1 MiB default buffer) — every PR that adds a path under packages/, content/docs/ or .changeset/ now fails Lint & Repo Gates #39025 (merge-queue ENOBUFS on new paths).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm

Contract-review-claim: session_01WGufzhGA3zoCFquQgku4pm · head 491eff0 · 2026-12-02T04:11Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 491eff0a97ff8d57913a89a029f44908035c7f36
Local-runs: none

Delta round 4 on PR #39013 · card #38988 · reviewed 2026-12-02T04:15Z. It follows the round 3 record on 40b23f49047da4f29311dbac0f6ef2b6bd0bb91a (PASS with S4 and S5 open, N4). Read: the dev report 7334613265, the PR body's "Patch round 3" section, the change 40b23f49..491eff0a (two commits, no merge; 5 files, +192/-22), and the check-runs on the head (41 success, 20 skipped, none failed).

Scope: packages/plugins/plugin-approvals/src/approval-fanout-judge.ts, packages/plugins/plugin-approvals/src/approval-service.ts (the placeApprovalRun hunks and stoodState) + none. The two test files and the changeset were read only to judge these. Read, not reviewed: readCarryingRun and judgeApprovalAfterDoor in approval-service.ts (how a stood state is kept and read), packages/services/service-automation/src/dag-traversal.ts (traverseNext), packages/services/service-automation/src/builtin/logic-nodes.ts (the decision executor).

S4: closed
S5: closed

N4 of round 3 is fixed as well (the docblock and the changeset name the reading of conditional and default edges on a node whose label could not be read).

① Derived judgments

  • No accept-set change and no public-surface change. stoodState is a module-private function whose kind union gains body; the string is compared whole and never parsed, and no other caller spells or reads the new kind. Right.
  • A new answer on the judged arms: a non-completed terminal run whose flow body cannot be read, and that shows no late step, is undetermined within the age bound, where it read finished. Right, and toward the reconciler.
  • The check-runs on the head are the gate verdicts: none failed.

② Semver level

@objectstack/plugin-approvals: patch, Clause-②: no and Metadata-protocol: none stand. The changeset's sentence on a decision that declares conditions, "Where that cannot tell the labels apart, every branch counts, which errs toward putting the record back", is still not true of one cell (S6).

③ Boundary flags

  • open_questions: none in report 7334613265.
  • Deviation, S5 adds a kind to stoodState and its docblock beyond call sites: accepted, it is inside the declared file and is the mechanism rulings A3 and B2 already use for a run that cannot be read.
  • Deviation, the aged S5 placement that ends finished writes no notice that the flow could not be seen through: accepted as declared; the outcome written is the same, and the seat may want the notice in a follow-up.
  • File surface: held. SQL push-down: no new query, no id materialisation, no in-app join.

④ Design judgment

The contract: ruling 7329430078, "When the run ends, any approval step on the other branch that has not finished counts as not done. The record is judged abandoned or withdrawn, and it is never marked approved with an approver missing."

What closed, against the tree. S4: onlyFrom takes a logged target as a label's evidence only where no other top-level step logged before it ran a node with an edge of any kind into that target, another visit of the same node included; a node logs its step before the engine walks its out-edges, so a sibling that ran the target is always seen. The sibling cell of round 3 is pinned on the real engine. S5: openBranch answers a third value where the body cannot be read and no late step shows; blind then answers undetermined within the age bound and on the first aged judgement, and the state it reads is kept for the next one by the same stands closure that keeps pause_gone. Past the bound and standing, the run is placed by the step last decided: abandoned where that step is in the stamped set, finished where it is not. The finished answer there cannot leave an approver missing: a step stands in the set exactly where a step can follow it, so outside it no step follows the step last decided. No other kind's reading changes: body is not among the states that place the approval at the end of the walk, and the completed, answered and rejected-on-refused paths never reach blind.

S6 (should-fix) — a decision that declares conditions and answers a label no out-edge carries is read as having taken one label, toward approved. The executor answers a condition's label or default; where no edge carries the answer (and, for default, no isDefault edge exists), traverseNext warns and runs EVERY out-edge together. choosesALabel reads the node as one that narrows, and following then keeps only the groups that show evidence. Cell: dec declares high and low, with high to prep (which leads to second) and low to tidy, and no default route; neither condition holds, so the engine runs prep and tidy together; tidy fails while prep is running. low shows tidy (its own, logged, no other predecessor), high shows nothing, so only low is read: one target, no fan-out, nothing open, and the door writes approved with second never asked. The flow is registrable (one branch reaches a pause; the unmatched label is a lint, not a refusal). The same reading is fooled where the node itself has a conditional edge of the taken label into a target another label's group names: owners counts the groups of unconditional edges only. To close: narrow by evidence only where the body shows the decision must have claimed a label (every declared label is carried by an edge, and a default label or an isDefault edge exists), count the node's own edges of every kind in owners, and otherwise read every group; pin the no-default cell.

S7 (should-fix) — the stricter evidence test now reads a branch as open in a flow with no fan-out. onlyFrom counts any logged node with an edge into the target, whether or not that node took the edge. Cell: first has reject to notify; approved, it leads to dec, whose high leads to second and whose low leads to the same notify; dec answers low and notify fails. first was logged and has an edge into notify, so low shows no evidence, every group is read, the two targets make a fan-out, and second, not logged, reads as open: the record is put back where it took approved on the round 3 head, and the timeline names a branch that never ran. The direction is the one ADR-0162 tolerates, but it is a new wrong line outside any fan-out. To close: a predecessor whose label is recorded (an approval step) counts only by the edges of the label it took; pin the cell as a control, or have the seat accept it in the acceptance notes.

Tried against the tree, and standing: a failure step counts as the node having run, in the evidence test and in the predecessor test alike; a late or nested step is never a visit; the default route of a decision (the default label on an isDefault edge) is followed through the conditional and default reading whatever the groups show; Q1 (the rejected guard on the refused arm) is unchanged, and a refused run after a rejection never reaches blind.

Implemented-by: claude/issue-38988-fanout-judge
Reviewed-by: session_01WGufzhGA3zoCFquQgku4pm

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm

L1 delta · PR #39013 (#38988) · head 491eff0 · 2026-12-02T04:16Z

REWORK. Contract L2 delta round 4 on this head is a PASS. It closes S4, S5 and N4, but leaves S6 and S7 (should-fix) open (comment 7334730161), so the queue guard refuses this head. CI is green: 41 success, 0 failed.

S6 must be fixed (toward a false "approved"). I read it against the engine. In dag-traversal.ts, when a node computes a branch label that no out-edge claims (for example default with no isDefault edge), the engine warns and walks every out-edge. The judge still narrows to the groups that show evidence. In the round 4 cell, dec declares high and low with no default route. Both run, tidy fails, high's branch is dropped, and the door writes approved with second never asked.

S7 is new in this round, in the tolerated direction (wrong abandon). onlyFrom counts any logged node with an edge into the target, whether or not that node took the edge. Fix it, or have the seat accept it in the acceptance notes.

A note on convergence. Four rounds have each closed their findings and found a new way to infer a label that wasn't recorded. The rule that cannot be fooled toward approved is: on a node that chooses a label whose label is not recorded, read every group. That closes S6 outright and makes S4's ownership test unnecessary. Its cost is a wrong abandon in some flows, which is the direction ADR-0162 tolerates and the class S7 already is. If the evidence narrowing stays, follow the record's closing condition: narrow only where every declared label has an edge and a default route exists, count the node's own edges of every kind, and pin the no-default cell. I have asked the seat to choose between the two.

Next: a fix head. I then run a round 5 delta at contract tier naming S6 and S7, and post an L1 delta. Landing also waits on #39025.

…wn conditional edge, red first, and the cost control (#38988)

On the real engine at 491eff0: a decision that answers a label no edge
carries runs every out-edge, and a decision's own conditional edge of the
label it took reaches a target its other label names; in both the door
writes approved with the second step never asked. The cost control pins
the put-back the read-every-group rule accepts where a decision's label is
not recorded.

Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ
Co-authored-by: Claude <noreply@anthropic.com>
…whose label is not recorded (#38988)

S6 of contract review 7334730161, by the rule the seat confirmed in
7334756396: where the label a node took is not recorded (a decision that
declares conditions, an approval step with no request row), every group is
read, always. The evidence narrowing (target ownership, the S4 predecessor
test) is removed rather than refined: a logged target is no knowledge of
the label, and a label no edge carries makes the engine run every edge.
The recorded label (an approval step's request decision) still decides.
The cost, a put-back after a branch the node did not take (S7), is the
direction ADR-0162 tolerates and the seat accepted.

Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ
Co-authored-by: Claude <noreply@anthropic.com>
…nout-judge

Brings in the ENOBUFS fix for check:closed-ceremony-text (#39027).

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ

Final green head · patch round 4 · 2026-12-02T05:32Z · zone osa-data
Head-sha: b7ecc14

  • CI at this head: 41 success, 20 skipped, 0 failure (origin/main merged at b7ecc146, carrying the fix(scripts): tree-scaled git listings in two gate scripts read past the 1 MiB default buffer #39027 fix). Diff: 5 files, +1023 / −38 (1061 lines ≤ 3000). Not governed. Fixes #38988. Same file surface.
  • Closes contract review 7334730161 (S6, S7 open) and L1 7334739130 by the seat's reading 7334756396: where a node's label is not recorded (a decision with conditions, an approval step with no request row), every group of its out-edges is read; the evidence narrowing (ownership, onlyFrom) is removed; the recorded label (S3) still decides. S6 pinned red first (dec_nodefault, dec_own_cond: approved → recalled). S7 accepted in writing by the seat as the rule's cost and pinned as control dec_low_notify. The PR body's "Patch round 4" section and a new 维护者速读 bullet state the behaviour change.
  • Readings (dev report 7335581345): red first at 491eff0a (test commit 410f4073); fan-out files 46/46; plugin-approvals 146 files / 2322 tests (also after the main merge); ablation (narrowing put back) → 10 cells red; 74 derived gates run, 0 NOT MEASURED. Three unit pins that asserted narrowing on an unrecorded label changed expectation, each named in the body; each keeps a recorded-label case that still narrows.
  • Sent to osa-L1-a for the round 5 L2 delta and the L1 delta.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm

Contract-review-claim: session_01WGufzhGA3zoCFquQgku4pm · head b7ecc14 · 2026-12-02T05:33Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: b7ecc1468a1ac225cdc8a70f124698e5de5b95e4
Local-runs: none

Delta round 5 on PR #39013 · card #38988 · reviewed 2026-12-02T05:35Z. It follows the round 4 record on 491eff0a97ff8d57913a89a029f44908035c7f36 (PASS with S6 and S7 open) and is judged against the seat's ruling 7334756396 on the card: where a choosing node's label is not recorded, every group of that node is read, with no narrowing by evidence; the wrong abandon this can cost is accepted and pinned. Read: that ruling, the dev report 7335581345, the dev's change 491eff0a..8b6d5808 (4 files, +126/-94; approval-service.ts untouched), the merge b7ecc146, and the check-runs on the head (41 success, 20 skipped, none failed). The merge brought nothing into packages/plugins/plugin-approvals, the changeset or the engine's dag-traversal.ts: git diff 8b6d5808 b7ecc146 over those paths is empty.

Scope: packages/plugins/plugin-approvals/src/approval-fanout-judge.ts, packages/plugins/plugin-approvals/src/approval-service.ts (the placeApprovalRun hunks and stoodState, unchanged this round) + none. The two test files and the changeset were read only to judge these. Read, not reviewed: packages/services/service-automation/src/dag-traversal.ts (traverseNext).

S6: closed
S7: closed

S7 is closed by the seat's acceptance, ruling 7334756396, not by a fix: a branch a node did not take can be read as open and the record put back, also in a flow with no fan-out. It is pinned as the control dec_low_notify and named in the PR body's summary and in the changeset. The cell as round 4 wrote it left the record approved (its second was the last step, so outside the set); the pin adds a third step, which is the right cell.

No must-fix, no should-fix.

① Derived judgments

  • No accept-set change and no public-surface change. FanOutInput.body no longer reads nodes; the type is module-internal. Right.
  • The outcome change is one way: a non-completed terminal run past a node whose label is not recorded (a decision that declares conditions, an approval step with no request row) and whose out-edges that run together number two or more now reads a target the run did not log as open where it stands between two steps. Toward the put-back only, as ruled. Right.
  • The check-runs on the head are the gate verdicts: none failed.

② Semver level

@objectstack/plugin-approvals: patch, Clause-②: no and Metadata-protocol: none stand. The changeset's sentence on an unrecorded label now says every branch counts, names the cost and the seat's acceptance, and is true of the tree; the sentence round 4 flagged is gone.

③ Boundary flags

  • open_questions: none in report 7335581345.
  • Deviation, the round 4 remedy for S6 (narrow only where a label must have been claimed) was not built: accepted, the seat's ruling took option (a) and set (b) aside.
  • Deviation, the cost control uses three steps where round 4 wrote two: accepted, see S7 above.
  • File surface: held. SQL push-down: no new query, no id materialisation, no in-app join.

④ Design judgment

The contract: ruling 7329430078 ("never marked approved with an approver missing"), as read by the seat's ruling 7334756396.

Does the tree implement exactly that rule. Yes. following narrows a visit's out-edges in one place only: where takenLabel answers a label and an edge of the node carries it. Every other case (nothing recorded, a decision recorded as not made, a recorded label no edge carries) keeps every out-edge, and the edges that run together are then all of them. choosesALabel, the ownership count and onlyFrom are removed; no reading of which targets logged remains in the choice of groups.

Is every path to a false approved from S4 and S6 closed. Yes, each traced on the code:

  • the sibling-run target (S4): the decision's label is not recorded, so both groups are read and the group whose target is still running is followed to its frontier;
  • the labelled fork: a node that chooses no label has nothing recorded, so every group is read, as the engine runs them;
  • the node's own conditional edge into another label's target (S6, second cell): no group is dropped on any evidence, and the conditional target is read by the sequential reading beside them; pinned as dec_own_cond;
  • a label no edge carries with no default route (S6): every group is read, the two targets make a fan-out, and the one still running is open; pinned as dec_nodefault.
    Where a label is recorded and narrows, it is the engine's own narrowing: traverseNext claims the edges that carry the label and walks every edge where none does, and the judge does the same.

Did removing the narrowing break what closed earlier. No. M2: the conditional and default reading and the frontier walk are unchanged. S3: an approval step's label is still read off the request its visit opened, so the label it did not take is not read; with no request row every group is read, toward open. S5: flowBodyReadable, the third answer of openBranch and the body stood state are untouched. A visit with fewer than two edges that run together is still no fan-out, which matches the engine: conditional and default targets are awaited one at a time before the unconditional ones start.

Q1 (the rejected guard on the refused arm) is unchanged and holds.

Implemented-by: claude/issue-38988-fanout-judge
Reviewed-by: session_01WGufzhGA3zoCFquQgku4pm

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm

L1 delta · PR #39013 (#38988) · head b7ecc14 · 2026-12-02T05:36Z

ACCEPT, on head b7ecc1468a1ac225cdc8a70f124698e5de5b95e4.

  • Contract L2 delta, round 5, at CONTRACT_REVIEW_TIER on this head: PASS, a clean round (comment 7336099791). S6: closed by the fix. S7: closed by the seat's acceptance (ruling 7334756396 on Approvals fan-out stop reading: cells the time-based fix of #38691 does not reach (held suspension, refused run, routedFailure) #38988), pinned as the control dec_low_notify. No graded finding is open on this head.
  • The seat's rule, read in the tree. In approval-fanout-judge.ts, following narrows a visit's out-edges in one place only: where a label is recorded and one of the node's edges carries it (recorded, lines 159-160). Every other case reads every group. The evidence narrowing (choosesALabel, the ownership count, onlyFrom) is gone. The pins dec_own_cond and dec_nodefault cover S6's two paths.
  • What earlier rounds closed still holds. M2, S3, S5, the labelled fork and Q1 are unchanged or now the default path, as the record traces.
  • The merge b7ecc146 (main with fix(scripts): tree-scaled git listings in two gate scripts read past the 1 MiB default buffer #39027) is empty over packages/plugins/plugin-approvals, so the dev's change is read as 491eff0a..8b6d5808.
  • Face. l1-face CLEAN. Checks: 41 success, 20 expected skips, 0 failed, 0 pending. mergeable_state clean. Not governed. Clause-②: no, patch. The changeset and the PR body's "Patch round 4" section name the behaviour change and its cost.

Next: zone landing. The merge closes #38988.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ

2026-12-02T05:37Z · Landing: on head b7ecc14 the contract L2 delta round 5 is PASS with nothing open (7336099791; S6 closed by the fix, S7 closed by the seat's acceptance 7334756396) and the L1 delta is ACCEPT (7336112775). Not governed, 1061 lines ≤ 3000, CI 41 success / 0 failure, mergeable clean. Ready for review and auto-merge (squash). Fixes #38988: the merge closes the card. #38985 phase 2 (approval-node.ts refuses to open on a terminal run) dispatches after this lands.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review December 2, 2026 05:37
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Dec 2, 2026
Merged via the queue into main with commit a0ee7d2 Dec 2, 2026
62 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-38988-fanout-judge branch December 2, 2026 06:04
os-support-ai pushed a commit that referenced this pull request Dec 2, 2026
…38985-failed-run-orphan-approval

Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ
Co-authored-by: Claude <noreply@anthropic.com>
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 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.

Approvals fan-out stop reading: cells the time-based fix of #38691 does not reach (held suspension, refused run, routedFailure)

2 participants