qwen-code/integration-tests/cli
jinye f16975ee56
feat(serve): Add workspace session live-state endpoint and catalog version (#9261)
* docs(serve): Design workspace session live-state protocol

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

* docs(serve): Refine workspace session live-state design

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

* feat(serve): Add workspace session live-state endpoint and catalog version

Add GET /workspaces/:workspace/sessions/live-state: a memory-only
volatile snapshot (clientCount, hasActivePrompt, waiting flags) plus an
in-memory catalog version (generation+revision equality token), so
clients stop polling the persisted catalog for volatile state.

The bridge owns the clock: registration/removal marks flow through the
emitSessionLifecycle choke point; rename, automatic title, worktree,
and persisted branch commits mark at exact points; serve-layer REST/ACP
mutations share an invalidate-then-mark helper with exact no-op
semantics (deleted:false group deletes, removeSession:false cleanups,
no-op renames). The route exposes a new version only after
invalidating both persisted catalog scopes, enabling the client
live-A -> full catalog -> live-B reconciliation handshake.

Wire-additive: new unconditional capability
workspace_session_live_state, TypeScript SDK types and
DaemonClient/WorkspaceDaemonClient methods (native REST, no per-poll
capability preflight), telemetry label, and protocol/capability/SDK
docs. Required clock methods on AcpSessionBridge are a source-level
contract change for external structural implementations; in-repo fakes
updated.

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

* test(serve): Cover workspace_session_live_state in the serve integration baseline

The capabilities envelope E2E asserts the exact advertised feature list;
the new unconditional live-state capability must appear after the
archived-export tag, matching registry declaration order.

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

* docs(serve): Close the handshake-vs-single-request argument gap

Separate the two claims the earlier paragraph conflated: the catalog
path cost is irrelevant to carrying a version (it runs anyway on a full
reload), but stamp placement decides consistency. Stamp-after-scan can
silently accept a bundle missing a mid-scan mutation; stamp-first is
safe and self-heals within one poll cycle, which a client may
legitimately choose. The A/B handshake buys provable consistency for
one extra cheap live-state read; the server supports both and the
Web Shell PR picks per product tolerance.

* fix(serve): Mark catalog version on persisted session renames

The metadata route's SessionNotFoundError fallback renamed persisted
sessions without advancing the catalog revision, so version-watching
clients kept the stale display name. Mark after a successful persisted
rename (parity with the live path, which marks on an actual change).

Also reconcile the design doc summary with its Implementation
Boundaries (the implementation ships in this PR, not a follow-up) and
spell out the child-recording persistence mechanism behind the
auto-title catalog mark.

* test(serve): Pin catalog-mark and live-state behaviors from the review round

- Assert markSessionCatalogChanged in the scheduled-task rollback
  (including the no-op-removal negative case), the sub-session and
  Live coordinator rollback paths, and the never-live orphan
  deletion; previously each mark could regress with suites green.
- Cover the live-state route's ?? false projection for both wait
  flags, and its first-exposure invalidation arm (revision
  unchanged, both organized scopes refilled).
- Cover the side-task generation-closed rollback arm (kill, remove,
  catalog mark).
- Compile the SDK live-state type fence via tsconfig.test-fence.json
  so shape assertions really pin the wire contract; the default
  tsconfig excludes test/.
- Align the design doc's cache-consistency goal with the cache
  mechanics (waiters joined before an invalidation may resolve, but
  cannot install).

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-17 15:01:50 +00:00
..
_daemon-benchmark-helpers.ts test(cli): add daemon startup benchmark (#5825) 2026-06-25 06:56:13 +00:00
_daemon-harness.ts feat(mcp): reconcile MCP servers live on settings change (#5561) 2026-06-25 14:50:37 +00:00
_daemon-perf-report.ts feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00
_first-output-benchmark.test.ts test(integration): Measure immediate prompt dispatch stages (#7994) 2026-07-29 23:37:46 +00:00
_first-output-benchmark.ts test(integration): Measure immediate prompt dispatch stages (#7994) 2026-07-29 23:37:46 +00:00
acp-cron.test.ts fix(tests): avoid blocking integration test cleanup (#8688) 2026-08-08 02:17:17 +00:00
acp-integration.test.ts perf(review): extend the convergence pair to 3B (chunked) reviews (#8903) 2026-08-12 01:36:42 +00:00
cron-tools.test.ts feat(core): enable loop/cron tools by default (#4950) 2026-06-10 23:21:53 +08:00
daemon-invocation-context.test.ts feat(core): propagate trusted daemon invocation context (#7279) 2026-07-23 06:49:11 +00:00
edit.test.ts refactor(tests): reorganize integration tests by execution mode 2026-03-29 05:49:17 +00:00
extensions-install.test.ts fix(tests): await rig setup in Qoder plugin install integration test (#8793) 2026-08-09 08:31:39 +00:00
file-system.test.ts fix(integration-tests): make the project typecheckable and fix what that found (#8693) 2026-08-08 16:32:31 +00:00
gen-ai-telemetry.test.ts feat(telemetry): Trace main agent invocations (#9107) 2026-08-14 02:50:22 +00:00
json-output.test.ts refactor(tests): reorganize integration tests by execution mode 2026-03-29 05:49:17 +00:00
json-schema.test.ts fix(test): repair stale --json-schema integration assertion (#4075) 2026-05-12 12:00:57 +08:00
list_directory.test.ts fix(tests): avoid blocking integration test cleanup (#8688) 2026-08-08 02:17:17 +00:00
mcp_server_cyclic_schema.test.ts refactor(tests): reorganize integration tests by execution mode 2026-03-29 05:49:17 +00:00
mock-acp-typecheck.test.ts feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00
monitor.test.ts ci(e2e): stabilize MCP/CLI flows and cancel stale main runs (#4039) 2026-05-12 16:09:30 +08:00
notebook-edit.test.ts fix(integration-tests): make the project typecheckable and fix what that found (#8693) 2026-08-08 16:32:31 +00:00
qwen-config-dir.test.ts fix(tests): avoid blocking integration test cleanup (#8688) 2026-08-08 02:17:17 +00:00
qwen-daemon-first-output-benchmark.test.ts test(integration): Measure immediate prompt dispatch stages (#7994) 2026-07-29 23:37:46 +00:00
qwen-daemon-loadtest.test.ts feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00
qwen-daemon-startup-benchmark.test.ts test(cli): add daemon startup benchmark (#5825) 2026-06-25 06:56:13 +00:00
qwen-daemon-vs-cli-benchmark.test.ts feat(daemon): merge daemon-mode feature batch into main (#4490) 2026-06-12 00:34:49 +08:00
qwen-serve-baseline.test.ts refactor(cli): Remove serve bridge re-export shims (#5955) 2026-06-28 13:20:44 +00:00
qwen-serve-channel-workers.test.ts fix(cli): Preserve channel startup failure details (#6950) 2026-07-16 01:17:19 +00:00
qwen-serve-client-mcp.test.ts fix(ci): cover release integration regressions (#5994) 2026-06-29 11:54:11 +00:00
qwen-serve-live-journal-recovery.test.ts fix(integration-tests): ack daemon tool-guard handshake in the mock ACP child (#9159) (#9161) 2026-08-15 18:28:01 +00:00
qwen-serve-routes.test.ts feat(serve): Add workspace session live-state endpoint and catalog version (#9261) 2026-08-17 15:01:50 +00:00
qwen-serve-streaming.test.ts feat: support fork from any conversation (#8817) 2026-08-15 10:01:49 +00:00
qwen-serve-webui-live-journal-recovery.test.ts fix(acp-bridge): bound live journal replay chunks (#8801) 2026-08-10 09:52:17 +00:00
read_many_files.test.ts refactor(tests): reorganize integration tests by execution mode 2026-03-29 05:49:17 +00:00
run_shell_command.test.ts ci(e2e): stabilize MCP/CLI flows and cancel stale main runs (#4039) 2026-05-12 16:09:30 +08:00
save_memory.test.ts refactor(tests): reorganize integration tests by execution mode 2026-03-29 05:49:17 +00:00
settings-migration.test.ts fix(tests): avoid blocking integration test cleanup (#8688) 2026-08-08 02:17:17 +00:00
simple-mcp-server.test.ts fix(ci): restore release integration env controls (#5121) 2026-06-15 15:56:29 +08:00
sleep-interception.test.ts fix(integration-tests): make the project typecheckable and fix what that found (#8693) 2026-08-08 16:32:31 +00:00
stdin-context.test.ts fix(integration-tests): make the project typecheckable and fix what that found (#8693) 2026-08-08 16:32:31 +00:00
telemetry.test.ts fix(tests): avoid blocking integration test cleanup (#8688) 2026-08-08 02:17:17 +00:00
todo_write.test.ts fix(integration-tests): make the project typecheckable and fix what that found (#8693) 2026-08-08 16:32:31 +00:00
tool-search.test.ts feat(core): enable loop/cron tools by default (#4950) 2026-06-10 23:21:53 +08:00
utf-bom-encoding.test.ts refactor(tests): reorganize integration tests by execution mode 2026-03-29 05:49:17 +00:00
write_file.test.ts fix(integration-tests): make the project typecheckable and fix what that found (#8693) 2026-08-08 16:32:31 +00:00