qwen-code/integration-tests/interactive
jinye 58797088be
feat(external-context): Add submitted-prompt auto recall (#7877)
* feat(external-context): add submitted-prompt auto recall

Add an opt-in Hook-only profile that derives bounded retrieval queries from submitted prompt provenance while preserving the existing on-demand MCP contract.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* fix(external-context): harden auto recall query sanitization (#7877)

Address review feedback on the submitted-prompt auto recall Hook:

- Bound the sanitizer input before the redaction regexes run so a
  worst-case prompt cannot drive the assignment regex into quadratic
  backtracking that blocks the event loop past the wall-clock budget.
- Test the whole assignment for secret names so a leading label such as
  "Deploy failed:" can no longer claim the match and leak an api_key=.
- Skip the interactive E2E under container sandboxes (docker/podman),
  matching the cron-interactive precedent.
- Restore real undici coverage for a malformed proxy environment value.
- Make the wall-clock-budget test exercise the internal timer rather than
  the provider timeout, and give the backtracking regression test a shape
  that actually backtracks.
- Clarify that the v2 top-level timeoutMs applies only to the on-demand
  MCP path, and note session-lifetime context accumulation in the design
  doc.

* fix(external-context): complete secret redaction, guard MCP config version (#7877)

Anchor the secret keyword to the name that owns the separator so a leading
prose label can no longer claim the match. This redacts spaced separators
(api_key = sk-...) and inline JSON ({"api_key": "..."}), and stops
over-redacting ordinary prose such as "readme: token refresh flow".

Also reject non-version-1 configs in runMcp with a clear startup error so an
auto-recall (v2) config cannot silently expose a second retrieval surface.

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Qwen Code Autofix <qwen-code-autofix@users.noreply.github.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev@service.alibaba.com>
2026-07-29 05:21:29 +00:00
..
context-compress-interactive.test.ts feat(core,cli): auto-compact follow-up — /compress instructions, PreCompact hook plumb, plan/subagent attachments (#4688) 2026-06-03 09:23:00 +08:00
cron-interactive.test.ts fix(cron): add deterministic test seam for cron-interactive E2E (#6987) 2026-07-15 17:39:15 +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 feat(external-context): Add submitted-prompt auto recall (#7877) 2026-07-29 05:21:29 +00:00
file-system-interactive.test.ts fix(integration): scale interactive read-then-write waits with env timeout (#7942) (#7943) 2026-07-29 02:16:13 +00:00
hooks-command.test.ts refactor(tests): reorganize integration tests by execution mode 2026-03-29 05:49:17 +00:00
interactive-session.ts feat(core): enable loop/cron tools by default (#4950) 2026-06-10 23:21:53 +08:00
mixed-input-crash.test.ts refactor(tests): reorganize integration tests by execution mode 2026-03-29 05:49: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