qwen-code/integration-tests
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
..
baselines test(perf): add daemon baseline harness (#4175 Wave 1 PR 1) (#4205) 2026-05-17 00:41:26 +08:00
cli feat(serve): Add workspace session live-state endpoint and catalog version (#9261) 2026-08-17 15:01:50 +00:00
concurrent-runner refactor(tools): rename TodoWrite tool display name to TodoList (#5319) 2026-06-19 08:32:10 +08:00
fixtures fix(integration-tests): ack daemon tool-guard handshake in the mock ACP child (#9159) (#9161) 2026-08-15 18:28:01 +00:00
hook-integration fix(integration-tests): make the project typecheckable and fix what that found (#8693) 2026-08-08 16:32:31 +00:00
interactive fix(tests): avoid blocking integration test cleanup (#8688) 2026-08-08 02:17:17 +00:00
sdk-typescript fix(core): restore deferred MCP tools on resumed sessions (#8475) 2026-08-11 10:16:17 +00:00
terminal-bench fix(integration-tests): make the project typecheckable and fix what that found (#8693) 2026-08-08 16:32:31 +00:00
terminal-capture fix(integration-tests): make the project typecheckable and fix what that found (#8693) 2026-08-08 16:32:31 +00:00
channel-plugin.test.ts fix(integration-tests): make the project typecheckable and fix what that found (#8693) 2026-08-08 16:32:31 +00:00
fake-openai-server.test.ts fix(test): Restore first-output benchmark measurement validity and correct its artifact schema (#7820) 2026-07-28 06:51:03 +00:00
fake-openai-server.ts feat(core): add ARMS session user ID (#7921) 2026-07-28 11:10:38 +00: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.test.ts fix(tests): avoid blocking integration test cleanup (#8688) 2026-08-08 02:17:17 +00:00
test-helper.ts fix(integration-tests): make the project typecheckable and fix what that found (#8693) 2026-08-08 16:32:31 +00: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 fix(integration-tests): make the project typecheckable and fix what that found (#8693) 2026-08-08 16:32:31 +00:00
vitest.config.ts fix(serve): Coordinate caller-supplied session IDs (#8415) 2026-08-09 07:31:30 +00:00
vitest.firstoutput.config.ts fix(test): Restore first-output benchmark measurement validity and correct its artifact schema (#7820) 2026-07-28 06:51:03 +00: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