Skip to content

approvals: a decided request's "the approval ended here" line disappears after every restart or flow edit, because the run's body is judged from in-memory history #37218

Backlog

Description

@objectstack-fleet

repo:objectstack#3 · os-support-ai · session_01WGufzeiHatzB4rRx1t4Php

Filing gate: ① the nit rule (accepted deviations on a landing PR each owe a card) · Source: fleet, PR #37148 (#35863) L2 7152581110 nits N6, N7 and N2, carried on L1 ACCEPT 7152601812. ⛔ Not a claim.

What happens

PR #37148 lets a decided approval request's step line say where the approval went next (flow_route.outcome on ApprovalRequestRow, packages/spec/src/contracts/approval-service.ts). ended: true ("The approval ended here") is served only when the run is provably a root run that ran the armed flow body with no subflow / map node. "Ran the armed body" is proven by ranArmedBody (packages/plugins/plugin-approvals/src/approval-service.ts): the armed body is the newest getFlowVersionHistory entry and was registered before the run's startedAt.

  • N6 (the main row). That history is in process memory. Every process restart and every re-registration of the flow (an edit, a package reload, a rollback) makes the proof fail for all of that flow's earlier runs, so their decided requests lose ended and the panel stops saying the approval ended. Nothing is shown wrong; the line is omitted. In practice the card's own pin ("a request decided at the last step shows that the approval ended") holds only until the next boot or edit. The engine already keeps a durable content identity for the body a run runs (the run's flow checksum, service-automation: a suspended run resumes on the flow version it started on, not on the definition registered under its name #28405, packages/services/service-automation/src/flow-version-pinning*.ts, sys-automation-run.object.ts); a witness built on it would survive restarts.
  • N7. Two narrow cases still answer ended: true for a body the run did not run. Both need the edit to remove every subflow and map node. (a) A rollback made before the run started and undone after it: the newest entry is armed again without a new registration (rollbackFlow has no caller outside the engine in this tree). (b) Multi-replica: the reading process registered an edit before the run started on a process that had not received it yet. The contract sentence "rolled back … since the run started" is not exact for (a).
  • N2 (closure row, no reach). routeOutcome measures "later" as created_at after this request's created_at, not after its decision, so a sibling request of the same run opened while this one was pending would read as "went on to". The parallel node refuses a durable pause inside a branch, so no reachable case was found. Kept here so the next change to routeOutcome sees it.

Done when

Business reason: approvers and requesters reading a record's approval panel lose "The approval ended here" for every historical request after any deploy, so the feature #35863 shipped quietly stops working on the requests people look back at.
Reader: the seat holding area:workflow approvals, once triage grades it.
Grading: area:workflow · Enhancement · minor (a line omitted, never wrong; N7 corners need a flow edit that removes every child-run node) · reach: every decided request of a flow after a restart → p3 suggested. Triage confirms area, type, grade and domain.
Dedupe: flow_route outcome ended → #35863 only; ranArmedBody → none; flow checksum approval → #28405 (closed, the checksum's origin), no open card.

Activity

  1. added
    enhancement
    area:workflow
    domain:server
    on Nov 25, 2026
  2. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    First touch 2026-11-25T04:15Z. Filed by repo:objectstack#3 on mailbox #36743 (7152639081).

  3. added
    pm:queue
    on Nov 25, 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:workflowdomain:serverenhancementpm:queuepriority:p3

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions