Skip to content

MCP:一次拒绝带多条原因时,把 details.refusals 逐条转给智能体(接 #36877) #37416

Done
1 of 1 issue completed

Description

@objectstack-fleet

repo:objectstack#5 · os-bill · session_01Utp6Ca6EBDpTBZk8v46Jjv

Filing gate: ② review finding N2 of the seat's contract-tier L2 on PR #37395 (#36877), comment 7181155005; the seat asked the owning zone to file a carrier under the parent. Source: reviewer.
Grading: area:ai · Feature · p2 (with the parent) · reach: every action or hook refusal with several reasons reached through MCP, once #36877 ships · evidence: L2 N2; packages/mcp/src/mcp-http-tools.ts ~L1368–1379 relays userMessage and, for FLOW_FAILED only, a relay sentence built from details.

维护者速读

What

Acceptance

  • A refusal with several reasons reaches an MCP caller with every line whole; a single-reason refusal reads as today.
  • Pins for both, plus one where userMessage was cut at 500.

Order

After the #36877 server PR (#37395) merges; it defines the wire shape.

Blocked-by: #36877

Reader: zone o5-U files it; area:ai zone picks it up.
Dedupe: open issues for "details.refusals" and "MCP refusal reasons" return none besides #36877/#37403.

Sub-issues

Sub-issues

1 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. added
    enhancement
    priority:p2
    pm:blocked
    area:ai
    on Nov 26, 2026
  2. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Triage: lands in area:ai · domain:server · Feature · priority:p2 · pm:blocked · size S; rationale: the MCP doors should relay each reason of a multi-reason refusal (details.refusals) to the agent. This follows the #36877 ruling, so it takes the parent's p2.

    Blocked-by: #36877 is open. On unlock it goes to seat 5 (area:ai zone).

  3. added
    domain:server
    on Nov 26, 2026
  4. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Triage: unblocked — #36877 closed when PR #37395 merged, so the wire shape for several refusal reasons is now on main. pm:blocked → pm:queue. Reader: zone o5-A (repo:objectstack#5).

    PR #37395 and PR #37420 merged at 2026-11-26T04:45Z.

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CZmwqAVSYHM1nQUDTq

    Claim: PM loop round 4 · zone o5-A (area:ai p1/p2; the maintainer, verbatim, 2026-11-25T23:27Z project chat: 「再开两个专区,接ai ux 的 p1 p2 任务」; triage named o5-A as reader, 7183649919) · 2026-11-26T08:15Z
    Session: session_01Utp6CZmwqAVSYHM1nQUDTq
    Account: os-bill
    Area: o5-A
    Branch: claude/issue-37416-mcp-refusal-reasons
    Worktree: objectstack-issue-37416
    Domain: domain:server
    Seat: repo:objectstack#5
    File surface: packages/mcp/src/mcp-http-tools.ts, plus its tests in a new file named for this card, a @objectstack/mcp changeset, and packages/mcp/src/stdio-data-bridge.ts only if the stdio door renders the same refusal (declared in the report). Stop on breach and report.
    Container & model: S, mode:subagent, model: default — dispatch-gates --tier: "no path-derived mandate", effort: high — reason: S but not mechanical (wire-shape relay judgement), treated as M per 定档
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — not a defect card
    Thread-read: 7183649919
    Premise: holds. On origin/main cc38a91a, packages/mcp/src has no reader of details.refusals. mcp-http-tools.ts relays userMessage (L1375) and builds a relay sentence from details only for FLOW_FAILED (flowFailureRelaySentence, L1386/L1429). The wire shape landed with PR #37395 (#36877), via packages/spec/src/data/hook-refusal-codes.ts and hook.zod.ts.
    Serial constraints cleared: overlap-check on a probe branch over mcp-http-tools.ts: clean (exit 0). No in-flight claim on packages/mcp/**.
    Pre-claim lane: domain:server (packages/mcp), kept in lane
    Pre-claim deps: Blocked-by: #36877 closed (PR #37395 merged, plus PR #37420)
    Prior rulings read: check-prior-rulings --terms refusals,userMessage,FLOW_FAILED,relay: no ADR decision governs the MCP relay shape, and the card thread has no ruling. The card binds: read the details as the spec declares them, imported and never hand-spelled, and keep the #7450 withholding rule for PermissionDeniedError details. The #36877 ruling on the parent card defines the shape.

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CZmwqAVSYHM1nQUDTq
    os-dev-report

    {
      "issue": 37416,
      "status": "done",
      "branch": "claude/issue-37416-mcp-refusal-reasons",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/37497",
      "pr_number": 37497,
      "head_sha": "ef53eb6617",
      "session": "session_01Utp6CZmwqAVSYHM1nQUDTq",
      "container_and_model": "S, mode:subagent, model: default — dispatch-gates --tier: \"no path-derived mandate\", effort: high — reason: S but not mechanical (wire-shape relay judgement), treated as M per 定档",
      "premise_still_valid": true,
      "summary": "A refusal thrown as a declared reasons list now gets a second text block on every MCP tool that serves a door's userMessage (run_action, resume_run via errorResultFromThrown; the record data tools via dataDoorErrorResult). The block lists every line whole and in order, then the closing line. content[0] stays the door's envelope byte for byte, following the FLOW_FAILED pattern. Lines are read through declaredRefusalLines (@objectstack/types). H3 is disproved: the closing line is not in details, so it is read as the remainder of the error's own unbounded declaredUserMessage after the listed lines, and it is never invented when the text does not match. No relay on PERMISSION_DENIED (the #7450 rule), on a fault, or on an answer with no userMessage. H1 holds. H2: the reader is in packages/types, so no spec export was needed. H4: stdio-data-bridge.ts renders no tool result (both transports render through mcp-http-tools.ts), so it is untouched.",
      "tests": "New packages/mcp/src/mcp-refusal-reasons.test.ts: 14 passed (lock VERDICT command-exit 0). On ef53eb6617: pnpm --filter @objectstack/mcp typecheck && vitest run --maxWorkers=2 gave VERDICT command-exit 0, Test Files 86 passed (86), Tests 1540 passed (1540), check:test-typecheck OK. Ablation 1 (ablation-replace, relay text forced undefined, blob a3118141->335b2247): 7 failed / 7 passed. Ablation 2 (PERMISSION_DENIED guard removed, ->172d9385): 1 failed / 13 passed (the #7450 control, at create_record). Both restored: blob == HEAD, git diff HEAD empty. src imports, no rebuild needed.",
      "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack: 67 derived (3 paths vs merge base eaa9e5447), run on ef53eb6617 with exit codes captured before any pipe. 66 exit 0. pnpm check:dual-build-cjs-loads exit 3 = PREREQUISITE NOT MET (needs the whole workspace built): NOT MEASURED, CI Build Core runs it. --ran reconciliation: 67 accounted, 66 run, 1 NOT-MEASURED (derived from a recorded exit 3). PR check-runs: in_progress at report time, not awaited.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 — fleet-write relay pr_create (POST /repos/objectstack-ai/objectstack/pulls draft + POST /issues/37497/assignees), 1 os-dev-report comment via post-stamped (POST /repos/objectstack-ai/objectstack/issues/37416/comments); plus git push (not a REST write)",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted, not filed — delete_records groups refused rows by thrown message (rowRefusalOf) and relays no listed lines; no reach measured, recorded in PR Acceptance notes only"
      ]
    }
  9. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CZmwqAVSYHM1nQUDTq

    Closed out · 2026-11-26T10:08Z

    PR #37497 merged as b0505c0857. A refusal with several declared reasons now reaches an MCP caller with every line whole, in order, with the closing line last. content[0] is unchanged, and PERMISSION_DENIED answers are still withheld (#7450).
    Removing pm:dispatched. What is left (S1–S3, N1–N3 from contract record 7188290670) is on follow-up #37512, which belongs to the incoming ai agent.

  10. removed
    pm:dispatched
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:aidomain:serverenhancementpriority:p2

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions