Commit graph

413 commits

Author SHA1 Message Date
qwen-code-dev-bot
9aa570446a
fix(integration-tests): ack the daemon tool guard in the mock ACP child (#9160) (#9162)
* fix(integration-tests): ack the daemon tool guard in the mock ACP child (#9160)

* fix(integration-tests): scrub the guard provider marker in the mock ACP child (#9160)

* fix(integration-tests): attach mock ACP child initialize _meta once (#9160)

---------

Co-authored-by: qwen-code-autofix[bot] <qwen-code-autofix[bot]@users.noreply.github.com>
2026-08-14 15:16:47 +00:00
ytahdn
c5bf222474
fix(webui): revert #8882's transactional session switching to the loading-skeleton model (#9129)
The transactional cross-session switching from #8882 staged a handoff and
kept the old attachment live until the target load committed. It added a
large transition state machine (intent staging, same-session capture,
watchdog deadlines, controlled rebind) across the daemon session layer
and the web-shell provider, and left the UI pinned to the previous
session while a switch prepared.

Restore the loading-skeleton model: switching a session clears the
transcript, shows the loading skeleton, and waits for the load result.

- Remove sessionTransition state, onSessionTransitionCommit and the
  transactional target logic from WorkspaceSessionProvider.
- Strip the transition state machine from DaemonSessionProvider and
  restore single-session restores: restore_in_progress retries stay
  bounded by the existing watchdog, and the skeleton UI keys on
  loadingTranscript.
- Move useDaemonSessionOwnerGuard back under the daemon index export.
- Delete the transactional design docs and both daemon integration
  tests; the restored behavior is covered by unit tests.
- Drop the dead desiredSessionTargetPending prop (write gating now keys
  on loadingTranscript alone) and stop a failed switch's target
  workspace from leaking into the next workspace-less load.

Co-authored-by: 钉萁 <dingqi.jww@alibaba-inc.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-14 08:00:25 +00:00
jinye
d670bb8109
feat(telemetry): Trace main agent invocations (#9107)
Some checks are pending
E2E Tests / E2E Test (Linux) - sandbox:docker - shard 1/3 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:docker - shard 2/3 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:docker - shard 3/3 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none - shard 1/3 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none - shard 2/3 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none - shard 3/3 (push) Waiting to run
E2E Tests / E2E Test - macOS - shard 1/2 (push) Waiting to run
E2E Tests / E2E Test - macOS - shard 2/2 (push) Waiting to run
E2E Tests / channel-plugin E2E (nightly) (push) Waiting to run
E2E Tests / cron-interactive E2E (nightly) (push) Waiting to run
E2E Tests / web-shell Browser Regression (push) Waiting to run
SDK Java / ubuntu-latest / Java 11 (push) Waiting to run
SDK Java / ubuntu-latest / Java 17 (push) Waiting to run
SDK Java / macos-latest / Java 21 (push) Waiting to run
SDK Java / ubuntu-latest / Java 21 (push) Waiting to run
SDK Java / windows-latest / Java 21 (push) Waiting to run
SDK Java / Real daemon E2E / Java 11 (push) Waiting to run
SDK Python / Classify PR (push) Waiting to run
SDK Python / SDK Python (3.10) (push) Blocked by required conditions
SDK Python / SDK Python (3.11) (push) Blocked by required conditions
SDK Python / SDK Python (3.12) (push) Blocked by required conditions
Security Checks / Dependency CVE audit (push) Waiting to run
Security Checks / Secret scan (TruffleHog) (push) Waiting to run
* feat(telemetry): Trace main agent invocations

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

* codex: address PR review feedback (#9107)

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

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-14 02:50:22 +00:00
ytahdn
a8bcaefea7
feat(web-shell): support workspace file uploads (#8874)
* feat: add web shell workspace file uploads

* fix(serve): accept plain string targets in shared atomic publisher (#8874)

* fix(review): bound web shell related paths

* fix(review): address web shell file upload review findings (#8874)

* test(serve): include upload capability in baseline

* fix(review): pin workspace_file_upload in the serve capabilities integration baseline (#8874)

* fix(review): address round-2 web shell file upload review findings (#8874)

* fix(review): address round-3 web shell file upload review findings (#8874)

* fix(review): address round-4 web shell file upload review findings (#8874)

* fix(review): address round-5 web shell file upload review findings (#8874)

* fix(review): address remaining file upload findings (#8874)

* fix(review): address round-6 web shell file upload review findings (#8874)

---------

Co-authored-by: 钉萁 <dingqi.jww@alibaba-inc.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev@service.alibaba.com>
Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev-bot@users.noreply.github.com>
2026-08-13 06:42:07 +00:00
jinye
9ff1519ac9
fix(webui): Close same-session refresh race gaps (#8990)
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-12 09:31:02 +00:00
jinye
5f29e7f788
fix(webui): make same-session refresh transactional (#8939)
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-12 06:20:26 +00:00
Shaojin Wen
16ff42bde7
perf(review): extend the convergence pair to 3B (chunked) reviews (#8903)
* perf(review): extend the convergence pair to 3B (chunked) reviews

The reverse-audit loop is 77-80% of the wall clock on long CI reviews
(measured on two v0.21.9 runs: 291min with 223min in the RA loop, 252min
with ~205min), and on 3B its rounds ran serially because the convergence
pair — rounds 1 and 2 launched together — was 3A-only.

The pair's arithmetic is per-territory, not whole-diff: a chunk dry in
round 1 leaves its slice of the cumulative findings list unchanged, so that
chunk's round-2 auditor re-runs substantively the same audit. Launching
`--all-chunks --round 1` and `--all-chunks --round 2` in one response runs
each chunk's two establishing audits concurrently, saving one round's wall
(~30-56min) off every chunked review — at the same one-round suppression
window the 3A pair and the pipelined loop already accept.

Orchestration-only: the CLI already builds round 2 before round 1's
transcripts exist (round 2 always fans out to every chunk; the retirement
schedule only reads history from round 3), and the deadline gate prices the
paired round-2 admission on its 600s floor exactly as the 3A pair relies on.
A new agent-prompt test pins that mechanism; SKILL.md carries the per-chunk
pair, and DESIGN.md the measurement.

* docs(review): fix the stale 3B parenthetical in the pipelined-loop bullet

The k=0 launch-coupling note still described 3B's first reverse-audit launch
as "round 1's fan-out"; with the convergence pair now applying to 3B it is
rounds 1 and 2 per chunk, matching the same fix already made at Step 4's
verifier-coupling paragraph.

* fix(review): price the 3B pair's wall at the gate and define its reporting transition

The deadline gate priced the concurrent 3B pair's round-2 build off the
seconds-old round-1 stamp — clamped to the observation floor — so both
members were committed at roughly one round's price even though their two
per-chunk fan-outs share the tool-concurrency pool and can take up to two
rounds' wall. Admissions whose predecessor is still in flight now pay both
members' wall in waves of the pool (expectedAdmissionSeconds): one round's
price when the pool holds both fan-outs at once, up to the two-round bound
when it serializes them, and the refusal degrades to round 1 alone as the
skill's budget-stop rule says.

SKILL.md's 3B pair also defined only the dry outcome; its reporting
transition now spells out waiting for both fan-outs, deduping across
rounds and chunks, one `--round 2` verifier batch riding round 3's build,
and the pair's exemption from the pipelined k/k+1 launch rule. DESIGN.md's
"packs tighter than two serial rounds ever could" claim is replaced with
the provable bound, and the gate's wave pricing is recorded beside it.

Tests pin the pair price (deadline.ts and the builder's refusal/admission
shapes) and the skill's same-response pair launch.

* fix(review): cover the both-refused pair shape and document the gate's pricing bounds

- Delegate expectedAdmissionSeconds' solo branch to expectedRoundSeconds,
  restoring one production round-cost estimator (R2-3).
- State that the pair price covers the auditor fan-outs only; the
  co-launched Step 4 verifier shards' extra wave is the reserve's to
  carry (R2-1).
- Document the pair-shaped span ledger's solo over-price as accepted
  conservatism, in the estimator doc and DESIGN.md (R2-6).
- Mirror the 3A pair annotation in the Step 5 3B copyable command block
  (R2-7).
- Make both pair refusal bullets orientation-symmetric and cover the
  both-builds-refused shape, where nothing launches and the first
  refusal's marker is the stop (R2-8).

* test(review): pin the 3B pair's reporting transition in the skill test

---------

Co-authored-by: verify <verify@local>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev@service.alibaba.com>
2026-08-12 01:36:42 +00:00
jinye
962dc8eadc
fix(serve): Keep restore request shapes distinct (#8933)
* fix(serve): keep restore request shapes distinct

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

* fix(webui): fence cancelled restore lifecycles

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

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-11 17:20:47 +00:00
jinye
74cfbccf49
fix(web-shell): Enforce prompt-safe session navigation (#8931)
* fix(web-shell): Enforce prompt-safe session navigation

Refs #8923

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

* test(webui): Harden session navigation cleanup

Refs #8923

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

* fix(web-shell): Preserve admission state across navigation

Refs #8923

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

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-11 14:33:35 +00:00
Nothing Chan
e6a3272271
feat(cli): expose reasoning effort through ACP (#8526)
* feat(cli): expose reasoning effort to ACP clients

* fix(cli): address ACP reasoning effort review

* fix(cli): address ACP reasoning effort review round 2

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

* fix(cli): migrate /effort dialog to applyReasoningEffort helper

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

* fix(acp): harden set_config_option routing and rejection messages (#8526)

---------

Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev@service.alibaba.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-11 10:32:33 +00:00
Nothing Chan
4ac606dd18
fix(core): restore deferred MCP tools on resumed sessions (#8475)
* fix(core): restore deferred MCP tools on resume (#8433)

* fix(core): reconcile resumed deferred MCP tools

---------

Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
2026-08-11 10:16:17 +00:00
jinye
00248b1a53
fix(webui): Make cross-session switching transactional (#8882)
* fix(webui): make cross-session restores transactional

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

* fix(web-shell): preserve sessions during navigation

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

* codex: address PR review feedback (#8882)

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

* fix(webui): address transactional switch review feedback

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

* fix(web-shell): preserve catalog updates across session switches

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

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-11 09:38:36 +00:00
ytahdn
1a2c5026b2
fix(web-shell): reconcile mid-turn messages with daemon state (#8798)
* fix(web-shell): reconcile mid-turn messages with daemon state

* test(serve): update mid-turn capability expectation

* test(mid-turn): cover reconciliation mutants and restore serve protocol docs (#8798)

* fix(serve): close mid-turn promotion admission and delivery gaps (#8798)

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

* fix(serve): keep anonymous mid-turn enqueues off the shared queue surface (#8798)

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

* fix(sdk): account for mid-turn APIs in bundle budget

* test(acp-bridge): use vi.waitFor for async prompt-drain assertions (#8798)

* fix(serve): reconcile mid-turn steering safely

* fix: reconcile mid-turn messages safely

---------

Co-authored-by: ytahdn <ytahdn@users.noreply.github.com>
Co-authored-by: 钉萁 <dingqi.jww@alibaba-inc.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev-bot@users.noreply.github.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev@service.alibaba.com>
2026-08-11 07:24:56 +00:00
易良
634567b138
test(acp): make exit plan mode test tolerant to LLM timeout (#8881)
* test(acp): make exit plan mode test tolerant to LLM timeout

The test sends a prompt asking the LLM to call exit_plan_mode, but LLM
behavior is non-deterministic — it may take too long or never call the
tool. Previously the test failed hard on timeout. Now it catches the
timeout and proceeds to verify whatever notifications were received,
matching the existing permissive stance already documented in the test.

* fix(test): re-throw non-timeout errors in exit plan mode test

The catch-all try/catch was suppressing JSON-RPC errors alongside
intended timeout tolerance. Guard the catch so only the harness
timeout ('Request … timed out') is swallowed; all other errors are
rethrown to surface real failures.

* fix(test): remove dead assert, polling wait, and stderr noise

- Remove stderr dump from the expected timeout path (noise on normal
  tolerated path; outer catch still dumps on real failures).
- Replace fixed delay(1000) with bounded polling (5 s) for
  mode_update after switch_mode to prevent new flake on slow-LLM
  runs.
- Move expect(promptResult).toBeDefined() back into try (the
  non-timeout guard now re-throws its AssertionError, so it is
  no longer dead code).

* fix(test): address review findings for exit plan mode test

- Expose agent from setupAcpTest so callers can check for crashes
- Detect dead agent in catch block before swallowing timeout
  (R1-1: agent crash was indistinguishable from slow LLM)
- Replace hand-rolled polling loop with rig.poll()
  (R1-2: duplicate of existing TestRig helper)

* fix(test): tighten timeout discriminator and log swallowed timeouts

- Match the exact harness timeout shape (Request N (session/prompt) timed out)
  instead of a substring to avoid swallowing JSON-RPC errors whose message
  happens to contain 'timed out' (e.g. MCP request timed out).
- Check for 'response' property to distinguish client-side timeouts from
  JSON-RPC error responses.
- Log swallowed timeouts so maintainers can tell which path executed.
2026-08-11 07:23:37 +00:00
jinye
fa8cae5418
fix(serve): Allow approved external built-in text writes (#8852)
* fix(serve): allow approved external built-in text writes

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

* fix(serve): keep write provenance off startup bundle

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

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-10 12:19:58 +00:00
Shaojin Wen
77bd04bd61
fix(acp-bridge): bound live journal replay chunks (#8801)
* fix(acp-bridge): bound live journal replay chunks

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

* test(core): isolate shell retention sidecars

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

* test(integration): cover aggregated live journal replay

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

* test(core): isolate registry sidecars

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

* fix(acp-bridge): keep unmodeled chunk keys out of live journal merges

The merged live-journal entry is rebuilt by spread-merging the first and
last source events, which was only safe because producers happen to emit
exactly {sessionUpdate, content, _meta?} on mergeable chunks. Gate the
merge on that key set so unmodeled data/update fields keep entries
discrete instead of leaking into the aggregate. Also clarify the
live-journal truncation marker: its retained/truncated counts describe
source events, while the limits count replay entries.

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

* fix(acp-bridge): align replay boundaries for discrete and meta-shaped chunks

Turn compaction folded discrete thought chunks (and non-todo-stop-guard
discrete messages) into one text slot with the last chunk's meta, while
the live journal keeps every discrete chunk separate — resyncing from
compactedReplay mis-attributed text across background tasks. Guard both
chunk paths with the same hasDiscreteMessageMeta predicate the live
journal already uses. Also align the merge gate with the shapes the
shared meta builder emits: tolerate update-level timestamp/
serverTimestamp and qwenTranscript.planToolCallId, and treat an
empty-string parentToolCallId as top-level the way the extractor does.
Document that byte-cap truncation drops whole entries, so the retained
tail can be much smaller than the cap, and tighten the integration
assertion that became vacuous once entries merge source chunks.

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

* fix(acp-bridge): merge subagent chunks in live journal replay

SubAgentTracker stamps every streamed subagent fragment with
{ parentToolCallId, subagentType }, but the live-journal merge gate
only modeled parentToolCallId, so subagent chunks stayed discrete and
a high-fragment subagent stream could still trip history_truncated.
Model subagentType as a carried label (like the completed-turn path,
which merges by parentToolCallId alone) and cover the producer wire
shape in the merge tests.

* fix(acp-bridge): preserve TextContent metadata in live journal replay (#8801)

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-08-10 09:52:17 +00:00
易良
d8c15b3456
fix(tests): await rig setup in Qoder plugin install integration test (#8793) 2026-08-09 08:31:39 +00:00
jinye
60458f5e37
fix(serve): Coordinate caller-supplied session IDs (#8415)
* fix(serve): coordinate caller-supplied session IDs

Complete daemon-wide admission across REST, ACP, workspace generations, SDKs, and MCP.

Closes #8411

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

* test(serve): wire session bridges in hot-reload harness

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

* fix(serve): address review round for caller-supplied session IDs (#8415)

Restore the observability and fail-loud guarantees flagged in review:
log every session-id admission routing failure, name the live foreign
owner workspace in restore conflicts, make the ACP dispatcher's
admission dependency required so load/resume cannot run on a mount
without one, and require mountAcpHttp hosts to inject the daemon-wide
admission instead of silently building a weak fallback. Harden the SDK
WS transport against environments without global fetch and against
non-capabilities 200 envelopes, and align the design doc with the
implemented restore-sharing and persistence-failure semantics.

* fix(sdk): harden session ID capability fallback

Preserve REST capability errors, fail closed on malformed envelopes, retain restore routing diagnostics, and align retry documentation.

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

* fix(serve): normalize restored session IDs

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

* fix(session): preserve mixed-case legacy session access

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

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev@service.alibaba.com>
2026-08-09 07:31:30 +00:00
callmeYe
39377fcff3
feat(daemon): add batch skill toggle API (#8664)
* feat(daemon): add batch skill toggle API

* test(serve): update capability integration baseline

* fix(daemon): apply skill batches atomically

* test(daemon): pin Skill batch toggle contracts and fix docs examples

* test(daemon): pin Skill batch toggle mutants flagged in review

* test(daemon): cover Skill batch toggle edge cases

* docs(daemon): clarify Skill batch toggle contract notes from review

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

* test(daemon): pin Skill batch toggle cap semantics and SDK surface shape

* test(daemon): pin Skill batch toggle mutants flagged in round-5 review

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev@service.alibaba.com>
2026-08-08 23:22:04 +00:00
callmeYe
33b124321c
feat(core): support Qoder plugin extensions (#8661)
* feat(core): support Qoder plugin extensions

* fix(core): address Qoder extension review feedback

* fix(core): handle annotated tags and unsafe parse errors

* fix(core): harden Qoder conversion edge cases

* fix(core): sanitize Qoder conversion inputs

* fix(core): address Qoder extension round-3 review feedback

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

* fix(core): honor explicit marketplace selection over Qoder manifest

* fix(core): preserve nested plugin update provenance

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-08 22:35:54 +00:00
jinye
3037744602
fix(integration-tests): make the project typecheckable and fix what that found (#8693)
* fix(integration-tests): make the project typecheckable and fix what that found

`tsc -p integration-tests/tsconfig.json` could not run at all. The config
carried a `"//"` documentation key inside `compilerOptions.paths`, and every
value there must be an array, so tsc aborted with TS5063 before checking a
single file. Nothing in CI runs it either, so the directory has been
unchecked for its whole life -- which is how PR #8620 shipped an
`integration-tests/cli/qwen-serve-streaming.test.ts` that referenced an
undeclared `REPO_ROOT`, swallowed the ReferenceError in a bare catch, and
reported a green skip for a security regression test.

Moving that note out of `paths` exposed 404 errors. Three more config
defects accounted for 353 of them:

- `composite: true` is inherited from the root config for the packages that
  are actually referenced. Composite requires every file in the program to
  appear in `include`, and these tests import package sources by relative
  path, so it produced 324 TS6307. Nothing references this project and it
  emits nothing, so it is now `composite: false`.
- The root `lib` is ES2023 only. The suite drives browser-side code in
  `terminal-capture/` and pulls SDK sources that name `WebSocket` and
  `HeadersInit`, so 21 identifiers resolved to nothing. Now DOM +
  DOM.Iterable + ES2023, matching packages/cli.
- Workspace packages resolved through `packages/core/dist` via a project
  reference, so with core unbuilt the checker reported a dozen members as
  missing from `Storage` that are right there in the source. They now
  resolve from source through `paths`, mirroring packages/cli, and the
  reference is gone.

node-pty declares `types` at the top level but its `exports` map is a bare
string with no `types` condition, so nodenext never reached the
declarations and every pty handle degraded to `any` -- which is what
silently untyped the `data` and `exitCode` callbacks in test-helper.ts. It
now resolves through `paths` as well. `@types/jsdom` is added for the one
file that uses it; DefinitelyTyped has no release matching jsdom 26 (it
jumps 21 -> 27), so this pins the current 28.x.

Two real defects fell out of the remaining 51:

- write_file.test.ts built a detailed tool-call failure message and passed
  it to `toBeTruthy()`, which takes no arguments. It was discarded on every
  failure, leaving only a bare literal.
- Two terminal-capture scenarios set `gif: true` inside `streaming`, where
  the runner never reads it. It is a scenario-level switch.

The rest was making an existing `undefined` visible. `readToolLogs()`
promised `name: string` for fields copied straight out of telemetry
attributes that nothing validates; the stdout fallback can promise them,
the telemetry branch cannot, and claiming otherwise just moved the
`undefined` past the type checker into the assertions.

This is type resolution only. `integration-tests/vitest.config.ts` keeps
its own hardcoded aliases onto the built SDK bundle, so the suite still
exercises the published-bundle shape at runtime.

Not wired into CI here, but not for cost reasons: a cold run of
`tsc -p integration-tests/tsconfig.json` takes about 106s on an idle
developer box. The program is 2679 files, of which 103 are integration
tests and roughly 1100 are package sources their own projects already
check, so there is duplicated work available to reclaim by resolving the
packages from their built declarations -- but at ~106s it is already cheap
enough to gate on as-is.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(integration-tests): isolate jsdom types and complete source-resolution paths

Address review round 1:

- external-context: override `types` to ["node"]. The root @types/jsdom
  entered its program through vitest's optional jsdom types and injected
  lib dom, flipping @types/node's fetch globals to DOM variants whose
  ReadableStream is not async-iterable (TS2504 in http-client.ts), which
  failed every CI job during the npm ci prepare build.
- integration-tests tsconfig: explicit nodenext paths entries for every
  workspace subpath the program imports (sdk/daemon, 19 acp-bridge
  subpaths, core goalWire/memoryScopes/userPromptSubmitContext, webui
  daemon-react-sdk, channel-base); drop the dead `*` wildcards; include
  **/*.tsx. Typechecks green with the source packages' dists removed.
- Relax noPropertyAccessFromIndexSignature in integration-tests and
  revert the six bracket-access rewrites it forced in SDK sources.
- channel-plugin: import channels/base from src and map
  @qwen-code/channel-base to source so both declarations agree.
- qwen-serve-streaming: asAccepted delegates to the SDK's exported
  isNonBlockingAccepted type predicate instead of a drifted copy.
- sleep-interception: tighten blocked predicates to success === false
  and fix the comment describing them.
- Declare jsdom at the root next to @types/jsdom.

* fix(integration-tests): complete source-resolution paths and restore single channel-base instance

Address review round 2:

- Map the eight builtin channel adapters and web-templates to source.
  channel-registry.ts and html.ts still resolved them through their
  exports maps to dist, so the typecheck's build-independence was
  incomplete: on a tree without built dists it failed with the exact
  9 x TS2307 the maintainer verification measured.
- channel-plugin.test.ts: import @qwen-code/channel-base by bare
  specifier instead of a relative src path. At runtime the test and
  plugin-example now resolve the same dist/index.js through the
  exports map, restoring the single ChannelBase / SessionRouter
  instance the relative src import silently split; type resolution
  still maps to source through paths, and vitest.config.ts keeps
  pointing e2e runs at the built bundles.

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev@service.alibaba.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev-bot@users.noreply.github.com>
2026-08-08 16:32:31 +00:00
Shaojin Wen
7b7ff19bc3
fix(tests): avoid blocking integration test cleanup (#8688)
* fix(tests): avoid blocking integration test cleanup

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

* fix(tests): avoid failing fast on telemetry waits for live CLIs (#8688)

* fix(tests): drop dead telemetry-ready return and gate rig tests (#8688)

* fix(tests): pin the gated rig test in the no-AK guard (#8688)

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev-bot@users.noreply.github.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev@service.alibaba.com>
2026-08-08 02:17:17 +00:00
Nothing Chan
c2026882b7
fix(acp): emit context usage updates (#8513) (#8528)
Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
2026-08-08 01:09:51 +00:00
Shaojin Wen
7942197666
fix(tests): apply integration worker limits to forks (#8689)
* fix(tests): apply integration worker limits to forks

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

* fix(tests): keep no-AK integration gate at two fork workers (#8689)

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

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: qwen-code-ci-bot <25325202+qwen-code-ci-bot@users.noreply.github.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev@service.alibaba.com>
2026-08-08 00:53:33 +00:00
Nothing Chan
675135e338
fix(cli): keep stream-json sessions alive after interrupt (#8509)
* fix(cli): keep stream-json sessions alive after interrupt

* refactor(cli): share turn request cancellation
2026-08-08 00:26:40 +00:00
jinye
26352fcc6a
feat(external-context): Add optional Mem0 memory writes (#8507)
* feat(external-context): Add optional Mem0 memory writes

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

* fix(hooks): Preserve confirmation content visibility

Render PreToolUse confirmation reasons literally and keep long confirmations accessible through the virtualized TUI. Add unit and interactive regression coverage for Mem0 write confirmations.

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

* fix(external-context): Address memory write review findings

Align Hook and MCP argument handling, distinguish definitive Provider rejections from ambiguous outcomes, improve deployment diagnostics, and document the write-back trust boundary.

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

* fix(hooks): Refine plain-text confirmations

Render URLs consistently, avoid persistent virtual viewport gaps, and document the literal-rendering and managed deployment boundaries.

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

* fix(external-context): Support Auto Edit write confirmation

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

* fix(external-context): Harden write confirmations

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

* fix(cli): Measure virtual row height directly

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

* fix(cli): Preserve YOLO Hook confirmation content

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

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev-bot@users.noreply.github.com>
2026-08-07 16:52:33 +00:00
Shaojin Wen
9e1b1eb49e
fix(tests): avoid blocking Vitest worker in directory E2E (#8685)
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-07 12:15:07 +00:00
jinye
bf3abdee81
fix(serve): Allow approved same-host text reads outside workspace (#8620)
Some checks failed
npm cache producer / Save npm cache (push) Has been cancelled
E2E Tests / E2E Test (Linux) - sandbox:docker - shard 1/3 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:docker - shard 2/3 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:docker - shard 3/3 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none - shard 1/3 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none - shard 2/3 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none - shard 3/3 (push) Waiting to run
E2E Tests / E2E Test - macOS - shard 1/2 (push) Waiting to run
E2E Tests / E2E Test - macOS - shard 2/2 (push) Waiting to run
E2E Tests / channel-plugin E2E (nightly) (push) Waiting to run
E2E Tests / cron-interactive E2E (nightly) (push) Waiting to run
E2E Tests / web-shell Browser Regression (push) Waiting to run
SDK Java / ubuntu-latest / Java 11 (push) Waiting to run
SDK Java / ubuntu-latest / Java 17 (push) Waiting to run
SDK Java / macos-latest / Java 21 (push) Waiting to run
SDK Java / ubuntu-latest / Java 21 (push) Waiting to run
SDK Java / windows-latest / Java 21 (push) Waiting to run
SDK Java / Real daemon E2E / Java 11 (push) Waiting to run
* fix(serve): allow same-host daemon text reads

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

* docs(serve): address review on same-host text reads

Record what the read capability does not fix: #8618 still reproduces for
the write and edit family, whose delegated writes are refused after the
user has already approved the diff. Give the daemon's pre-approval SSE
fan-out its own bullet in the user-facing security section, restore the
sentence stating that environment isolation is not an OS security
boundary, and make the design doc the single owner of the tradeoff list
so tuning a limit cannot leave stale copies behind.

Test fixtures no longer land in the developer's real home directory, the
assertion pinned to localized rejection copy is dropped, and the combined
capability case is split so deleting the write half cannot silently
remove read coverage.

* fix(test): declare REPO_ROOT and bind the external-read session to the daemon's workspace

The external-read regression test referenced REPO_ROOT twice without
declaring it, which made it unrunnable everywhere:

- On a developer box the ReferenceError was swallowed by the bare catch
  in findExternalReadBase(), every candidate was discarded, and the test
  reported a green skip -- exactly the silently-disabled security test
  the CI loud-fail added last round was meant to prevent. The guard was
  defeated three lines above itself.
- On CI that loud-fail branch threw at module scope, so the file failed
  to collect and took the four pre-existing tests down with it.

Declare REPO_ROOT the way every other daemon integration test does.

The session also asked for `workspaceCwd: REPO_ROOT` while beforeAll
binds the daemon with `--workspace workspaceDir`, so the create returned
400 Workspace mismatch even once the constant existed. The read under
test is external because externalReadDir sits outside the bound
workspace, not because the session claims a wider one.

Finally, collect each candidate's rejection reason instead of dropping
it, and fold it into both branches: the CI throw names why every
candidate failed and the developer-box skip warns with the same text.
A bare catch cannot tell "no /var/tmp on this image" from a bug in the
function, and the second reads as a green skip.

Reported by @wenshao, who reproduced all three consequences against a
real qwen serve daemon on Linux and supplied the repair.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-07 07:33:16 +00:00
Edenman
02f1692d40
fix(web-shell): allow session refresh with daemon auth (#8445)
* fix(web-shell): allow session refresh with daemon auth

* test(web-shell): cover SPA fallback shell branch for non-session navigations

* test(web-shell): retarget sec-fetch SPA fallback test to non-session navigation

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

* fix(web-shell): serve pre-auth navigations during the deferred runtime window

The deferred-runtime gate applied bearerAuth to every non-bootstrap
request while the runtime was cold, so a browser refresh of
/session/<id> (and / and /assets/*) 401'd on the default
`qwen serve --token ...` start until something else warmed the runtime.

Exempt the same surface mountWebShellAssets registers before auth, via a
shared isPreAuthWebShellRequest predicate, so cold document navigations
start the runtime and load the shell while JSON fetches, API subpaths,
and --no-web daemons stay gated. The predicate is dynamically imported
to respect the serve fast-path import-boundary guards.

* fix(cli): align deferred pre-auth web shell gate with warm routing (#8445)

* fix(cli): report daemon startup failure to pre-auth web shell navigations (#8445)

A pre-auth-exempted Web Shell navigation that hit a failed deferred
runtime startup fell through to the bootstrap app's bearer gate and
received a misleading 401 instead of the 503 daemon_runtime_failed
envelope authenticated requests get for the same failure. Track the
exemption in the deferred dispatch and answer the diagnostic envelope
directly. Also cover the deferred gate's HEAD exemption, which was
previously untested.

* fix(cli): exempt bare /assets from the deferred pre-auth gate (#8445)

* refactor(cli): dedupe runtime failure envelopes and deferred-window test setup (#8445)

* refactor(cli): rename startup envelope helper and pin query-string deep links (#8445)

* fix(cli): serve the // root alias pre-auth and fail-close the deferred predicate (#8445)

* docs(cli): record the pre-auth %2F session deep-link invariant (#8445)

* fix(test): isolate serve streaming suite from stray workspace settings (#8445)

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

---------

Co-authored-by: 克竟 <dingbingzhi.dbz@alibaba-inc.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev@service.alibaba.com>
Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-06 14:23:10 +00:00
jinye
3084326243
fix(webui): recover complete turns after live journal truncation (#8414)
* fix(webui): recover live journal turns

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

* fix(webui): address PR review feedback (#8414)

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

* fix(webui): refresh repair pagination anchor (#8414)

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

* fix(webui): restore evicted repair side effects

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

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-05 02:50:58 +00:00
qwen-code-dev-bot
29a18f90f3
test(integration): select acp-cron notification by source, not wall-clock (#8333) (#8336)
* test(integration): select acp-cron notification by source, not wall-clock (#8333)

* test(integration): remove tautological cron assertions (#8333)

* test(integration): address review — marker-only predicate, post-match assertion (#8333)

- Simplify 3a predicate to _meta.source === 'cron' only (content check
  was redundant for selection); assert content post-match so a prompt
  text regression fails loudly instead of timing out.
- Drop the residual receivedAt > promptDoneAt wall-clock guard on 3b
  and the now-unused promptDoneAt anchor — same race class this PR
  fixes, and the ordering is already established by control flow.
- Document 3b's reliance on notification ordering.

---------

Co-authored-by: qwen-code-autofix[bot] <qwen-code-autofix[bot]@users.noreply.github.com>
Co-authored-by: qwen-code-ci-bot <qwen-code-ci-bot@users.noreply.github.com>
Co-authored-by: Qwen Code Bot <qwen-code-bot@users.noreply.github.com>
2026-08-02 14:45:06 +00:00
易良
8300e21571
test(sdk-typescript): make permission control E2E deterministic (#8302)
* test(sdk-typescript): stabilize permission mode round trips

* test(sdk-typescript): make permission control deterministic

* test(sdk-typescript): distinguish plan-mode enforcement

* test(sdk-typescript): reuse fake tool server

* test(sdk-typescript): document fake-server request indexing

* test(sdk-typescript): strengthen permission control assertions per review (#8302)

* fix(sdk-typescript): fix red permission-control tests per review (#8302)

- Use write-classified command (touch) instead of read-only echo in
  plan-mode shell test, since echo is auto-approved by the scheduler
- Replace fragile requestIndex-based fake server handlers with
  content-aware matching in multi-turn tests, fixing request drift
  caused by internal SDK requests (memory, etc.)

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

* test(sdk-typescript): strengthen plan-mode assertions and deduplicate fake-server pattern per review (#8302)

* test(sdk-typescript): assert plan-mode message for shell block and fix edit plan-mode test per review (#8302)

---------

Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
Co-authored-by: qwen-code-ci-bot <qwen-code-ci-bot@users.noreply.github.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev@service.alibaba.com>
Co-authored-by: Qwen Code Bot <qwen-code-bot@users.noreply.github.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev-bot@users.noreply.github.com>
2026-08-02 03:33:29 +00:00
易良
7100ffb816
ci: gate merges on deterministic no-AK E2E (#8313)
* test(sdk-typescript): stabilize permission mode round trips

* test(sdk-typescript): make permission control deterministic

* test(sdk-typescript): make orchestration E2E deterministic

* test(sdk-typescript): make orchestration E2E deterministic

* ci: gate merges on deterministic no-AK E2E

* ci: gate merges on deterministic no-AK E2E

* Merge PR #8302 review follow-up

* test(sdk-typescript): distinguish plan-mode enforcement

* test(sdk-typescript): distinguish plan-mode enforcement

* ci: validate stacked gate against main

* ci: validate stacked gate against main

* test(sdk-typescript): reuse fake tool server

* test(sdk-typescript): reuse fake tool server

* test(sdk-typescript): stabilize model switch timing

* test(sdk-typescript): ignore E2E side queries

* fix(ci): enforce no-AK gate invariants

* test(ci): cover no-AK gate event wiring

* fix(ci): isolate no-AK gate environment

* test(ci): anchor credential isolation checks

* fix(ci): complete no-AK gate credential clearing and restore closed-query tests (#8313)

* fix(ci): harden no-AK gate per review feedback (#8313)

* test(ci): assert timeout-minutes on no-AK gate step (#8313)

---------

Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
Co-authored-by: qwen-code-ci-bot <qwen-code-ci-bot@users.noreply.github.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev-bot@users.noreply.github.com>
2026-08-02 02:21:14 +00:00
易良
8bdb0586a3
test(sdk-typescript): make orchestration E2E deterministic (#8312)
* test(sdk-typescript): make orchestration E2E deterministic

* test(sdk-typescript): make orchestration E2E deterministic

* test(sdk-typescript): stabilize model switch timing

* test(sdk-typescript): ignore E2E side queries

---------

Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
2026-08-01 16:39:34 +00:00
ytahdn
554c5e44ba
feat(web-shell): support mutable default mid-turn messages (#8229)
* feat(web-shell): support mutable default mid-turn messages

* fix(serve): register mid-turn removal telemetry route

* test(serve): update telemetry route totals

* fix(test): add session_mid_turn_message_mutation to expected features list

* fix(webui): forward clientId on cross-session mid-turn removal (#8229)

- Forward the session clientId in the cross-session removeMidTurnMessage
  branch so the bridge's exact-originator match can succeed; without it the
  removal resolved to an undefined originator and could never remove the
  message stamped at enqueue.
- Strip a misaligned/malformed messageIds from mid_turn_message_injected in
  asKnownDaemonEvent instead of rejecting the whole event, mirroring the
  sidechannel parser so a buggy daemon can't silently lose the injection
  signal.
- Log a mid-turn removal miss in the bridge like the enqueue/pending-removal
  siblings, to make removal races diagnosable from daemon logs.

* fix(web-shell): exclude annotations from mid-turn path and harden idle cleanup (#8229)

* fix(web-shell): add container-type to .queuedPrompts so @container query applies (#8229)

* fix(web-shell): harden mid-turn dedupe and capability gate per review (#8229)

- removeInjectedFromQueue now matches by id first (position-independent)
  and falls back to text only when no id match exists, so two same-text
  sends can't remove the wrong row and double-deliver.
- Thread canMutateMidTurn into useQueuedPrompts and gate the mid-turn
  delete/edit mutation on it, so the keyboard path can't hit a DELETE
  route the daemon doesn't advertise.
- asMidTurnMessageInjectedData omits a malformed messageIds key instead
  of leaving a present undefined, matching the sidechannel parser.
- Narrow MidTurnQueueItem.midTurnState, document the load-bearing effect
  order, and make clearQueuedPrompts return false on a no-op clear.

* fix: harden mid-turn removal per review (log escape, cross-session client id) (#8229)

- Escape the caller-controlled messageId (and sessionId) in the mid-turn
  removal-miss stderr line to prevent log injection (CWE-117).
- Forward the target session's persisted client id on cross-session mid-turn
  removal so the bridge's exact-originator match no longer rejects valid
  removals after a session switch with per-session client ids.
- Strengthen tests: distinct-id independence for two queued messages, deferred
  removal proving the composer waits for daemon removal, and the active-turn
  delete failed-action flag.

---------

Co-authored-by: 钉萁 <dingqi.jww@alibaba-inc.com>
Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
Co-authored-by: Qwen Code Autofix <qwen-code-autofix@users.noreply.github.com>
Co-authored-by: Qwen Code Bot <qwen-code-bot@users.noreply.github.com>
2026-08-01 10:41:29 +00:00
qwen-code-dev-bot
d962b82d1c
test(sdk-typescript): make abort-signal canUseTool E2E deterministic (#8297) (#8300)
Co-authored-by: qwen-code-autofix <qwen-code-autofix@users.noreply.github.com>
2026-08-01 09:55:48 +00:00
qwen-code-dev-bot
196549dc81
fix(integration): use QWEN_CODE_TEST_CRON_FAST in acp-cron test (#8237) (#8243)
* fix(integration): use QWEN_CODE_TEST_CRON_FAST in acp-cron test (#8237)

The acp-cron E2E test relied on real minute-boundary cron timing,
waiting up to 75s for the scheduler to fire. This made it flaky in
CI where timing is unpredictable. The interactive cron test already
uses the QWEN_CODE_TEST_CRON_FAST test seam to auto-fire after 5s;
apply the same approach here and reduce the wait timeout to 30s.

* fix(test): pin cron delay and fix stale timeout comment (#8237)

* fix(integration): restore 75s cron-fire fallback timeout in acp-cron (#8237)

---------

Co-authored-by: Qwen Code Bot <qwen-code-bot@users.noreply.github.com>
Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev-bot@users.noreply.github.com>
2026-08-01 04:56:36 +00:00
qwen-code-dev-bot
48142a8bc9
test(e2e): skip two model-flaky SDK E2E cases (#8256) (#8259)
* test(e2e): skip two model-flaky SDK E2E cases (#8256)

The async SDK MCP tool-handler case and the subagent-delegation case both
assert that a live model chooses to call a specific tool. That is
nondeterministic: the subagent case reproduces locally as the file-reader
subagent replying without calling read_file (foundSubagentToolCall false),
and the async case fails the same way when the model skips the tool call.
Both already survived three targeted fixes (assert on the deterministic
tool result, force the delegation prompt, inherit the suite timeout) plus
retry: 2 and the 5-minute suite timeout, then recurred on main. Skip them
with FIXME comments matching the existing model-flaky convention
(permission-control.test.ts, save_memory.test.ts). The durable fix is to
drive these turns with the fake OpenAI server harness the interactive
tests use; that is a larger change for a follow-up.

Co-authored-by: Qwen Code Autofix <qwen-code-autofix@users.noreply.github.com>

* test(e2e): reference tracking issue in skipped-test FIXMEs (#8256)

* test(e2e): correct FIXME failure description for sdk-mcp-server skip (#8256)

---------

Co-authored-by: Qwen Code Autofix <qwen-code-autofix@users.noreply.github.com>
2026-07-31 22:43:43 +00:00
qwen-code-dev-bot
af63c9d54e
test(e2e): inherit suite timeout in flaky subagent cases (#8244) (#8246)
The two subagent-execution E2E cases capped their timeout at 60s, below the suite's configured real-model E2E budget (TB_TIMEOUT_MINUTES, default 5m) that every other case in the file inherits. A delegated run is multi-turn (main agent delegates, subagent reads and reports, main agent summarizes), so under the slower docker sandbox plus CI load and model rate-limiting it can exceed 60s and fail all retry attempts. The failing main-branch run failed only in sandbox:docker while the same shard passed in sandbox:none, implicating timing rather than model nondeterminism. Drop the per-case 60s overrides so these cases use the same configured timeout as the rest of the suite. No assertions change.

Co-authored-by: Qwen Code Autofix <qwen-code-autofix@users.noreply.github.com>
2026-07-31 16:55:26 +00:00
qwen-code-dev-bot
e8d72673a9
test(integration): migrate acp-cron to fake-openai-server (#8076) (#8082)
* test(integration): migrate acp-cron to fake-openai-server (#8076)

* fix(integration): correct misleading requestIndex comment and remove no-op cleanup (#8076)

* test(integration): harden acp-cron diagnostics and isolation (#8076)

Fail fast when the cron_create tool call is not served to the first user
prompt instead of timing out opaquely 75s later, and dump the fake server
request log on failure so a dispatch shift is quick to diagnose. Close the
fake server even when test setup throws, drop the dead FAKE_SERVER_OPTIONS
(container mode is skipped by IS_SANDBOX), and move QWEN_HOME out of the
agent workspace cwd so workspace scans never see it.

* fix(integration): clear stale qwenHome before acp-cron test setup (#8076)

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

---------

Co-authored-by: qwen-code-dev-bot <269191875+qwen-code-dev-bot@users.noreply.github.com>
Co-authored-by: Qwen Code Bot <qwen-code-bot@users.noreply.github.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-07-31 14:13:42 +00:00
qwen-code-dev-bot
de26c2d805
fix(integration-tests): stabilize async SDK MCP tool handler E2E (#8222) (#8223)
Assert on the deterministic tool result instead of the model's paraphrased final text, which did not reliably echo the value verbatim and caused intermittent failures on main.

Co-authored-by: Qwen Code Autofix <qwen-code-autofix@users.noreply.github.com>
2026-07-31 12:25:29 +00:00
qwen-code-dev-bot
ec3c527cf6
fix(test): route setPermissionMode E2E timeouts through TEST_TIMEOUT (#8133) (#8135)
* fix(test): route setPermissionMode E2E timeouts through TEST_TIMEOUT (#8133)

The 'yolo to plan' and 'auto-edit' setPermissionMode tests hardcoded 10s/15s response timeouts while their passing sibling 'default to yolo' uses the CI-aware TEST_TIMEOUT (60s on CI). A single model round-trip routinely exceeds 30s on shared CI runners, so the tight values made these two tests time out waiting for the first/second response. Route all four hardcoded values through TEST_TIMEOUT to match the established CI-stability pattern.

* fix(test): widen closed-query test timeout to reduce flake risk (#8133)

---------

Co-authored-by: Qwen Code Autofix <qwen-code-autofix@users.noreply.github.com>
2026-07-31 07:39:01 +00:00
Shaojin Wen
702932cc7c
fix(test): make auto-edit permission E2E deterministic (#8154)
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-07-31 00:01:18 +00:00
Shaojin Wen
584f6a4bec
fix(test): allow slow permission mode E2E responses (#8149)
Some checks are pending
E2E Tests / E2E Test (Linux) - sandbox:docker - shard 1/3 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:docker - shard 2/3 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:docker - shard 3/3 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none - shard 1/3 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none - shard 2/3 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none - shard 3/3 (push) Waiting to run
E2E Tests / E2E Test - macOS - shard 1/2 (push) Waiting to run
E2E Tests / E2E Test - macOS - shard 2/2 (push) Waiting to run
E2E Tests / channel-plugin E2E (nightly) (push) Waiting to run
E2E Tests / cron-interactive E2E (nightly) (push) Waiting to run
E2E Tests / web-shell Browser Regression (push) Waiting to run
SDK Java / ubuntu-latest / Java 11 (push) Waiting to run
SDK Java / ubuntu-latest / Java 17 (push) Waiting to run
SDK Java / macos-latest / Java 21 (push) Waiting to run
SDK Java / ubuntu-latest / Java 21 (push) Waiting to run
SDK Java / windows-latest / Java 21 (push) Waiting to run
SDK Java / Real daemon E2E / Java 11 (push) Waiting to run
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-07-30 16:32:10 +00:00
ytahdn
0a3098a279
feat(web-shell): add contextual task panels (#7929)
* feat(web-shell): add contextual task panels

* fix(web-shell): harden contextual task panels

* fix(web-shell): preserve side task titles

* fix(web-shell): address review feedback on context panels PR (#7929)

- Add POST /session/:id/side-task to telemetry route catalog (51 routes)
- Increase SDK browser bundle size limit to 184KB
- Fix duplicated data-testid="chat-pane" → "chat-pane-container" on container
- Gate sourceType behind session_source_metadata capability check
- Add removeSession cleanup after killSession in !res.writable path
- Add i18n key sideTask.renameFailed for error fallback
- Add unit tests for selectVisibleHistoryRecords invariant

* fix(cli): update telemetry-catalog route drift guard to 51 routes (#7929)

* fix(web-shell): address review feedback round 2 on context panels PR (#7929)

- Fix /fork sider discarding createSideTask() return value: show toast
  when side tasks are unavailable
- Fix layout feedback loop: availableWidth no longer depends on
  environmentPanelVisible since the CSS overlay does not change the
  chat pane DOM width
- Remove dead environmentPanelSuppressed state (never set to true)
- Restore setArtifactPanelOpen(false) in closeArtifactPanelTab when
  the last tab is closed
- Extract agentDisplayName(task) to a local variable to avoid triple
  invocation per render

* fix(web-shell): dedupe completed background agents in environment panel (#7929)

getEnvironmentAgentTasks correlated a transcript tool card with the live
/tasks snapshot only on toolUseId, the notification taskId, and a
<subagentType>-<callId> derived id. A completed background agent can lose
that linkage (its live task carries no usable toolUseId and its daemon id
is general-purpose-<internalId>), so the trailing loop appended the live
task as a second entry. Add a conservative content fallback (prompt, or
description+subagentType) mirroring the daemon's legacy resolver.

* feat(web-shell): support side tasks during active turns

* fix(web-shell): deduplicate completed subagents and gate sourceType on capability (#7929)

* fix(web-shell): restore background agent reconciliation and fix agent dedupe (#7929)

Restore the one-shot subagent reconciliation for inline background Agent tool
cards. Persisted notification records do not always retain a toolUseId, so the
SSE discrete-notification path alone can leave a card stuck in Running; the
documented fallback resolves pending cards through the subagent endpoint after
catch-up, reconnect, and terminal notifications.

Also stop the loose description content fallback in getEnvironmentAgentTasks
from claiming a live task that another transcript tool call already links
precisely (by toolUseId, message taskId, or derived id). Two agents sharing a
description previously collapsed into one: the fallback stole the linked task,
its owner re-matched the same task, and the orphan was dropped.

* fix(web-shell): address critical review feedback on context panels (#7929)

* fix(web-shell): reconcile side-task state across sessions and listings (#7929)

* fix(web-shell): preserve contextual panel fallbacks

---------

Co-authored-by: 钉萁 <dingqi.jww@alibaba-inc.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev@service.alibaba.com>
Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev-bot@users.noreply.github.com>
Co-authored-by: qwen-code-ci-bot <qwen-code-ci-bot@users.noreply.github.com>
Co-authored-by: Qwen Code Autofix <qwen-code-autofix@users.noreply.github.com>
Co-authored-by: Qwen Code Bot <qwen-code-bot@users.noreply.github.com>
2026-07-30 13:45:30 +00:00
qwen-code-dev-bot
b2c77d224c
fix(test): give multi-model E2E turns more CI timeout headroom (#8108) (#8111)
Co-authored-by: Qwen Code Autofix <qwen-autofix@users.noreply.github.com>
2026-07-30 12:47:10 +00:00
jinye
f3ad4fcffb
feat(serve): page large text files by byte cursor (#8002)
* fix(serve): allow bounded reads of large text files

* fix(serve): bound large-text reads by scan cost, not by which knob was set

Follow-up to the bounded large-text read path. Three changes:

Gate on any explicit window argument, not on `limit`. Gating on `limit`
had the cost model backwards in both directions: `{ line: 900_000_000,
limit: 20 }` was admitted despite walking the whole file, while
`{ maxBytes: 4096 }` — satisfiable from the first 4 KiB — was refused. A
read with no window argument at all still fails, since a caller that
believes it holds the whole file may write it back truncated.

Add MAX_TEXT_SCAN_BYTES (8 MiB). MAX_READ_BYTES caps what a read
returns; nothing capped what it cost. Line offsets are resolved by
scanning from byte 0, so a query param could turn into an
uninterruptible multi-second scan of an arbitrarily large file — and on
Windows hold a read handle for that span, blocking renames and deletes.
Past the budget the read is refused with `file_too_large` pointing at
readBytes, which reaches any offset in O(1).

Tolerate appends on streamed windows. Requiring whole-file size/mtime
stability after reading a prefix rejected reads whose returned bytes
were still valid, and the case it rejected — tailing a live log — is the
one this path exists for. Streamed windows now assert inode identity
plus "did not shrink"; truncation and replacement are still rejected.

Also: non-UTF-8 large text now returns `binary_file` rather than
`file_too_large`, so a client retrying on 413 with a smaller window
can't loop forever; and `readFileWithLineAndLimit` throws instead of
silently ignoring a caller-supplied `fileHandle` on the by-path
fallback.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* refactor(core): thread the descriptor instead of forking text-read helpers

PR #7947 pinned large-text reads to one inode by threading a caller-owned
FileHandle into readTextRange as an optional field, plus a second field,
forceStreaming, to suppress the buffering fast path. Two optional fields
produced four combinations: one meaningful, one used by a single test, one
unreachable, and — in readFileWithLineAndLimit — one that silently fell
through to a by-path read, defeating the reason the caller opened a handle.

Unify the two encoding detectors. detectFileEncoding now takes a path or a
borrowed handle, so detectFileHandleEncoding is deleted along with the
message discrepancy between them: an encoding iconv-lite cannot load now
raises LargeNonUtf8TextError naming that encoding rather than deferring to
the decoder's generic invalid-utf8 variant. Both still refuse the file, and
the Serve boundary maps both to binary_file.

Split the reader into readTextRange (path) and readTextRangeFromHandle
(always streams, both byte bounds required). The unreachable combination and
its untested readFileHandleBuffer are gone, and with no fileHandle parameter
left for readFileWithLineAndLimit to ignore, the RangeError guarding that
fallthrough is deleted too — the trap can no longer be expressed.

CoreReadTextFileHandleRequest drops its required stats field. Nothing
downstream read it, and because the ACP request type it extends permits
extra properties, TypeScript accepted the dead argument silently.

readFileHandleChunks becomes chunksFromHandle(fh, from) — the one seam
byte-cursor text paging needs.

No observable change at the Serve boundary: its 222 tests pass unmodified.
Two fileSystemService tests were deleted rather than repaired; they asserted
the arguments readFileWithLineAndLimit received, which is nothing once the
handle path stops calling it. Their coverage lives in read-text-range.test.ts
against real files and in workspace-file-system.test.ts at the real boundary.

258 production lines in core, net -71 overall.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* refactor(core): make CoreReadTextFileHandleRequest standalone

Self-audit follow-up to f55c867a. Two fields survived the reshape that the
handle path never reads:

- `stats` was documented as required ("must pass the Stats captured from that
  handle") and nothing downstream read it. The handle path always streams, so
  it never needs a size to choose a strategy, and the encoding probe does its
  own fstat.
- `path` became dead once readTextRangeFromHandle replaced the path-plus-handle
  call. Errors are labelled with the path by the Serve boundary that owns it.

Neither was caught by the compiler: the ACP ReadTextFileRequest the type
derived from permits extra properties, so the CLI kept passing both silently.
That is the argument for declaring the type standalone rather than Omit-ing
four of six inherited fields and quietly re-admitting the rest.

Also record the second behaviour delta of the detector merge in the design
doc: detectFileEncoding catches I/O errors and falls back to 'utf-8', where
detectFileHandleEncoding let them propagate. The failure is not lost — a handle
that fails the 8 KiB probe fails the streaming read immediately after — but a
different call now reports it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* feat(serve): page large text files by byte cursor

Line offsets address a byte stream, so `readText` resolves them by scanning
from byte 0. Paging a large log that way is O(n^2) across pages, and past
MAX_TEXT_SCAN_BYTES (8 MiB) a deep page is refused outright — agents had no
O(1) path short of dropping to GET /file/bytes and splitting lines themselves,
losing encoding handling, multibyte safety, and the binary_file refusal.

A response that leaves content behind now returns `hasMore`, and where a file
byte offset is derivable, an opaque `nextCursor`. Passing it back as `cursor`
resumes in O(1). Page 1 is an ordinary `limit` read, so clients never compute
byte offsets themselves, and a paging loop does not break when a file happens
to be small.

The cursor is unsigned base64url JSON carrying {off, size, dev, ino}, matching
encodeOrganizedCursor rather than the HMAC-signed transcript codec: the path is
re-resolved through the workspace boundary on every request, so a forged cursor
can only move the offset within a file the caller may already read — what
GET /file/bytes?offset= allows today. What the payload is for is staleness:
a replaced or truncated file yields hash_mismatch instead of bytes from the
wrong place, while an append leaves an outstanding cursor valid — the case the
feature exists for.

Every minted cursor points at the start of a line. When a single line exceeds
maxOutputBytes the reader emits a truncated prefix and skips to the next line
rather than resuming mid-line, because a mid-line cursor makes the following
page snap forward and silently drop the rest of that line at the seam. Windows
cut mid-line by a byte cap therefore report hasMore with no cursor, as do
non-UTF-8 snapshot reads whose decoded text is a UTF-8 re-encoding with no
mapping back to file offsets. That is why hasMore is a field rather than a
restatement of nextCursor.

Cursor reads branch before the size check, not by widening the window gate:
a cursor read of a file under MAX_READ_BYTES would otherwise land on the
snapshot path, which knows only line/limit, and silently return line 0.

Adds the workspace_file_read_cursor capability, per the convention that new
behavior gets a new tag, and retargets the scan-budget hint at cursor paging.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(core): advance UTF-8 cursors after truncation

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

* docs(serve): clarify cursor bootstrap limits

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

* fix(sdk): raise daemon browser bundle budget

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

* test(serve): cover ACP cursor dispatch and cursor binary_file mapping (#8002)

* fix(core): only set sawCrlf for emitted lines in cursor paging (#8002)

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Qwen Code Bot <qwen-code-bot@users.noreply.github.com>
2026-07-30 12:07:05 +00:00
qwen-code-dev-bot
467ed9884d
fix(test): resolve turn completion on result messages in setModel E2E test (#8072) (#8075)
* fix(test): resolve turn completion on result messages in setModel E2E test (#8072)

* fix(test): apply result-only turn completion to permission-control tests (#8072)

* fix(test): add result-only turn completion comments to permission-control tests (#8072)

---------

Co-authored-by: Qwen Code Autofix <qwen-code-autofix@users.noreply.github.com>
2026-07-30 11:57:51 +00:00
qwen-code-dev-bot
7db57552e3
fix(integration): make interactive read-then-write test deterministic (#8060) (#8064)
Some checks are pending
E2E Tests / E2E Test (Linux) - sandbox:docker - shard 1/3 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:docker - shard 2/3 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:docker - shard 3/3 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none - shard 1/3 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none - shard 2/3 (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none - shard 3/3 (push) Waiting to run
E2E Tests / E2E Test - macOS - shard 1/2 (push) Waiting to run
E2E Tests / E2E Test - macOS - shard 2/2 (push) Waiting to run
E2E Tests / channel-plugin E2E (nightly) (push) Waiting to run
E2E Tests / cron-interactive E2E (nightly) (push) Waiting to run
E2E Tests / web-shell Browser Regression (push) Waiting to run
SDK Java / ubuntu-latest / Java 11 (push) Waiting to run
SDK Java / ubuntu-latest / Java 17 (push) Waiting to run
SDK Java / macos-latest / Java 21 (push) Waiting to run
SDK Java / ubuntu-latest / Java 21 (push) Waiting to run
SDK Java / windows-latest / Java 21 (push) Waiting to run
SDK Java / Real daemon E2E / Java 11 (push) Waiting to run
* fix(integration): make interactive read-then-write test deterministic (#8060)

Drive the multi-turn conversation with the fake OpenAI server instead of a
live LLM. The real model made this test flaky on main: it could choose
different tools, phrase the read result without the literal version, or
settle the first turn on its own schedule. Scripting the exact read-then-write
turns keeps the interactive mechanics (typed input, tool execution, file
mutation) under test while removing the nondeterminism, matching the
fake-server pattern already used by the other multi-turn interactive tests.

* fix(integration): add debug output to read-step assertions (#8060)

* test(integration): clarify scripted-echo assertion and verify request count (#8060)

* test(integration): ground version assertion in the read result (#8060)

Address review feedback: assert the read_file tool result the CLI sent
back (requests[1]) contains '1.0.0', so the version check observes the
real read result rather than only the fake model's scripted echo. Also
correct the flake rationale comment to cite the verified mid-stream
stall on turn 2 instead of an unsupported late-settle hypothesis.
2026-07-30 03:06:24 +00:00
qwen-code-dev-bot
4558bfa725
test(e2e): force delegation in flaky subagent case (#8070) (#8073)
The main agent runs in yolo mode with read_file registered, so the model sometimes read the file directly instead of delegating, failing the foundTaskTool assertion. Make the prompt require delegation and forbid direct reads, and make the subagent imperative about calling read_file. Tool restriction (coreTools/excludeTools) is not viable: the subagent shares the session permissionManager, so it would lose read_file too.

Co-authored-by: Qwen Code Autofix <qwen-code-autofix@users.noreply.github.com>
2026-07-30 02:44:54 +00:00