Files
qwen-code/integration-tests/installed
86f1338b86 feat(serve): batch workspace session live-state snapshots (#12513)
* feat(serve): batch workspace session live-state snapshots

* test(serve): include batch live-state capability in integration baseline

* fix(serve): close review gaps in the batch session live-state route (#12513)

Index POST /sessions/live-state in the REST reference's persisted-catalog
row so the docs contract sees the protocol section, give the batch route the
single-workspace route's server-side records (routing-failure warn on
untrusted members, daemonLog error on unexpected bridge failures), make the
mid-batch disconnect guard observable with an AbortController and a
macrotask yield between members, and move the duplicated member-failure,
generation-currency, and bound literals into workspace-route-runtime for
both plural batch routes. Six tests pin the new witnesses.

Co-authored-by: Qwen-Coder <[email protected]>

* fix(serve): align live-state scope docs and pin batch route guards (#12513)

Co-authored-by: Qwen-Coder <[email protected]>

* test(cli): pin grouped REST doc rows against bare SDK names and column shifts

Co-authored-by: Qwen-Coder <[email protected]>

* test(cli): fail closed on grouped REST doc rows and ambiguous SDK qualifiers

Co-authored-by: Qwen-Coder <[email protected]>

* test(serve): pin documented live-state batch bounds against silent drift (#12513)

Co-authored-by: Qwen-Coder <[email protected]>

* test(cli): isolate the suite from the operator's settings home (#12513)

The autofix verification gate runs the packages/cli suite with the host's
real HOME on a machine shared with other jobs. A malformed
$HOME/.qwen/settings.json there (observed content: "X") makes every
operator-settings reader fail closed at once — readOperatorSettingsScopes
is designed to refuse a corrupted policy file — and one such file failed
408 tests across 15 files in the measured gate rejection.

Pin a private empty QWEN_HOME per test-file process in the suite setup
when the environment did not select one, following the file's existing
doctrine for operator-owned environment. Tests that exercise QWEN_HOME
set, stub, or delete it themselves. settings.test.ts keys every
user-settings and .env path off a mocked os.homedir, so it now deletes
an ambient QWEN_HOME explicitly; with any ambient value set, 13 of its
tests fail regardless of this change.

* test(cli): harden the QWEN_HOME suite pin and batch maxima test (#12513)

- Pin on truthiness so an ambient empty QWEN_HOME no longer falls
  through to $HOME/.qwen, matching every production reader.
- Sweep the pinned home from afterAll instead of an 'exit' listener
  that vitest workers never fire (51 leaked dirs on src/config -> 0).
- Restore QWEN_DEBUG_LOG_FILE around loadCliConfig tests so the debug
  logger's fire-and-forget writes stop racing the sweep.
- Witness that the suite never resolves settings from the ambient
  $HOME/.qwen, and assert member shape in the 20-selector maxima half
  so twenty failed members cannot read as twenty snapshots.

* test(cli): keep AppContainer store work off the pinned per-file QWEN_HOME (#12513)

* test(managed-agent): settle fresh group leaders before age-judged sweeps (#12513)

A just-forked process can read in ps with procps's negative-elapsed
wraparound (e.g. 441077234-00:18:40), which parsePsElapsed deliberately
leaves undatable. An undatable leader judges every worker/group identity
'unknown', so an unwitnessed sweep conservatively holds the live process
and rejects unproven — flaking the real-process sweep tests within
milliseconds of the spawn. settledGroupTable now also waits for the
leader's row to be datable, and the four sweep sites that judged a fresh
process without the guard use it.

* fix(cli): keep the QWEN_HOME test pin unconditional and alive for the process lifetime (#12513)

The conditional pin honored an ambient QWEN_HOME, so agent-gate vitest
runs read and wrote the operator's live settings home; the teardown
sweep then deleted the live pin while un-awaited extension-store work
was still reading it, turning Test (ubuntu-latest) red on ENOENT. Pin
unconditionally, keep the pin for the process lifetime, reap stale pins
by age at setup, await the floated extensions-list handler, and add
teardown, pin, reaper, and memory-only-contract witnesses.

Co-authored-by: Qwen-Coder <[email protected]>

* fix(cli): keep the QWEN_HOME teardown witness inside test-setup.ts (#12513)

The previous commit registered the pin teardown witness as a second
setupFiles entry in packages/cli/vitest.config.ts, which deterministic
verification rejects as CI/verification machinery outside the PR
footprint. Revert vitest.config.ts and fold the witness into
test-setup.ts itself: vitest runs root-level afterAll hooks in reverse
registration order, so the hook registered immediately after the pin
runs last among this file's root hooks and still turns every file red
if a teardown sweep of the live pin is reintroduced below it
(mutation-probed). The separate witness setup file is deleted.

Co-authored-by: Qwen-Coder <[email protected]>

Co-authored-by: Qwen-Coder <[email protected]>

* test(integration): raise the installed distribution case ceiling

The tui-parity installed-distribution darwin-x64 leg failed on the
npx-lifecycle-enabled no-relaunch-fallback case with "Test timed out in
120000ms" (run 40537979533, job 122316223603). The five preceding cases
averaged ~117s on that host, right at the ceiling: startup alone can
spend the whole 90s ready-prompt budget there (#15677) and the /about
retry window is another 90s, so 120s cannot contain a healthy case.

Raise the per-case ceiling to 240s and keep the budget helper's note in
sync.

---------

Co-authored-by: 西岐 <[email protected]>
Co-authored-by: qwen-code-dev-bot <[email protected]>
Co-authored-by: qwen-code-ci-bot <[email protected]>
Co-authored-by: Qwen-Coder <[email protected]>
Co-authored-by: qwen-code-dev-bot <[email protected]>
Co-authored-by: qwen-code-autofix <[email protected]>
Co-authored-by: qwen-code-autofix <qwen-code-autofix@localhost>
Co-authored-by: qwen-code-autofix[bot] <qwen-code-autofix[bot]@users.noreply.github.com>
Co-authored-by: Qwen Autofix <[email protected]>
2026-10-31 21:40:40 +08:00
..