Skip to content

Protocol re-discussion: the spec says an approved-but-failed pending action is a 200 with status failed, while the runtime action door holds that failures speak HTTP (#3962); which one stands, and does the approve answer need a code slot #32603

Open

Description

@objectstack-fleet

domain:spec#2 · os-sales · session_01L6bhgU7jN46DmQ6XFvz28s

Ruled: 6837307082 · letter B · 2026-11-12T22:10Z
Restart-when: closed #31527

Filed by: repo:cloud#5 · hotlong · session_01Q4EjjPP1zuWBNq3nBXVei9

Filing gate: ③ a task the maintainer approved in session (2026-11-12): the seat's plan for cloud#4346, which named this card as a separate follow-up, was answered 「4346 同意,按钮两个都下掉」 (cloud ruling comment 6817576806).

维护者速读

「AI 待办批准了但执行失败」,协议规定返回 200 加「失败」。平台另一条原则是「失败要用 HTTP 状态码表达」,通用按钮也是照这条写的,结果读不懂这个 200。cloud#4346 先按协议改成 200,不在缺陷卡上翻协议。这张卡要回答两个问题:协议这条要不要改;返回里要不要加机器能读的错误码。

The tension, with readings (objectstack main 67c49d77)

  • packages/spec/src/api/protocol.zod.ts ~L4200, ApproveAiPendingActionResponseSchema docblock: 「status: 'failed' is a 200 with a reason, not an HTTP error: the approval succeeded, the execution did not. A caller that only checks res.ok will report a failed write as a success.」 The response has no code slot.
  • packages/runtime/src/action-execution.ts ~L2180-2189: 「A target that starts answering 2xx success: false has the defect itself (failures speak HTTP, [17.0.0-rc] /actions reports business failures as HTTP 200 inside a double envelope — the only route of 12 that does; unify on real status codes before GA #3962), and the fix goes in that target, never in a body check here」.
  • ui/packages/app-shell/src/hooks/useConsoleActionRuntime.tsx ~L578-591: a generic type: 'api' action treats only !res.ok or a top-level success: false as failure. That is why cloud#4346 removed its two row actions on ai_pending_actions.
  • Consumers written for 200-failed: packages/client/src/index.ts (ai.pendingActions.approve), ui/packages/plugin-chatbot/src/useHitlInChat.ts, AiPendingActionsInbox.tsx.

Questions for the maintainer (the analysis is owed with the four-facet block before the box)

  1. Keep 200-failed, or move to a non-2xx answer for an executed-but-refused write? The row has already moved to a terminal failed, so a 4xx that reads as "nothing changed, retry" misstates the state. Weigh that.
  2. Does the answer need a closed code (and details)? Measured readers today: zero.
  3. If HTTP wins, cloud's removed row actions on ai_pending_actions may come back (recorded in cloud#4346's ruling).

Reader: domain:spec lane for the analysis; the decision is the maintainer's.

Dedupe: repo:objectstack-ai/objectstack "200 with a reason" is:issue → 7, none on this route. ApproveAiPendingActionResponseSchema is:issue → 1 (#31884, closed, the held outcome).

Activity

  1. objectstack-fleet commented on Nov 12, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    决策分析:AI 待办「批准成功但执行失败」该回 200 还是 HTTP 错误 · 2026-11-12T07:50Z

    维护者速读

    Governing text: packages/spec/src/api/protocol.zod.ts ~L4200 ApproveAiPendingActionResponseSchema docblock(200 + reason,无 code 槽);packages/runtime/src/action-execution.ts ~L2180-2189(「failures speak HTTP, #3962」)。两条都是已声明的规则,彼此冲突,所以是决策卡。
    协议声明 / 是否改协议: 两个选项都改协议:A 新增 code 槽(协议新增);B 改响应语义(Metadata-protocol: semantic)。

    前提(带 re-check):

    • 冲突成立:grep -n "is a 200 with a reason" packages/spec/src/api/protocol.zod.ts 与 grep -n "failures speak HTTP" packages/runtime/src/action-execution.ts 各命中一处(main 67c49d77)。
    • 通用按钮只看 res.ok:ui/packages/app-shell/src/hooks/useConsoleActionRuntime.tsx ~L578-591。

    选项 × 代价 × 工作量

    选项 做什么 客户可感知后果 工作量
    A 200 + 错误码 协议加 code;所有调用方改为读 status 每个调用方都要记得读正文,忘了就把失败报成成功 domain:spec + 调用方 · 1–2 PR;估 S–M
    B 非 2xx 协议改为失败回非 2xx,正文带待办状态(已批准)和错误码 只看 res.ok 的调用方自动看到失败;重试前要读正文里「已批准」 domain:spec + runtime + cloud#4346 回改 · 2–3 PR;估 M

    业务含义: A = 快递签收单写「已签收」,备注栏写「包裹损坏」,要看备注才知道出事。B = 直接退件,附单写明「已签收但损坏」。

    四轴(业务立场):

    推荐:B。 只看①选 B;②③④ 是否翻转:否。置信缺口:B 下「已批准」的待办不能重复批准,重试语义要在正文里写清(正文必须带待办的当前状态),这一点 PR 要 pin。

    裁后执行: B ⇒ domain:spec 改 ApproveAiPendingActionResponseSchema 与 docblock(FROM 200 → TO 非 2xx + 结构化正文),runtime 跟改,cloud#4346 的临时处理随后回改;p1(协议改动)。A ⇒ domain:spec 加 code 槽(协议新增,p1),通用按钮改读 status。

    os-decision-facets

    • ① 长远:B 去掉一条接口例外;A 固化例外并加槽。
    • ② 拉动:有实测:cloud#4346 已撞上。
    • ③ 防 AI:B 响亮失败;A 对只看 res.ok 的调用方静默。
    • ④ 不扩散:B 不新增键;A 新增协议槽。

    Prior rulings read: #3962 (failures speak HTTP, cited by the runtime); ADR search not run, unresolved; thread: none

    Related: cloud#4346 (ruling comment 6817576806).


    Generated by Claude Code

  2. added
    domain:spec
    needs-user-decision
    priority:p1
    on Nov 12, 2026
  3. objectstack-fleet commented on Nov 12, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#2 · os-sales · session_01L6bhgU7jN46DmQ6XFvz28s

    Ruling: #32603 · letter B · maintainer 「其他都同意」 2026-11-12T22:09Z

    The maintainer's words were written 2026-11-12T22:00Z, answering the fable review of the open decision items, which recommended for this card 「B 排在专题后面做」 (B, scheduled after the epic, not urgent) over C (close) and against A (triage analysis 6817938762; the review read origin/main f770d664 and ran the ADR search the analysis had left unrun: no ADR fixes this route's failure shape).

    Letter B: an approved pending action whose execution fails answers non-2xx, not 200 with status: 'failed'. The standard error envelope carries code and details, so question 2 (a new code slot) falls away under B.

    Workload of B, taken from the analysis's effort column: domain:spec + runtime + the cloud#4346 revert · 2–3 PR; estimated M. The route itself is implemented in cloud, so at least one PR is cloud-lane.

    Conditions the implementing thread carries (part of the ruling):

    1. The error body carries the pending action's current state (approved, failed), because the approval is already spent; a caller must not read the answer as "nothing changed, retry".
    2. The status code follows the execution's own class: a refused write answers 4xx, a crash 5xx.
    3. held stays 200, and the docs keep saying a caller must read status.
    4. Pin: approving an already-terminal pending action does not execute it again (needs the cloud side).
    5. A breaking change to a published wire protocol: the changeset states FROM, TO and the migration.

    Timing (part of the ruling): after the epic #31527, not urgent. No caller misreads this answer today: cloud#4346 removed the two generic row actions, and the three remaining readers were written for this response.

    State: needs-user-decision → pm:on-hold, record only, no work started.
    Restart-when: closed #31527
    On restart the domain:spec lane dispatches B with the conditions above as one card thread; the cloud-lane PR is requested from the cloud seat then.

  4. added
    pm:on-hold
    and removed
    needs-user-decision
    on Nov 12, 2026
  5. objectstack-fleet commented on Nov 13, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: regrade p1 → p2 under the adopted grading rules (#32997) · 2026-11-13T03:13Z

    ⛔ Not a claim; the card's claim and state are unchanged.

    • Line: API client or generic api action · approve route of an AI pending action · each approved-but-failed action · read from code, zero measured readers
    • Why: Step 1: an ordinary protocol change ruled B as 'after the epic, not urgent'; cloud#4346 already removed the buttons that misread the 200, and the release does not need it.
    • Rule: the maintainer adopted the fixed grading order on 2026-11-13: impact, reach discount, one raise, release window (「…其他同意」 · 「你现在就开始执行这个规则」). A rule change allows this one re-grade pass over the open p1 cards.

    Generated by Claude Code

  6. added
    priority:p2
    and removed
    priority:p1
    on Nov 13, 2026
  7. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    coordinator#1 · os-project-manager · session_01FEkQ5p5codnUGsdGxBfaL9

    Ruling: grade p3 · maintainer 「只做有把握的 15 张」 (the option he chose on the decision card) · recorded 2026-11-16T13:57Z

    Recorded by the project's decision thread. The maintainer's standing rule sends every decision through a dedicated thread that evaluates it and puts it to him there. He chose at 2026-11-16T13:52:22Z. Decision thread cmsg_01TenzsRopZj4jMbvjX8uz1X2H6qQ8ciHX7XMq2gtnGnNg, card cmsg_01TenzsRopZj4jMbvjX8uz1XKQvJ8JeBWFXoUnZeAT9HQp, choice record cmsg_01TenzsRopZj4jMbvjX8uz1XLvK1ZoqRY8p1hygErwupfD.

    Thread-read: 6842698748 (the newest comment). Labels at the read: priority:p2, domain:spec, pm:on-hold, area:automation; unassigned.

    The question he was asked

    He asked which open p2 cards have no business value and should be lowered or closed. The thread read the 81 open p2 cards that no seat is working, against his 2026-11-15 p3 standard (recorded on #34153) and the grading rules, and listed 26: 15 it was sure of and 11 it was not. How should the list be handled?

    The four options on the card, as he read them:

    The ten cards on hold named by the option are #27314, #27108, #33023, #32677, #32603, #30349, #33628, #33353, #26472 and #24027, as listed in the file he was given.

    The ruling

    This card is lowered from p2 to p3. The other 14 cards of the 15 carry their own record. The 11 cards the thread was not sure of keep p2.

    Why this card, as told to him: It is on hold and cannot be started today. The state rules lower a card to p3 when it enters hold and keep its grade on a Restart-grade: line; this one kept priority:p2, so the p2 list mixes work that can start with work that cannot. The grade says nothing about the card's value: the protocol re-discussion waits for epic #31527 to close.

    State

    • This record changes no label. Triage writes priority:p2 to priority:p3 and adds Restart-grade: p2 to the body, citing this record.
    • Not ruled: whether a hold with no Restart-when: line closes instead. The thread read the card bodies only, not the comments, for that line; it stays triage's reading under the state rules.
    • List and reasons: /mnt/project-files/pm-orders/objectstack/p2-prune-2026-11-16.md.
    • Knock: Notify: ruling to the triage mailbox, PR pm:mailbox — triage#1 · hotlong #32588.

    Generated by Claude Code

  8. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: regrade p2 → p3 (maintainer) · 2026-11-16T14:09Z

    ⛔ Not a claim.

    The maintainer chose 「只做有把握的 15 张」 on the p2-value decision card, and card #32603 is one of the lowered ones (ruling record 6918487540). The lane and queue state are unchanged.

  9. added
    area:workflow
    and removed
    priority:p2
    on Nov 16, 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:specpm:on-holdpriority:p3

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions