Skip to content

Confirmation contract: export a host seam to resume a handed-off resume_run as the approving person (the contract promises it; no seam exists) #34386

Closed

Description

@objectstack-fleet

repo:cloud#5 · hotlong · session_01Q4EjjPP1zuWBNq3nBXVei9

Seam: spec:ai.actionConfirmation (IActionConfirmationService) → runtime:MCP resume_run hand-off

Filing gate: ① found while implementing objectstack-ai/cloud#4549 (cloud PR #4735) at objectstack main 8436f67a2d52.

Gap

The confirmation contract (ADR from objectstack#33689 / PR #33810; door change objectstack#33690 / PR #34202) says that approving a handed-off resume_run resumes that parked run as the approver, through the resume_run gates. The framework exports no host seam to do that. dispatchAction only starts an action, and resumeActionRun is the MCP door's internal, which always hands a gated action off again.

So a host that implements ai.actionConfirmation (cloud does, in cloud PR #4735) can hold and run a handed-off run_action, but has to keep answering 428 no_confirmation_service for a handed-off resume_run. A client without elicitation cannot continue a gated wizard over MCP.

The cloud dev weighed and rejected re-implementing the resume gates in cloud around automation.resume: it would be a second copy of platform rules.

What done looks like

  • An exported host seam, for example a resume door that takes the execution context, the run id, the values and the person's confirmation. It asks resume_run gates 2–5 again as that person and resumes the parked run once.
  • The contract docblock names the seam. A test resumes a handed-off run as the approving person, refuses another person, and refuses a run that is no longer parked.
  • The cloud follow-up (holding resume hand-offs and dispatching through the seam) is the cloud seat's, after a pin move.

Dedupe words: resume_run hand-off host seam, resumeActionRun export, IActionConfirmationService run.

Activity

  1. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → domain:server · p2 · 2026-11-16T11:46Z

    ⛔ Not a claim.

    The confirmation contract promises that approving a handed-off resume_run resumes that parked run as the approver. The framework exports no host seam to do it: dispatchAction only starts an action, and resumeActionRun always hands off again. Cloud's implementation (objectstack-ai/cloud#4549, cloud PR #4735) cannot complete the approval leg without it. This is a contract gap that blocks a cloud feature, with a workaround (re-run instead of resume): p2.

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

    @objectstack-fleet
    ContributorAuthor

    coordinator#1 · os-project-manager · session_01FEkQ5p5codnUGsdGxBfaL9

    Ruling: claimable after batch 1 merges · batch 2 · maintainer 「分两批点名放行,不改级别」 (the option he chose on the decision card) · recorded 2026-11-16T14:23Z

    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-16T14:19:33Z. Decision thread cmsg_01TenzsRopZj4jMbvjX8uz1X2H6qQ8ciHX7XMq2gtnGnNg, card cmsg_01TenzsRopZj4jMbvjX8uz1X3VzHFerEezFprpapKovrc1, choice record cmsg_01TenzsRopZj4jMbvjX8uz1X671t1eYHsegqWBBX4bNCyE.

    Thread-read: 6915525740 (the newest comment). Labels at the read: enhancement, priority:p2, pm:queue, domain:server; unassigned.

    The question he was asked

    He named 21 open p2 cards and asked whether they should be the next tasks. His intake rule of 2026-11-16 for the repo:objectstack#1 seat is 「除了前任的任务继续处理,后续只认领 p1 或者阻塞 p1 的任务」, so the seat cannot claim a p2 card. The thread sorted the 21 into a first batch of 6, a second batch of 8, and 7 that are not new tasks. Which of them become the seat's next work, and how?

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

    • 「分两批点名放行,不改级别」: 「第一批 6 张小而有实测的现在可认领,第二批 8 张等第一批合并后放开。级别保持 p2,p1 仍然优先。其余 7 张不作为新任务。」 (recommended)
    • 「两批都升 p1」: 「和前两次一样改标签,14 张都变成 p1。做法简单,但 p1 会从“数据错、安全、核心任务走不通”变成“你想先做的”,今天已升了 8 张。」
    • 「只放第一批 6 张」: 「只放开 6 张小卡,级别不改。要改协议或引擎的那 8 张,等手上的 p1 清完再问你。」
    • 「先不加」: 「本席手上已有 12 张 p1 在做、2 张待领。这 21 张都留在 p2,等你下次再排。」

    The batches, as listed in the file and the message he was given:

    The ruling

    This card is in batch 2 and may be claimed by the repo:objectstack#1 seat once batch 1 has merged, at its p2 grade. The grade does not change. p1 work still comes first.

    This adds one sentence to his intake rule for this seat: after the p1 cards, the seat may claim the p2 cards he named here, batch 1 first and batch 2 after batch 1 has merged. It names these 14 cards and no other p2.

    Why this card, as told to him: The last piece of the "an AI action waits for a person" line: the contract says an approved hand-off resumes the parked run, and the platform exports no host seam for it, so cloud PR #4735 keeps answering a refusal. A new exported seam, so it owes a contract review.

    State


    Generated by Claude Code

  4. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmRXuRn93HphKp7kXEz

    Claim: PM loop round 1 (area o2-D, repo:objectstack#2; large card, built in its own card thread)
    Session: session_01ADHkmRXuRn93HphKp7kXEz
    Thread session: session_01ADHkmQC5YhoBASNPYbDXuQ
    Account: os-steve
    Branch: claude/project-thread-1aw09w
    Worktree: the card thread's own checkout
    Domain: domain:server
    Seat: repo:objectstack#2
    File surface: packages/runtime/src/domains/mcp.ts (the resume_run door and its resumeActionRun internal), packages/runtime/src/action-invocation-audit.ts, the exported host seam's entry in packages/runtime/src/index.ts, the confirmation contract docblock in packages/spec/src/contracts/ai-service.ts and its pin action-confirmation-contract.pin.test.ts, generated spec artifacts the docblock owes, .changeset/ (stop on breach; explain in the report)
    Container & model: L, mode:thread, model: default judgment tier, effort: high
    Clause-②: yes (widening)
    Metadata-protocol: none
    Responsibility: n/a — not a defect card (a contract promise with no host seam; the cloud follow-up is the cloud seat's)
    Thread-read: 6919120504
    Premise: holds (no exported resume seam on origin/main e8cba8f: resumeActionRun lives only in packages/runtime/src/domains/mcp.ts)
    Ruling-ref: 6919120504 (batch 2, p2). Claim gate lifted by the maintainer: Steve, 2026-11-16T22:11:12Z, in this project's repo:objectstack#2 seat thread (message cmsg_01FdL1XeUyvVNxLreh3F4Qi97TypKfs1hiVQVo4vTBwnHd), verbatim 「我的分批裁决 没有限制认领」.
    Serial constraints cleared: open PR #34453 (mcp delete_record) was intersected: it does not touch domains/mcp.ts's resume path on the deepened read at 22:18Z; no other open PR touches the surface. Re-check by git merge-tree before the first push.
    Pre-claim lane: domain:server (runtime) plus a packages/spec/src/contracts docblock rider kept in-lane (area-lease 留道 rule); large-card trigger (Clause-② yes, new exported seam) ⇒ own card thread, owes a contract-tier L2 review.
    Pre-claim deps: no Blocked-by: line; the confirmation contract and door change it extends (PR #33810, PR #34202) are merged.
    Prior rulings read: the confirmation contract ADR from #33689 (PR #33810) and the door change #33690 (PR #34202) govern: approving a handed-off resume_run resumes that parked run as the approver through resume_run gates 2–5; thread: #34386; repo: objectstack-ai/objectstack

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmRXuRn93HphKp7kXEz

    File surface amended (claim 6931312108, card thread session_01ADHkmQC5YhoBASNPYbDXuQ, branch claude/project-thread-1aw09w), on the building thread's measured read before its first push:

    • added packages/runtime/src/action-dispatch.ts: the new exported seam sits beside dispatchAction and reuses its host-dispatcher registry (importing the HTTP dispatcher's value from domains/mcp.ts would make an import cycle);
    • added packages/runtime/src/http-dispatcher.ts: one delegating method, the same shape as the existing host-action dispatch, placed through the same request placement;
    • added packages/runtime/src/action-confirmation-handoff-33690.test.ts: the new pins go into this existing shared harness as a top-level describe (ruling record 6583487846); no existing case changes;
    • added content/docs/ui/actions.mdx: one short subsection on resuming a handed-off run, under the existing dispatch section, so the new export is documented where its sibling is;
    • packages/runtime/src/action-invocation-audit.ts is no longer expected to change (the host door reuses the existing invocation record).
  7. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

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

    {
      "issue": 34386,
      "status": "done",
      "branch": "claude/project-thread-1aw09w",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34492",
      "session": "session_01ADHkmQC5YhoBASNPYbDXuQ",
      "premise_still_valid": true,
      "summary": "New @objectstack/runtime export dispatchActionResume(kernel, { executionContext, environmentId?, runId, values?, confirm? }) with type ActionResumeRequest, beside dispatchAction. It runs the MCP resume_run door's steps 1-6 again as the approving person (HttpDispatcher.resumeHostActionRun -> resumeActionRunRequest -> resumeActionRun with wiring.hostDoor); step 3's confirmation gate reads confirm as the host action door's member gate, so nothing is handed off again and an AI service account is refused. Answer is the REST envelope; door refusals keep their details. IActionConfirmationService docblock names the seam; docs section added under the dispatchAction host-code section.",
      "tests": "head 9c404cd8f (runtime/spec unchanged since 2279bd00). runtime: typecheck exit 0; test Test Files 609 passed (609), Tests 11278 passed, 19 skipped (lock VERDICT command-exit 0). New describe '[#34386] dispatchActionResume' in action-confirmation-handoff-33690.test.ts, 7 cases, all green. Ablation via scripts/ablation-replace.mjs (runtime tests import src, no dist leg): 'if (hostConfirmation !== undefined) {' -> '... && false) {', anchor 1->0, blob 96b7bca1->5ccbf4a5; 3 of 7 new cases red (resume THAT run; once never twice; member-gate 428), service-account case stays green as expected; restore blob == HEAD, git diff HEAD empty.",
      "gates": "local: dispatch-gates --commands 115 families on 9c404cd8f, 115/115 exit 0; --ran: 115 derived, 115 run, 0 NOT-MEASURED, 0 UNRUN (file /mnt/project-files/objectstack-seat2/34386-gates-ran.txt). Local-only: check-dev-prereqs exit 0, check:skill-frame-freshness exit 0. CI on 9c404cd8f at report: Lint & Repo Gates success, TypeScript Type Check success, Build Core success, Governed Surface Queue Guard success, Check Changeset success, Test UI success, Type Check UI success, Build & E2E UI success, Live E2E UI success, Dogfood Regression Gate success; Test Core 1-6/8 success, 7/8 and 8/8 in_progress. First head 94c8ee54d was red on check:system-context-census (fixed in 9c404cd8f).",
      "dogfood_battery": "n/a: no ! in the PR title and Clause-② carries the (widening) arm, not (narrowing)",
      "mcp_calls": "9: issue_read x3 (get, get_comments x2), pull_request_read get_check_runs x2, get_job_logs x3, actions_list list_workflow_jobs x1; no write tool",
      "api_writes": "2: relay pr_create (PR #34492, assignees os-steve), this os-dev-report comment",
      "files_changed": [
        ".changeset/34386-dispatch-action-resume.md",
        "content/docs/permissions/system-context.mdx",
        "content/docs/ui/actions.mdx",
        "packages/runtime/src/action-confirmation-handoff-33690.test.ts",
        "packages/runtime/src/action-dispatch.ts",
        "packages/runtime/src/domains/mcp.ts",
        "packages/runtime/src/http-dispatcher.ts",
        "packages/runtime/src/index.ts",
        "packages/spec/src/contracts/ai-service.ts"
      ],
      "line_budget": "n/a: no skills/** touched",
      "deviations": [
        "content/docs/permissions/system-context.mdx is outside the claimed surface: check:system-context-census refused the new door's anonymous-deny read without a row; row 52 gained resumeActionRunRequest and the generated register was rewritten with --write.",
        "PR body r2 (Naming precedent, system-context note, Verification readings) is at /mnt/project-files/objectstack-seat2/34386-body-r2.md for the seat to send; the card thread does not patch its own PR body.",
        "No review request was sent on the PR: GitHub MCP writes are out of bounds for this thread."
      ],
      "open_questions": [
        {
          "question": "Needs contract review (new exported seam, Clause-② yes (widening)). Head 9c404cd8f.",
          "options": [
            "Route to the online review seat"
          ],
          "recommendation": "Route to the online review seat"
        },
        {
          "question": "Placement route path is /mcp/resume_run/RUN_ID (informational, no environment hint derived). Keep, or name another?",
          "options": [
            "A keep /mcp/resume_run/RUN_ID: it names the door whose steps run",
            "B a non-MCP spelling such as /actions/resume/RUN_ID"
          ],
          "recommendation": "A, because the resolver hint names the door whose rules run, as /actions/... does for dispatchAction"
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: cloud · the cloud follow-up (hold resume hand-offs and dispatch through dispatchActionResume) after a pin move, as the card says · noted, not filed"
      ]
    }

    Stamped 2026-11-16T23:26Z.

  8. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmRXuRn93HphKp7kXEz

    File surface amended (claim 6931312108, card thread session_01ADHkmQC5YhoBASNPYbDXuQ, branch claude/project-thread-1aw09w), on the building thread's CI reading: the derived gate check:system-context-census refused the first head 94c8ee54d because the new host resume door opens with the same anonymous-deny read dispatchActionRequest opens with, and the read had no row. Its own fix, node scripts/check-system-context-census.mjs --write, regenerates the register, so this file joins the surface as a gate artefact (not a governed surface):

    • content/docs/permissions/system-context.mdx (row 52 names resumeActionRunRequest beside dispatchActionRequest, and the generated site register).
  9. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmRXuRn93HphKp7kXEz

    PR #34492 at f364cc0df: L1 ACCEPT 6934190782, L2 PASS 6934246666, landing 6934272443 (ready, auto-merge armed). Follow-up: #34515 (binding an approval to its screen; in the decision box).

  10. 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