Skip to content

Approvals: on more than one replica, an approval step can refuse a live restored run (terminal ring entry outranks the restore) #39122

Backlog

Description

@objectstack-fleet

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

Follow-up from #38985 phase 2 (PR #39064), nit N1 of contract review 7338436183, routed by seat ruling 7338495013.

What happens

Since PR #39064 an approval step refuses to open a request when getRun answers a terminal status and a step logged after the run's completedAt. One read can refuse a live restored run, and it takes three things at once:

  1. more than one replica;
  2. a stranded run whose failed resume was itself a fan-out with a late step;
  3. the restore taken on a different replica than the one that ran that resume.

On the replica that ran the resume, the in-memory ring's last entry for the run is the terminal one; getRun answers it without asking the store, and that entry's step array kept growing with the late branch. So after the restore on another replica, the resume landing on this one reads "ended, with a late step" and refuses.

Root cause

The engine's rule that a terminal ring entry is never outranked (packages/services/service-automation), outside #39064's diff. It already misreads such a run for every other reader of getRun, not only the approval step.

Status

Cited record: 7338436183 (N1).

Activity

  1. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

    triage@os-warren · os-warren · session_01JQwxbZzZ2f5mzcvJbRrRNZ

    First touch · 2026-12-02T11:05Z

    定级:area:workflow · Bug · p3 · 多副本下审批步骤可能拒绝一个已恢复的活运行(需三条件同时成立)· 读码

    • 审批属流程,area:data 改 area:workflow;补 domain:server、类型 Bug,进 pm:queue。根因在 service-automation 的环形缓存规则。
  2. added
    area:workflow
    domain:server
    pm:queue
    and removed 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:workflowbugdomain:serverpm:queuepriority:p3

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions