qwen-code/integration-tests/interactive
易良 509c310fd4
fix(core): surface PreToolUse ask content on MCP tool confirmations (#13687) (#13697)
* fix(core): surface PreToolUse ask content on MCP tool confirmations (#13687)

A PreToolUse 'ask' now merges into the tool's normal approval as one
confirmation, but withPreToolUseAskReason only handled edit/exec/info
confirmation details. MCP tools return 'mcp' details, which fell into
the default passthrough, so the hook's question and the exact content
it asked about were silently dropped: approving the plain MCP prompt
admitted the call blind (or, under YOLO, the forced confirmation showed
no content at all). Fall back to the literal-text info confirmation the
pre-merge hook bounce used, so the content stays reviewable and
expandable before approval.

The Mem0 write E2E test asserted the pre-merge two-dialog sequence:
MCP permission prompt, then a separate hook content prompt. Update the
scenarios to the merged single-dialog contract — one confirmation whose
heading is the hook's literal content, in every approval mode — and add
a scheduler unit test pinning the MCP fallback.

Fixes #13687. Unblocks the v0.25.1-preview.1 release run (#13696).

* fix(core): judge plan mode from the tool's real confirmation shape

A PreToolUse 'ask' on an MCP tool rewrites the confirmation to the
literal-text `info` shape, and `isPlanModeBlocked` exempts `info` — so a
hook-asked MCP call in plan mode flipped from a hard block into an
approvable dialog. Read the pre-rewrite shape in the plan-mode gate and
pin it with a regression test.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Patrol-Run: qwen-pr-closeout/jmuzv9c3wfd

* test(core): pin the hook-ask guard and name the MCP destination

The PreToolUse ask fallback for MCP calls now names the server and tool in
the dialog body: the `info` shape renders no title and carries no server
field, so the hook's reason alone need not identify the destination.

The MCP fixtures use a distinct `toolDisplayName` so the title assertion
discriminates which field production reads, and a new AUTO_EDIT test pins
the `!preToolUseAsk` term that keeps a hook-asked MCP write from being
silently auto-approved.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Patrol-Run: qwen-pr-closeout/jmuzzjnorfk

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-10-09 02:28:32 +00:00
..
command-output-visibility.test.ts fix(cli): report completion for saved workflow slash commands (#12415) 2026-09-27 03:30:09 +00:00
context-compress-interactive.test.ts test(integration): assert compress telemetry success (#11259) 2026-09-11 01:15:17 +00:00
cron-interactive.test.ts fix(e2e): Relax LLM-turn timeouts in monitor and cron interactive tests (#13002) 2026-09-29 08:45:30 +00:00
ctrl-c-exit.test.ts refactor(tests): reorganize integration tests by execution mode 2026-03-29 05:49:17 +00:00
external-context-auto-recall.test.ts fix(core)!: read command hook timeout in seconds (#11615) 2026-09-12 10:44:06 +00:00
external-context-mem0-write.test.ts fix(core): surface PreToolUse ask content on MCP tool confirmations (#13687) (#13697) 2026-10-09 02:28:32 +00:00
file-system-interactive.test.ts fix(integration): make interactive read-then-write test deterministic (#8060) (#8064) 2026-07-30 03:06:24 +00:00
hooks-command.test.ts test(integration): make the /hooks dialog E2E witness the rendered dialog (#13425) (#13427) 2026-10-05 12:41:26 +00:00
interactive-session.test.ts test(integration): let workflow-completion reply waits inherit the helper default (#13552) (#13555) 2026-10-08 09:09:39 +00:00
interactive-session.ts test(integration): let workflow-completion reply waits inherit the helper default (#13552) (#13555) 2026-10-08 09:09:39 +00:00
mid-turn-submit-interactive.test.ts fix(cli): Align OpenTUI mid-turn submit and exit with ink (#10883) 2026-09-03 09:31:05 +00:00
mixed-input-crash.test.ts fix(tests): avoid blocking integration test cleanup (#8688) 2026-08-08 02:17:17 +00:00
protocol-tags-interactive.test.ts fix(integration): configure Docker sandbox networking for submitted-prompt provenance test (#7879) (#7881) 2026-07-28 05:32:01 +00:00
submitted-prompt-provenance.test.ts fix(integration): configure Docker sandbox networking for submitted-prompt provenance test (#7879) (#7881) 2026-07-28 05:32:01 +00:00
workflow-completion.test.ts fix(workflow): show results and failures in /workflows run details (#13646) 2026-10-08 15:36:42 +00:00