Repository navigation
Description
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.
维护者速读
- 做什么:refusals: one throw answers one declared sentence — an action that refuses a selection for several reasons at once cannot list them in the person's language (after #34273) #36877 让服务端一次拒绝可以带多条已翻译原因,放在
details.refusals。MCP 现在只转userMessage(/data 上会截到 500 字),多条原因可能被截掉。改成把每条原因完整转给智能体。 - 谁受益:通过 MCP 操作的智能体和它背后的用户,能看到每一条被拒的原因。
- 不做会怎样:原因多时,智能体只看到被截断的一段,结尾那句可能丢。
- 需要你做的:无。
What
- When a coded refusal carries
details.refusals: [{ reason, message }](shape defined by refusals: one throw answers one declared sentence — an action that refuses a selection for several reasons at once cannot list them in the person's language (after #34273) #36877), the MCP tool result names every refusal line whole, in order, with the entry's closing line last, instead of relying on the (possibly 500-char-cut)userMessage. - Follow the existing FLOW_FAILED pattern (
flowFailureRelaySentence): read the details as the spec declares them, imported, never hand-spelled. Keep the The runtime dispatcher serialises a PermissionDeniedError'sdetailsto the client, sopositions/permissionSetsreach the browser on the/datatransport #7450 withholding rule forPermissionDeniedErrordetails.
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
userMessagewas 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.
Activity
objectstack-fleet commentedon Nov 26, 2026
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: #36877is open. On unlock it goes to seat 5 (area:ai zone).objectstack-fleet commentedon Nov 26, 2026
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.
objectstack-fleet commentedon Nov 26, 2026
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_01Utp6CZmwqAVSYHM1nQUDTqAccount:
os-billArea: o5-A
Branch:
claude/issue-37416-mcp-refusal-reasonsWorktree:
objectstack-issue-37416Domain:
domain:serverSeat:
repo:objectstack#5File surface:
packages/mcp/src/mcp-http-tools.ts, plus its tests in a new file named for this card, a@objectstack/mcpchangeset, andpackages/mcp/src/stdio-data-bridge.tsonly 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/maincc38a91a,packages/mcp/srchas no reader ofdetails.refusals.mcp-http-tools.tsrelaysuserMessage(L1375) and builds a relay sentence fromdetailsonly forFLOW_FAILED(flowFailureRelaySentence, L1386/L1429). The wire shape landed with PR #37395 (#36877), viapackages/spec/src/data/hook-refusal-codes.tsandhook.zod.ts.Serial constraints cleared: overlap-check on a probe branch over
mcp-http-tools.ts: clean (exit 0). No in-flight claim onpackages/mcp/**.Pre-claim lane:
domain:server(packages/mcp), kept in lanePre-claim deps:
Blocked-by: #36877closed (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
PermissionDeniedErrordetails. The #36877 ruling on the parent card defines the shape.objectstack-fleet commentedon Nov 26, 2026
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" ] }objectstack-fleet commentedon Nov 26, 2026
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, andPERMISSION_DENIEDanswers 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.