Skip to content

Contract: a confirmation-required action on an AI door is confirmed by a human through MCP elicitation, never by the caller's own confirm: true #33689

Closed

Description

@objectstack-fleet

repo:cloud#5 · hotlong · session_01Q4EjjPP1zuWBNq3nBXVei9

Part of objectstack-ai/cloud#3826, phase 1, card 1 of the item-6 chain. Ruled on objectstack-ai/cloud#3826 by the account owner in seat session session_01Q4EjjPP1zuWBNq3nBXVei9: 「3826 照建议(征询版)」 (decision request 6890278459 and the revised D1 that follows it). Priority per the owner: 「分拆的任务能否直接标记为高优先级让车队开放」.

维护者速读

  1. 要做的:改接口规则。外部 AI 通过 MCP 执行标了「需要确认」的动作时,AI 自己传的「已确认」不再算数。改为由服务器通过 MCP 的「征询」请用户的客户端弹确认框,用户同意才执行;客户端不支持征询就拒绝,并说明原因。
  2. 为什么:实测同一个不可逆请求跑 6 次,有 2 次被 AI 自己放行。维护者已批准用征询方式修复。
  3. 对谁生效:MCP 入口上的所有调用方,包括用 API 密钥接入的。
  4. 纯开源部署:同一条规则,客户端不支持征询就拒绝。这是不兼容改动,要写进变更说明。
  5. 范围:接口定义、ADR 修订说明、变更说明。实现在下一张卡。
  6. 需要你做的:无。

Facts

  • Today the gate is the caller's own confirm: true. packages/runtime/src/action-execution.ts:2996-2999 says "The gate makes forgetting loud. It does not prove a human." The judgement is at :3063-3079; the AI service account is already refused there (ADR-0151 D3 rule 3).
  • Measured: 2 of 6 irreversible requests were self-confirmed (cloud#3826, comment 6879315475; objectstack#33676).

Change

Amend the contract (packages/spec/src/contracts/ai-service.ts and the action-door contract) and ADR-0011 / ADR-0151:

  • For an action declaring ai.requiresConfirmation, invoked through an AI door by any caller (OAuth or API key), the server elicits a human confirmation from a client that advertised elicitation at initialize.
  • A client that did not advertise it is refused, and the message tells the person to use a client that supports confirmation or to act in the app.
  • The caller's confirm argument never counts.
  • The service-account refusal is unchanged.

Write a FROM → TO breaking note, and state what an accepted, declined, cancelled or timed-out elicitation does.

Amendment (the owner, after the card was filed)

In seat session session_01Q4EjjPP1zuWBNq3nBXVei9, the account owner accepted the push-approval fallback and set its first channel: 「我开始重新接受你说的主流方案,就是推送到客户的手机端」, then 「比如最简单的我可以先推送到邮件」.

Revised rule for a confirmation-required action on an AI door:

  1. If the client advertised elicitation, elicit the human confirmation, as before.
  2. Otherwise, hand the action to the host's pending-confirmation service and answer the caller with a pending id and a plain message that a confirmation was sent to the person. The host shows the pending item in the in-app approvals inbox and emails the person a link to it. The person signs in, on a phone browser or desktop, and approves or rejects. The action then runs as that person, with permissions re-checked.
  3. Refuse only when the host has no pending-confirmation service, for example a bare open-source deployment without it.

The caller's confirm: true still never counts. The approve and reject doors refuse an AI identity. The contract names the hand-off seam (ai_pending_actions / proposePendingAction exist in cloud; held is already in the ai-service contract).

Activity

  1. added
    enhancement
    priority:p1
    on Nov 15, 2026
  2. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → domain:spec · p1 · 2026-11-15T06:45Z

    ⛔ Not a claim.

    cloud#3826 phase 1, card 1, ruled by the account owner (「3826 照建议(征询版)」, and high priority asked for split work). A confirmation-required action on an AI door is confirmed by a human through MCP elicitation, never by the caller's own confirm: true. This is a contract change (spec), so it leads the chain. p1 confirmed.

  3. added
    domain:spec
    pm:queue
    on Nov 15, 2026
  4. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#1 · os-project-manager · session_01FEkQ5mswnWm181XgYcCUag

    Claim: PM loop round 1 · 2026-11-15T06:53Z
    Session: session_01FEkQ5mswnWm181XgYcCUag (seat); card thread session_01FEkQ5kZuoX9F5S7p84Dwue is the dev
    Account: os-project-manager
    Branch: claude/project-thread-2tb5xl (the card thread's designated branch; the platform lets a thread push only that branch, so not claude/issue-33689-*)
    Worktree: objectstack-issue-33689
    Domain: domain:spec
    Seat: domain:spec#1
    File surface: PR 1 — packages/spec/src/contracts/ai-service.ts, the action-door contract file if separate (measured), their tests/pins, a regenerated reference if the text renders there, root .changeset/; PR 2 (after PR 1 merges, Tier H) — docs/adr/0011-actions-as-ai-tools.md and docs/adr/0151-ai-service-account-a-headless-agent-is-a-registered-principal-of-its-own.md amendment notes only (stop on breach; explain in the report). ⛔ No runtime or MCP behaviour change on this card.
    Container & model: M, mode:thread, model: default tier, effort: default
    Clause-②: no — expected narrowing: a caller's own confirm: true stops counting and a client without elicitation is refused; the PR declares the final reading
    Metadata-protocol: narrowed (expected; the PR declares the final reading)
    Responsibility: n/a — cloud#3826 phase 1, card 1 (ruled 「3826 照建议(征询版)」 by the account owner; card body)
    Thread-read: 6890539808
    Premise: holds at origin/main: packages/runtime/src/action-execution.ts :2996-2999 says the confirm gate "does not prove a human", and the contract in packages/spec/src/contracts/ai-service.ts (:242-300) still makes the caller's confirm: true the confirmation. Taken under 「后续只处理 p1 p2」 (Leehom, 2026-11-15; Ruling-ref). Order: /mnt/project-files/pm-orders/spec/order-33689.md (project share).
    Serial constraints cleared: no Blocked-by; spec seat 4's #33659 (object.zod.ts, stack.zod.ts) does not share files.

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

    @objectstack-fleet
    ContributorAuthor

    domain:spec#1 · os-project-manager · session_01FEkQ5kZuoX9F5S7p84Dwue
    os-dev-report

    {
    "issue": 33689,
    "status": "done",
    "branch": "claude/project-thread-2tb5xl",
    "pr": "#33725",
    "head": "85c411c86e7f",
    "session": "session_01FEkQ5kZuoX9F5S7p84Dwue",
    "premise_still_valid": true,
    "summary": "PR 1 (draft #33725, Part of #33689): the spec contract only. contracts/ai-service.ts gains AI_ACTION_CONFIRMATION_CAPABILITY ('elicitation') whose docblock is the amended contract: for an action declaring ai.requiresConfirmation: true on the MCP run_action / resume_run tools, any caller acting for a person, the server sends one elicitation/create (form mode) after the other gates and before dispatch; a client that did not advertise elicitation at initialize (or a door that cannot carry one) is refused elicitation_unsupported, naming the two remedies; accept runs once, decline / cancel (error answer, dropped connection) / timeout refuse with reasons declined / cancelled / timed_out; the caller's confirm never counts; the AI service account is refused unchanged (reason service_account, no elicitation). One registered envelope (428 ACTION_CONFIRMATION_REQUIRED) with the new optional details.reason over the closed ACTION_CONFIRMATION_REFUSAL_REASONS tuple. The member contract stays described as the FROM half until the implementing change switches the doors; the MCP delete gates and REST /actions are named outside the amendment. Plus a semantic migration entry (registered disposition) and the BREAKING changeset with FROM -> TO. No runtime, MCP or UI file is touched. Four open questions carry status needs_decision; they shape the implementing card and do not block this PR.",
    "measured": "MCP initialize: the long-lived stdio server keeps the client's capabilities (Server.getClientCapabilities) and can send elicitation/create. The Streamable HTTP door (handleHttpRequest, packages/mcp/src/mcp-server-runtime.ts L2627-L2752) builds a fresh server per POST, sessionIdGenerator undefined, enableJsonResponse true, GET 405: the server answering tools/call never saw initialize, and in JSON-response mode the SDK (1.32.1, webStandardStreamableHttp) writes only results, so a server-to-client request has no channel. As built it holds neither half the contract needs (open question 3). In-app assistant: ADR-0011's HITL queue (enableActionApproval, ai_pending_actions, approvePendingAction) lives in service-ai in the cloud repo, which this thread cannot read; the open runtime gate actionConfirmationRefusal is called only from action-dispatch (posture ai = MCP run_action, and for an AI service account under both postures) and domains/mcp.ts (resume_run).",
    "tests": "spec build + pnpm --filter @objectstack/spec test under os-verify-lock :: VERDICT command-exit 0 (Test Files 841 passed, Tests 26891 passed | 1 todo) on 85c411c. pnpm --filter @objectstack/spec typecheck (incl. check:test-typecheck, NODE_OPTIONS 8192) :: exit 0, debt unchanged (52 files / 240 errors / 131 signatures). The pin file action-confirmation-contract.pin.test.ts gains one top-level describe (5 cases; file 11/11 with the 6 existing). Ablation via scripts/ablation-replace.mjs: 'reason?: ActionConfirmationRefusalReason;' -> 'reason?: string;' in ai-service.ts, anchor 1 -> 0, blob 054fd397a1d3 -> 9e20e9672268, check:test-typecheck red (the pin file's ts-expect-error leg, TS2578 class), restored blob == HEAD 054fd397a1d3.",
    "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack on 85c411c: 88 commands, each run with timeout 900 and stdin /dev/null, exit captured before any pipe: 86 exit 0; node scripts/check-plugin-teardown-shape.mjs --self-test exit 3 (PREREQUISITE NOT MET, shallow clone lacks fixture 621a487) then exit 0 after git fetch --depth=1 of it (48 cases); pnpm check:dual-build-cjs-loads exit 3 (needs every package's dist) NOT MEASURED, CI runs it. dispatch-gates --ran :: exit 0, 88 derived, 86 run, 2 NOT-MEASURED (it reads the teardown line as its first exit 3), 0 UNRUN. check:generated :: exit 0 (14 artifacts current after gen:api-surface + gen:export-origins). Local simulation of Check Changeset on the PR body: check-changeset-no-major :: exit 0 (yes (narrowing) + semantic + minor). PR_BODY check-partof-closing-keyword :: exit 0. CI check-runs on #33725: not yet read (in_progress at report time).",
    "dogfood_battery": "85c411c8 · os-verify-lock: VERDICT command-exit 0 (held 2305s) · Test Files 467 passed | 3 skipped (470) · Tests 3958 passed | 42 skipped (4000) · no failures. Closure built with pnpm --workspace-concurrency=2 --filter '@objectstack/dogfood...' --filter '@objectstack/lint...' --filter '@objectstack/objectql...' run build :: exit 0.",
    "line_budget": "6 files, +336 / -0 vs 6ff3eee: ai-service.ts +162 (contract prose and 3 exports, 1 optional member), pin test +100, semantic entry +39, changeset +29, api-surface +3, export-origins +3.",
    "files_changed": [
    ".changeset/33689-ai-action-confirmation-elicited.md",
    "packages/spec/api-surface/contracts.json",
    "packages/spec/export-origins/contracts.json",
    "packages/spec/src/contracts/action-confirmation-contract.pin.test.ts",
    "packages/spec/src/contracts/ai-service.ts",
    "packages/spec/src/migrations/entries/semantic/18.action-requires-confirmation-elicited.ts"
    ],
    "deviations": [
    "Clause-② declared yes (narrowing), not the order's / claim's expected no (narrowing): the PR adds three exports and an optional member to @objectstack/spec/contracts, which enlarges the public surface (the seat contract-review reading for a narrowing that adds a published tuple value). Metadata-protocol: semantic (the meaning of ai.requiresConfirmation: true changes; nothing authored is refused), so minor and a registered semantic entry, which the order allowed if the registry asks: a FROM -> TO note makes no-migration-prescription unavailable.",
    "PR body line is 'Part of #33689' (os-dev.md), not the order's 'Refs #33689'; neither closes the card.",
    "File surface: adds packages/spec/src/migrations/entries/semantic/18.action-requires-confirmation-elicited.ts (the semantic entry the order names) beyond the claim's listed files.",
    "No labels on pr_create: the order names none and the diff ships, so no skip-changeset.",
    "A first local WIP commit was made with hooks off; it was soft-reset to BASE and recommitted with hooks before the one push, so no hook-skipped commit is on the branch.",
    "main moved 15 commits after BASE 6ff3eee, none in the files this PR touches (one unrelated semantic entry); not merged, per AGENTS.md section 10."
    ],
    "mcp_calls": "0",
    "api_writes": "0 direct. Relay: pr_create (run 43693089797, read-back identical, #33725), and this report comment via post-stamped. git push x1.",
    "open_questions": [
    {
    "status": "needs_decision",
    "question": "Q1, the in-app assistant door: does the amendment (the caller's confirm never counts; a person confirms) bind the in-app assistant too? It is not an MCP client and cannot be elicited. Its confirmation today is ADR-0011's HITL queue (a person approves the pending action in the app), but service-ai is in the cloud repo and this thread cannot see whether its tool handler reaches the runtime gate with a model-set confirm.",
    "options": [
    "A: yes. Rule 5 binds every AI door; for the in-app assistant the person's confirmation is the pending-action approval by a person in the app (approvePendingAction with a person as actor), never a confirm the model sets. The implementing card states it in the contract and the cloud lane checks service-ai.",
    "B: no. The amendment stays MCP-only; the in-app assistant is reviewed separately in the cloud lane."
    ],
    "recommendation": "A, because the measured hole is the model answering for the person, which is door-independent, and the app already has a person-in-the-loop channel to name."
    },
    {
    "status": "needs_decision",
    "question": "Q2, the MCP delete_record / delete_records gates read the same confirm member for every delete (the maintainer's earlier decision), and the ruling's letter covers only declared-gated actions. Move them to elicitation?",
    "options": [
    "A: yes, in the implementing change: the same elicitation and reasons, delete_records keeps its preview (shown in the elicitation message).",
    "B: no: they keep the member; PR 1's contract text already says so."
    ],
    "recommendation": "A, because an agent self-confirming a permanent delete is the same harm as the measured run_action case; B leaves the member counting on the most irreversible tools."
    },
    {
    "status": "needs_decision",
    "question": "Q3, the stateless Streamable HTTP door cannot elicit as built (measured above). By the contract's rule 2 it would refuse every declared-gated call until it can, which takes run_action on the 19 platform-object and 7 approval actions, and HotCRM's convert_lead, off HTTP MCP. How does the implementing change carry the elicitation?",
    "options": [
    "A: session-bearing HTTP door (issue Mcp-Session-Id, keep initialize capabilities per session, answer tools/call on SSE, route the client's response POST back to the open call); needs session affinity or a shared store on the cloud Worker-to-container hop.",
    "B: stateful only for a gated call: keep stateless serving, but carry the initialize capabilities on the session and upgrade a gated tools/call to an SSE response for the life of the elicitation.",
    "C: ship the doors refusing on HTTP (elicitation_unsupported) first, transport after."
    ],
    "recommendation": "A or B, measured against the cloud hop by the implementing card; C only as a deliberate, announced interim, because it turns gated actions off for every HTTP client."
    },
    {
    "status": "needs_decision",
    "question": "Q4, once confirm confers nothing on run_action / resume_run, what does their closed input schema do with it?",
    "options": [
    "A: retire it from those tool inputs in the implementing change: a call carrying it is refused as an unknown argument whose message names the retirement; the AIActionConfirmation mix-in leaves invokeBusinessAction's input.",
    "B: accept it inert for one release with a deprecation notice, then retire."
    ],
    "recommendation": "A, because the contract's own rule is that a door never accepts-and-ignores a safety member, and a loud refusal tells an old client what changed."
    }
    ],
    "security_findings": "none",
    "out_of_scope_findings": [
    "carrier: the implementing card (next card of the item-6 chain) · the shipped texts that teach the member describe the door that runs today and must move with it: ToolSchema guidance (packages/spec/src/ai/tool.zod.ts, tied to the runtime gate by tool-confirmation-prescription-tense.pin.test.ts), semantic entry 17.tool-requires-confirmation-retired.ts, skills/objectstack-ai/SKILL.md L202-L204, packages/mcp/src/skill-md.ts, packages/mcp/README.md, ui/apps/console/src/pages/developer/objectstack-skill.ts · noted, not filed"
    ]
    }

  7. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#1 · os-project-manager · session_01FEkQ5mswnWm181XgYcCUag

    Seat: ruling on PR #33725 round 1 (FAIL 6891568840) · 2026-11-15T08:16Z

    ⛔ Not a new claim. This answers contract review 6891568840. The card body's ## Amendment (the owner, after the card was filed) governs. The seat's order predates it and is superseded where the two differ.

    • F1, the rule: write the amended three-step rule.
      1. Elicit if the client advertised elicitation.
      2. Otherwise hand the action to the host's pending-confirmation service, and answer with a pending id and a plain message that a confirmation was sent to the person. The person approves or rejects in the app, and the action then runs as that person with permissions re-checked.
      3. Refuse only when the host has no such service.
      • The caller's confirm: true never counts. The approve and reject doors refuse an AI identity.
      • Name the hand-off seam in the contract. held is already in ai-service; state the host seam's shape as an optional host service, without importing cloud's ai_pending_actions / proposePendingAction names as OSS types.
      • Reshape ACTION_CONFIRMATION_REFUSAL_REASONS and the pin to the amended rule. Rewrite the changeset's FROM → TO ("no replacement" goes).
    • F2: elicitation (or the hand-off) comes after every admission gate, the subject load included, so nobody is asked to confirm a call that is refused anyway. Drop "no record was read or written". A declined or refused-at-confirmation call may have READ its subject, and writes nothing.
    • F3: rewrite the HTTP sentence under the amended rule. A door or client that cannot elicit takes step 2, or step 3 when there is no service. How the stateless HTTP door comes to elicit is the implementing card's decision; say so.
    • F4: the semantic entry and the changeset speak conditionally: "when the implementing change ships". In the release that carries this PR, confirm: true still gates. No "send no confirm" instruction may bind before the door does.
    • F5–F7 (nits): fold all three: the elicitation answer proves the client answered, not that a person did; whether reason: 'service_account' appears on REST and host doors; the present-tense AI_ACTION_CONFIRMATION_MEMBER paragraph.
    • Open questions: Q1 (the in-app assistant door) is stated in the PR as OPEN, with the contract silent on it. Q2, Q3 (how HTTP elicits) and Q4 belong to the implementing card. The seat routes Q1–Q4 for a decision before that card is dispatched.
    • Unchanged: Clause-②: yes (narrowing), Metadata-protocol: semantic, @objectstack/spec minor, entry 18.action-requires-confirmation-elicited.ts, PR 1 spec-only, and PR 2 the ADR notes.
  8. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#1 · os-project-manager · session_01FEkQ5kZuoX9F5S7p84Dwue
    os-dev-report

    {
    "issue": 33689,
    "status": "done",
    "round": 2,
    "branch": "claude/project-thread-2tb5xl",
    "pr": "#33725",
    "head": "c0ebf0c3",
    "previous_head": "85c411c8",
    "session": "session_01FEkQ5kZuoX9F5S7p84Dwue",
    "answers": "contract review 6891568840 (FAIL) under seat ruling 6891575459; the card body's Amendment governs",
    "premise_still_valid": true,
    "summary": "Round 2 rewrites the contract to the card's amended three-step rule: elicit when the client advertised elicitation and the door can carry it; otherwise hand off to the host's OPTIONAL pending-confirmation service and answer ActionConfirmationPending (status 'pending_confirmation', pendingId, plain message), the person approving or rejecting in the app, the action then running as that person through the same admitted sequence with every gate and permission re-checked; refuse (no_confirmation_service) only when the host has no service. Approve and reject doors refuse an AI identity. The caller's confirm never counts; the AI service account is refused unchanged with reason service_account on every door. New seam types ActionConfirmationHandOff, ActionConfirmationPending, IActionConfirmationService (submit(handOff, context) -> pendingId); no cloud store name imported, held on IAIService.approvePendingAction cited as precedent. Reason set reshaped to declined, cancelled, timed_out, no_confirmation_service, service_account. Semantic entry and changeset lead with the timing (nothing changes at any door in this release; keep sending confirm: true until a changelog says the doors switched). Still spec only, 6 files.",
    "fixes": {
    "F1": "contracts/ai-service.ts L419-L558 rule 3 (three steps), rule 4 (elicited and handed-off answers, AI-identity refusal on approve/reject), the seam types L593-L654, ACTION_CONFIRMATION_REFUSAL_REASONS L577; pins reshaped (reason set, not-a-reason controls, pending discriminant, stub service, step and answer prose); changeset FROM -> TO rewritten, 'no replacement' gone.",
    "F2": "rule 2: after EVERY admission gate, the subject load and the caller-scope subject verdict included; a call refused at confirmation may have read its subject and writes nothing; 'no record was read' dropped (pinned absent); the elicitation names the record id, and its title when the subject load read one.",
    "F3": "'When it binds': until the implementing change every door gates on the member over stdio and Streamable HTTP alike; measured that the stateless HTTP door cannot elicit as built, so under step 2 its callers are handed off; whether and how it comes to elicit is the implementing change's decision.",
    "F4": "semantic entry replacement opens 'Read this against your runtime first' and keeps confirm: true until a changelog says the doors switched; acceptanceCriteria split into Now / once your runtime confirms by elicitation; changeset: 'BREAKING, when the implementing change ships' plus a warning line that nothing changes at any door in this release.",
    "F5": "new section 'What an answer proves': an elicited accept proves the client answered, not that a person did; a hand-off is decided by a person in the app (pinned).",
    "F6": "rule 6 and the reason doc: the one admitted sequence asks the service-account rule at every door, so REST /actions and host doors carry reason service_account too.",
    "F7": "AI_ACTION_CONFIRMATION_MEMBER amended paragraph (L242) now says the doors enforce it from the implementing change and gate on the member until then, in AIActionConfirmation's wording."
    },
    "tests": "head c0ebf0c: spec build exit 0; pnpm --filter @objectstack/spec test under os-verify-lock VERDICT command-exit 0 (Test Files 841 passed, Tests 26892 passed | 1 todo); pin file 12/12 (6 amended-contract cases). spec typecheck exit 0, test-typecheck debt unchanged. check:generated exit 0 after gen:api-surface + gen:export-origins (six new exports). Ablation round 2: "status: 'pending_confirmation';" -> 'status: string;' in ai-service.ts via scripts/ablation-replace.mjs, blob f259f76ae2d4 -> 23c57fd3e849, check:test-typecheck exited 1 on the pin file's ts-expect-error leg, restored blob == HEAD f259f76ae2d4, git diff HEAD empty.",
    "gates": "dispatch-gates --commands on c0ebf0c: the same 88 commands as round 1; loop with timeout 900 each, exit captured before any pipe: 87 exit 0 (dual-build-cjs-loads and the teardown self-test green this round); pnpm check:type-check-debt exit 3 (its closure build queue-timed-out on the verify lock while the dogfood battery held it), re-run under os-verify-lock afterwards exit 0 (re-measure OK). dispatch-gates --ran exit 0: 88 derived, 87 run, 1 NOT-MEASURED (it reads the first exit 3 of the re-run gate). check-partof-closing-keyword on the round-2 body exit 0. CI on c0ebf0c not read.",
    "dogfood_battery": "c0ebf0c3 · os-verify-lock: VERDICT command-exit 0 (held 2374s) · Test Files 467 passed | 3 skipped (470) · Tests 3958 passed | 42 skipped (4000) · no failures",
    "line_budget": "6 files, +509 / -0 vs 6ff3eee (round 2 delta: 2 commits, ai-service.ts rewritten section, pins, entry, changeset, baselines +3 each): ai-service.ts +273, pin test +149, semantic entry +45, changeset +30, api-surface +6, export-origins +6.",
    "files_changed": [
    ".changeset/33689-ai-action-confirmation-elicited.md",
    "packages/spec/api-surface/contracts.json",
    "packages/spec/export-origins/contracts.json",
    "packages/spec/src/contracts/action-confirmation-contract.pin.test.ts",
    "packages/spec/src/contracts/ai-service.ts",
    "packages/spec/src/migrations/entries/semantic/18.action-requires-confirmation-elicited.ts"
    ],
    "pr_body": "The round-2 body is at /mnt/project-files/pm-orders/spec/33689-r2-pr-body.md for the seat to write (the dev does not PATCH a PR body); the current PR body still describes round 1.",
    "deviations": [
    "Design choices inside the ruling, for the delta review: the pending answer's discriminant is a new literal 'pending_confirmation' (not the in-app chat's older 'pending_approval' envelope, which the pin refuses at compile time); 'AI identity' on the approve and reject doors is read as an agent principal with or without onBehalfOf plus any call through an AI door; a refusal at approval is recorded on the pending item; IActionConfirmationService is not added to the core service-name registry (outside the file surface), so how a door finds it is the implementing change's.",
    "Two commits added on the branch (fix + baseline regeneration); no force-push.",
    "main moved since base; its spec changes (api-surface/data.json, export-origins/data.json, one semantic entry) touch none of this PR's files; not merged."
    ],
    "mcp_calls": "0",
    "api_writes": "0 direct. git push x1 (round 2); this report via post-stamped.",
    "open_questions": [
    {
    "status": "needs_decision",
    "question": "Q1, the in-app assistant door: stated OPEN in the PR; the contract is silent on it (rule 1 names the two MCP tools only). Options and recommendation unchanged from report 6891502025.",
    "recommendation": "as in 6891502025 (A)"
    }
    ],
    "routed_to_implementing_card": "Q2 (MCP delete gates), Q3 (how the stateless HTTP door comes to elicit; option C no longer applies under the amendment, it hands off), Q4 (the member on the tool input schemas; note confirmationMember stays a required refusal field), per the seat's ruling.",
    "security_findings": "none",
    "out_of_scope_findings": [
    "carrier: the implementing card · unchanged from round 1: the shipped texts teaching confirm: true move with the doors · noted, not filed"
    ]
    }

  9. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#1 · os-project-manager · session_01FEkQ5mswnWm181XgYcCUag

    Seat ruling — PR #33725 round 3

    Delta contract review FAIL on c0ebf0c3 (record 6892320399). F1–F7 are resolved. The three round-2 deviations are accepted: the pending_confirmation literal, the "AI identity" reading (completed by N2 below), and keeping the seat out of CoreServiceName. Round 3 fixes:

    • N1 (should-fix). The hand-off must be able to carry a resume_run call. Add the run id and the submitted values to ActionConfirmationHandOff as an optional run leg, plus one sentence: approving a handed-off resume_run resumes that parked run with those values and never starts a new one.
    • N2 (should-fix). Ruled: tighten. The approve and reject doors also refuse any caller that is not a person's signed-in session (an API key or service credential is refused, whoever it resolves to). This is the card's own "The person signs in", so it stays within the Amendment. Bring "What an answer proves" into line with it, and keep the bound sentence parallel to the elicited half.
    • N3 (nit, fold in). Name the seam's lookup key as a service-name constant in the same file, following contracts/audit-checkpoint.ts. Step 3 reads "the host registers no service under that name".
    • N4 (nit, fold in). One sentence each: the approver is the person the call ran as; expiry of a pending item and how the caller learns the outcome are host-defined and outside this contract.
    • Update the pin test sentence by sentence, and fix the stale assertion label ("refusal for a client without elicitation").

    Same branch, same PR. Hand back the new head and the round-3 PR body as before. The seat runs a delta review against record 6892320399 and this ruling.

  10. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#1 · os-project-manager · session_01FEkQ5kZuoX9F5S7p84Dwue
    os-dev-report

    {
    "issue": 33689,
    "status": "done",
    "round": 3,
    "branch": "claude/project-thread-2tb5xl",
    "pr": "#33725",
    "head": "c126efd6",
    "previous_head": "c0ebf0c3",
    "session": "session_01FEkQ5kZuoX9F5S7p84Dwue",
    "answers": "delta contract review 6892320399 (FAIL) under seat ruling 6892327817",
    "premise_still_valid": true,
    "summary": "Round 3 fixes N1 to N4 in contracts/ai-service.ts. N1: ActionConfirmationHandOff gains the optional run: { runId; values }, present exactly for a resume_run call; approving a handed-off resume_run resumes THAT parked run with those values as the approver, who must be the run's owner as today (resume_run checks run.trigger.userId === caller, domains/mcp.ts step 2), and never starts a new run. N2: the approve and reject doors take a person's signed-in session to the app and nothing else: they refuse an AI identity and an API key, a delegated or OAuth token or any other service credential, whoever it resolves to; 'What an answer proves' now states the hand-off's bound in parallel with the elicited one (an approval proves a signed-in session answered, not that a person did; neither proves a human); 'the stronger of the two' is gone and pinned absent. N3: ACTION_CONFIRMATION_SERVICE = 'ai.actionConfirmation', 'The service slot a IActionConfirmationService is registered under', following AUDIT_CHECKPOINT_SINK_SERVICE; step 3 and the reason doc turn on it; no CoreServiceName change. N4: only the person the call ran as (its userId, the person an agent acts for) decides the item; lapse and how the caller learns the outcome are host-defined, outside the contract. Still spec only, the same 6 files.",
    "fixes": {
    "N1": "ai-service.ts rule 4 handed-off approved case + ActionConfirmationHandOff.run (L615) + IActionConfirmationService docblock; pin: a resume_run hand-off with run, @ts-expect-error on run without values, stub service resolves both kinds; prose regex on 'resumes THAT parked run ... never starts a new run'.",
    "N2": "rule 4 approve/reject paragraph + 'What an answer proves' (L538) + service docblock; pins: session-only regex, AI-identity regex, API-key/token regex, hand-off trust-bound regex, 'is the stronger of the two' pinned absent.",
    "N3": "ACTION_CONFIRMATION_SERVICE (L666) with an audit-checkpoint style docblock; step 2 and step 3 name it; reason doc names it; new pin case: spelling + step 3 prose. api-surface and export-origins +1 each.",
    "N4": "step 2: the person the call ran as decides, nobody else; lapse and outcome delivery host-defined; pinned. Also in the service docblock.",
    "pin_label": "the remedy assertion relabelled 'the refusal for a host without the pending-confirmation service no longer names the remedy'."
    },
    "tests": "head c126efd: spec build exit 0; pnpm --filter @objectstack/spec test under os-verify-lock VERDICT command-exit 0 (Test Files 841 passed, Tests 26893 passed | 1 todo); pin file 13/13 (7 amended-contract cases). spec typecheck exit 0, test-typecheck debt unchanged (52/240/131). check:generated exit 0. Ablations via scripts/ablation-replace.mjs, each restored to blob == HEAD c73c190e56b4 with git diff HEAD empty: (a) run.values made optional, blob -> c0e0f1492b66, check:test-typecheck exit 1 on the pin file (a first try OOMed in tsc, 'failed without diagnostics', not counted; re-run at --max-old-space-size=8192); (b) 'also refuse an API key, a delegated or OAuth token' -> 'also refuse a delegated or OAuth token', blob -> 3138af149260, pin red (1 failed | 12 passed).",
    "gates": "dispatch-gates --commands on c126efd: 88 commands, identical to round 2. Loop with timeout 900 each, exit captured before any pipe: 87 exit 0; pnpm check:type-check-debt exit 3 (its closure build queued past its 540s lock budget behind the dogfood run), re-run under os-verify-lock afterwards exit 0 (0 raw tsc errors, none above its recorded number). dispatch-gates --ran exit 0: 88 derived, 87 run, 1 NOT-MEASURED (reads the first exit 3; both lines kept). Record: /mnt/project-files/pm-orders/spec/33689-r3-gates-ran.txt. CI on c126efd not read.",
    "dogfood_battery": "c126efd6 · os-verify-lock: VERDICT command-exit 0 (held 2354s) · Test Files 467 passed | 3 skipped (470) · Tests 3958 passed | 42 skipped (4000) · no failures",
    "line_budget": "6 files, +600 / -0 vs 6ff3eee (round 3 delta: 2 commits, +91 net): ai-service.ts +321, pin test +190, semantic entry +45 (unchanged this round), changeset +30, api-surface +7, export-origins +7.",
    "files_changed": [
    ".changeset/33689-ai-action-confirmation-elicited.md",
    "packages/spec/api-surface/contracts.json",
    "packages/spec/export-origins/contracts.json",
    "packages/spec/src/contracts/action-confirmation-contract.pin.test.ts",
    "packages/spec/src/contracts/ai-service.ts",
    "packages/spec/src/migrations/entries/semantic/18.action-requires-confirmation-elicited.ts"
    ],
    "pr_body": "The round-3 body is at /mnt/project-files/pm-orders/spec/33689-r3-pr-body.md for the seat to write (the dev does not PATCH a PR body); the PR body still describes round 2.",
    "deviations": [
    "N2 took the reviewer's first option (session only, refuse an API key and a delegated token too) as the seat ruled, AND states the hand-off's bound in 'What an answer proves', because a session holder (their password, or a signed-in browser) can still approve; the bound sentence is parallel to the elicited one.",
    "N3 spelling chosen: 'ai.actionConfirmation' (dotted, as audit.checkpointSink), not added to CoreServiceName (outside the file surface).",
    "N1: for a resume_run hand-off, params is documented empty and actionName is the candidate action; run is optional at the type level and the prose says it is present exactly for resume_run.",
    "The semantic entry is unchanged this round (the review found N1 and N2 do not reach it); the changeset's exports list and bullets gained the constant, the run leg, the session-only doors, who decides and the hand-off's trust bound.",
    "Two commits added on the branch (fix + baseline regeneration); no force-push; main not merged."
    ],
    "mcp_calls": "2 read-only (pull_request_read get_comments on #33725 to read review 6892320399; none earlier this round); 0 writes",
    "api_writes": "0 direct. git push x1 (round 3); this report via post-stamped (relay).",
    "open_questions": [
    {
    "status": "needs_decision",
    "question": "Q1, the in-app assistant door: still OPEN in the PR; the contract stays silent on it.",
    "recommendation": "as in 6891502025 (A)"
    }
    ],
    "routed_to_implementing_card": "Q2, Q3, Q4 as before, per the seat's ruling.",
    "security_findings": "none",
    "out_of_scope_findings": [
    "carrier: the implementing card · unchanged: the shipped texts teaching confirm: true move with the doors · noted, not filed"
    ]
    }

  11. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#1 · os-project-manager · session_01FEkQ5mswnWm181XgYcCUag

    ACCEPT → PR #33725 comment 6893059465 (PR 1 of 2, contract; ready + auto-merge, K=11). Contract review PASS 6893043349. PR 2 (ADR-0011 / ADR-0151 notes, Tier H, Fixes #33689) follows the merge.

  12. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#1 · os-project-manager · session_01FEkQ5mswnWm181XgYcCUag

    Landed: PR #33725 (PR 1 of 2, the contract) merged as 1e65a389 (2026-11-15T11:03Z). ACCEPT 6893059465, contract review PASS 6893043349.

    Still owed on this card:

    • PR 2: the ADR-0011 / ADR-0151 amendment notes (Tier H, Fixes #33689), from the card thread.
    • Q1 (the in-app assistant door) goes to the maintainer; the contract is silent on it.
    • Q2, Q3 and Q4, plus review nits R1 (the run leg names no screen) and R2 (run.values required while the tool input is optional), go to the implementing card (the runtime and MCP switch). The seat writes them onto that card when it is filed.
  13. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#1 · os-project-manager · session_01FEkQ5mswnWm181XgYcCUag

    Ruling: Q1 (the in-app assistant door) → B · 2026-11-15T11:14Z

    Leehom ruled at 2026-11-15T11:10Z: he tapped 「B 同一规则,两套流程暂留」 on 「裁定应用内助手是否沿用 AI 入口确认规则」 (Fable decision thread cmsg_01TenzsRopZj4jMbvjX8uz1XPMKHfgJ7naSH783NCeTcFu; card cmsg_01TenzsRopZj4jMbvjX8uz1XR6o9Sbc4bviZwos9EB8ASG; choice record cmsg_01TenzsRopZj4jMbvjX8uz1XGFJJfgey2cnNvPraGKEtSR). The option as he read it: 「新规则对所有 AI 入口生效:只有本人、在登录状态下能同意,同意后按本人权限重查再执行。应用内确认卡保留,管理员代批改走暂挂审批。」

    What it means:

    • For a declared-gated action, the core rules bind every AI door, the in-app assistant included:
      • the caller's or the model's own confirmation never counts;
      • only the person the call ran as decides;
      • the deciding doors take a signed-in session only;
      • the approved action runs as that person, with permissions re-checked.
    • The in-app door keeps its own channel (the pending-approval card and inbox), and IAIService's pending members stay.
    • Merging the two seams was NOT ruled (option C was not taken). It is a later card.

    Where it goes:

    All three new cards wait. Leehom's order 「当前任务处理完,合并后就下班」 (2026-11-15T11:07Z) dispatches nothing new. Analysis: /mnt/project-files/pm-orders/spec/33689-q1-decision-analysis.md (project share).

  14. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#1 · os-project-manager · session_01FEkQ5kZuoX9F5S7p84Dwue
    os-dev-report

    {
    "issue": 33689,
    "status": "done",
    "pr_of_card": "2 of 2",
    "branch": "claude/project-thread-2tb5xl",
    "pr": "#33810",
    "head": "25d3c183",
    "base": "origin/main 1e65a38 (PR 1 #33725 merged)",
    "session": "session_01FEkQ5kZuoX9F5S7p84Dwue",
    "premise_still_valid": true,
    "summary": "PR 2 is docs only: ADR-0011 gains a header Amended line and a dated amendment note under 'Confirmation (HITL approval queue)' recording the merged contract by symbol (ai-service.ts#AI_ACTION_CONFIRMATION_CAPABILITY, #IActionConfirmationService, #ACTION_CONFIRMATION_SERVICE): which calls, the three steps (elicit; hand off, the person the call ran as decides, approval runs as them re-checked, resume_run resumes its run, approve/reject doors take a signed-in session only; refuse no_confirmation_service only with no service registered), confirm never counts, neither answer proves a human, bounds (delete tools keep the member, REST /actions for a person), the in-app assistant door stated OPEN (Q1), when it binds (until the implementing change the gate is #actionConfirmationRefusal on confirm: true, and the addendum's sentence stays the description of running code), and what stays unchanged (opt-in, H/C/E buckets, ADR-0151 D3 rule 3). ADR-0151 gains a header Amended line and a note after D3: rule 3 unchanged (refused whatever it sends, neither elicited nor handed off; reason service_account on every door from the implementing change); the pending-confirmation service is not the hold door rule 3 waits on (O6 stays separate); an OAuth agent acting for a person is not an account; until the switch the gate is #actionConfirmationRefusal / #isAiServiceAccountCaller. No decision reversed, no status line changed.",
    "tests": "docs only; no test added.",
    "gates": "dispatch-gates --commands on 25d3c18: 21 commands, each with timeout 900, exit captured before any pipe: 21 exit 0 (check:adr-symbol-anchors 3621 anchors resolve, check-adr-links 1131 destinations resolve, check:adr-anchors, check:adr-index, check:doc-authoring, check:pm-governed-merges, check:pm-prior-rulings among them). dispatch-gates --ran exit 0: 21 derived, 21 run, 0 NOT-MEASURED. check:partof-closing-keyword on the PR body exit 0. Record: /mnt/project-files/pm-orders/spec/33689-pr2-gates-ran.txt. CI not read.",
    "dogfood_battery": "not derived for this diff (docs/adr only, no (narrowing) arm)",
    "line_budget": "2 files, +62 / -0: ADR-0011 +39, ADR-0151 +23; under the human-merge threshold",
    "files_changed": [
    "docs/adr/0011-actions-as-ai-tools.md",
    "docs/adr/0151-ai-service-account-a-headless-agent-is-a-registered-principal-of-its-own.md"
    ],
    "declarations": "Clause-②: no; Metadata-protocol: none; no changeset (publishes nothing). Tier H: docs/adr/** — the maintainer approves and merges.",
    "pr_body": "/mnt/project-files/pm-orders/spec/33689-pr2-body.md (as sent with pr_create; read back identical)",
    "deviations": [
    "dispatch-gates --tier reads the MANDATORY contract-review tier for docs/adr/** with no one-line exit; this card thread authored the notes on its own tier, so the seat's contract review at the mandatory tier is the owed record.",
    "The branch was recreated from origin/main 1e65a38 (the old remote branch was deleted at merge); pushed as a new branch, no force."
    ],
    "mcp_calls": "0 this PR (2 read-only earlier in round 3)",
    "api_writes": "0 direct. git push x1; pr_create x1 via the relay (run 43707924300); this report via post-stamped.",
    "open_questions": [
    {
    "status": "needs_decision",
    "question": "Q1, the in-app assistant door: stated OPEN in the ADR-0011 note; the contract is silent on it.",
    "recommendation": "as in 6891502025 (A)"
    }
    ],
    "security_findings": "none",
    "out_of_scope_findings": [
    "carrier: the implementing card · Q2, Q3, Q4 and nits R1, R2, as the seat recorded in 6893367987 · not filed here"
    ]
    }

  15. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#1 · os-project-manager · session_01FEkQ5kZuoX9F5S7p84Dwue
    os-dev-report

    PR #33810 (PR 2 of 2) update, which supersedes the Q1 line of report 6893488418. The new head is ab50848a; the previous head was 25d3c183.

    • What changed: the ADR-0011 note cites the Q1 ruling. It reads: Ruling-ref: Leehom 2026-11-15T11:10:57Z, 「B 同一规则,两套流程暂留」, record 6893484458. The "OPEN" sentence is replaced by a bullet titled "The in-app assistant door: the same rule, its own channel". That bullet says:
    • Gates: dispatch-gates --commands on ab50848a derived the same 21 commands, and all 21 exit 0. --ran: 21 derived, 21 run, 0 NOT-MEASURED. check:partof-closing-keyword on the new body: exit 0. Record: /mnt/project-files/pm-orders/spec/33689-pr2-r2-gates-ran.txt.
    • Size: 2 files, +70 / -0.
    • PR body: the updated body for the seat to write is /mnt/project-files/pm-orders/spec/33689-pr2-r2-body.md. It changes the 速读 ask line, the in-app bullet, the head and the line count.
    • Open questions: none. Q1 is ruled.
    • Writes: mcp_calls 0. One git push, plus this report through post-stamped.
  16. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#1 · os-project-manager · session_01FEkQ5mswnWm181XgYcCUag

    ACCEPT → PR #33810 comment 6894219398 (PR 2 of 2, ADR notes, Tier H). Contract review PASS 6894204579 (review#1). Waiting on GOVERNED_APPROVER approval and merge; Fixes #33689.

  17. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#1 · os-project-manager · session_01FEkQ5mswnWm181XgYcCUag

    Landed: PR #33810 (PR 2 of 2, the ADR-0011 / ADR-0151 notes) merged as a84bcd86, approved and enqueued by os-zhuang. ACCEPT 6894219398, contract review PASS 6894204579 (review#1). Both PRs of this card are in: the contract (#33725, 1e65a389) and the ADR notes.

    Carried on: Q1 follow-ups #33808, #33809 and #33806 (queued). For the implementing card: Q2–Q4 and nits R1, R2 (record 6893043349); review#1 nits N1, N2 on #33810 go with #33808.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

domain:specenhancementpm:dispatchedpriority:p1

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions