Skip to content

approvals: after one branch of a top-level fan-out fails, the other branch still opens an approval step, leaving a pending request and a pending record on a failed run that nothing reconciles #38985

Description

@objectstack-fleet

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

Filing gate: ② a card thread's out-of-scope finding, measured while reproducing #38691 item 1 (branch claude/issue-38691-approval-fanout-stop), drafted by that card thread and filed by the seat on the maintainer's approval 「可以立这张孤儿审批 p2 卡」 (2026-12-01T16:44Z) · Source: probe 4 of that thread, the real kernel harness of approval-reconciler-37767.integration.test.ts, origin/main d38006b9.
Grading: area:data · domain:server · Bug · p2 (same family and grade as #38691) · reach: an approval flow whose top-level node fans out to one pausing branch beside a synchronous branch, when the synchronous branch fails; still a legal flow after #38838, which refuses two pausing branches only · evidence: measured (both decision paths, with and without the door).
Dedupe: fan-out failed branch approval pending, Promise.all branch after failure → #38838 (refuses two pausing branches at publish; one pausing branch beside synchronous ones is "Correct, not refused" in flow-concurrent-pause.ts), #38691 (the reading side: a terminal run's log carries the other branch's late steps; its PR fixes how the approvals plugin READS that log, not that the branch runs on), #38976 (a test-timeout flake in the #38838 flow-route suite; unrelated beyond the file).

What happens

  • Flow fork_fail_side: first (approval) → on approve fork; fork fans out unconditionally to mid (a subflow, ~120 ms) and note (fails after ~30 ms, then → end); mid → second (approval) → end.
  • Approve first (through the decision door, and again through the service with no door):
    • The decision answers RESUME_FAILED: the approve decision was recorded on request ….
    • The run is failed (error: 'note failed'), and its stored log is start, first, fork, note(failure), mid(success), second(success): the dag traversal runs the out-edges under Promise.all, so mid and then second go on after note ended the run.
    • The approval's steps read first: approved, second: pending; the record's status field stays pending.
    • The record carries no reconciliation mark ([false, false]), so reconcileMarkedApprovals() answers scanned: 0 and the pending request on a failed run is never judged. The timeline shows only submit and approve.
  • Net: an approver is asked to decide second for a run that has already failed and cannot resume, and the record is held pending with nothing to release it.

Done when

  • Once a run has failed, no branch of it opens a new approval request (either the engine stops sibling branches from starting new visits after the run's terminal write, or the approval step refuses to open on a run that is no longer running), and the record is left in the state the failed run implies (the same state as without the fan-out).
  • Or, if siblings are meant to finish: a request opened on a run that failed is marked so the reconciler judges it, and the decision door answers it with a clear refusal instead of RESUME_FAILED after recording the decision.
  • Pinned red-first on the real engine with the flow above, through the door and without it; the 37767 后续:审批读取的 fan-out 判断与引擎注释收尾(N14–N17、N23、stopOf) #38691 pins (the stop reading of a failed fan-out run) stay green.

Open question

Which side owns it: the engine (stop sibling visits after a terminal write; this also removes the late steps #38691 has to read around) or the approvals plugin (refuse to open on a non-running run). The first is wider and touches every flow with a top-level fan-out; the seat or the maintainer picks.

Activity

  1. added
    bug
    priority:p2
    domain:server
    on Dec 1, 2026
  2. objectstack-fleet commented on Dec 1, 2026

    @objectstack-fleet
    ContributorAuthor

    triage@os-warren · os-warren · session_01JQwxbZzZ2f5mzcvJbRrRNZ

    Triage: first-touch · lane grade kept: area:data · Bug · p2 (maintainer 「可以立这张孤儿审批 p2 卡」) · pm:queue.

  3. added
    pm:queue
    on Dec 1, 2026
  4. objectstack-fleet commented on Dec 1, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Claim: PM loop round 5 · 2026-12-01T19:17Z
    Area: osa-data
    Session: session_01WGufzhKEbEnW8pwZRgK2gJ
    Account: os-support-ai
    Branch: claude/issue-38985-failed-run-orphan-approval (not created until the ownership pick)
    Worktree: objectstack-issue-38985
    Domain: domain:server
    Seat: repo:objectstack@os-support-ai
    File surface: PHASE 1, read-only: none written. The dev reads both owners the card's Open question names (the engine: packages/services/service-automation/src/dag-traversal.ts stops sibling visits after a terminal write; the plugin: the approval step in packages/plugins/plugin-approvals/src/ refuses to open on a run that is not running), measures each one's reach, and brings the choice to the seat before any code (seat routing 2026-12-01T19:15Z). PHASE 2's surface is named by claim amendment after the pick.
    Container & model: M, mode:subagent, model: default (dispatch-gates --tier: "Model tier — no path-derived mandate"), effort: high (reason: an ownership choice between the flow engine's fan-out and the approvals plugin, with reach over every top-level fan-out)
    Clause-②: no (to be re-read at the pick)
    Metadata-protocol: none
    Responsibility: platform code, objectstack (dag-traversal runs out-edges under Promise.all and keeps visiting after a sibling's failure ended the run; the approval step opens on a failed run) | none | an approval flow whose top-level node fans out to one pausing branch beside a failing synchronous branch: an approver is asked to decide on a failed run, the record stays pending, nothing reconciles it; reachable today, measured
    Thread-read: 7318760105
    Premise: the card's measurement on origin/main d38006b9 (probe 4 of the #38691 thread); re-read at origin/main 20f47c9 in phase 1.
    Pre-claim lane: packages/services/**, packages/plugins/** ⇒ domain:server (file ownership only).
    Pre-claim deps: none named. Maintainer 「可以立这张孤儿审批 p2 卡」 (2026-12-01T16:44Z) filed it.
    Prior rulings read: #38838 ("one pausing branch beside synchronous ones is Correct, not refused", flow-concurrent-pause.ts); check-prior-rulings.mjs: thread: none.
    Serial constraints cleared: check-handover.mjs --inflight --paths=packages/services/service-automation/src/dag-traversal.ts,packages/plugins/plugin-approvals/src/ --card=38985: OVERLAP with #38875 (os-justin, dag-traversal.ts) and #38976 (os-justin, flow-route.integration.test.ts). Phase 1 writes nothing; phase 2 re-runs the check on its named files and yields to a live claim on the same file. #38988 (zone, same family) holds approval-service.ts readers and run-resume.ts; a plugin-side pick waits behind it where files meet.

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Dec 1, 2026
  6. objectstack-fleet commented on Dec 1, 2026

    @objectstack-fleet
    ContributorAuthor

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

    2026-12-01T19:45Z · Phase 1 done (read-only; reproduced at origin/main 20f47c9 on the real engine, through the decision door and without it). Readings:

    Blocked-by: #38988

  7. objectstack-fleet commented on Dec 1, 2026

    @objectstack-fleet
    ContributorAuthor

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

    2026-12-01T23:30Z · 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.

  8. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Claim: PM loop round 7 · 2026-12-02T05:39Z · amendment 1, phase 2 (same holder, same card, claim 7322588153): the plugin side the seat picked in phase 1 (7323394875), on the maintainer's ruling 7329450068 (a failed fan-out is abandoned, never approved). #38988's PR #39013 passed both reviews on b7ecc146 and is landing; this PR must not land before it.
    Area: osa-data
    Session: session_01WGufzhKEbEnW8pwZRgK2gJ
    Account: os-support-ai
    Branch: claude/issue-38985-failed-run-orphan-approval
    Worktree: objectstack-issue-38985
    Domain: domain:server
    Seat: repo:objectstack@os-support-ai
    File surface: packages/plugins/plugin-approvals/src/approval-node.ts (an approval step refuses to open a request when its run's status is terminal: no request row, no notice to the approver, no pending record), tests packages/plugins/plugin-approvals/src/approval-node.test.ts and/or a new card-named test beside it, .changeset/38985-*.md (stop on breach; explain in the report). ⛔ Not packages/services/service-automation/** (the engine side was set aside in phase 1); not approval-fanout-judge.ts or approval-service.ts (PR #39013).
    Container & model: S, mode:subagent, model: default (dispatch-gates --tier: "Model tier — no path-derived mandate"), effort: high (reason: an approval step's open path on a run another branch already failed; the refusal must not touch a running run, a restored continuation or a revise)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: platform code, objectstack (an approval step opening on a run already terminal, in plugin-approvals) | none | after one branch of a top-level fan-out fails, the other branch's approver is notified and the record held pending until the dead-run sweep (5 min; none without a job service)
    Thread-read: 7329450068
    Premise: phase 1 (7323394875) reproduced at 20f47c91 on the real engine: the sibling branch's approval step opens a request on a run whose status is already failed; the dead-run sweep recalls it later. The dev re-reads this on current main (with #39013 merged once it lands) before writing.
    Pre-claim lane: packages/plugins/plugin-approvals/** ⇒ domain:server (file ownership only).
    Pre-claim deps: #38988 (PR #39013) lands first; ruling 7329450068.
    Prior rulings read: 7329450068 (abandoned, never approved); ADR-0162; the seat's phase-1 pick 7323394875; seat reading 7334756396 on #38988.
    Serial constraints cleared: check-handover.mjs --inflight on this surface: NO OVERLAP READ (one unread, #38415); PR #39013 does not touch approval-node.ts.

  9. 4 remaining items

  10. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Claim: PM loop round 8 · 2026-12-02T07:43Z · amendment 2, phase 2 (same holder, same card, claim 7322588153, amendment 1): the seat's ruling 7338495013 on S1 of contract review 7338436183 picks route (a): when the approval step refuses on an ended run, the record goes to recalled on every object (ruling 7329430078 has no object scope), through the existing dead-run abandon path in approval-service.ts. #39013 has merged, so that file is free of PR #39013.
    Area: osa-data
    Session: session_01WGufzhKEbEnW8pwZRgK2gJ
    Account: os-support-ai
    Branch: claude/issue-38985-failed-run-orphan-approval
    Worktree: objectstack-issue-38985
    Domain: domain:server
    Seat: repo:objectstack@os-support-ai
    File surface: amendment 1's surface (packages/plugins/plugin-approvals/src/approval-node.ts, its tests, .changeset/38985-*.md), plus packages/plugins/plugin-approvals/src/approval-service.ts, only to expose the existing abandonForDeadRun path as one call the approval step makes on refusal (no new outcome, no change to the sweep's own behaviour). If route (a) needs more than that one call into the abandon path, the dev stops and the zone brings it back to the seat (no fallback to route (b)). ⛔ Not packages/services/service-automation/**; not approval-fanout-judge.ts.
    Container & model: S, mode:subagent, model: default (dispatch-gates --tier: "Model tier — no path-derived mandate"), effort: high (reason: the refusal now writes the record's outcome; it must not double-write where the judge already recalls, nor touch a live run)
    Clause-②: yes (widening) (the exported ApprovalAutomationSurface gains optional getRun; re-read at the head if the service change widens an export)
    Metadata-protocol: none
    Responsibility: platform code, objectstack (an approval step opening on a run already terminal, in plugin-approvals) | none | after one branch of a top-level fan-out fails, the other branch's approver is notified and the record held pending until the dead-run sweep; on objects without closedStates the refusal alone would leave it approved
    Thread-read: 7338495013
    Premise: contract review 7338436183 S1 and L1 delta 7338459623 on 594e1406: an object whose approval field declares no closedStates ends approved with this head; on main it ended recalled by the sweep. The dev pins it red first.
    Pre-claim lane: packages/plugins/plugin-approvals/** ⇒ domain:server (file ownership only).
    Pre-claim deps: ruling 7338495013; PR #39013 merged.
    Prior rulings read: 7338495013 (route a, recalled on every object); 7329430078 (a failed fan-out is never approved, no object scope); 7329450068; seat reading 7334756396.
    Serial constraints cleared: check-handover.mjs --inflight --paths=packages/plugins/plugin-approvals/src/approval-service.ts --card=38985: NO OVERLAP READ (one unread, #38415, which names no path).

  11. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

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

    2026-12-02T07:44Z · Seat ruling, follow-up to 7338495013: route (a) is built as A2, per the zone's report (amendment 2, 7338532370; measurement 7338522411).

    • Why not one call: abandonForDeadRun works on a pending request and flips it to recalled. At a refused step there is no pending request, only first: approved, so calling it as it is would rewrite the first approver's decision. The public release, reconcile and recall paths all need a pending request or a mark.
    • A2: one new internal method in the approvals service, called once by the node when it refuses. It reuses the abandon path's steps (the audit recall row, mirrorStatusField(… 'recalled'), clearEarlierMarks) and touches no request row. It is skipped where the judge already recalls, so nothing is written twice. That fits the 30–60 line approvals-service scope that ruling 7329430078 named.
    • Done when: every object, with or without closedStates, ends recalled on this path and approver 2 is never asked. The engine measurement is repeated on the new head, and the first approver's approved decision row stays as written.
    • Declaration: if the method is reachable from outside the package (exported type or public member on a published package), the PR body says Clause-②: yes (widening) as L1 already asked for getRun. The contract-tier L2 repeats on the new head.
  12. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Claim: PM loop round 8 · 2026-12-02T07:45Z · amendment 3, phase 2 (same holder, same card, claim 7322588153; amends amendment 2, 7338532370, wording of the approval-service.ts entry only): the seat's go 7338562363 on route A2. The dev's measurement 7338522411 showed abandonForDeadRun acts on a pending request, and a refused step has none (only the first approver's approved row), so one call into it would rewrite that decision.
    Area: osa-data
    Session: session_01WGufzhKEbEnW8pwZRgK2gJ
    Account: os-support-ai
    Branch: claude/issue-38985-failed-run-orphan-approval
    Worktree: objectstack-issue-38985
    Domain: domain:server
    Seat: repo:objectstack@os-support-ai
    File surface: amendment 1's surface (packages/plugins/plugin-approvals/src/approval-node.ts, its tests, .changeset/38985-*.md), plus packages/plugins/plugin-approvals/src/approval-service.ts, for one new internal method the approval step calls once on refusal. It reuses the abandon path's steps (an audit recall row, mirrorStatusField(… 'recalled'), clearEarlierMarks), writes no request row (the first approver's approved row stays as written), and is skipped where the judge already recalls (stamped, and the object closes on its approval field). No change to the sweep's own behaviour. Anything beyond that, stop and bring it back. ⛔ Not packages/services/service-automation/**; not approval-fanout-judge.ts.
    Container & model: S, mode:subagent, model: default (dispatch-gates --tier: "Model tier — no path-derived mandate"), effort: high (reason: the refusal now writes the record's outcome; no double write where the judge recalls, no touch of a live run, no rewrite of a decided request)
    Clause-②: yes (widening) (exported ApprovalAutomationSurface gains optional getRun; the new method is declared too if it is reachable from outside the package)
    Metadata-protocol: none
    Responsibility: platform code, objectstack (an approval step opening on a run already terminal, in plugin-approvals) | none | after one branch of a top-level fan-out fails, the other branch's approver is notified and the record held pending until the dead-run sweep; on objects without closedStates the refusal alone would leave it approved
    Thread-read: 7338562363
    Premise: dev measurement 7338522411 at 594e1406 (no-closedStates object ends approved, approver2 told 0); repeated on the new head.
    Pre-claim lane: packages/plugins/plugin-approvals/** ⇒ domain:server (file ownership only).
    Pre-claim deps: rulings 7338495013, 7338562363.
    Prior rulings read: 7338562363 (A2, conditions: first approver's row unchanged, every object ends recalled, approver 2 never asked, engine measurement repeated, Clause-② if reachable outside the package); 7338495013; 7329430078; 7329450068.
    Serial constraints cleared: check-handover.mjs --inflight --paths=packages/plugins/plugin-approvals/src/approval-service.ts --card=38985: NO OVERLAP READ (one unread, #38415, which names no path).

  13. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

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

    {
      "issue": 38985,
      "status": "done",
      "branch": "claude/issue-38985-failed-run-orphan-approval",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/39064",
      "session": "session_01WGufzhKEbEnW8pwZRgK2gJ",
      "premise_still_valid": true,
      "summary": "Patch round 1, route A2 (seat ruling 7338562363, claim amendment 3 7338578050), head a52afebe. New public method ApprovalService.abandonAtRefusedStep({runId,nodeId,object,recordId,runStatus}) in approval-service.ts. The approval step calls it once when it refuses on an ended run. It reads the approval's latest request on that run and record. When that request is approved or rejected, it writes the abandon path's steps: an audit recall row with actor_id null naming the run, its status and the refused step; mirrorStatusField(... 'recalled' ...) as the sweep does; and clearEarlierMarks. It writes no request row. It skips where the approval is stamped and its object closes on the approval field (holdsBackDecision: the judge recalls there), where the latest request is pending or closed, and where no request exists. The sweep is unchanged. ApprovalService is exported from the package index, so the method is reachable from outside the package: the changeset declares it under Clause-② yes (widening), next to getRun. The node's MinimalLogger now declares warn as required (check:optional-error-sink). A failed put-back reports through error, else warn, with the consequence and the fix, and is appended to the step's error. Tenant-audit census regenerated: 51 to 52 write call sites. The new insert threads organization_id exactly as abandonForDeadRun's does: org = request.organization_id ?? null, through actionRow(request, ...). Changeset: recalled on every object kind (replaces the S1 sentence), N4 (an authored fault edge is taken on refusal), and the widening sentence extended. N3 done: run is read after the wait. All seat conditions pinned on the real engine: first approver's row unchanged by the refusal; every object kind ends recalled; approver2 never asked (no request for second, 0 notices).",
      "tests": "Red first at 685a81f2 (test-only, over 594e1406): 4 failed | 5 passed, `abandoned, never approved: expected 'approved' to be 'recalled'` on crm_memo (no closedStates) and crm_ticket (closedStates on another field), door and no-door; the crm_invoice cells and the controls green. Green at a52afebe: the new file has 10 passed: 6 fan-out cells over 3 object kinds x door/no-door, the failed put-back cell, and 3 controls. Full suite `pnpm --filter @objectstack/plugin-approvals exec vitest run --maxWorkers=2` under os-verify-lock, VERDICT command-exit 0: Test Files 147 passed (147), Tests 2332 passed (2332), restored-continuation and stranded-resubmit pins included. Ablation at 99d3d3be: the new call disabled on disk gives 4 failed | 5 passed with the same assertion on memo and ticket; restored by hash 443a2674. Typecheck exit 0 (check:test-typecheck OK). Engine measurement at a52afebe (temporary probe, deleted): crm_invoice door: requests [first:approved], first row unchanged, approver2 0, field recalled after refusal, end recalled, timeline submit,approve,comment(judge). crm_invoice no-door: same, field pending after refusal, reconciler abandoned 1, end recalled, no recall row from the step. crm_memo door / no-door: [first:approved], unchanged, approver2 0, recalled right after refusal, reconciler nothing, sweep 0, end recalled, timeline submit,approve,recall(no actor). crm_ticket door / no-door: same as memo; the no-door reconciler then judges ended 1 with no field write. Only the reconciler's own mark-clear touches the first row (unjudged_since, node_config_json marker), and only after the refusal; the refusal changes no column.",
      "gates": "Local at a52afebe: dispatch-gates --commands derived 84; 81 exit 0. NOT MEASURED: check:dual-build-cjs-loads and check:i18n exit 3 (PREREQUISITE NOT MET, dist outside the closure); check:query-options-erasure exit 124 (a 280 s cap on a shared box). --ran: 84 derived, 81 run, 3 NOT-MEASURED, 0 UNRUN, exit 0. Also pnpm check:optional-error-sink exit 0, pnpm check:durability-log-level exit 0, node scripts/check-tenant-audit-census.mjs exit 0. CI check-runs on a52afebe: all success, including Lint & Repo Gates, Lint repo & tooling gates, Lint docs & code guards, Lint scoped query-options erasure, Test Core (12/12 and the aggregate), TypeScript Type Check, Type Check workspace/source/consumer/debt ledger, Build Core, Check Changeset, Dogfood Regression Gate, Live E2E UI, Test UI, Governed Surface Queue Guard, Spec property liveness.",
      "mcp_calls": "0",
      "api_writes": "1 — relay comment POST /repos/objectstack-ai/objectstack/issues/38985/comments (this report); pushes are git, not REST",
      "classifier_refusals": [],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": []
    }
  14. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

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

    {
      "issue": 38985,
      "status": "done",
      "branch": "claude/issue-38985-failed-run-orphan-approval",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/39064",
      "session": "session_01WGufzhKEbEnW8pwZRgK2gJ",
      "premise_still_valid": true,
      "summary": "Patch round 2 on contract delta 7339783716, head 6a1f86f9. First, origin/main was merged in as merge commit 00562b95, which carries the trailer pair; no file overlaps. S2: MinimalLogger is back to its shape on main (info?, warn?). A failed put-back now logs at warn, else info, and always goes on the step's error string. The docblock names that error string as the guaranteed channel. The approval-node.d.ts emitted at head and at main differ only in the declared getRun widening: registerApprovalNode's signature and MinimalLogger are identical. S3: abandonAtRefusedStep does one keyed read, with where object_name, record_id and $or [flow_run_id = run, root_run_id = run], taking the latest by created_at desc, limit 1. It therefore reaches a request that a child run (a subflow body or a map item) of the refusing root run opened. The column values were measured and pinned. A top-level run's request holds the run id in both flow_run_id and root_run_id. A subflow body's request holds the child id in flow_run_id and the parent id in root_run_id and record_run_id. No new column, index or engine change. Boundary: a refusing run that is itself a child reaches only its own requests, not those of sibling runs under the same root; the docblock for none says so. N5: the recall row's step_name is the request's own node, as in the sweep; the refused node stays in the comment. N6 is left as it is. The changeset now says the put-back reaches child runs' requests and that a failed put-back is said on the step's error. The census is unchanged (still one new insert; the check passes).",
      "tests": "Red at 1f705eca (test-only): new cell 'the decided request was opened by a child run' on crm_memo (subflow approval, then parent fan-out with a failing branch): 1 failed | 10 passed, `abandoned, never approved: expected 'approved' to be 'recalled'`. Every earlier assertion passed: flow_run_id differs from the root, run failed, no row for second, approver2 told 0. Green at e318c220/6a1f86f9: 11 passed. Ablation (lookup put back to flow_run_id only, on disk): 1 failed | 10 passed with the same assertion; restored, hash bed10859 verified. Full suite under os-verify-lock at 6a1f86f9, VERDICT command-exit 0: Test Files 147 passed (147), Tests 2333 passed (2333). Typecheck VERDICT command-exit 0 (check:test-typecheck OK). Type diff: tsc --emitDeclarationOnly at head and with main's approval-node.ts/approval-service.ts. approval-node.d.ts differs only in the import line and the getRun?: member; registerApprovalNode(automation, service, logger?: MinimalLogger) and MinimalLogger { info?; warn? } are identical. approval-service.d.ts differs only in abandonAtRefusedStep.",
      "gates": "Local at 6a1f86f9: pnpm check:optional-error-sink exit 0; pnpm check:durability-log-level exit 0; node scripts/check-tenant-audit-census.mjs exit 0; node scripts/check-nul-bytes.mjs exit 0. dispatch-gates --commands (tree objectstack-ai/objectstack at 6a1f86f9) derived 84; 81 exit 0. check:type-check-debt was killed once at the 220 s batch cap (exit 124) and rerun alone: exit 0. NOT MEASURED: check:dual-build-cjs-loads and check:i18n exit 3, PREREQUISITE NOT MET; check:query-options-erasure exit 124, killed at the 220 s cap; CI ran it: success. --ran: 84 accounted for, 81 run, 3 NOT-MEASURED, exit 0. CI on 6a1f86f9: 41 success, 18 skipped, none failed, including Test Core (12/12 + aggregate), Lint & Repo Gates, TypeScript Type Check, Type Check workspace/source/consumer/debt ledger, Lint scoped query-options erasure, Lint ESLint, Build Core, Check Changeset, Dogfood Regression Gate, Live E2E UI, Test UI, Spec property liveness, Governed Surface Queue Guard, PR-body guards.",
      "mcp_calls": "0",
      "api_writes": "1 — relay POST /repos/objectstack-ai/objectstack/issues/38985/comments (this report); pushes are git, not REST",
      "classifier_refusals": [],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: seat — boundary, not filed: when the refusing run is itself a child (a fan-out inside a subflow body or a map item), the put-back reaches only that run's own requests, not those of sibling runs under the same root; in that case the record is left to the existing paths"
      ]
    }
  15. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

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

    {
      "issue": 38985,
      "status": "done",
      "branch": "claude/issue-38985-failed-run-orphan-approval",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/39064",
      "session": "session_01WGufzhKEbEnW8pwZRgK2gJ",
      "premise_still_valid": true,
      "summary": "Patch round 3 on contract delta 7341149576, head ad7b8cc4. First, origin/main was merged in as merge commit a3047515, which carries the trailer pair and touches none of the PR's files. S4: on refusal, the approval step now passes its run's root, automation.rootRunOf(context)?.runId, which is reachable at that point because the call is pure on the step's context. The declared public method's input gains one optional field: abandonAtRefusedStep({ runId, nodeId, object, recordId, runStatus, rootRunId? }). The read is still one keyed read on the same index: object_name and record_id, plus $or [flow_run_id = run, root_run_id = rootRunId or run], newest first, limit 1. A child run that refuses therefore reaches requests opened by its parent, its root and its sibling children. Without a root, the run is taken for its own root, as before. A cell pins that while the tree's newest request is pending, the answer is open and nothing is written, even with an older decided request present. The docblock's none case now says what is still outside: a request with no root_run_id that another run opened, and, where no root is passed, a request whose root is another run. Changeset: the widening sentence lists rootRunId?, and the child-run line now says any run of the tree, the parent or a sibling of a child included. The census is unchanged.",
      "tests": "Red at 813e8043 (test-only, over a3047515), 3 failed | 11 passed. The parent-opened and sibling-opened child cells on crm_memo fail with `abandoned, never approved: expected 'approved' to be 'recalled'`; every earlier assertion passed (refusing child is not the root and did not open the decided request, child run failed, no row for second, decided row unchanged, approver2 told 0). The live-request guard cell fails with `expected 'none' to be 'open'`. Green at ad7b8cc4: 14 passed. Ablation (second arm put back to the run's own id, on disk) gives the same 3 failures; restored, hash 4874e040 verified. Full suite under os-verify-lock at ad7b8cc4, VERDICT command-exit 0: Test Files 147 passed (147), Tests 2336 passed (2336). Typecheck VERDICT command-exit 0.",
      "gates": "Local at ad7b8cc4: check:optional-error-sink 0, check:durability-log-level 0, check-tenant-audit-census 0, check-nul-bytes 0. dispatch-gates --commands (objectstack-ai/objectstack at ad7b8cc4) derived 84; 81 exit 0. check:type-check-debt was killed once at the 220 s batch cap (exit 124) and rerun alone: exit 0. NOT MEASURED: check:dual-build-cjs-loads and check:i18n exit 3 (PREREQUISITE NOT MET); check:query-options-erasure exit 124 at the 220 s cap; CI ran it: success. --ran: 84 accounted for, 81 run, 3 NOT-MEASURED, exit 0. CI on ad7b8cc4: 41 success, 18 skipped, 0 failed (Test Core 12/12 + aggregate, Lint & Repo Gates, TypeScript Type Check, Type Check lanes, Lint ESLint, Lint scoped query-options erasure, Build Core, Check Changeset, Dogfood Regression Gate, Live E2E UI, Test UI).",
      "mcp_calls": "0",
      "api_writes": "1 — relay POST /repos/objectstack-ai/objectstack/issues/38985/comments (this report); pushes are git, not REST",
      "classifier_refusals": [],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": []
    }
  16. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

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

    2026-12-02T10:58Z · Done: PR #39064 merged at 2026-12-02T10:58Z as d0bce702 (contract delta PASS 7342528286, L1 ACCEPT 7342545519, route A2 per seat rulings 7338495013 / 7338562363). Follow-ups filed: #39121 (an approval step in a child run of an already-failed parent), #39122 (N1, multi-replica restored strand); N7 carried to the seat. Clearing pm:dispatched and the assignee: nothing is in flight here.

  17. removed
    pm:dispatched
    on Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:databugdomain:serverpriority:p2

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions