You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Approvals fan-out stop reading: cells the time-based fix of #38691 does not reach (held suspension, refused run, routedFailure) #38988
Filing gate: ② seat-filed from the escalation of the contract-tier L2 on PR #38978 (card #38691), record 7318891630. Grading: area:data · Bug · p2 (same family and grade as #38691) · domain:server · reach: approval flows whose run fans out and then ends while a branch is still logging. No outcome regresses against the base; these are the cells the fix does not reach. Not claimed.
What
PR #38978 reads a terminal fan-out run's log by time: a step logged after the run's completedAt does not count (loggedAfterEnd). Three cells stay outside it:
A suspension held in memory. With suspendedRunStore: 'memory', no data engine, or a pause whose durable save failed, loadSuspendedRunStrict hands out heldSuspensionCopy, which shares the live steps array (run-resume.ts ~843, ~866, ~876). A run cancelled or failed where it waited then carries the other branch's steps logged during the pause, completed before its completedAt, so stopOf and passed read them as before. The control test pins the store-backed shape only.
A refused fan-out run.FlowRefusalSignal unwinds the Promise.all as a failure does, and the reachedAnEnd arm passes every successful step, a late one included.
L2 nits that ride here: N2 (loggedAfterEnd assumes one non-regressing clock; say so), N3 (the stopOf sentence on cancelled/failed/unresumable runs is true only of a store-loaded snapshot), N4 (stopOf and childRunsOf differ on a non-time-ordered log; document the fallback), N5 (routedFailure and reachedAnEnd do not apply loggedAfterEnd).
Done when
A held suspension is cloned at the pause (as InMemorySuspendedRunStore and ObjectStoreSuspendedRunStore.save already do), or the readers judge it the same way; pinned on the memory store.
A refused fan-out run and routedFailure ignore late steps as the stop reading does; pinned red-first.
The docblocks state the clock and snapshot premises (N2, N3, N4).
Dedupe
#38691 (the measured cell, fixed by PR #38978), #38985 (an approval opened on a failed run: the engine side), #38976 (test timeout, unrelated).
Claim: PM loop round 5 · 2026-12-01T19:16Z
Area: osa-data
Session: session_01WGufzhKEbEnW8pwZRgK2gJ
Account: os-support-ai
Branch: claude/issue-38988-fanout-late-steps
Worktree: objectstack-issue-38988
Domain: domain:server
Seat: repo:objectstack@os-support-ai
File surface: packages/services/service-automation/src/run-resume.ts (heldSuspensionCopy / the held-suspension hand-out only: clone at the pause or judge it the same way); packages/plugins/plugin-approvals/src/approval-service.ts (the run-log readers only: stopOf, loggedAfterEnd, routedFailure, the reachedAnEnd pass arm and the refused-run reading, and their docblocks N2–N5; call-site lines only, new logic in a new module beside it if it grows); new test files named for this card beside each; existing tests beside them only where a pin reads the changed answer; one .changeset/38988-*.md. ⛔ Not dag-traversal.ts (#38985's open ownership question, and #38875's claim). Stop on breach; explain in the report.
Container & model: M, mode:subagent, model: default (dispatch-gates --tier: "Model tier — no path-derived mandate"), effort: high (reason: three reading cells over a concurrent run log, a shared-array aliasing defect, and a 15k-line file that takes call-site edits only)
Clause-②: no
Metadata-protocol: none
Responsibility: platform code, objectstack (heldSuspensionCopy shares the live steps array, run-resume.ts:840-876; routedFailure and the reachedAnEnd arm read late steps, approval-service.ts ~2156-2165, ~6475-6511) | none | approval flows whose run fans out and ends while a branch still logs: a memory-held suspension, a refused run or a routed failure reports late sibling steps as passed or as where the flow went on; no outcome regresses against the base
Thread-read: 7320383419
Premise: holds at origin/main20f47c9 (fetched 2026-12-01T19:16Z): heldSuspensionCopy (run-resume.ts:840) is handed out at :866 and :876; stopOf filters loggedAfterEnd (approval-service.ts:1945) while the pass arm at :2165 reads reachedAnEnd || i < lastInRun and routedFailure (:6475, :6503, :6511) reads the stop without that filter; FlowRefusalSignal unwinds from dag-traversal.ts:269/:636.
Pre-claim lane: packages/services/**, packages/plugins/** ⇒ domain:server (file ownership only).
Pre-claim deps: none named; PR #38978 (#38691) merged, whose reading this card extends.
Prior rulings read: L2 escalation record 7318891630 on PR #38978 (the source of this card, with nits N2–N5); seat routing to this zone 2026-12-01T19:15Z ("#38988 can go straight in"); check-prior-rulings.mjs: thread: none.
Serial constraints cleared: check-handover.mjs --inflight --paths=packages/plugins/plugin-approvals/src/approval-service.ts,packages/services/service-automation/src/run-resume.ts --card=38988: NO OVERLAP READ (one unread surface, #38415, a seat reading stroke naming no path). #38985 (same family, engine-or-plugin ownership open) is not folded: another defect shape, and its choice goes to the seat first. overlap-check.mjs before every push.
{
"issue": 38988,
"status": "done",
"branch": "claude/issue-38988-fanout-late-steps",
"pr": "https://github.com/objectstack-ai/objectstack/pull/39000",
"session": "session_01WGufzhKEbEnW8pwZRgK2gJ",
"premise_still_valid": true,
"summary": "Items 1 and 2 of the card plus docblocks N2-N4 and N5's reachedAnEnd half, as a draft PR with 'Part of #38988'. Item 1: run-resume.ts gives the held suspension its own step log at the pause (persistSuspendedRun, matching the stores' save) and on each hand-out (heldSuspensionCopy); a shallow array copy, because a logged entry is only ever replaced at its index, never written in place. Item 2: childRunsOf no longer passes a step completed after the run's completedAt, a run that reached an end included (a refusing end unwinds the fan-out as a failure does, measured on the real engine). Item 3 (routedFailure ignoring late steps) is held out of the PR per the seat's 19:45Z ruling: routedFailure is byte-identical to base. The fork_fail_both pin records the outcomes before and after: at this head (same as base) the door writes approved and the reconciler writes recalled ({abandoned:1}, naming 'late'); with item 3 applied (measured at 4a3c8e1e) both write approved and 'second' is never asked.",
"tests": "Red first on base 20f47c91: held-suspension-steps-38988.test.ts 3 failed | 1 passed (4) (the store control passed on base); approval-fanout-late-steps-38988.test.ts memory cancel cell \"expected 'note' to be 'mid'\", refused cell \"expected { finished: 1 } to deeply equal { undetermined: 1 }\". Green: service-automation test 303 files / 4488 tests passed (at 4a3c8e1e; later commits touch plugin-approvals only); plugin-approvals test 145 files / 2279 passed (at 4a3c8e1e); the two card files plus approval-fanout-stop-38691.test.ts at ff6b5f1f: 8 passed (8); both typechecks exit 0. Ablations (on-disk, restored, hash-identical to HEAD): no pause copy, 3 failed | 1 passed; no hand-out copy, 1 failed | 3 passed; no childRunsOf late-step condition, 1 failed | 7 passed ({ finished: 1 }).",
"gates": "Local at ff6b5f1f: dispatch-gates --commands derived 76; --ran: '76 derived famil(ies) accounted for, 74 run, 2 NOT-MEASURED' (check:dual-build-cjs-loads and check:i18n exit 3 PREREQUISITE NOT MET, a full workspace build; CI ran them). check-plugin-teardown-shape --self-test first exited 3 on the shallow clone (pinned fixture commit 621a4876), exit 0 after fetching that one commit. CI on head ff6b5f1f: every check-run completed, 39 success, the rest skipped, none failed: Lint & Repo Gates success, TypeScript Type Check success, Type Check · workspace success, Test Core success (12/12 shards), Build Core success, Test UI success, Live E2E UI success, Dogfood Regression Gate success, Governed Surface Queue Guard success, Check Changeset success, Check PR Size success, PR-body guards success.",
"mcp_calls": "0",
"api_writes": "2 relay strokes: (1) fleet-write pr_create run 46735587495 = POST /repos/objectstack-ai/objectstack/pulls (draft) + POST /repos/objectstack-ai/objectstack/issues/39000/assignees (os-support-ai), read back identical; (2) this report comment via post-stamped.mjs = POST /repos/objectstack-ai/objectstack/issues/38988/comments. git push x4 (probe + 3 commits), not REST.",
"classifier_refusals": [],
"open_questions": [
{ "question": "Item 3: should the routed-failure reading ignore a failure another branch logged after the run ended?", "options": ["A: ignore it (the card's box); fork_fail_both then reads approved on both the door and the reconciler, with 'second' never asked", "B: a fan-out-aware judge: a step that can follow from any branch still open at the run's end counts as between two steps (abandoned)", "C: leave it as is (door approved, reconciler recalled: they disagree)"], "recommendation": "Already with the maintainer through the seat (ruling 19:45Z); this PR carries none of them and pins the current reading" }
],
"security_findings": "none",
"out_of_scope_findings": ["carrier: none · noted, not filed: the pause snapshot's variables are Object.fromEntries(variables), so a nested value a late branch writes into in place could still reach a held suspension before its first read; read only, not measured; in the PR's Acceptance notes"],
"line_budget": "539 changed lines (+528 / -11), 5 files; under 3,000",
"deviations": "The routed-failure half of the card (item 3, N5's routedFailure half) is held per the seat's ruling, so the PR body says 'Part of #38988', not 'Fixes'. The new approvals test file repeats the #38691 suite's harness: the claim names new files for this card, and the package has no shared harness file.",
"files_changed": ["packages/services/service-automation/src/run-resume.ts", "packages/services/service-automation/src/held-suspension-steps-38988.test.ts", "packages/plugins/plugin-approvals/src/approval-service.ts", "packages/plugins/plugin-approvals/src/approval-fanout-late-steps-38988.test.ts", ".changeset/38988-fanout-late-steps.md"],
"head_sha": "ff6b5f1f8f2008384db517b7b3edf1d35e638a88"
}
2026-12-01T21:14Z · PR #39000 (Part of this card) merged at 2026-12-01T21:14Z: item 1 (a memory-held suspension copies its step log at the pause and on hand-out), item 2 (childRunsOf ignores late steps, a run that reached an end included), docblocks N2–N4 and the reachedAnEnd half of N5 (L1 ACCEPT 7325303559). The card stays open and claimed for item 3 (routedFailure ignoring late steps): applied alone it flips fork_fail_both to approved on the reconciler with the second step never asked, so it waits for the maintainer's ruling on how a failed fan-out run's outcome is judged (raised by the seat). Nothing exists only locally.
2026-12-01T23:29Z · Maintainer ruling recorded (decision card in the seat thread): for an approval flow that fans out where one branch fails, the result is abandoned, never approved.
Answered 2026-12-01T23:28Z. The question asked: after one branch of a fan-out fails, is the record judged approved or abandoned?
Chosen, as the card read it: 「判作废」. 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. Not chosen: an ADR-0162 amendment first, or keeping the current judgement.
{
"issue": 38988,
"status": "done",
"branch": "claude/issue-38988-fanout-judge",
"pr": "https://github.com/objectstack-ai/objectstack/pull/39013",
"session": "session_01WGufzhKEbEnW8pwZRgK2gJ",
"premise_still_valid": true,
"round": "patch round 2, verification and report (contract review 7332253435 FAIL M2/S3/N3; L1 7332267098). Commits beec3648, 006c6f69, 24adca7d and the main merge c877439b came from the previous dev of this round, which the container restart cut off before it could report. This run verified them, found one gap, and closed it in d91d5c69 (red first) and 40b23f49 (fix).",
"summary": "M2, S3 and N3 are closed at c877439b as the review states them, verified red first on the real engine. Recorded facts the judge reads: the top-level step log by the run's end (nodeId, status, parentNodeId, and completedAt against the run's end); the skipped step the engine writes for a conditional or default edge it passed over, together with the run step of the target it took, so a target with neither is the frontier (M2); the step's nodeType; and, for an approval step, the sys_approval_request row of that run and node opened last by the step's completedAt, mapped approved/rejected/returned to approve/reject/revise, with pending/recalled/cancelled read as every edge (S3). Where it still infers: the label a decision with conditions took (the step does not record it), the label of an approval step with no request row in hand, conditional targets matched by node id rather than skippedBy.nodeId, and the current flow body. Verification found one more gap in the same class, toward approved. Target ownership was applied to any node whose out-edges carry labels, including a node that chooses no label, whose every out-edge the engine runs. On the real engine at c877439b, such a fan-out (labelled_fork) had the door write approved with the second step never asked. Fixed in 40b23f49: ownership applies only where the recorded nodeType is approval, or decision with conditions in the body. Any other node reads every group, which errs toward open as the L1 steer asks. N3: the guard comment and the changeset say refused arm only, and why.",
"tests": "Red first: the round-2 source hunks (judge and service, 51ecf071..24adca7d) were reverse-applied on c877439b, judge blob 7394b387 equal to 51ecf071's, and the three fan-out files run: 'Tests 8 failed | 29 passed (37)'. Real engine: fork_decision 'the door: expected approved to be recalled'; approved_shared 'i_appr_door: expected approved to be recalled'; reject_audit 'expected { abandoned: 1 } to deeply equal { finished: 1 }'. The reconciler halves of fork_decision and approved_shared passed on round-1 code, because the reconciler judges after the late step logged and the late-step half of the judge answers that. Unit: the shared-label cell (expected undefined to be second), the null/unknown-label cell (expected undefined to be c), the conditional cell (expected undefined to be late2), and both approvalStepLabels cells (TypeError: approvalStepLabels is not a function). Restored by git restore, hashes 424441d5 and a439a72f matched head. Green at c877439b: 'Tests 37 passed (37)' over the 38988 judge, 38988 late-steps and 38691 files; label_fail, reject_fork_refuse, shared_notify and all four 38691 pins pass. New gap, red at c877439b: labelled_fork 'i_lab_door: expected approved to be recalled'. At 40b23f49: fan-out files 'Tests 39 passed (39)'; plugin-approvals full suite 'Test Files 146 passed (146), Tests 2315 passed (2315)' (VERDICT command-exit 0); plugin-approvals typecheck exit 0 including check:test-typecheck OK; plugin-approvals build exit 0 with 2/2 declaration files. Ablations, each an on-disk edit restored and checked by hash. M2, sequential targets emptied: 'Tests 2 failed | 35 passed (37)', the unit conditional cell plus fork_decision at the door (expected approved to be recalled). S3, takenLabel dropped at the service call site: 'Tests 2 failed | 13 passed (15)', reject_audit and shared_notify, both expected { abandoned: 1 } to deeply equal { finished: 1 }. approved_shared stays green under the S3 ablation because M2's every-group fallback puts it back. New fix, choosesALabel gate removed: 'Tests 2 failed | 33 passed (35)', the unit non-routing cell and labelled_fork at the door.",
"gates": "Local at 40b23f49. dispatch-gates --commands --repo objectstack-ai/objectstack derived 74 families. --ran with exit codes: '74 derived famil(ies) accounted for, 72 run, 2 NOT-MEASURED'. The two are check:dual-build-cjs-loads and check:i18n, exit 3 PREREQUISITE NOT MET, no dist for packages outside the plugin-approvals closure; CI runs them. check:dts-closure exited 1 first, because plugin-approvals had no declaration files from an earlier skip-dts build; after the plugin-approvals build it exited 0 ('281/281 declared declaration file(s) present'). check:query-options-erasure hit my 300 s cap (124) and then exited 0 ('ratchet holds'). Every other family exited 0. eslint --no-inline-config on the 4 touched source files exited 0. CI on 40b23f49: 39 success, 18 skipped, 0 failed, including Lint & Repo Gates, TypeScript Type Check, Test Core and all 12 shards, Build Core, Governed Surface Queue Guard, Dogfood Regression Gate, Live E2E UI, Test UI and Check Changeset.",
"mcp_calls": "0",
"api_writes": "1: this report comment via post-stamped.mjs (POST issues/38988/comments through the fleet-write relay). git push x1 (c877439b..40b23f49), not a REST write.",
"classifier_refusals": [],
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: none, noted, not filed: a recall resumes the engine on the reject label while the request reads recalled, so the judge reads every edge of that visit. This errs toward open, the direction the L1 steer accepts. It is in the round-2 acceptance notes."
],
"deviations": "One test command, a single-file run of the judge unit tests, ran without os-verify-lock.sh (about 13 s). Every other build and test went through the lock. The gate runner hit the 10-minute foreground cap, and the harness moved it to the background; I waited for it within the turn and read its results. The PR body was not edited; the ready-to-append section is pr_body_round2_sections.",
"files_changed_this_run": [
"packages/plugins/plugin-approvals/src/approval-fanout-judge.ts",
"packages/plugins/plugin-approvals/src/approval-fanout-judge-38988.test.ts",
"packages/plugins/plugin-approvals/src/approval-fanout-late-steps-38988.test.ts",
".changeset/38988-fanout-judge.md"
],
"commits": [
"beec3648 test: red-first pins (decision cell, approved shared target, reject_audit control)",
"006c6f69 fix: M2 conditional targets, S3 approval label from the request",
"24adca7d docs: N3 rejected-guard comment",
"c877439b merge of origin/main",
"d91d5c69 test: labelled_fork, red first (this run)",
"40b23f49 fix: target ownership only on a node that chooses a label (this run)"
],
"line_budget": "+818 / -35 against origin/main, 5 files; under 3,000",
"head_sha": "40b23f49047da4f29311dbac0f6ef2b6bd0bb91a",
"pr_body_round2_sections": "## Patch round 2 (contract review 7332253435, L1 7332267098)\n\nThe 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.\n\n- **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`).\n- **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`.\n- **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.\n- **N3**: the code comment on the rejected guard says the guard is on the refused arm only, and why. The changeset says the same.\n\nWhere 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.\n\nAcceptance notes:\n- 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 are what tell round 1 and round 2 apart. This is the same design as round 1's two-deep cell.\n- `approved_shared` stays green with S3 ablated. 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.\n- 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.\n"
}
{
"issue": 38988,
"status": "done",
"branch": "claude/issue-38988-fanout-judge",
"pr": "https://github.com/objectstack-ai/objectstack/pull/39013",
"session": "session_01WGufzhKEbEnW8pwZRgK2gJ",
"premise_still_valid": true,
"round": "patch round 3 (contract review 7333739245 PASS with S4/S5 open; L1 7333760961 REWORK)",
"summary": "S4 is fixed. On a node that chose a label the judge cannot read, a target only one label names shows that label only if no other top-level step logged before it ran a node with an edge into that target (fault edges included), and no other visit of the same node did either. Otherwise every group is read, toward open. S5 is fixed inside the surface. Where the run's flow body cannot be read (flowBodyReadable, exported from the judge) and no branch logged after the end, placeApprovalRun no longer answers nothing open: within the age bound it answers undetermined. Past the bound, once the judgement before it read the same (new stoodState kind 'body', through the walk's existing aged/stands arguments), it places the run at the step last decided, the A3/B2 rule for a run that cannot be read: abandoned where a step can follow that step, finished where none can. N4: the docblock names the label-chosen-but-unread case for conditional and default edges. The changeset sentence the review named is now true, and the S5 rule is stated.",
"tests": "Red first at 40b23f49 (test commit 40b72514). dec_sibling at the door: 'AssertionError: i_sib_door: expected approved to be recalled'; its order assertion (dec logged before the sibling's audit) and its reconciler half passed, the reconciler half through the late-step half. The unreadable-body cell: 'within the age bound: expected { finished: 1 } to deeply equal { undetermined: 1 }'. Green at 491eff0a: fan-out files (38988 judge unit, 38988 late-steps, 38691) 'Tests 41 passed (41)', then the unit file with the two new cells 'Tests 25 passed (25)'. plugin-approvals full suite 'Test Files 146 passed (146), Tests 2319 passed (2319)' (VERDICT command-exit 0). plugin-approvals typecheck plus build exit 0 (check:test-typecheck OK; check-dts-emitted 2/2). Every earlier pin stays green: label_fail, reject_fork_refuse, shared_notify, fork_decision, approved_shared, reject_audit, labelled_fork and all four 38691 pins. Ablations, each an on-disk edit restored by git restore and checked by hash (judge 2d795f2d, service 5bf6e1b4). S4, onlyFrom dropped: 'Tests 2 failed | 41 passed (43)', the unit sibling cell (expected undefined to be prep) and dec_sibling at the door (expected approved to be recalled). S5, BLIND answer dropped: 'Tests 1 failed | 17 passed (18)', the unreadable-body cell (expected { finished: 1 } to deeply equal { undetermined: 1 }).",
"gates": "Local at 491eff0a. dispatch-gates --commands --repo objectstack-ai/objectstack derived 74 families, the same set as round 2. --ran with exit codes: '74 derived famil(ies) accounted for, 74 run, 0 NOT-MEASURED (a DERIVED zero)'. check:query-options-erasure hit my 300 s per-gate cap (124) and then exited 0 ('ratchet holds'); every other family exited 0, check:dual-build-cjs-loads, check:i18n and check:dts-closure included, since the workspace dist was complete this time. The derivation warned STALE TREE: origin/main is 6 commits ahead and changed scripts/cross-package-test-inputs.mjs. Per AGENTS.md multi-agent section 10 there was no main merge, because nothing conflicted and nothing main-caused is red; CI judges the merge ref. eslint --no-inline-config on the 4 touched source files exited 0. CI on 491eff0a: 39 success, 18 skipped, 0 failed, including Test Core, TypeScript Type Check, Lint & Repo Gates, Build Core, Dogfood Regression Gate, Governed Surface Queue Guard and Check Changeset.",
"mcp_calls": "0",
"api_writes": "1: this report comment via post-stamped.mjs (POST issues/38988/comments through the fleet-write relay). git push x2 (40b72514, 491eff0a), not REST writes.",
"classifier_refusals": [],
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": [],
"deviations": "S5 is implemented at the judge's call site in placeApprovalRun, plus one kind added to the closed stoodState union and its docblock in approval-service.ts. That is slightly wider than call sites only, but it stays in the declared file. In the finished case, the S5 placement writes no 'flow did not continue' notice, unlike the walk's own placed path; this is noted in the round-3 acceptance notes. The last gate part hit the 10-minute foreground cap and the harness moved it to the background; I waited for it within the turn, and nothing is left running. The PR body was not edited.",
"commits": [
"40b72514 test: dec_sibling and unreadable-body cells, red first",
"491eff0a fix: S4 sibling-run target is no label evidence; S5 unreadable body undetermined within the age bound, placed past it; N4 docblock; changeset"
],
"line_budget": "+991 / -38 against origin/main, 5 files; under 3,000",
"head_sha": "491eff0a97ff8d57913a89a029f44908035c7f36",
"pr_body_round3_sections": "## Patch round 3 (contract review 7333739245, L1 7333760961)\n\n- **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`.\n- **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 }`.\n- **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).\n- 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.\n\nAcceptance notes:\n- 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.\n- 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.\n"
}
2026-12-02T04:17Z · Seat ruling for PR #39013 (item 3), after contract-review round 4 (7334730161) and the L1 delta: option (a).
When a choosing node's decision label is not recorded, the judge reads every group of that node. It does not narrow by inferring the label from evidence.
Why: four rounds have each found a new way the inference leaks, and the latest (S6) reaches a false "approved". The maintainer's ruling 7329430078 is that a fan-out with an unfinished approval is judged abandoned and never marked approved with an approver missing. (a) cannot be fooled toward approved. What it costs is a wrong abandon in some flows, which is the direction that ruling and ADR-0162 tolerate.
S6 is closed by (a). S7 (an abandon where the flow would have finished) is accepted as that cost: name it in the PR body's 速读 as a behaviour change, and pin it.
(b), narrowing only where every declared label has an edge and a default route exists, is not taken: it is more precise but leaves more surface for another round.
{
"issue": 38988,
"status": "done",
"branch": "claude/issue-38988-fanout-judge",
"pr": "https://github.com/objectstack-ai/objectstack/pull/39013",
"session": "session_01WGufzhKEbEnW8pwZRgK2gJ",
"premise_still_valid": true,
"round": "patch round 4 (contract review 7334730161 PASS with S6/S7 open; L1 7334739130; seat reading 7334756396 confirms the read-every-group rule and accepts the S7 cost)",
"summary": "S6 is closed by the rule the seat confirmed in 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: target ownership, the round-3 onlyFrom predecessor test, choosesALabel and the body-node lookup all go. The recorded label (an approval step's request decision, S3) still decides, and the S5 unreadable-body path is unchanged. S7 is not fixed; it is the cost the seat accepted, and it is pinned as a control: the dec_low_notify record is put back after a branch that never ran. The changeset bullet and the module docblock now state the rule and its cost. origin/main is merged (b7ecc146, carrying #39027), as the coordinator asked.",
"tests": "Red first at 491eff0a (test commit 410f4073). dec_nodefault: 'AssertionError: i_nodef_door: expected approved to be recalled'. dec_own_cond: 'the door: expected approved to be recalled'. The dec_low_notify cost control first read 'expected approved to be recalled' at 491eff0a, because second was the last step and so not between two steps. With a third step added, it reads recalled at 491eff0a already (S7 as the reviewer found it) and at the new head. Three unit pins changed expectation because they asserted narrowing on an unrecorded label (named in the round-4 section): the routes-by-decision cell (unrecorded: late), the 'only one label names it' cell (alone: prep), and the no-target-logged cell (approval with no request row: a). Each keeps a recorded-label case that still narrows. At 8b6d5808: fan-out files 'Tests 46 passed (46)'; plugin-approvals full suite 'Test Files 146 passed (146), Tests 2322 passed (2322)'; typecheck exit 0. At b7ecc146, after the merge: pnpm install --frozen-lockfile exit 0, turbo build of the plugin-approvals closure exit 0, spec check:generated 'All 14 generated artifacts are up to date' (exit 0), full suite 'Test Files 146 passed (146), Tests 2322 passed (2322)', typecheck exit 0. Every earlier pin is green: dec_sibling, unreadable-body, label_fail, reject_fork_refuse, shared_notify, fork_decision, approved_shared, reject_audit, labelled_fork and all four 38691 pins. Ablation (on-disk, restored by git restore, hash 577963c3 matched): putting back a simple evidence narrowing for unrecorded labels gave 'Tests 10 failed | 36 passed (46)'. Among the reds are dec_nodefault, dec_own_cond, dec_sibling and labelled_fork at the door (expected approved to be recalled), the cost control, and five unit cells.",
"gates": "Local at 8b6d5808. dispatch-gates --commands derived 74 families, the same set as rounds 2 and 3. --ran with exit codes: '74 derived famil(ies) accounted for, 74 run, 0 NOT-MEASURED (a DERIVED zero)'. check:query-options-erasure was run alone with a longer cap and exited 0; every family exited 0, check:closed-ceremony-text included (ENOBUFS did not reproduce locally). After merging main (b7ecc146), the derivation gives the same 74-family set. I re-ran the families main changed or that are ratchets: check:cross-package-test-inputs, check-affected-docs, check:type-check-coverage, check:type-check-debt and check:nul-bytes all exited 0, as did check:closed-ceremony-text ('6624 shipped file(s) read'). eslint --no-inline-config on the 4 touched files exited 0. CI on b7ecc146 at report time: 12 success, 18 skipped, 24 in progress, 0 failed; the in-progress rows are NOT MEASURED, and their convergence is the PM's. Known-red on 8b6d5808: Lint · repo & tooling gates (check:closed-ceremony-text ENOBUFS, fleet-wide, fixed by #39027, now merged).",
"mcp_calls": "0",
"api_writes": "1: this report comment via post-stamped.mjs (POST issues/38988/comments through the fleet-write relay). git push x3 (410f4073, 8b6d5808, b7ecc146), not REST writes.",
"classifier_refusals": [],
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": [],
"deviations": "Following the coordinator's change of approach, I did not implement the S6 narrowing recipe (a must-claim test plus every-kind owners); I implemented the read-every-group rule instead. The S7 cell as written by the reviewer leaves the record approved, because second is the last step and so not between two steps; the pinned control adds a third step so that second can be read as open. The PR body was not edited. Two runs, the red-first cell run and the full suite, were moved to the background by the harness when a message arrived; I waited for both within the turn.",
"commits": [
"410f4073 test: dec_nodefault and dec_own_cond red first; dec_low_notify cost control",
"8b6d5808 fix: read every group of a node whose label is not recorded; evidence narrowing removed; changeset",
"b7ecc146 merge of origin/main c748e7df (carries #39027), trailer pair"
],
"line_budget": "+1023 / -38 against origin/main, 5 files; under 3,000",
"head_sha": "b7ecc1468a1ac225cdc8a70f124698e5de5b95e4",
"pr_body_round4_sections": "## Patch round 4 (contract review 7334730161, L1 7334739130, seat reading 7334756396)\n\n- **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`.\n- **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`.\n- 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.\n- Changeset: the bullet now states the rule and its cost, and that it never reads a branch the engine ran as finished.\n- `origin/main` merged at `b7ecc146` (it carries the closed-ceremony-text fix, #39027). It touches no file of the package.\n\nAcceptance 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.\n",
"maintainer_brief_bullet_zh": "- 用户能看到的变化:审批流程中,如果读不到某个分支判断节点实际走了哪条路,系统会把这条记录退回到可重新提交的状态,而不是直接标成已批准;这种情况在一些没有并行分支的流程里也会出现。"
}
2026-12-02T06:05Z · Done: PR #39013 merged at 2026-12-02T06:04Z (contract L2 round 5 PASS 7336099791, L1 ACCEPT 7336112775 on b7ecc146): the fan-out judge, on the maintainer's ruling 7329430078 and the seat's reading 7334756396. Clearing pm:dispatched and the assignee: nothing is in flight here. #38985 phase 2 (approval-node.ts refuses to open on a terminal run) builds on this, on its own claim.
Activity
objectstack-fleet commentedon Dec 1, 2026
triage@os-warren · os-warren · session_01JQwxbZzZ2f5mzcvJbRrRNZ
Triage: first-touch · lane grade kept:
area:data· Bug · p2 ·pm:queue.fix(plugin-approvals): a terminal run is read by the steps it logged …
objectstack-fleet commentedon Dec 1, 2026
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ
Claim: PM loop round 5 · 2026-12-01T19:16Z
Area: osa-data
Session:
session_01WGufzhKEbEnW8pwZRgK2gJAccount:
os-support-aiBranch:
claude/issue-38988-fanout-late-stepsWorktree:
objectstack-issue-38988Domain:
domain:serverSeat:
repo:objectstack@os-support-aiFile surface:
packages/services/service-automation/src/run-resume.ts(heldSuspensionCopy/ the held-suspension hand-out only: clone at the pause or judge it the same way);packages/plugins/plugin-approvals/src/approval-service.ts(the run-log readers only:stopOf,loggedAfterEnd,routedFailure, thereachedAnEndpass arm and the refused-run reading, and their docblocks N2–N5; call-site lines only, new logic in a new module beside it if it grows); new test files named for this card beside each; existing tests beside them only where a pin reads the changed answer; one.changeset/38988-*.md. ⛔ Notdag-traversal.ts(#38985's open ownership question, and #38875's claim). Stop on breach; explain in the report.Container & model:
M,mode:subagent,model: default (dispatch-gates --tier: "Model tier — no path-derived mandate"),effort: high (reason: three reading cells over a concurrent run log, a shared-array aliasing defect, and a 15k-line file that takes call-site edits only)Clause-②: no
Metadata-protocol: none
Responsibility:
platform code, objectstack (heldSuspensionCopy shares the live steps array, run-resume.ts:840-876; routedFailure and the reachedAnEnd arm read late steps, approval-service.ts ~2156-2165, ~6475-6511) | none | approval flows whose run fans out and ends while a branch still logs: a memory-held suspension, a refused run or a routed failure reports late sibling steps as passed or as where the flow went on; no outcome regresses against the baseThread-read: 7320383419
Premise: holds at
origin/main20f47c9 (fetched 2026-12-01T19:16Z):heldSuspensionCopy(run-resume.ts:840) is handed out at :866 and :876;stopOffiltersloggedAfterEnd(approval-service.ts:1945) while the pass arm at :2165 readsreachedAnEnd || i < lastInRunandroutedFailure(:6475, :6503, :6511) reads the stop without that filter;FlowRefusalSignalunwinds from dag-traversal.ts:269/:636.Pre-claim lane:
packages/services/**,packages/plugins/**⇒ domain:server (file ownership only).Pre-claim deps: none named; PR #38978 (#38691) merged, whose reading this card extends.
Prior rulings read: L2 escalation record 7318891630 on PR #38978 (the source of this card, with nits N2–N5); seat routing to this zone 2026-12-01T19:15Z ("#38988 can go straight in");
check-prior-rulings.mjs: thread: none.Serial constraints cleared:
check-handover.mjs --inflight --paths=packages/plugins/plugin-approvals/src/approval-service.ts,packages/services/service-automation/src/run-resume.ts --card=38988: NO OVERLAP READ (one unread surface, #38415, a seat reading stroke naming no path). #38985 (same family, engine-or-plugin ownership open) is not folded: another defect shape, and its choice goes to the seat first.overlap-check.mjsbefore every push.objectstack-fleet commentedon Dec 1, 2026
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ
os-dev-report
{ "issue": 38988, "status": "done", "branch": "claude/issue-38988-fanout-late-steps", "pr": "https://github.com/objectstack-ai/objectstack/pull/39000", "session": "session_01WGufzhKEbEnW8pwZRgK2gJ", "premise_still_valid": true, "summary": "Items 1 and 2 of the card plus docblocks N2-N4 and N5's reachedAnEnd half, as a draft PR with 'Part of #38988'. Item 1: run-resume.ts gives the held suspension its own step log at the pause (persistSuspendedRun, matching the stores' save) and on each hand-out (heldSuspensionCopy); a shallow array copy, because a logged entry is only ever replaced at its index, never written in place. Item 2: childRunsOf no longer passes a step completed after the run's completedAt, a run that reached an end included (a refusing end unwinds the fan-out as a failure does, measured on the real engine). Item 3 (routedFailure ignoring late steps) is held out of the PR per the seat's 19:45Z ruling: routedFailure is byte-identical to base. The fork_fail_both pin records the outcomes before and after: at this head (same as base) the door writes approved and the reconciler writes recalled ({abandoned:1}, naming 'late'); with item 3 applied (measured at 4a3c8e1e) both write approved and 'second' is never asked.", "tests": "Red first on base 20f47c91: held-suspension-steps-38988.test.ts 3 failed | 1 passed (4) (the store control passed on base); approval-fanout-late-steps-38988.test.ts memory cancel cell \"expected 'note' to be 'mid'\", refused cell \"expected { finished: 1 } to deeply equal { undetermined: 1 }\". Green: service-automation test 303 files / 4488 tests passed (at 4a3c8e1e; later commits touch plugin-approvals only); plugin-approvals test 145 files / 2279 passed (at 4a3c8e1e); the two card files plus approval-fanout-stop-38691.test.ts at ff6b5f1f: 8 passed (8); both typechecks exit 0. Ablations (on-disk, restored, hash-identical to HEAD): no pause copy, 3 failed | 1 passed; no hand-out copy, 1 failed | 3 passed; no childRunsOf late-step condition, 1 failed | 7 passed ({ finished: 1 }).", "gates": "Local at ff6b5f1f: dispatch-gates --commands derived 76; --ran: '76 derived famil(ies) accounted for, 74 run, 2 NOT-MEASURED' (check:dual-build-cjs-loads and check:i18n exit 3 PREREQUISITE NOT MET, a full workspace build; CI ran them). check-plugin-teardown-shape --self-test first exited 3 on the shallow clone (pinned fixture commit 621a4876), exit 0 after fetching that one commit. CI on head ff6b5f1f: every check-run completed, 39 success, the rest skipped, none failed: Lint & Repo Gates success, TypeScript Type Check success, Type Check · workspace success, Test Core success (12/12 shards), Build Core success, Test UI success, Live E2E UI success, Dogfood Regression Gate success, Governed Surface Queue Guard success, Check Changeset success, Check PR Size success, PR-body guards success.", "mcp_calls": "0", "api_writes": "2 relay strokes: (1) fleet-write pr_create run 46735587495 = POST /repos/objectstack-ai/objectstack/pulls (draft) + POST /repos/objectstack-ai/objectstack/issues/39000/assignees (os-support-ai), read back identical; (2) this report comment via post-stamped.mjs = POST /repos/objectstack-ai/objectstack/issues/38988/comments. git push x4 (probe + 3 commits), not REST.", "classifier_refusals": [], "open_questions": [ { "question": "Item 3: should the routed-failure reading ignore a failure another branch logged after the run ended?", "options": ["A: ignore it (the card's box); fork_fail_both then reads approved on both the door and the reconciler, with 'second' never asked", "B: a fan-out-aware judge: a step that can follow from any branch still open at the run's end counts as between two steps (abandoned)", "C: leave it as is (door approved, reconciler recalled: they disagree)"], "recommendation": "Already with the maintainer through the seat (ruling 19:45Z); this PR carries none of them and pins the current reading" } ], "security_findings": "none", "out_of_scope_findings": ["carrier: none · noted, not filed: the pause snapshot's variables are Object.fromEntries(variables), so a nested value a late branch writes into in place could still reach a held suspension before its first read; read only, not measured; in the PR's Acceptance notes"], "line_budget": "539 changed lines (+528 / -11), 5 files; under 3,000", "deviations": "The routed-failure half of the card (item 3, N5's routedFailure half) is held per the seat's ruling, so the PR body says 'Part of #38988', not 'Fixes'. The new approvals test file repeats the #38691 suite's harness: the claim names new files for this card, and the package has no shared harness file.", "files_changed": ["packages/services/service-automation/src/run-resume.ts", "packages/services/service-automation/src/held-suspension-steps-38988.test.ts", "packages/plugins/plugin-approvals/src/approval-service.ts", "packages/plugins/plugin-approvals/src/approval-fanout-late-steps-38988.test.ts", ".changeset/38988-fanout-late-steps.md"], "head_sha": "ff6b5f1f8f2008384db517b7b3edf1d35e638a88" }objectstack-fleet commentedon Dec 1, 2026
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ
2026-12-01T21:14Z · PR #39000 (Part of this card) merged at 2026-12-01T21:14Z: item 1 (a memory-held suspension copies its step log at the pause and on hand-out), item 2 (
childRunsOfignores late steps, a run that reached an end included), docblocks N2–N4 and thereachedAnEndhalf of N5 (L1 ACCEPT 7325303559). The card stays open and claimed for item 3 (routedFailureignoring late steps): applied alone it flipsfork_fail_bothtoapprovedon the reconciler with the second step never asked, so it waits for the maintainer's ruling on how a failed fan-out run's outcome is judged (raised by the seat). Nothing exists only locally.objectstack-fleet commentedon Dec 1, 2026
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhPdWmTd47Fi2bKYZS
2026-12-01T23:29Z · Maintainer ruling recorded (decision card in the seat thread): for an approval flow that fans out where one branch fails, the result is abandoned, never approved.
14 remaining items
docs(plugin-approvals): the rejected guard says it is on the refused …
test(plugin-approvals): pin a fan-out whose node carries labels it ne…
fix(plugin-approvals): the fan-out judge reads target ownership only …
objectstack-fleet commentedon Dec 2, 2026
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ
os-dev-report
{ "issue": 38988, "status": "done", "branch": "claude/issue-38988-fanout-judge", "pr": "https://github.com/objectstack-ai/objectstack/pull/39013", "session": "session_01WGufzhKEbEnW8pwZRgK2gJ", "premise_still_valid": true, "round": "patch round 2, verification and report (contract review 7332253435 FAIL M2/S3/N3; L1 7332267098). Commits beec3648, 006c6f69, 24adca7d and the main merge c877439b came from the previous dev of this round, which the container restart cut off before it could report. This run verified them, found one gap, and closed it in d91d5c69 (red first) and 40b23f49 (fix).", "summary": "M2, S3 and N3 are closed at c877439b as the review states them, verified red first on the real engine. Recorded facts the judge reads: the top-level step log by the run's end (nodeId, status, parentNodeId, and completedAt against the run's end); the skipped step the engine writes for a conditional or default edge it passed over, together with the run step of the target it took, so a target with neither is the frontier (M2); the step's nodeType; and, for an approval step, the sys_approval_request row of that run and node opened last by the step's completedAt, mapped approved/rejected/returned to approve/reject/revise, with pending/recalled/cancelled read as every edge (S3). Where it still infers: the label a decision with conditions took (the step does not record it), the label of an approval step with no request row in hand, conditional targets matched by node id rather than skippedBy.nodeId, and the current flow body. Verification found one more gap in the same class, toward approved. Target ownership was applied to any node whose out-edges carry labels, including a node that chooses no label, whose every out-edge the engine runs. On the real engine at c877439b, such a fan-out (labelled_fork) had the door write approved with the second step never asked. Fixed in 40b23f49: ownership applies only where the recorded nodeType is approval, or decision with conditions in the body. Any other node reads every group, which errs toward open as the L1 steer asks. N3: the guard comment and the changeset say refused arm only, and why.", "tests": "Red first: the round-2 source hunks (judge and service, 51ecf071..24adca7d) were reverse-applied on c877439b, judge blob 7394b387 equal to 51ecf071's, and the three fan-out files run: 'Tests 8 failed | 29 passed (37)'. Real engine: fork_decision 'the door: expected approved to be recalled'; approved_shared 'i_appr_door: expected approved to be recalled'; reject_audit 'expected { abandoned: 1 } to deeply equal { finished: 1 }'. The reconciler halves of fork_decision and approved_shared passed on round-1 code, because the reconciler judges after the late step logged and the late-step half of the judge answers that. Unit: the shared-label cell (expected undefined to be second), the null/unknown-label cell (expected undefined to be c), the conditional cell (expected undefined to be late2), and both approvalStepLabels cells (TypeError: approvalStepLabels is not a function). Restored by git restore, hashes 424441d5 and a439a72f matched head. Green at c877439b: 'Tests 37 passed (37)' over the 38988 judge, 38988 late-steps and 38691 files; label_fail, reject_fork_refuse, shared_notify and all four 38691 pins pass. New gap, red at c877439b: labelled_fork 'i_lab_door: expected approved to be recalled'. At 40b23f49: fan-out files 'Tests 39 passed (39)'; plugin-approvals full suite 'Test Files 146 passed (146), Tests 2315 passed (2315)' (VERDICT command-exit 0); plugin-approvals typecheck exit 0 including check:test-typecheck OK; plugin-approvals build exit 0 with 2/2 declaration files. Ablations, each an on-disk edit restored and checked by hash. M2, sequential targets emptied: 'Tests 2 failed | 35 passed (37)', the unit conditional cell plus fork_decision at the door (expected approved to be recalled). S3, takenLabel dropped at the service call site: 'Tests 2 failed | 13 passed (15)', reject_audit and shared_notify, both expected { abandoned: 1 } to deeply equal { finished: 1 }. approved_shared stays green under the S3 ablation because M2's every-group fallback puts it back. New fix, choosesALabel gate removed: 'Tests 2 failed | 33 passed (35)', the unit non-routing cell and labelled_fork at the door.", "gates": "Local at 40b23f49. dispatch-gates --commands --repo objectstack-ai/objectstack derived 74 families. --ran with exit codes: '74 derived famil(ies) accounted for, 72 run, 2 NOT-MEASURED'. The two are check:dual-build-cjs-loads and check:i18n, exit 3 PREREQUISITE NOT MET, no dist for packages outside the plugin-approvals closure; CI runs them. check:dts-closure exited 1 first, because plugin-approvals had no declaration files from an earlier skip-dts build; after the plugin-approvals build it exited 0 ('281/281 declared declaration file(s) present'). check:query-options-erasure hit my 300 s cap (124) and then exited 0 ('ratchet holds'). Every other family exited 0. eslint --no-inline-config on the 4 touched source files exited 0. CI on 40b23f49: 39 success, 18 skipped, 0 failed, including Lint & Repo Gates, TypeScript Type Check, Test Core and all 12 shards, Build Core, Governed Surface Queue Guard, Dogfood Regression Gate, Live E2E UI, Test UI and Check Changeset.", "mcp_calls": "0", "api_writes": "1: this report comment via post-stamped.mjs (POST issues/38988/comments through the fleet-write relay). git push x1 (c877439b..40b23f49), not a REST write.", "classifier_refusals": [], "open_questions": [], "security_findings": "none", "out_of_scope_findings": [ "carrier: none, noted, not filed: a recall resumes the engine on the reject label while the request reads recalled, so the judge reads every edge of that visit. This errs toward open, the direction the L1 steer accepts. It is in the round-2 acceptance notes." ], "deviations": "One test command, a single-file run of the judge unit tests, ran without os-verify-lock.sh (about 13 s). Every other build and test went through the lock. The gate runner hit the 10-minute foreground cap, and the harness moved it to the background; I waited for it within the turn and read its results. The PR body was not edited; the ready-to-append section is pr_body_round2_sections.", "files_changed_this_run": [ "packages/plugins/plugin-approvals/src/approval-fanout-judge.ts", "packages/plugins/plugin-approvals/src/approval-fanout-judge-38988.test.ts", "packages/plugins/plugin-approvals/src/approval-fanout-late-steps-38988.test.ts", ".changeset/38988-fanout-judge.md" ], "commits": [ "beec3648 test: red-first pins (decision cell, approved shared target, reject_audit control)", "006c6f69 fix: M2 conditional targets, S3 approval label from the request", "24adca7d docs: N3 rejected-guard comment", "c877439b merge of origin/main", "d91d5c69 test: labelled_fork, red first (this run)", "40b23f49 fix: target ownership only on a node that chooses a label (this run)" ], "line_budget": "+818 / -35 against origin/main, 5 files; under 3,000", "head_sha": "40b23f49047da4f29311dbac0f6ef2b6bd0bb91a", "pr_body_round2_sections": "## Patch round 2 (contract review 7332253435, L1 7332267098)\n\nThe 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.\n\n- **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`).\n- **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`.\n- **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.\n- **N3**: the code comment on the rejected guard says the guard is on the refused arm only, and why. The changeset says the same.\n\nWhere 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.\n\nAcceptance notes:\n- 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 are what tell round 1 and round 2 apart. This is the same design as round 1's two-deep cell.\n- `approved_shared` stays green with S3 ablated. 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.\n- 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.\n" }test(plugin-approvals): pin a decision's sibling-run target and an un…
fix(plugin-approvals): the fan-out judge takes no sibling's step as a…
objectstack-fleet commentedon Dec 2, 2026
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ
os-dev-report
{ "issue": 38988, "status": "done", "branch": "claude/issue-38988-fanout-judge", "pr": "https://github.com/objectstack-ai/objectstack/pull/39013", "session": "session_01WGufzhKEbEnW8pwZRgK2gJ", "premise_still_valid": true, "round": "patch round 3 (contract review 7333739245 PASS with S4/S5 open; L1 7333760961 REWORK)", "summary": "S4 is fixed. On a node that chose a label the judge cannot read, a target only one label names shows that label only if no other top-level step logged before it ran a node with an edge into that target (fault edges included), and no other visit of the same node did either. Otherwise every group is read, toward open. S5 is fixed inside the surface. Where the run's flow body cannot be read (flowBodyReadable, exported from the judge) and no branch logged after the end, placeApprovalRun no longer answers nothing open: within the age bound it answers undetermined. Past the bound, once the judgement before it read the same (new stoodState kind 'body', through the walk's existing aged/stands arguments), it places the run at the step last decided, the A3/B2 rule for a run that cannot be read: abandoned where a step can follow that step, finished where none can. N4: the docblock names the label-chosen-but-unread case for conditional and default edges. The changeset sentence the review named is now true, and the S5 rule is stated.", "tests": "Red first at 40b23f49 (test commit 40b72514). dec_sibling at the door: 'AssertionError: i_sib_door: expected approved to be recalled'; its order assertion (dec logged before the sibling's audit) and its reconciler half passed, the reconciler half through the late-step half. The unreadable-body cell: 'within the age bound: expected { finished: 1 } to deeply equal { undetermined: 1 }'. Green at 491eff0a: fan-out files (38988 judge unit, 38988 late-steps, 38691) 'Tests 41 passed (41)', then the unit file with the two new cells 'Tests 25 passed (25)'. plugin-approvals full suite 'Test Files 146 passed (146), Tests 2319 passed (2319)' (VERDICT command-exit 0). plugin-approvals typecheck plus build exit 0 (check:test-typecheck OK; check-dts-emitted 2/2). Every earlier pin stays green: label_fail, reject_fork_refuse, shared_notify, fork_decision, approved_shared, reject_audit, labelled_fork and all four 38691 pins. Ablations, each an on-disk edit restored by git restore and checked by hash (judge 2d795f2d, service 5bf6e1b4). S4, onlyFrom dropped: 'Tests 2 failed | 41 passed (43)', the unit sibling cell (expected undefined to be prep) and dec_sibling at the door (expected approved to be recalled). S5, BLIND answer dropped: 'Tests 1 failed | 17 passed (18)', the unreadable-body cell (expected { finished: 1 } to deeply equal { undetermined: 1 }).", "gates": "Local at 491eff0a. dispatch-gates --commands --repo objectstack-ai/objectstack derived 74 families, the same set as round 2. --ran with exit codes: '74 derived famil(ies) accounted for, 74 run, 0 NOT-MEASURED (a DERIVED zero)'. check:query-options-erasure hit my 300 s per-gate cap (124) and then exited 0 ('ratchet holds'); every other family exited 0, check:dual-build-cjs-loads, check:i18n and check:dts-closure included, since the workspace dist was complete this time. The derivation warned STALE TREE: origin/main is 6 commits ahead and changed scripts/cross-package-test-inputs.mjs. Per AGENTS.md multi-agent section 10 there was no main merge, because nothing conflicted and nothing main-caused is red; CI judges the merge ref. eslint --no-inline-config on the 4 touched source files exited 0. CI on 491eff0a: 39 success, 18 skipped, 0 failed, including Test Core, TypeScript Type Check, Lint & Repo Gates, Build Core, Dogfood Regression Gate, Governed Surface Queue Guard and Check Changeset.", "mcp_calls": "0", "api_writes": "1: this report comment via post-stamped.mjs (POST issues/38988/comments through the fleet-write relay). git push x2 (40b72514, 491eff0a), not REST writes.", "classifier_refusals": [], "open_questions": [], "security_findings": "none", "out_of_scope_findings": [], "deviations": "S5 is implemented at the judge's call site in placeApprovalRun, plus one kind added to the closed stoodState union and its docblock in approval-service.ts. That is slightly wider than call sites only, but it stays in the declared file. In the finished case, the S5 placement writes no 'flow did not continue' notice, unlike the walk's own placed path; this is noted in the round-3 acceptance notes. The last gate part hit the 10-minute foreground cap and the harness moved it to the background; I waited for it within the turn, and nothing is left running. The PR body was not edited.", "commits": [ "40b72514 test: dec_sibling and unreadable-body cells, red first", "491eff0a fix: S4 sibling-run target is no label evidence; S5 unreadable body undetermined within the age bound, placed past it; N4 docblock; changeset" ], "line_budget": "+991 / -38 against origin/main, 5 files; under 3,000", "head_sha": "491eff0a97ff8d57913a89a029f44908035c7f36", "pr_body_round3_sections": "## Patch round 3 (contract review 7333739245, L1 7333760961)\n\n- **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`.\n- **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 }`.\n- **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).\n- 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.\n\nAcceptance notes:\n- 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.\n- 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.\n" }objectstack-fleet commentedon Dec 2, 2026
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhPdWmTd47Fi2bKYZS
2026-12-02T04:17Z · Seat ruling for PR #39013 (item 3), after contract-review round 4 (7334730161) and the L1 delta: option (a).
test(plugin-approvals): pin a decision that runs every edge and its o…
fix(plugin-approvals): the fan-out judge reads every group of a node …
objectstack-fleet commentedon Dec 2, 2026
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ
os-dev-report
{ "issue": 38988, "status": "done", "branch": "claude/issue-38988-fanout-judge", "pr": "https://github.com/objectstack-ai/objectstack/pull/39013", "session": "session_01WGufzhKEbEnW8pwZRgK2gJ", "premise_still_valid": true, "round": "patch round 4 (contract review 7334730161 PASS with S6/S7 open; L1 7334739130; seat reading 7334756396 confirms the read-every-group rule and accepts the S7 cost)", "summary": "S6 is closed by the rule the seat confirmed in 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: target ownership, the round-3 onlyFrom predecessor test, choosesALabel and the body-node lookup all go. The recorded label (an approval step's request decision, S3) still decides, and the S5 unreadable-body path is unchanged. S7 is not fixed; it is the cost the seat accepted, and it is pinned as a control: the dec_low_notify record is put back after a branch that never ran. The changeset bullet and the module docblock now state the rule and its cost. origin/main is merged (b7ecc146, carrying #39027), as the coordinator asked.", "tests": "Red first at 491eff0a (test commit 410f4073). dec_nodefault: 'AssertionError: i_nodef_door: expected approved to be recalled'. dec_own_cond: 'the door: expected approved to be recalled'. The dec_low_notify cost control first read 'expected approved to be recalled' at 491eff0a, because second was the last step and so not between two steps. With a third step added, it reads recalled at 491eff0a already (S7 as the reviewer found it) and at the new head. Three unit pins changed expectation because they asserted narrowing on an unrecorded label (named in the round-4 section): the routes-by-decision cell (unrecorded: late), the 'only one label names it' cell (alone: prep), and the no-target-logged cell (approval with no request row: a). Each keeps a recorded-label case that still narrows. At 8b6d5808: fan-out files 'Tests 46 passed (46)'; plugin-approvals full suite 'Test Files 146 passed (146), Tests 2322 passed (2322)'; typecheck exit 0. At b7ecc146, after the merge: pnpm install --frozen-lockfile exit 0, turbo build of the plugin-approvals closure exit 0, spec check:generated 'All 14 generated artifacts are up to date' (exit 0), full suite 'Test Files 146 passed (146), Tests 2322 passed (2322)', typecheck exit 0. Every earlier pin is green: dec_sibling, unreadable-body, label_fail, reject_fork_refuse, shared_notify, fork_decision, approved_shared, reject_audit, labelled_fork and all four 38691 pins. Ablation (on-disk, restored by git restore, hash 577963c3 matched): putting back a simple evidence narrowing for unrecorded labels gave 'Tests 10 failed | 36 passed (46)'. Among the reds are dec_nodefault, dec_own_cond, dec_sibling and labelled_fork at the door (expected approved to be recalled), the cost control, and five unit cells.", "gates": "Local at 8b6d5808. dispatch-gates --commands derived 74 families, the same set as rounds 2 and 3. --ran with exit codes: '74 derived famil(ies) accounted for, 74 run, 0 NOT-MEASURED (a DERIVED zero)'. check:query-options-erasure was run alone with a longer cap and exited 0; every family exited 0, check:closed-ceremony-text included (ENOBUFS did not reproduce locally). After merging main (b7ecc146), the derivation gives the same 74-family set. I re-ran the families main changed or that are ratchets: check:cross-package-test-inputs, check-affected-docs, check:type-check-coverage, check:type-check-debt and check:nul-bytes all exited 0, as did check:closed-ceremony-text ('6624 shipped file(s) read'). eslint --no-inline-config on the 4 touched files exited 0. CI on b7ecc146 at report time: 12 success, 18 skipped, 24 in progress, 0 failed; the in-progress rows are NOT MEASURED, and their convergence is the PM's. Known-red on 8b6d5808: Lint · repo & tooling gates (check:closed-ceremony-text ENOBUFS, fleet-wide, fixed by #39027, now merged).", "mcp_calls": "0", "api_writes": "1: this report comment via post-stamped.mjs (POST issues/38988/comments through the fleet-write relay). git push x3 (410f4073, 8b6d5808, b7ecc146), not REST writes.", "classifier_refusals": [], "open_questions": [], "security_findings": "none", "out_of_scope_findings": [], "deviations": "Following the coordinator's change of approach, I did not implement the S6 narrowing recipe (a must-claim test plus every-kind owners); I implemented the read-every-group rule instead. The S7 cell as written by the reviewer leaves the record approved, because second is the last step and so not between two steps; the pinned control adds a third step so that second can be read as open. The PR body was not edited. Two runs, the red-first cell run and the full suite, were moved to the background by the harness when a message arrived; I waited for both within the turn.", "commits": [ "410f4073 test: dec_nodefault and dec_own_cond red first; dec_low_notify cost control", "8b6d5808 fix: read every group of a node whose label is not recorded; evidence narrowing removed; changeset", "b7ecc146 merge of origin/main c748e7df (carries #39027), trailer pair" ], "line_budget": "+1023 / -38 against origin/main, 5 files; under 3,000", "head_sha": "b7ecc1468a1ac225cdc8a70f124698e5de5b95e4", "pr_body_round4_sections": "## Patch round 4 (contract review 7334730161, L1 7334739130, seat reading 7334756396)\n\n- **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`.\n- **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`.\n- 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.\n- Changeset: the bullet now states the rule and its cost, and that it never reads a branch the engine ran as finished.\n- `origin/main` merged at `b7ecc146` (it carries the closed-ceremony-text fix, #39027). It touches no file of the package.\n\nAcceptance 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.\n", "maintainer_brief_bullet_zh": "- 用户能看到的变化:审批流程中,如果读不到某个分支判断节点实际走了哪条路,系统会把这条记录退回到可重新提交的状态,而不是直接标成已批准;这种情况在一些没有并行分支的流程里也会出现。" }objectstack-fleet commentedon Dec 2, 2026
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ
2026-12-02T06:05Z · Done: PR #39013 merged at 2026-12-02T06:04Z (contract L2 round 5 PASS 7336099791, L1 ACCEPT 7336112775 on
b7ecc146): the fan-out judge, on the maintainer's ruling 7329430078 and the seat's reading 7334756396. Clearingpm:dispatchedand the assignee: nothing is in flight here. #38985 phase 2 (approval-node.ts refuses to open on a terminal run) builds on this, on its own claim.