Skip to content

Contract: AI-door confirmation rule binds every AI door, including the in-app assistant (#33689 Q1 ruled B) #33808

Closed

Description

@objectstack-fleet

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

Follow-up of #33689. Q1 was ruled B by Leehom on 2026-11-15 at 11:10:57Z: he tapped 「B 同一规则,两套流程暂留」. The ruling record is on #33689.

维护者速读

  1. 要做的:在 AI 入口确认契约里写明:新规则对所有 AI 入口生效,包括应用内助手。
  2. 为什么:同一个「需要确认」的声明,在哪个入口都该是同一条规则。两类待办进同一个收件箱,分开就留下一条旁路。
  3. 范围:只改契约文字和固定测试。应用内确认卡和 IAIService 的待批成员保持不变。
  4. 需要你做的:无。

Change (spec, packages/spec/src/contracts/ai-service.ts)

  • Rule 1 covers every AI door that starts a declared-gated action (ai.requiresConfirmation: true), not only MCP run_action / resume_run.
  • A paragraph on the in-app door. It asks through its own channel: the inline pending-approval card and the inbox. When that channel is not wired, the action is not offered. Three points change from ADR-0011's queue as documented:
    1. Who decides: only the person the call ran as, not any ai:approve holder. A host that wants a second person uses the existing held outcome (the approvals engine).
    2. Which credential: a signed-in session only. An API key, token or AI identity is refused.
    3. As whom it runs: as that person, with every gate re-checked.
  • IAIService's proposePendingAction / approvePendingAction / rejectPendingAction stay. State the three points on their docblocks.
  • Pins follow the new sentences.

Declarations (expected)

Clause-②: yes (narrowing): an ai:approve holder approving someone else's item, and any non-session credential, are refused. Also Metadata-protocol: semantic. Measure first-party exposure (ui inbox 21 files, client SDK, examples, skills) and state it.

Not in scope

Analysis: /mnt/project-files/pm-orders/spec/33689-q1-decision-analysis.md (project share). This card waits under 「当前任务处理完,合并后就下班」 (Leehom, 2026-11-15 at 11:07Z).

Activity

  1. added
    priority:p1
    pm:queue
    domain:spec
    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 audit → domain:spec · p1 confirmed · 2026-11-15T14:23Z

    ⛔ Not a claim. Requested by domain:spec#2 (mailbox comment 6895909249).

    Q1 of #33689 was ruled B on 2026-11-15 at 11:10:57Z. Under that ruling, the AI-door confirmation rule binds every door that starts a declared-gated action (ai.requiresConfirmation: true), the in-app assistant included. The in-app door may decide only as the person the call ran as, from a signed-in session, with every gate re-checked. Until the contract says so, the in-app door is a side path around a declared confirmation gate. That is a permission boundary (#32997 rule 4), so p1 stands. The change is contract text plus pinned tests in packages/spec/src/contracts/ai-service.ts; IAIService's pending-action members stay.

  3. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

    Claim: PM loop round 2 · 2026-11-15T15:09Z
    Session: session_01ADHkmQjrEpxMVxEiDUJHqC (seat); a card thread of this account's project is the dev and reports its session id
    Account: os-steve
    Branch: pending — the card thread's designated branch; a follow-up Claim: from this session names it before the dev builds
    Worktree: objectstack-issue-33808
    Domain: domain:spec
    Seat: domain:spec#2
    File surface: packages/spec/src/contracts/ai-service.ts, packages/spec/src/contracts/action-confirmation-contract.pin.test.ts, packages/spec/src/contracts/ai-service.test.ts, regenerated spec references, root .changeset/. ⛔ Not docs/adr/**, not service-ai routes (#33809), not the seam merge (#33806), not the runtime/MCP switch
    Container & model: M, mode:thread, model: default tier (dispatch-gates --tier: no path-derived mandate; contract text at a permission boundary, so the seat owes a CONTRACT_REVIEW_TIER review before the queue), effort: high
    Clause-②: yes
    Metadata-protocol: semantic
    Responsibility: n/a — contract follow-up of a ruling (#33689 Q1 → B), not a defect card
    Thread-read: 6896020249
    Premise: holds at origin/main 895783a: ai-service.ts (last touched by 1e65a38, PR #33725) states the confirmation rule for the MCP doors only; ADR-0011's note says the in-app door's three changes land through #33808. Ruling-ref: record 6893484458 on #33689, Leehom 「B 同一规则,两套流程暂留」. Order: /mnt/project-files/spec-seat2/33808-delta.md (project share).
    Serial constraints cleared: no open PR or pm:dispatched claim touches packages/spec/src/contracts/ai-service.ts (seat 1's #33757 is automation-service.ts; this seat's #33786 is execution-context.zod.ts / hook.zod.ts; #33634 is the i18n contract); #33806 and #33809 stay out.

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

    @objectstack-fleet
    ContributorAuthor

    domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

    Claim: PM loop round 2 · 2026-11-15T15:10Z (names the branch; supersedes claim 6896616396, same session)
    Session: session_01ADHkmQjrEpxMVxEiDUJHqC (seat); card thread session_01ADHkmSVGxoq1nRCWLaMKPd is the dev
    Account: os-steve
    Branch: claude/project-thread-yg8bqb (the card thread's designated branch; the platform lets a thread push only that branch, so not claude/issue-33808-*)
    Worktree: objectstack-issue-33808
    Domain: domain:spec
    Seat: domain:spec#2
    File surface: packages/spec/src/contracts/ai-service.ts, packages/spec/src/contracts/action-confirmation-contract.pin.test.ts, packages/spec/src/contracts/ai-service.test.ts, regenerated spec references, root .changeset/. ⛔ Not docs/adr/**, not service-ai routes (#33809), not the seam merge (#33806), not the runtime/MCP switch
    Container & model: M, mode:thread, model: default tier (dispatch-gates --tier: no path-derived mandate; contract text at a permission boundary, so the seat owes a CONTRACT_REVIEW_TIER review before the queue), effort: high
    Clause-②: yes
    Metadata-protocol: semantic
    Responsibility: n/a — contract follow-up of a ruling (#33689 Q1 → B), not a defect card
    Thread-read: 6896616396
    Premise: holds at origin/main 895783a: ai-service.ts (last touched by 1e65a38, PR #33725) states the confirmation rule for the MCP doors only; ADR-0011's note says the in-app door's three changes land through #33808. Ruling-ref: record 6893484458 on #33689, Leehom 「B 同一规则,两套流程暂留」. Order: /mnt/project-files/spec-seat2/33808-delta.md (project share).
    Serial constraints cleared: no open PR or pm:dispatched claim touches packages/spec/src/contracts/ai-service.ts (seat 1's #33757 is automation-service.ts; this seat's #33786 is execution-context.zod.ts / hook.zod.ts; #33634 is the i18n contract); #33806 and #33809 stay out.

  6. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#2 · os-steve · session_01ADHkmSVGxoq1nRCWLaMKPd
    os-dev-report

    {
      "issue": 33808,
      "status": "done",
      "branch": "claude/project-thread-yg8bqb",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34001",
      "session": "session_01ADHkmSVGxoq1nRCWLaMKPd",
      "premise_still_valid": true,
      "summary": "Contract text only in packages/spec/src/contracts/ai-service.ts: rule 1 of AI_ACTION_CONFIRMATION_CAPABILITY now covers every AI door that starts a declared-gated action, the in-app assistant's action tools included; a new section states the in-app door's own channel (pending-approval card plus inbox, not offered when unwired) and its three points (only the person the call ran as decides, ai:approve no longer lets another user decide, second approver via held; signed-in session only; runs as that person with every gate re-checked), plus its bounds (two seams) and its FROM half. The IAIService proposePendingAction / approvePendingAction / rejectPendingAction docblocks state the same points; no export, type or signature moves. Pins follow the new sentences in both named test files; no forced test edit. Changeset @objectstack/spec minor with both declaration lines, Skills-docs follow-up and FROM/TO.",
      "tests": "At 10b5d04b: pnpm --filter @objectstack/spec test exit 0 (Test Files 842 passed, Tests 26961 passed | 1 todo); spec typecheck exit 0; check:generated exit 0 (14 artifacts up to date, nothing regenerated); the 3 touched pin files 46/46. Reverse verification: ai-service.ts set to 895783a1's text, the 4 new tests red (Tests 4 failed | 36 passed, lock VERDICT command-exit 1), the listPendingActions control and all pre-existing tests green; restored with git checkout HEAD --, hash equal to HEAD blob, git diff HEAD empty. No ablation: the diff is prose plus prose pins (os-dev: docs are not ablated). Consumer: ui plugin-chatbot spec-symbol-batch6.test.ts from the ui root 22/22; mcp and runtime import IAIService for chat and the tool registry only, no test imports the pending members, no type moved, so not run.",
      "gates": "dispatch-gates --commands at 10b5d04b (merge base 895783a1, 4 paths): 84 derived, 84 run, all exit 0; --ran: 0 NOT-MEASURED, 0 UNRUN. Four first answered exit 3 (prerequisite) and were re-run green after it: check-plugin-teardown-shape --self-test (fixture commit 621a4876 fetched into the shallow clone), check:doc-formula-expressions (after building formula and lint), check:dual-build-cjs-loads and check:lean-entry-closure (after full pnpm build, 119/119, VERDICT command-exit 0). Local-only check:dev-prereqs exit 0. Full list in the PR body. CI check-runs: in_progress at report time (not waited on).",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm on the claim's Clause-② line",
      "files_changed": [
        ".changeset/33808-ai-door-confirmation-in-app.md",
        "packages/spec/src/contracts/action-confirmation-contract.pin.test.ts",
        "packages/spec/src/contracts/ai-service.test.ts",
        "packages/spec/src/contracts/ai-service.ts"
      ],
      "line_budget": "236 changed lines (+228 / -8), under the 3000 human-merge threshold; no skills/** file touched",
      "deviations": "none against os-dev or the order. PR assignee left unset: the harness asked for os-steve as assignee best-effort, but the order allows writes only through the relay and pr_create sent none; the seat may set it.",
      "mcp_calls": "5 — reads only: issue_read get x1, issue_read get_comments x3, pull_request_read get x1; no MCP write",
      "api_writes": "2 — fleet-write relay pr_create (PR #34001, 14723 bytes sent = stored) and this os-dev-report comment via post-stamped.mjs; plus git push of the branch (not a REST write)",
      "open_questions": [
        {
          "question": "ProposePendingActionInput.proposedBy stays optional, yet the contract now makes the recorded person the sole decider. Where is that gap closed?",
          "options": [
            "A — the in-app door's implementing card refuses to queue an item without the person (a door rule, no spec shape change)",
            "B — a separate spec card makes proposedBy required (contract shape change, ADR-0087 path)"
          ],
          "recommendation": "A, because it needs no shape change and the implementing card already owns the proposal path; B only if a host other than the runtime proposes items"
        },
        {
          "question": "The card wrote Clause-②: yes (narrowing); the claim carries bare yes, which this PR copies. Keep it?",
          "options": [
            "A — keep bare yes as claimed (no ADR-0087 marker, no dogfood battery owed)",
            "B — the seat re-claims with (narrowing): changeset then needs an ADR-0087 disposition marker and the dogfood battery runs on the final head"
          ],
          "recommendation": "A, because nothing changes at any door in the release carrying this text; the breaking narrowing lands with the implementing change, which declares (narrowing) there"
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: skills lane · skills/objectstack-ai/SKILL.md:163-166 (an operator approves or rejects in the AI Pending Actions inbox) and, after merge, a pointer update in ADR-0011's amendment note (land through #33808) · noted, not filed",
        "carrier: the in-app door's implementing card · content/docs/api/client-sdk.mdx:418-426 and packages/client/src/index.ts:7712-7717 (deciding takes ai:approve), content/docs/ai/actions-as-tools.mdx:236-241 (an operator resolves it) describe today's queue and move with enforcement · noted, not filed",
        "carrier: domain:ui with the implementing card · ui/packages/plugin-chatbot/src/usePendingActions.ts:385,396 and useHitlInChat.ts:223-231 decide items with credentials include plus caller headers (may carry Authorization); the inbox will need to stop offering others' items to an operator once enforced · noted, not filed",
        "carrier: #33809 (cloud) · the service-ai approve and reject routes that enforce the three points live in cloud · noted, not filed"
      ]
    }

    Stamped 2026-11-15T15:46Z.


    Generated by Claude Code

  7. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

    Claim: PM loop round 2 · 2026-11-15T15:53Z (corrects the Clause-② line to the narrowing arm per contract review M1, PR #34001 comment 6897177404; supersedes the previous claim, same session and branch)
    Session: session_01ADHkmQjrEpxMVxEiDUJHqC (seat); card thread session_01ADHkmSVGxoq1nRCWLaMKPd is the dev
    Account: os-steve
    Branch: claude/project-thread-yg8bqb (the card thread's designated branch; the platform lets a thread push only that branch, so not claude/issue-33808-*)
    Worktree: objectstack-issue-33808
    Domain: domain:spec
    Seat: domain:spec#2
    File surface: packages/spec/src/contracts/ai-service.ts, packages/spec/src/contracts/action-confirmation-contract.pin.test.ts, packages/spec/src/contracts/ai-service.test.ts, regenerated spec references, root .changeset/. ⛔ Not docs/adr/**, not service-ai routes (#33809), not the seam merge (#33806), not the runtime/MCP switch
    Container & model: M, mode:thread, model: default tier (dispatch-gates --tier: no path-derived mandate; contract text at a permission boundary, so the seat owes a CONTRACT_REVIEW_TIER review before the queue), effort: high
    Clause-②: no (narrowing)
    Metadata-protocol: semantic
    Responsibility: n/a — contract follow-up of a ruling (#33689 Q1 → B), not a defect card
    Thread-read: 6897100164
    Premise: holds at origin/main 895783a: ai-service.ts (last touched by 1e65a38, PR #33725) states the confirmation rule for the MCP doors only; ADR-0011's note says the in-app door's three changes land through #33808. Ruling-ref: record 6893484458 on #33689, Leehom 「B 同一规则,两套流程暂留」. Order: /mnt/project-files/spec-seat2/33808-delta.md (project share).
    Serial constraints cleared: no open PR or pm:dispatched claim touches packages/spec/src/contracts/ai-service.ts (seat 1's #33757 is automation-service.ts; this seat's #33786 is execution-context.zod.ts / hook.zod.ts; #33634 is the i18n contract); #33806 and #33809 stay out.

  8. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#2 · os-steve · session_01ADHkmSVGxoq1nRCWLaMKPd
    os-dev-report

    {
      "issue": 33808,
      "status": "done",
      "branch": "claude/project-thread-yg8bqb",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34001",
      "session": "session_01ADHkmSVGxoq1nRCWLaMKPd",
      "premise_still_valid": true,
      "summary": "Rework round 1 after contract review FAIL 6897177404, head b091e451. M1: the changeset is now feat(spec)! with Clause-②: no (narrowing) (claim 6897186176), Metadata-protocol: semantic, the BREAKING-when-implemented banner and the ADR-0087 marker registered in-app-pending-action-decided-by-person, matching the #33689 changeset; the new semantic entry packages/spec/src/migrations/entries/semantic/18.in-app-pending-action-decided-by-person.ts carries the notice into the upgrade guide and os migrate meta. S1: one sentence in the in-app section says the three points bind EVERY item in the in-app queue, whichever trigger queued it (declared flag or destructive heuristic), because a row does not record why and the queue has one decider rule; pinned beside a control that rule 1 keeps the declared-flag predicate. N1-N3 and the proposedBy refusal are listed in the PR body under Follow-ups. PR title and body patched through the relay (signed trailer).",
      "tests": "At b091e451: spec build exit 0; migrations.test.ts with both pin files 198/198 (VERDICT command-exit 0); spec test exit 0 (Test Files 842 passed, Tests 26961 passed | 1 todo); spec typecheck exit 0; check:generated --fix (rebuilds spec first) exit 0, all 14 artifacts up to date, nothing written. An earlier check:generated on this head read check:docs stale while the gate sweep regenerated the git-ignored json-schema tree in the same worktree; the standalone check:docs gate and the self-building --fix both answer clean and git status stayed empty. Round-0 reverse verification stands for the round-0 pins; the S1 assertions sit in the same it with rule 1's declared-flag predicate as control. No ablation (prose and prose pins).",
      "gates": "dispatch-gates --commands at b091e451 (merge base 895783a1, 5 paths): 88 derived (round 0's 84 plus check:spec-changes, check:upgrade-guide, check:role-word, check:settings-bind-window), 88 run, all exit 0; --ran: 0 NOT-MEASURED, 0 UNRUN. check:type-check-debt first answered exit 3 (its build queued behind the dogfood hold, nothing measured) and was re-run under the lock: exit 0, 0 raw tsc errors. CI check-runs on b091e451: in_progress at report time (not waited on).",
      "dogfood_battery": "b091e451 · VERDICT command-exit 0 (held 31m30s, shared box) · Test Files 467 passed | 3 skipped (470) · Tests 3959 passed | 42 skipped (4001) · no failure",
      "files_changed": [
        ".changeset/33808-ai-door-confirmation-in-app.md",
        "packages/spec/src/contracts/action-confirmation-contract.pin.test.ts",
        "packages/spec/src/contracts/ai-service.test.ts",
        "packages/spec/src/contracts/ai-service.ts",
        "packages/spec/src/migrations/entries/semantic/18.in-app-pending-action-decided-by-person.ts"
      ],
      "line_budget": "302 changed lines vs merge base (+294 / -8), under the 3000 human-merge threshold; no skills/** file touched",
      "deviations": "one file outside the claim's listed surface: packages/spec/src/migrations/entries/semantic/18.in-app-pending-action-decided-by-person.ts, the semantic entry the ADR-0087 marker registers, as M1 asked the changeset to match #33689 (whose PR #33725 added its entry the same way); the claim's file surface may want that line. PR assignee still unset (relay writes only).",
      "mcp_calls": "11 across both rounds, reads only: issue_read get x1, issue_read get_comments x4, pull_request_read get x3, pull_request_read get_comments x2, plus ToolSearch schema loads not counted; no MCP write",
      "api_writes": "4 across both rounds — round 0: relay pr_create (#34001) and os-dev-report comment 6897100164; round 1: relay issue_patch on #34001 twice (title feat(spec)! and body, 17478 then 17715 bytes sent = stored; the second adds the migrations.test.ts reading the delta review 6897827483 asked for; seat-requested) and this report comment; plus git pushes of the branch",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: the in-app door's implementing card · must refuse to queue an in-app item without the person (proposedBy); N1 refusal delivery (a throw, not failed) on approve/rejectPendingAction; N2 lapse of an item whose person never answers · in the PR body's Follow-ups, noted, not filed",
        "carrier: a separate prose card (seat) · N3: proposePendingAction still lists has `confirmText` as a danger signal against skills/objectstack-ai/SKILL.md:153 · noted, not filed",
        "carrier: skills lane · skills/objectstack-ai/SKILL.md:163-166 and, after merge, a pointer update in ADR-0011's amendment note · noted, not filed",
        "carrier: the in-app door's implementing card · client SDK docblock packages/client/src/index.ts:7712-7717, content/docs/api/client-sdk.mdx:418-426, content/docs/ai/actions-as-tools.mdx:236-241 · noted, not filed",
        "carrier: domain:ui with the implementing card · ui/packages/plugin-chatbot/src/usePendingActions.ts:385,396 and useHitlInChat.ts:223-231 · noted, not filed",
        "carrier: #33809 (cloud) · the service-ai approve and reject routes · noted, not filed"
      ]
    }

    Stamped 2026-11-15T16:44Z.


    Generated by Claude Code

  9. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

    Landed · #33808 via PR #34001 · 2026-11-15T23:18Z

    probe reading
    PR #34001 MERGED, merge commit fa1fb6f4e0b162f768c340ea781ccba65c61c1f7 at 2026-11-15T23:18Z
    card #33808 closed by Fixes #33808

    State: pm:dispatched removed, assignee cleared, card done. Out-of-scope items are already filed: the implementing card #33809 (6898471548) and #34061.

  10. removed
    pm:dispatched
    on Nov 15, 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:specpriority:p1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions