qwen-code/integration-tests
jinye 06549daa9b
fix(sdk): self-heal stale clientId on invalid_client_id prompts (#5797)
* fix(sdk): self-heal stale clientId on invalid_client_id prompts

After a daemon restart or session reload the daemon's in-memory client
registration is wiped, so a prompt sent with our now-unknown clientId is
rejected at admission with 400 invalid_client_id (PR #5784). That rejection
happens before the turn registers, so the prompt never ran and retrying cannot
double-execute.

DaemonSessionClient.prompt() now wraps the admission call (both the blocking and
non-blocking paths) in a self-heal: on invalid_client_id it re-registers via
resumeSession to obtain a fresh clientId and retries the admission exactly once.
A single-flight guard coalesces concurrent prompts so re-registration happens
once; any other error (and a second invalid_client_id) propagates.

Adds 6 tests covering both paths, the retry bound, the non-matching-error guard,
reattach-failure propagation, and concurrent single-flight.

Design: docs/superpowers/specs/2026-06-24-daemon-clientid-self-heal-design.md

🤖 Generated with [Qwen Code](https://github.com/QwenLM/qwen-code)

* test(integration): cover real-daemon invalid_client_id contract for self-heal

Adds an integration case to qwen-serve-routes.test.ts validating the three
real-daemon behaviors DaemonSessionClient's clientId self-heal depends on:
(1) an unregistered prompt clientId is rejected at admission with
400 invalid_client_id, (2) resume re-registers and mints a fresh clientId, and
(3) retrying admission with that clientId is accepted (202). Model-free: prompt
admission runs before any model call, so promptNonBlocking returns 202 on
acceptance without reaching the model.

🤖 Generated with [Qwen Code](https://github.com/QwenLM/qwen-code)

* fix(sdk): Adjust daemon browser bundle budget

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

* test(sdk): Cover clientId self-heal review cases

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

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-06-24 13:59:59 +08:00
..
baselines test(perf): add daemon baseline harness (#4175 Wave 1 PR 1) (#4205) 2026-05-17 00:41:26 +08:00
cli fix(sdk): self-heal stale clientId on invalid_client_id prompts (#5797) 2026-06-24 13:59:59 +08:00
concurrent-runner refactor(tools): rename TodoWrite tool display name to TodoList (#5319) 2026-06-19 08:32:10 +08:00
fixtures feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00
hook-integration feat(hooks): Add HTTP Hook, Function Hook and Async Hook support (#2827) 2026-04-16 10:10:33 +08:00
interactive feat(core): enable loop/cron tools by default (#4950) 2026-06-10 23:21:53 +08:00
sdk-typescript fix(test): count result messages instead of assistant messages in multi-model E2E test (#4341) 2026-05-20 10:42:51 +08:00
terminal-bench Terminal Bench Integration Test (#521) 2025-09-05 17:02:03 +08:00
terminal-capture test(integration): run no-AK smoke tests on PRs (#5607) 2026-06-22 19:41:32 +08:00
channel-plugin.test.ts docs(channels): add plugin developer guide and rename mock to plugin-example 2026-03-27 03:19:34 +00:00
fake-openai-server.test.ts test(integration): run no-AK smoke tests on PRs (#5607) 2026-06-22 19:41:32 +08:00
fake-openai-server.ts test(integration): run no-AK smoke tests on PRs (#5607) 2026-06-22 19:41:32 +08:00
globalSetup.ts feat(core): support QWEN_HOME env var to customize config directory (#2953) 2026-05-09 15:51:52 +08:00
test-helper.ts test(integration): harden flaky sleep-interception e2e against skipped tool calls (#4936) 2026-06-11 00:08:26 +08:00
test-mcp-server.ts # 🚀 Sync Gemini CLI v0.2.1 - Major Feature Update (#483) 2025-09-01 14:48:55 +08:00
tsconfig.json refactor(serve): 1 daemon = 1 workspace (#3803 §02) (#4113) 2026-05-15 12:44:36 +08:00
vitest.config.ts feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00
vitest.loadtest.config.ts feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00
vitest.terminal-bench.config.ts Fix E2E caused by Terminal Bench test (#529) 2025-09-08 10:51:14 +08:00