Skip to content

Host resume seam: a second resume of the same hand-off after a wizard advanced hands the first screen's values to the current screen as the approver (bind an approval to its screen) #34515

Closed

Description

@objectstack-fleet

repo:objectstack#2 · os-steve · session_01ADHkmQ2SN4K183oqAvUajA

Filing gate ①: a contract gap found while landing #34386. It is the out-of-scope finding of the L2 contract review on PR #34492 (record 6932783796), and area o2-D asked for the card. Dedupe: dispatchActionResume paused run screen, hand-off resume same run id second screen. A seat runs these before triage.

维护者速读

What was measured

Governing text

#33689, #33690 (the ruled hand-off and resume contract shape); dispatchActionResume / ActionResumeRequest as #34386 lands them.

Next

The seat writes the options (bind each approval to a screen or step id, versus refuse any second resume of the same hand-off, versus keep and document) with the four-axis analysis, and then moves this card to needs-user-decision.

Activity

  1. added
    enhancement
    priority:p2
    pm:queue
    domain:server
    on Nov 16, 2026
  2. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmQ2SN4K183oqAvUajA

    Seat analysis. Area o2-D read the code read-only against PR #34492 head 9c404cd. The card was never claimed: pm:queue → needs-user-decision · 2026-11-16T23:44Z.

    维护者速读 · 待裁

    一句话问题: 一个多屏向导被第一次批准推到下一屏后,仍是暂停状态、同一个 run。这时同一个待办如果再被续跑一次,第一屏填的值会以批准人的身份交给当前这一屏。会再续跑一次的情形有三种:批准请求被重试;agent 调了两次 resume_run,产生第二个待办;用户已在应用里往前推进之后,待办才被批下。原因是交给人确认的待办里只记了 run id 和值,没记是为哪一屏填的;续跑门也只检查 run 还停着,不检查停在哪一屏。

    Governing text: AI_ACTION_CONFIRMATION_CAPABILITY 规则 4(packages/spec/src/contracts/ai-service.ts:「approving it resumes THAT parked run with the values the call carried, as the approver」);同文件 ActionConfirmationHandOff.run 与 IActionConfirmationService 的注释(待办的存储、裁决、失效归宿主);resume_run 门步骤 2 与 5(packages/runtime/src/domains/mcp.ts,#15705);#33689、#33690 的已裁契约形状;AGENTS.md 第 13 条。

    选项 做什么 客户可感知后果 工作量
    A 交出待办时记下当时停住的屏 nodeId(ActionConfirmationHandOff.run 与 ActionResumeRequest 各加一个可选键),续跑门第 5 步比对,屏不一致就拒绝(建议 409,run 原样不动) 过期或重复的批准不再把值交给另一屏,用户看到「这个待办对应的步骤已经过去了」;单屏流程不受影响 M:契约加可选键(Clause-② yes,扩宽)+ 门内一次比对 + 两屏钉测;cloud 侧存一个键、传回一个键
    B 框架记录已续跑过的待办 id,同一个 id 第二次来就拒绝 只挡住「重试」一种情形,另外两种挡不住;与宿主已承担的「一个待办只裁一次」重复 M–L:新的已消费表,需要原子消费和清理
    C 保留现状,只写文档(PR #34492 已改散文),本卡只补一处注释(N2) 安全与否全看每个宿主(cloud)自己做对;cloud 不知道屏 id,只能自己复制一份平台规则 S
    D 引擎每次暂停都发一个暂停 id,待办记它,续跑时比对 同 A,另外能覆盖「循环回到同一屏」的向导 L:要改自动化引擎和 ScreenSpec 契约,还要迁移在途的暂停 run

    业务含义直译: A 是「批准只对当时那一屏有效」;B 是「同一张批单不能用两次」;C 是「交给云端自己把关」;D 是 A 的加强版,代价大得多。

    os-decision-facets
    ① 项目长远合理性:A 把「批准绑定到具体那一屏」放进平台契约,一处判定、所有宿主共用;C 让每个宿主各写一份;B 把宿主的职责搬进框架,且只覆盖一种情形;D 最完整,但要动自动化契约。
    ② 实际业务拉动:三种再续跑情形都是现有流程能走到的(重试、agent 双调、用户先推进);端到端多屏复现未测,结论来自读码。循环回到同一屏的向导没有读到真实用例,这是 D 的弱项。
    ③ 防 AI 犯错:A 让「agent 第二次续跑」这类 AI 常犯的错误响亮失败(409);C 下它静默成功,把值交给错的那一屏。
    ④ 创业阶段不扩散:C 最省;A 只加一个可选键;D 最扩散。
    Prior rulings read: #33689, #33690, #15705, #16370, ADR-0151 D3 rule 3, ADR-0019 D1 (adjacent, does not answer which screen an approval binds to), L2 record 6932783796 (S1, N2); check-prior-rulings.mjs --card 34515 other hits (ADR-0027, ADR-0147, ADR-0028, ADR-0091) do not bear on this question; thread: none.
    Analysis-tier: seat default (CONTRACT_REVIEW_TIER not used: the maintainer, 2026-11-15T21:53Z, 「fable 不多了」).

    推荐:A,本卡顺带做 N2(区与席位意见相同)。只看①选 A;②③④ 是否翻转:否。端到端多屏复现未测,所以派发令会要求开发先在两屏向导上复现,前提不成立就报 fork,不硬做。可选键的名字由席位定,按 ScreenSpec.nodeId 的先例取 screenNodeId。
    未实测: 真实多屏向导的端到端复现。
    裁后执行: 选 A ⇒ 本卡回 pm:queue,改 spec 契约,算大卡,单开卡线程,欠 L2;另立 cloud 卡,让云端存待办时带上这个键。选 B ⇒ 同样回队,作为大卡。选 C ⇒ 只补 N2 注释,按小卡进区。选 D ⇒ 先立自动化契约修订卡。

  3. added
    needs-user-decision
    and removed
    pm:queue
    on Nov 16, 2026
  4. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmQ2SN4K183oqAvUajA

    2026-11-17T08:30Z Ruled. Steve chose an option on this project's decision card for #34515 at 2026-11-17T08:26:17Z. Option text verbatim: 「全部按推荐」 — 「七张都按上面写的推荐回队开工,#33952 按包取翻译,#34427 只写文档后关卡。」. It answers the seat analysis 6932866004 (this card is one of the seven). Freshness: no comment on this card is newer than that analysis, and the body was not edited after it.

    Ruled: A, with its premise

    • The approval is bound to the screen it was given on; a resume whose screen does not match is refused.
    • Premise first: reproduce the second resume on a two-screen wizard on main before any code. ⛔ If it does not reproduce, report it on this card and stop; do not build the binding anyway.
  5. added
    pm:queue
    and removed
    needs-user-decision
    on Nov 17, 2026
  6. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmRXuRn93HphKp7kXEz

    Claim: PM loop (area o2-D, repo:objectstack#2; built in a card thread that reports to the area; the card thread adds its Thread session and Branch below this claim when it starts)
    Session: session_01ADHkmRXuRn93HphKp7kXEz
    Account: os-steve
    Branch: named by the card thread on its first post (claude/project-thread-*)
    Domain: domain:server
    Seat: repo:objectstack#2
    File surface: step 1 (premise) touches nothing: reproduce on main a second resume_run of one hand-off on a two-screen wizard delivering the first screen's values to the second screen. Only if it reproduces: packages/spec/src/contracts/ai-service.ts (ActionConfirmationHandOff.run gains an optional screen binding, rule-4 prose), packages/runtime/src/domains/mcp.ts (record the parked screen at hand-off; compare at resume step 5, refuse on mismatch with the run untouched), packages/runtime/src/action-dispatch.ts (ActionResumeRequest optional key), action-execution.ts (N2 comment), the #33690 hand-off test, content/docs/ui/actions.mdx, .changeset/; the error-code ledger only if a new code is minted (name is the seat's call). Stop on breach.
    Container & model: L, card thread, effort: high
    Clause-②: yes (widening)
    Metadata-protocol: none
    Responsibility: ruling 6942893807 (maintainer, option A, premise first); L2 record 6932783796 (S1, N2); PR #34492 (#34386)
    Thread-read: 6942893807
    Premise: NOT YET MEASURED, by the ruling: reproduce first; if it does not reproduce, report on this card and stop, nothing built
    Serial constraints cleared: no open PR touches packages/spec/src/contracts/ai-service.ts, automation-service.ts, packages/runtime/src/domains/mcp.ts, action-dispatch.ts or action-execution.ts (open PR file lists read at 08:47Z).
    Pre-claim lane: domain:server; large-card trigger: a contract change (packages/spec/src) ⇒ contract-tier L2, landing through the seat's governed step.
    Pre-claim deps: no Blocked-by: line; #34386 merged.
    Prior rulings read: #33689, #33690, #15705, #16370, ADR-0151 D3 rule 3, ADR-0019 D1, L2 record 6932783796, area options 34515-options.md, ruling 6942893807; thread: none; repo: objectstack-ai/objectstack

  7. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 17, 2026
  8. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmRXuRn93HphKp7kXEz

    Claim registration · #34515 (claim 6943219796)
    Thread session: session_01ADHkmSKdmdbBugjg8QSZGa
    Branch: claude/project-thread-di6l33

  9. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmSKdmdbBugjg8QSZGa
    os-dev-report

    {
      "issue": 34515,
      "status": "done",
      "branch": "claude/project-thread-di6l33",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34753",
      "session": "session_01ADHkmSKdmdbBugjg8QSZGa",
      "premise_still_valid": true,
      "summary": "Premise measured first on main dc66d330 with a real two-screen wizard (bootStack + MCP + dispatchActionResume): all three re-resume paths (same item approved twice, two resume_run items, person advanced in the app first) completed step_2 with step 1's bag as the approver. Built ruling 6942893807 option A: the hand-off records run.screenNodeId (ScreenSpec.nodeId at hand-off), ActionResumeRequest takes it back, and resume step 5 refuses a run on another screen 409 RESOURCE_CONFLICT before resume(); an elicited accept is bound the same way. N2 comment done. Optional keys only: a call without screenNodeId resumes the current screen as before.",
      "tests": "runtime action-confirmation-handoff-33690.test.ts 46/46 (7 new [#34515]); dogfood action-confirmation-handoff-33690.dogfood.test.ts 6/6 (3 new); runtime test exit 0 (611 files, 11345 passed, 19 skipped); spec action-confirmation-contract.pin.test.ts 14/14. Ablation (step-5 comparison disabled via ablation-replace.mjs): leg A runtime src 4 red / 3 green (CONTROLs and 400); leg B dogfood through rebuilt runtime dist 2 red / 4 green; restore: blob == HEAD, dist preflight --absent ok, dogfood 6/6. Log: objectstack-seat2/34515-ablation.log.",
      "gates": "head 1f37c11a: dispatch-gates --commands 113 derived, 113 exit 0 (3 first exit 3 on prerequisites, re-run green after git fetch of the teardown fixture commit and turbo build ./packages/**); --ran reconcile 0 NOT-MEASURED (objectstack-seat2/34515-gates-ran.txt). runtime/spec/dogfood typecheck exit 0. CI: in_progress at report time.",
      "dogfood_battery": "n/a — no ! in the PR title and Clause-② carries the (widening) arm",
      "mcp_calls": "2 — mcp__github__issue_read (get, get_comments)",
      "api_writes": "2 — fleet-write pr_create (#34753); post-stamped os-dev-report comment on #34515",
      "files_changed": [".changeset/34515-resume-approval-bound-to-screen.md", "content/docs/ui/actions.mdx", "packages/qa/dogfood/test/action-confirmation-handoff-33690.dogfood.test.ts", "packages/runtime/src/action-confirmation-handoff-33690.test.ts", "packages/runtime/src/action-dispatch.ts", "packages/runtime/src/action-execution.ts", "packages/runtime/src/domains/mcp.ts", "packages/spec/src/contracts/ai-service.ts"],
      "line_budget": "n/a — no governed surface touched",
      "deviations": ["Elicited-accept path bound to its screen too (same defect class, same function mcp.ts, no contract change); named in the PR body.", "The dogfood file is the #33690 hand-off dogfood twin of the claimed runtime test; its fixture gained two gated flow actions and two screen flows.", "Ablation leg B: the in-leg dist preflight call exited 1 on its tree check while the mutation sat in src; arrival in dist is shown by the dogfood going red on that build; the restore leg's --absent preflight passed."],
      "open_questions": [
        { "question": "Needs contract review: packages/spec/src/contracts/ai-service.ts (optional key ActionConfirmationHandOff.run.screenNodeId, rule-4 prose). Head 1f37c11a097f391462df441dfbdc157ce8fecde9.", "options": ["A route to the L2 review seat", "B none"], "recommendation": "A, Clause-② yes (widening) on packages/spec/src" }
      ],
      "security_findings": "none",
      "out_of_scope_findings": ["carrier: cloud · the cloud host must store run.screenNodeId with the pending item and pass it back to dispatchActionResume to get the binding · noted, not filed", "carrier: none · a wizard looping back to the same screen node is not told apart by nodeId (analysis option D) · no flow found doing it · noted in Acceptance notes"]
    }

    Stamped 2026-11-17T09:48Z.


    Generated by Claude Code

  10. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmQ2SN4K183oqAvUajA

    Correction to the seat analysis · 2026-11-17T10:24Z · ruling 6942893807 (A) unchanged

    Option A's text said it "only adds an optional key and narrows no existing call". L1 review of PR #34753 (6945290592) found one path where that is false: a guided confirmation where the person is asked in place, the wizard advances, and only then accepts. On main that resume answers 200 and continues the current screen; with A it answers 409 RESOURCE_CONFLICT. That 200 is the very outcome A exists to stop (values handed to a different screen), so the code stays as ruled; the PR now declares the narrowing (Clause-②: yes (narrowing), changeset FROM → TO, ! in the title, full dogfood readings).

    The seat does not reopen the decision. The narrowing is stated in the PR's maintainer summary, and the Tier H approval of PR #34753 is the maintainer's confirmation of it; withholding approval sends it back.

  11. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmRXuRn93HphKp7kXEz

    Hand-off · 2026-11-17T12:39Z · repo:objectstack#2 → repo:objectstack#3 (maintainer order 2026-11-17 12:33–12:34Z)

    • PR: fix(runtime)!: bind a resume approval to the screen it was given on #34753 (ready, not armed).
    • Current head: 85b5f360e19824f42dea785b8036c39c1caf8dbd.
    • Records on file: L1 ACCEPT 6947459641 and L2 PASS 6947540558 (contract tier, narrowing), same head; earlier rounds L1 6945290592 (REWORK) / 6946488378, L2 6946628926 (S1, closed); final-head comment 6947438568; seat's Tier H hand-off 6947568565; seat's correction on this card 6945347284.
    • Open items: no S items. Accepted nits: L2 N1 (read-then-resume is not atomic across instances, a narrow window), N3 (the two no-nodeId branches untested), and ActionResumeRequest.screenNodeId's jsdoc does not state the 400 rule. The maintainer must explicitly confirm the elicited in-place accept narrowing (200 resume → 409 RESOURCE_CONFLICT); without that confirmation, the elicited binding and the rule-4 sentence are withdrawn. The cloud half is objectstack-ai/cloud#4549 (comment 6944653166). The Dogfood Regression Gate shards were skipped by the selector; the full local battery passed (4058) on 51975cc3, and the later delta is docs only.
    • Next step: approval by os-zhuang (Tier H), then enqueue.
    • Small-flaw rule (maintainer 2026-11-17 12:34Z): when review leaves only small flaws, the PR may merge first and each flaw gets its own card; a governed PR still needs os-zhuang's approval.

    Lease lease:o2-D removed in this stroke; the assignee and pm:dispatched stay for seat 3's takeover claim to swap.

  12. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Claim: takeover · #34515 · area o3-I (seat-2 hand-off: approvals and close-out) · 2026-11-17T12:56Z
    Provenance: whose order — seat repo:objectstack#2 handed its in-flight PRs to seat repo:objectstack#3 (mailbox PR #34585 comment 6948334887, 2026-11-17T12:41Z) on its maintainer's word of 2026-11-17T12:33–12:34Z 「L1 L2 不继续审核了,让 3号席位跟进」; this seat's maintainer ruled at 2026-11-17T12:44Z that seat 3 takes every non-security handed PR, p2 included (「也由我接」); where — this account's Claude Code project, seat 3's order to area o3-I.
    Session: session_01WGufzi6WQ71HhZSLSvHhdF (area o3-I)
    Account: os-support-ai
    Branch: claude/project-thread-di6l33 (PR #34753), continued as it is, no new PR
    Worktree: none yet (nothing to push)
    Domain: domain:server
    Seat: repo:objectstack#3
    File surface: unchanged; PR #34753's committed tree at 85b5f360e19824f42dea785b8036c39c1caf8dbd is the surface
    Clause-②: yes (narrowing)
    Metadata-protocol: none
    Responsibility: carried from the earlier claim
    Thread-read: 6948301224
    Premise: holds (carried; L1 ACCEPT 6947459641 and L2 PASS 6947540558 at the current head)
    Serial constraints cleared: overlap-check.mjs --branch=origin/claude/project-thread-di6l33 at origin/main dfbc316: clean against main and #34814 #34811 #34736 #34734 #34719
    Prior rulings read: seat record 6947568565 (the maintainer still has to confirm the in-place accept narrowing 200 → 409 RESOURCE_CONFLICT); thread: 6948301224
    Next: os-zhuang's APPROVED review on PR #34753 (seat record 6947568565), then this area enqueues. Nothing is readied, queued or armed before that.
    Lease: lease:o3-I (replaces lease:o2-D, already dropped by the hand-off write)

  13. removed
    pm:dispatched
    on Nov 17, 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

    domain:serverenhancementpriority:p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions