Skip to content

fix(serve): Bound ACP HTTP pre-attach buffers by bytes - #9007

Merged
doudouOUC merged 16 commits into
mainfrom
agent/daemon-acp-http-pre-attach-bounds
Aug 16, 2026
Merged

fix(serve): Bound ACP HTTP pre-attach buffers by bytes#9007
doudouOUC merged 16 commits into
mainfrom
agent/daemon-acp-http-pre-attach-bounds

Conversation

@doudouOUC

Copy link
Copy Markdown
Collaborator

What this PR does

This PR makes daemon-owned ACP HTTP pre-attach buffering bounded by both frame count and serialized payload bytes. It serializes buffered replies once into UTF-8 buffers, applies per-stream, per-connection, and process-global limits shared by primary and dynamic workspace mounts, retains budget ownership through stalled SSE or WebSocket delivery, and closes the exact session or logical connection on refusal instead of silently evicting an older frame.

It also makes session ownership grants transactional with local transport delivery. session/new, session/load, session/resume, and session/fork remain provisional until their JSON-RPC reply is locally delivered; teardown, overflow, serialization failure, or delivery failure rolls back fresh sessions, persisted forks, and new client attachments without revoking ownership that already existed. Notification forms of these ownership-granting methods no longer mutate state.

The daemon status and TypeScript SDK surfaces now expose the effective pre-attach limits, current and high-water frame/byte usage, pending delivery ownership, guard failures, per-mount attribution, and per-connection owned frames/bytes. The accompanying capacity and resumable-stream documentation records the compatibility changes and the remaining non-goals.

The first commit also corrects prepared-response estimation for JSON string escaping, UTF-8, and surrogate handling so admission matches the bytes that JSON.stringify actually emits.

Why it's needed

The existing 256-frame pre-attach cap controlled only item count and could silently drop an older frame. A small number of very large replies, multiple connections across dynamic workspaces, or an attached but stalled writer could still retain large buffers without a daemon-global byte boundary. Silent eviction was especially unsafe for id-less JSON-RPC replies because the client could wait forever for a response that had been discarded.

Session creation and attach operations were also recorded as owned before their reply was delivered. If a connection closed or overflowed before the client learned the session ID, the daemon could leave an unreachable fresh session, persistent fork, or bridge client attachment behind. Tying ownership to the local delivery result closes that lifecycle gap.

Reviewer Test Plan

How to verify

Run the focused ACP bridge tests and confirm the JSON string estimator matches JSON.stringify for every UTF-16 code unit, mixed escaping, surrogate pairs, and deterministic random strings.

Run the focused CLI transport tests and confirm the N+1 frame/byte admission closes only the correct owner, primary and dynamic workspace registries compete for one global budget, stalled SSE/WS delivery retains leases until callback/close, serialization re-entry cannot revive stale stream identities, replay-deferred replies preserve order, and every provisional ownership receipt is either committed after delivery or rolled back on teardown/failure.

Run the daemon status and SDK surface tests and confirm the new limits and runtime counters are stable when ACP HTTP is disabled and populated when enabled.

The committed E2E plan describes the real 128 × 1 MiB distinct-payload reproduction, cross-workspace global-budget competition, stalled writer inspection, and workspace disposal baseline check. That real daemon RSS scenario was not executed in this local pass.

Validation completed locally: ACP bridge focused tests 46/46, CLI focused tests 442/442, SDK public-surface tests 14/14, npm run build, npm run typecheck, npm run lint, and git diff --check.

Evidence (Before & After)

N/A — this is daemon transport, lifecycle, status, SDK type, documentation, and test coverage with no TUI change.

Tested on

OS Status
🍏 macOS ✅ tested
🪟 Windows ⚠️ not tested
🐧 Linux ⚠️ not tested

Environment (optional)

macOS, Node.js v24.12.0, repository npm workspaces and package-local Vitest configurations. The repository requires Node.js >=22; no Docker or sandbox runtime was used for the focused tests.

Risk & Scope

  • Main risk or tradeoff: The transport now fails closed when a pre-attach owner exceeds a frame or byte limit, and ownership becomes usable only after local reply delivery. This is intentionally stricter than retaining or evicting frames indefinitely.
  • Not validated / out of scope: Ordinary live SSE/WS new-frame queues, transient single-frame JSON.stringify amplification, remote exactly-once receipts, and the real 128 × 1 MiB daemon RSS E2E remain outside this PR or were not run locally.
  • Breaking changes / migration notes: The 257th frame on one pre-attach stream, a 1,025th frame or payload above 64 MiB on one logical connection, or the 4,097th frame / payload above 256 MiB globally closes the admitting owner instead of evicting an older frame. Shared WebSocket resource failures close with code 1013. Buffered objects are frozen at serialization time. Ownership-granting notifications no longer create or attach sessions, and request-form ownership cannot be used before its reply is locally delivered. Workspace/session count defaults and public standalone ACP behavior are unchanged.

Linked Issues

Tracking: #8091

中文说明

本 PR 做了什么

本 PR 为 daemon 自有的 ACP HTTP pre-attach 缓冲增加帧数和序列化 payload 字节数双重边界。缓冲回复只序列化一次并保存为 UTF-8 Buffer,同时应用单 stream、单 connection 和 primary/动态 workspace mount 共享的进程级全局限制;即使 SSE 或 WebSocket writer 已 attach 但阻塞,预算所有权也会保留到本地投递完成或明确失败。资源拒绝时不再静默淘汰旧帧,而是关闭精确 session 或逻辑 connection。

本 PR 还把 session ownership grant 与本地 transport delivery 做成事务闭环。session/newsession/loadsession/resumesession/fork 在 JSON-RPC 回复本地投递完成前保持 provisional;teardown、overflow、序列化失败或投递失败会回滚 fresh session、持久化 fork 和新增 client attach,同时不会撤销原本已经存在的 ownership。这些会授予 ownership 的方法以 notification 形式调用时不再执行 mutation。

daemon status 和 TypeScript SDK 现在会暴露有效的 pre-attach limits、当前和高水位帧数/字节数、pending delivery ownership、guard failure、每个 mount 的归因,以及每个 connection 自有的帧数/字节数。配套的 capacity 与 resumable-stream 文档记录了兼容性变化和剩余非目标。

第一笔 commit 还修复了 prepared-response 对 JSON 字符串转义、UTF-8 和 surrogate 的计费,使 admission 与 JSON.stringify 实际输出字节一致。

为什么需要

现有 256 帧 pre-attach 限制只控制条目数,并且可能静默丢弃旧帧。少量超大回复、多个动态 workspace connection,或已 attach 但阻塞的 writer,仍可能在没有 daemon 全局字节边界的情况下保留大量 buffer。对于无 id 的 JSON-RPC 回复,静默淘汰尤其危险,因为客户端可能永远等待一个已经被丢弃的响应。

session create/attach 操作之前也会在回复投递前就记录为 owned。如果 connection 在客户端得知 session ID 之前关闭或 overflow,daemon 可能遗留客户端无法访问的 fresh session、持久化 fork 或 bridge client attachment。把 ownership 与本地 delivery result 绑定可以闭合这一生命周期缺口。

Reviewer 测试计划

如何验证

运行聚焦 ACP bridge 测试,确认 JSON 字符串 estimator 对全部 UTF-16 code unit、混合转义、surrogate pair 和确定性随机字符串都与 JSON.stringify 一致。

运行聚焦 CLI transport 测试,确认第 N+1 个 frame/byte admission 只关闭正确 owner,primary 与动态 workspace registry 竞争同一全局预算,阻塞的 SSE/WS delivery 在 callback/close 前持续持有 lease,序列化重入不能复活 stale stream identity,replay deferred reply 保持顺序,并且每个 provisional ownership receipt 都只会在 delivery 后提交或在 teardown/failure 时回滚。

运行 daemon status 与 SDK surface 测试,确认 ACP HTTP 关闭时新 limits/runtime 字段保持稳定,开启时正确填充。

已提交的 E2E 计划描述了真实 128 × 1 MiB distinct payload 复现、跨 workspace 全局预算竞争、阻塞 writer 观察和 workspace dispose 后回到基线的验证流程。本次本地验证未实际执行真实 daemon RSS 场景。

本地已完成验证:ACP bridge 聚焦测试 46/46、CLI 聚焦测试 442/442、SDK public-surface 测试 14/14、npm run buildnpm run typechecknpm run lintgit diff --check

证据(Before & After)

N/A —— 本 PR 修改 daemon transport、生命周期、status、SDK 类型、文档和测试,不涉及 TUI 变化。

测试平台

OS 状态
🍏 macOS ✅ 已测试
🪟 Windows ⚠️ 未测试
🐧 Linux ⚠️ 未测试

环境(可选)

macOS,Node.js v24.12.0,仓库 npm workspaces 和包级 Vitest 配置。仓库要求 Node.js >=22;聚焦测试未使用 Docker 或 sandbox runtime。

风险与范围

  • 主要风险或取舍:transport 现在会在 pre-attach owner 超过帧数或字节数边界时 fail closed,并且 ownership 只有在本地回复投递后才可用。这比无限保留或淘汰帧更严格,是有意的兼容性变化。
  • 未验证 / 非目标:普通 live SSE/WS 新帧队列、单帧 JSON.stringify 瞬时放大、远端 exactly-once receipt 不在本 PR 范围内;真实 128 × 1 MiB daemon RSS E2E 本地未执行。
  • Breaking changes / 迁移说明:单个 pre-attach stream 的第 257 帧、单个逻辑 connection 的第 1,025 帧或超过 64 MiB 的 payload、全局第 4,097 帧或超过 256 MiB 的 payload 会关闭发起 admission 的 owner,而不再淘汰旧帧。共享 WebSocket 的资源失败使用 1013 close code。buffered object 在序列化时冻结。会授予 ownership 的 notification 不再创建或 attach session,请求形式的 ownership 在回复本地投递前不可用。workspace/session 数量默认值与公共 standalone ACP 行为保持不变。

关联 Issue

Tracking: #8091

@qwen-code-ci-bot

qwen-code-ci-bot commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

🩺 serve daemon A/B

Built the PR base vs this PR head e7ea3b2, drove a fixed endpoint set against each, and diffed the JSON responses. Only fields that changed are shown.

No response changes against the PR base across 4 scenario(s).

Qwen Code · serve A/B

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Summary

Package Lines Statements Functions Branches
CLI 84.33% 84.33% 90.14% 83.51%
Core 88.01% 88.01% 89.56% 86.56%
CLI Package - Full Text Report
-------------------|---------|----------|---------|---------|-------------------
File               | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
-------------------|---------|----------|---------|---------|-------------------
All files          |   84.33 |    83.51 |   90.14 |   84.33 |                   
 src               |   85.58 |    81.57 |   87.93 |   85.58 |                   
  cli.ts           |   95.68 |    84.11 |     100 |   95.68 | ...60-561,565-566 
  gemini.tsx       |    73.4 |    78.04 |   80.76 |    73.4 | ...1338-1342,1469 
  ...ractiveCli.ts |   87.92 |    82.11 |    88.7 |   87.92 | ...3097,3103,3168 
  ...liCommands.ts |   88.64 |    82.96 |      80 |   88.64 | ...77-579,593,692 
  ...ActiveAuth.ts |     100 |     87.5 |     100 |     100 | 66-80             
 ...cp-integration |   72.26 |     74.7 |   91.58 |   72.26 |                   
  acpAgent.ts      |   71.66 |    74.53 |   91.13 |   71.66 | ...35,12840-12842 
  ...k-reporter.ts |     100 |       80 |     100 |     100 | 81,84,119,141     
  authMethods.ts   |      92 |       60 |     100 |      92 | 33-34             
  errorCodes.ts    |     100 |      100 |     100 |     100 |                   
  ...ion-skills.ts |     100 |    88.23 |     100 |     100 | 17,32             
  generation.ts    |    97.1 |    81.25 |     100 |    97.1 | 109,112           
  ...figuration.ts |     100 |      100 |     100 |     100 |                   
  ...DirContext.ts |     100 |      100 |     100 |     100 |                   
 ...ration/service |    97.1 |    95.83 |   93.33 |    97.1 |                   
  filesystem.ts    |    97.1 |    95.83 |   93.33 |    97.1 | ...22-123,246-247 
 ...ration/session |   91.09 |    86.16 |   96.35 |   91.09 |                   
  Session.ts       |    90.4 |    84.68 |   95.96 |    90.4 | ...16,11643-11647 
  ...entTracker.ts |    96.8 |    89.36 |      90 |    96.8 | 137-143,221       
  ...projection.ts |   98.85 |    91.59 |     100 |   98.85 | 234,250,262       
  ...stop-guard.ts |     100 |    98.07 |     100 |     100 | 37,127            
  ...eplay-page.ts |   94.11 |     86.3 |     100 |   94.11 | ...11,315,395,399 
  ...y-replayer.ts |   83.17 |    92.98 |   94.11 |   83.17 | ...24-142,260-262 
  index.ts         |       0 |        0 |       0 |       0 | 1-40              
  ...ssionUtils.ts |   89.76 |    87.32 |     100 |   89.76 | ...54-270,326-328 
  ...oal-update.ts |   98.61 |    97.29 |     100 |   98.61 | 64                
  ...lure-guard.ts |   98.32 |    97.72 |     100 |   98.32 | 294-295,340-341   
  tasksSnapshot.ts |    94.3 |     87.5 |     100 |    94.3 | 65-71             
  ...on-tracker.ts |     100 |      100 |     100 |     100 |                   
  types.ts         |     100 |      100 |     100 |     100 |                   
 ...ssion/emitters |    95.7 |    93.37 |   96.87 |    95.7 |                   
  ...ageEmitter.ts |   95.25 |    93.54 |     100 |   95.25 | ...08-115,128-129 
  PlanEmitter.ts   |     100 |       90 |     100 |     100 | 66                
  base-emitter.ts  |   78.26 |       75 |     100 |   78.26 | 23-24,26-28       
  index.ts         |       0 |        0 |       0 |       0 | 1-10              
  ...ll-emitter.ts |   99.18 |    96.47 |     100 |   99.18 | 355-356           
 ...ession/rewrite |    91.8 |    89.13 |   94.44 |    91.8 |                   
  LlmRewriter.ts   |    82.4 |     86.2 |     100 |    82.4 | ...,88-89,166-170 
  ...Middleware.ts |   96.96 |    88.09 |     100 |   96.96 | 144,152-154       
  TurnBuffer.ts    |     100 |      100 |     100 |     100 |                   
  config.ts        |     100 |      100 |     100 |     100 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  types.ts         |       0 |        0 |       0 |       0 | 1                 
 src/agent-view    |   89.03 |    81.37 |   89.09 |   89.03 |                   
  ...t-cli-argv.ts |     100 |      100 |     100 |     100 |                   
  protocol.ts      |     100 |      100 |     100 |     100 |                   
  ...sor-client.ts |   80.38 |    72.54 |   76.66 |   80.38 | ...22-626,652-656 
  ...or-process.ts |   96.61 |    89.47 |   84.61 |   96.61 | 129-130,150-151   
  ...sor-runner.ts |    84.9 |     75.6 |      85 |    84.9 | ...44,468,471-481 
  ...sor-server.ts |   85.71 |    83.06 |   95.45 |   85.71 | ...67-468,471-488 
  ...isor-store.ts |   97.73 |    81.16 |     100 |   97.73 | ...92,594,607,643 
  ...nal-bridge.ts |   93.98 |     91.3 |   83.33 |   93.98 | 228-238           
 src/commands      |   91.03 |    80.09 |   66.66 |   91.03 |                   
  auth.ts          |     100 |    83.33 |     100 |     100 | 11,14             
  channel.ts       |   55.55 |      100 |       0 |   55.55 | 18-22,30-40       
  extensions.tsx   |   96.77 |      100 |      50 |   96.77 | 39                
  hooks.tsx        |   66.66 |      100 |       0 |   66.66 | 20-24             
  mcp.ts           |   95.45 |      100 |      50 |   95.45 | 31                
  review.ts        |   98.79 |      100 |      50 |   98.79 | 94                
  serve.ts         |   90.08 |    77.96 |     100 |   90.08 | ...81,884-887,899 
  sessions.ts      |     100 |      100 |      50 |     100 |                   
  update.ts        |   98.13 |    94.44 |   66.66 |   98.13 | 82-83             
 ...mmands/channel |   89.08 |    88.56 |   90.64 |   89.08 |                   
  channel-cwd.ts   |     100 |      100 |     100 |     100 |                   
  ...l-registry.ts |   94.88 |    95.49 |      90 |   94.88 | ...20-323,368-371 
  ...entry-path.ts |      75 |       50 |     100 |      75 | 8-9               
  config-utils.ts  |   95.88 |    96.35 |     100 |   95.88 | ...08-213,271-274 
  configure.ts     |    14.7 |      100 |       0 |    14.7 | 18-21,23-84       
  daemon-worker.ts |   93.91 |    85.55 |   94.33 |   93.91 | ...1264,1271-1272 
  loop-runtime.ts  |   91.66 |      100 |      50 |   91.66 | 15,22             
  ...classifier.ts |   98.53 |    96.66 |     100 |   98.53 | 115-116,161       
  ...tact-store.ts |   93.51 |    87.65 |     100 |   93.51 | ...71,288-289,337 
  pairing.ts       |      75 |      100 |      50 |      75 | 22-28,59-70       
  pidfile.ts       |   95.55 |       90 |     100 |   95.55 | ...50-251,315-316 
  proxy.ts         |     100 |      100 |     100 |     100 |                   
  reload.ts        |    77.5 |    86.95 |      75 |    77.5 | 72-84,93-97       
  runtime.ts       |   82.43 |    86.44 |     100 |   82.43 | ...87-191,251-253 
  set.ts           |   75.72 |    85.71 |      50 |   75.72 | 65-83,111-116     
  start.ts         |    85.8 |    82.17 |      88 |    85.8 | ...85,591-594,606 
  ...ure-format.ts |   93.65 |    82.45 |     100 |   93.65 | ...42,48-49,74-75 
  status.ts        |   78.57 |    59.25 |   66.66 |   78.57 | ...36-137,150-161 
  stop.ts          |   57.83 |    82.35 |      50 |   57.83 | ...3,74-76,85-111 
 ...nds/extensions |   88.85 |    87.91 |   87.09 |   88.85 |                   
  consent.ts       |   72.53 |    90.32 |   42.85 |   72.53 | ...86-142,157-163 
  disable.ts       |     100 |       90 |     100 |     100 | 30                
  enable.ts        |     100 |    91.66 |     100 |     100 | 38                
  install.ts       |   82.95 |    81.57 |      75 |   82.95 | ...96-199,202-211 
  link.ts          |     100 |      100 |     100 |     100 |                   
  list.ts          |     100 |     90.9 |     100 |     100 | 18                
  new.ts           |     100 |      100 |     100 |     100 |                   
  settings.ts      |   99.15 |      100 |   83.33 |   99.15 | 151               
  sources.ts       |   93.42 |    87.09 |   92.85 |   93.42 | ...4-66,96-98,167 
  uninstall.ts     |   74.57 |       40 |   66.66 |   74.57 | 45-47,60-67,70-73 
  update.ts        |   96.71 |    97.05 |     100 |   96.71 | 114-118           
  utils.ts         |   75.63 |    57.14 |     100 |   75.63 | ...30-134,136-140 
 ...les/mcp-server |       0 |        0 |       0 |       0 |                   
  example.ts       |       0 |        0 |       0 |       0 | 1-60              
 ...amples/starter |       0 |        0 |       0 |       0 |                   
  example.ts       |       0 |        0 |       0 |       0 | 1-64              
 src/commands/mcp  |   90.31 |    84.61 |   83.33 |   90.31 |                   
  add.ts           |    99.3 |    96.07 |     100 |    99.3 | 154-155           
  approve.ts       |   76.19 |     87.5 |   66.66 |   76.19 | ...,89-99,114-124 
  list.ts          |   93.15 |    84.84 |      80 |   93.15 | ...78-180,198-199 
  reconnect.ts     |   78.85 |    66.66 |   85.71 |   78.85 | 42-55,169-191     
  remove.ts        |     100 |       80 |     100 |     100 | 21-25             
 ...ommands/review |   88.23 |    88.46 |   88.83 |   88.23 |                   
  agent-prompt.ts  |   93.69 |    92.51 |   97.22 |   93.69 | ...2609,2734-2814 
  base-tree.ts     |   76.16 |    80.76 |   77.77 |   76.16 | ...50-371,373-386 
  capture-local.ts |   68.57 |     90.9 |      75 |   68.57 | 107-111,158-189   
  ...k-coverage.ts |   50.71 |       35 |   66.66 |   50.71 | ...40-245,279-289 
  cleanup.ts       |   89.12 |    82.22 |   83.33 |   89.12 | ...99-504,506-507 
  comment-body.ts  |   69.92 |     92.3 |   66.66 |   69.92 | ...18,145,147-152 
  ...ent-status.ts |   93.03 |    83.87 |   83.33 |   93.03 | 291,531-551       
  ...ose-review.ts |   97.02 |    93.27 |   96.55 |   97.02 | ...2227,2255-2277 
  cost-ledger.ts   |   94.52 |    96.46 |   78.57 |   94.52 | ...89-490,530-540 
  drive.ts         |   76.07 |    85.71 |   81.81 |   76.07 | ...90-492,497-499 
  extract-step.ts  |   91.36 |    90.62 |   88.88 |   91.36 | ...90-707,714-729 
  fetch-diff.ts    |   73.41 |      100 |   66.66 |   73.41 | 75-95             
  fetch-pr.ts      |    76.7 |    69.38 |   63.63 |    76.7 | ...99,421,454-459 
  findings.ts      |   89.89 |    89.56 |   95.65 |   89.89 | ...77-980,989-990 
  issue-context.ts |    88.1 |    92.98 |   85.71 |    88.1 | 247-274           
  load-rules.ts    |   26.41 |      100 |   16.66 |   26.41 | ...41-153,155-156 
  match-remote.ts  |   85.54 |     92.3 |   66.66 |   85.54 | 67-72,131-136     
  meta.ts          |   76.84 |     91.3 |   66.66 |   76.84 | 91-96,115-130     
  mock-provider.ts |   95.44 |    90.25 |   89.47 |   95.44 | 145,690-709       
  parse-args.ts    |    99.7 |    96.99 |     100 |    99.7 | 458               
  plan-diff.ts     |   66.66 |      100 |   66.66 |   66.66 | 157-200           
  pr-context.ts    |   92.05 |    80.54 |     100 |   92.05 | ...1008,1058-1074 
  presubmit.ts     |   87.93 |       88 |   88.88 |   87.93 | ...98-599,676-706 
  ...ish-assets.ts |    81.3 |    82.22 |   85.71 |    81.3 | ...75-479,506-552 
  repo-context.ts  |   94.92 |    90.82 |     100 |   94.92 | ...67-368,376-377 
  ...ve-anchors.ts |   77.77 |    88.88 |      75 |   77.77 | ...77-182,194-211 
  run.ts           |   84.16 |    89.06 |   94.11 |   84.16 | ...88,604-652,665 
  save-artifact.ts |    89.9 |    81.81 |   94.11 |    89.9 | ...08-311,404-407 
  script-lint.ts   |   83.67 |    78.41 |   88.88 |   83.67 | ...59-773,775-797 
  submit.ts        |   85.01 |    86.36 |      90 |   85.01 | ...99,588,615-651 
  test-delta.ts    |   87.13 |    91.46 |      75 |   87.13 | 206-237,477-485   
  test-efficacy.ts |   88.04 |    84.12 |   95.45 |   88.04 | ...2602,2610-2630 
  test-plan.ts     |   91.44 |    91.39 |   89.47 |   91.44 | ...38-839,903-920 
 ...w/__fixtures__ |     100 |      100 |     100 |     100 |                   
  ...r-default.mjs |     100 |      100 |     100 |     100 |                   
  ...der-empty.mjs |     100 |      100 |     100 |     100 |                   
  ...der-named.mjs |     100 |      100 |     100 |     100 |                   
 ...nds/review/lib |    97.5 |    95.16 |   98.36 |    97.5 |                   
  agent-briefs.ts  |      99 |      100 |      50 |      99 | 746-747           
  ...t-identity.ts |     100 |      100 |     100 |     100 |                   
  anchors.ts       |     100 |    94.79 |     100 |     100 | ...33,169,178,225 
  assets.ts        |     100 |      100 |     100 |     100 |                   
  audit-layers.ts  |   98.67 |    96.15 |     100 |   98.67 | 277-279           
  authorization.ts |   93.02 |    94.11 |     100 |   93.02 | 152-158           
  budget.ts        |     100 |    97.14 |     100 |     100 | 544,584           
  coverage.ts      |   96.82 |    94.48 |     100 |   96.82 | ...95-496,536-547 
  deadline.ts      |   98.33 |    93.61 |     100 |   98.33 | ...88,237,629,661 
  diff-flags.ts    |     100 |        0 |     100 |     100 | 63                
  diff-plan.ts     |   98.73 |    93.01 |     100 |   98.73 | ...41,264,290-291 
  disk.ts          |     100 |      100 |     100 |     100 |                   
  effort.ts        |     100 |      100 |     100 |     100 |                   
  gh.ts            |   89.09 |    95.31 |   77.77 |   89.09 | ...29,366-367,394 
  git.ts           |   97.64 |    95.65 |     100 |   97.64 | 180-181           
  heavy.ts         |     100 |      100 |     100 |     100 |                   
  inline-counts.ts |     100 |      100 |     100 |     100 |                   
  ...audit-gate.ts |     100 |    96.15 |     100 |     100 | 110               
  ledger.ts        |     100 |      100 |     100 |     100 |                   
  local-diff.ts    |   84.86 |    90.38 |     100 |   84.86 | ...63-473,475-483 
  ...ry-context.ts |   96.61 |    95.51 |     100 |   96.61 | ...47-450,496-499 
  merge-base.ts    |     100 |      100 |     100 |     100 |                   
  npm-toolchain.ts |   97.36 |    95.37 |     100 |   97.36 | ...86,409,770,787 
  path-rules.ts    |     100 |      100 |     100 |     100 |                   
  paths.ts         |   91.48 |       75 |     100 |   91.48 | 31-32,35-36       
  prompt-record.ts |   97.88 |    93.87 |     100 |   97.88 | 260-261,267       
  receipt.ts       |     100 |      100 |     100 |     100 |                   
  remote-match.ts  |   97.26 |    91.42 |     100 |   97.26 | 49-50             
  report.ts        |   94.68 |    93.75 |     100 |   94.68 | 189-193           
  ...ry-context.ts |     100 |    98.66 |     100 |     100 | 187               
  retirement.ts    |     100 |    92.39 |     100 |     100 | ...28,308-309,449 
  review-footer.ts |     100 |      100 |     100 |     100 |                   
  ...w-settings.ts |     100 |      100 |     100 |     100 |                   
  roster.ts        |     100 |    95.71 |     100 |     100 | 145,163,208       
  shell-quote.ts   |     100 |      100 |     100 |     100 |                   
  stale-bundle.ts  |   98.11 |    94.11 |     100 |   98.11 | 416,457,497-498   
  test-utils.ts    |     100 |      100 |     100 |     100 |                   
  toolchain.ts     |     100 |      100 |     100 |     100 |                   
  transcripts.ts   |   96.59 |    94.62 |     100 |   96.59 | ...08,297-298,323 
  ...pace-scope.ts |     100 |    96.96 |     100 |     100 | 172               
  workspaces.ts    |     100 |    96.77 |     100 |     100 | 222,452,499,512   
  worktree.ts      |     100 |      100 |     100 |     100 |                   
 ...w/lib/platform |   95.48 |       75 |     100 |   95.48 |                   
  github.ts        |   95.23 |    74.28 |     100 |   95.23 | 25-28,210-211     
  registry.ts      |     100 |      100 |     100 |     100 |                   
  types.ts         |     100 |      100 |     100 |     100 |                   
 ...mands/sessions |   91.56 |    86.95 |   83.33 |   91.56 |                   
  common.ts        |     100 |      100 |     100 |     100 |                   
  list.ts          |   90.96 |    86.66 |   81.81 |   90.96 | 208-219,221-222   
 src/config        |   94.93 |    89.87 |   96.28 |   94.93 |                   
  ...l-fallback.ts |     100 |      100 |     100 |     100 |                   
  auth.ts          |   89.35 |    83.56 |     100 |   89.35 | ...97-298,314-315 
  ...eMcpImport.ts |   87.91 |    81.52 |     100 |   87.91 | ...63-371,453-454 
  compile-cache.ts |     100 |      100 |     100 |     100 |                   
  config.ts        |   89.12 |    88.69 |   83.78 |   89.12 | ...2497,2499-2507 
  ...cy-monitor.ts |   88.75 |    76.19 |     100 |   88.75 | ...3,90-92,98,101 
  ...ust-policy.ts |   83.02 |    88.88 |     100 |   83.02 | ...02-209,232-240 
  ...heme-names.ts |     100 |      100 |     100 |     100 |                   
  environment.ts   |    96.5 |    93.58 |      95 |    96.5 | ...85-586,640-641 
  ...le-watcher.ts |   90.86 |    83.65 |   95.83 |   90.86 | ...23-325,370,418 
  ...resh-state.ts |   90.57 |    97.29 |   93.75 |   90.57 | 137-142,146-152   
  ...ime-reload.ts |     100 |    69.69 |     100 |     100 | ...12-113,122-123 
  hot-reload.ts    |     100 |    89.13 |     100 |     100 | 47,172-178,238    
  keyBindings.ts   |    97.4 |       50 |     100 |    97.4 | 240-243           
  ...ngsAdapter.ts |     100 |    94.11 |     100 |     100 | 64                
  ...ig-watcher.ts |   95.17 |    83.05 |     100 |   95.17 | ...78,200,292-293 
  ...er-secrets.ts |   98.97 |    96.96 |     100 |   98.97 | 85                
  mcpApprovals.ts  |   96.55 |    95.55 |     100 |   96.55 | 223-224,229-231   
  mcpJson.ts       |     100 |      100 |     100 |     100 |                   
  mcpServers.ts    |   92.85 |     87.5 |     100 |   92.85 | 46-47             
  ...idersScope.ts |      95 |    94.73 |     100 |      95 | 11-12             
  ...abledTools.ts |     100 |      100 |     100 |     100 |                   
  ...comparison.ts |     100 |      100 |     100 |     100 |                   
  ...n-settings.ts |   99.15 |    93.75 |     100 |   99.15 | 63                
  sandboxConfig.ts |   93.33 |    93.33 |     100 |   93.33 | ...42-147,216-217 
  session-id.ts    |     100 |      100 |     100 |     100 |                   
  ...ings-cache.ts |   96.52 |    93.93 |     100 |   96.52 | 90-91,201-202     
  settings.ts      |   91.27 |    92.64 |      90 |   91.27 | ...1030,1032-1033 
  ...ingsSchema.ts |     100 |      100 |     100 |     100 |                   
  ...ngsWatcher.ts |   95.54 |    88.34 |     100 |   95.54 | ...28,277-278,293 
  ...d-env-keys.ts |     100 |      100 |     100 |     100 |                   
  ...l-settings.ts |     100 |      100 |     100 |     100 |                   
  ...paths-lite.ts |   89.47 |       88 |     100 |   89.47 | 43-44,53-54,56-57 
  ...precedence.ts |   98.79 |     92.3 |     100 |   98.79 | 62                
  ...tedFolders.ts |   92.53 |    93.47 |     100 |   92.53 | ...36-337,373-384 
 ...nfig/migration |   95.23 |    78.94 |   83.33 |   95.23 |                   
  index.ts         |   95.65 |    88.88 |     100 |   95.65 | 117-118           
  scheduler.ts     |   96.55 |    77.77 |     100 |   96.55 | 19-20             
  types.ts         |       0 |        0 |       0 |       0 | 1                 
 ...ation/versions |   94.91 |      100 |     100 |   94.91 |                   
  ...-v2-shared.ts |     100 |      100 |     100 |     100 |                   
  v1-to-v2.ts      |   81.75 |      100 |     100 |   81.75 | ...28-229,231-247 
  v2-to-v3.ts      |     100 |      100 |     100 |     100 |                   
  v3-to-v4.ts      |     100 |      100 |     100 |     100 |                   
  v5-to-v4.ts      |      96 |      100 |     100 |      96 | 94-95,99          
 src/core          |     100 |      100 |     100 |     100 |                   
  auth.ts          |     100 |      100 |     100 |     100 |                   
  initializer.ts   |     100 |      100 |     100 |     100 |                   
  theme.ts         |     100 |      100 |     100 |     100 |                   
 src/dualOutput    |   75.08 |    67.64 |   71.42 |   75.08 |                   
  ...tputBridge.ts |   75.33 |    68.18 |   73.68 |   75.33 | ...09-410,418-421 
  ...utContext.tsx |     100 |      100 |     100 |     100 |                   
  index.ts         |       0 |        0 |       0 |       0 | 1-8               
 src/export        |       0 |        0 |       0 |       0 |                   
  index.ts         |       0 |        0 |       0 |       0 | 1-7               
 src/generated     |     100 |      100 |     100 |     100 |                   
  git-commit.ts    |     100 |      100 |     100 |     100 |                   
 src/hooks         |     100 |      100 |     100 |     100 |                   
  ...elete-hook.ts |     100 |      100 |     100 |     100 |                   
 src/i18n          |   85.98 |    81.92 |   89.65 |   85.98 |                   
  index.ts         |   73.45 |    77.77 |      90 |   73.45 | ...70-271,294-299 
  languages.ts     |   93.07 |     92.3 |   85.71 |   93.07 | ...35,164-169,184 
  ...nslateKeys.ts |     100 |      100 |     100 |     100 |                   
  ...lationDict.ts |   93.33 |    66.66 |     100 |   93.33 | 15                
 src/i18n/locales  |     100 |      100 |     100 |     100 |                   
  ca.js            |     100 |      100 |     100 |     100 |                   
  de.js            |     100 |      100 |     100 |     100 |                   
  en.js            |     100 |      100 |     100 |     100 |                   
  fr.js            |     100 |      100 |     100 |     100 |                   
  ja.js            |     100 |      100 |     100 |     100 |                   
  pt.js            |     100 |      100 |     100 |     100 |                   
  ru.js            |     100 |      100 |     100 |     100 |                   
  zh-TW.js         |     100 |      100 |     100 |     100 |                   
  zh.js            |     100 |      100 |     100 |     100 |                   
 ...nonInteractive |   80.98 |    77.27 |   84.12 |   80.98 |                   
  session.ts       |   84.97 |    76.31 |   96.07 |   84.97 | ...1048,1057-1067 
  types.ts         |    42.5 |      100 |   33.33 |    42.5 | ...31-632,635-636 
 ...active/control |   75.54 |    89.83 |      80 |   75.54 |                   
  ...rolContext.ts |    6.06 |        0 |       0 |    6.06 | 57-99             
  ...Dispatcher.ts |   91.95 |    92.98 |   88.88 |   91.95 | ...54-372,392,395 
  ...rolService.ts |    6.89 |        0 |       0 |    6.89 | 46-188            
 ...ol/controllers |   45.95 |    69.03 |   55.26 |   45.95 |                   
  ...Controller.ts |    42.4 |      100 |   83.33 |    42.4 | 101-105,140-223   
  ...Controller.ts |       0 |        0 |       0 |       0 | 1-56              
  ...Controller.ts |   55.01 |    67.14 |   58.33 |   55.01 | ...15-624,639-644 
  ...Controller.ts |   49.23 |       60 |      50 |   49.23 | ...07-108,111-121 
  ...Controller.ts |   40.64 |    68.11 |   46.66 |   40.64 | ...72-684,693-722 
 .../control/types |       0 |        0 |       0 |       0 |                   
  serviceAPIs.ts   |       0 |        0 |       0 |       0 | 1                 
 ...Interactive/io |   98.12 |    94.18 |   95.29 |   98.12 |                   
  ...putAdapter.ts |   97.98 |    93.23 |   98.07 |   97.98 | ...1416,1432-1433 
  ...putAdapter.ts |      96 |    91.66 |   85.71 |      96 | 51-52             
  ...nputReader.ts |     100 |    94.73 |     100 |     100 | 67                
  ...putAdapter.ts |   98.49 |      100 |   90.47 |   98.49 | 85-86,126-127     
  ...projection.ts |     100 |      100 |     100 |     100 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
 src/patches       |       0 |        0 |       0 |       0 |                   
  is-in-ci.ts      |       0 |        0 |       0 |       0 | 1-17              
 src/remoteInput   |   87.31 |    75.32 |   88.23 |   87.31 |                   
  ...utContext.tsx |     100 |      100 |     100 |     100 |                   
  ...putWatcher.ts |   88.01 |       76 |   93.33 |   88.01 | ...49-350,361-364 
  index.ts         |       0 |        0 |       0 |       0 | 1-8               
 src/runtime       |   99.61 |    95.04 |     100 |   99.61 |                   
  ...livery-ipc.ts |     100 |     90.9 |     100 |     100 | 94,106,134        
  ...l-delivery.ts |     100 |      100 |     100 |     100 |                   
  cpu-percent.ts   |     100 |      100 |     100 |     100 |                   
  ...erver-name.ts |     100 |      100 |     100 |     100 |                   
  ...-constants.ts |     100 |      100 |     100 |     100 |                   
  ...-summaries.ts |   86.66 |       50 |     100 |   86.66 | 11,19             
  ...ber-errors.ts |     100 |    95.32 |     100 |     100 | 53,93-94,172,192  
  ...ls-mapping.ts |     100 |      100 |     100 |     100 |                   
 src/serve         |   88.12 |    84.47 |   90.92 |   88.12 |                   
  ...tp-enabled.ts |     100 |      100 |     100 |     100 |                   
  ...ion-bridge.ts |     100 |      100 |     100 |     100 |                   
  auth.ts          |   93.43 |    92.95 |     100 |   93.43 | ...20-321,324-326 
  ...em-adapter.ts |     100 |      100 |     100 |     100 |                   
  capabilities.ts  |     100 |    98.07 |     100 |     100 | 685               
  ...cp-command.ts |     100 |      100 |     100 |     100 |                   
  ...horization.ts |   92.79 |    93.33 |    87.5 |   92.79 | 75-80,135-136     
  ...op-mcp-ipc.ts |   81.06 |    73.68 |   94.11 |   81.06 | ...37-242,267,289 
  ...nt-service.ts |    94.1 |    86.89 |     100 |    94.1 | ...75-477,484,486 
  ...-selection.ts |     100 |      100 |     100 |     100 |                   
  ...ings-store.ts |   89.64 |    94.11 |   96.29 |   89.64 | ...57-269,521-524 
  ...ebhook-ipc.ts |    98.5 |    86.66 |     100 |    98.5 | 47                
  ...iagnostics.ts |     100 |      100 |     100 |     100 |                   
  ...worker-env.ts |     100 |      100 |     100 |     100 |                   
  ...rker-group.ts |   87.27 |     85.2 |     100 |   87.27 | ...10,816-820,838 
  ...er-manager.ts |   89.39 |    83.88 |   93.33 |   89.39 | ...98,711,722-724 
  ...horization.ts |     100 |      100 |     100 |     100 |                   
  ...tartup-ipc.ts |   97.72 |    96.66 |     100 |   97.72 | 88-89             
  ...supervisor.ts |   92.54 |    84.53 |   97.14 |   92.54 | ...1489,1543-1547 
  ...e-grouping.ts |     100 |    94.28 |     100 |     100 | 71,137            
  core-runtime.ts  |     100 |      100 |     100 |     100 |                   
  ...ub-session.ts |    90.1 |    77.83 |   94.73 |    90.1 | ...1014,1021-1026 
  ...tree-guard.ts |   92.89 |    87.55 |     100 |   92.89 | ...2766,2836-2840 
  daemon-logger.ts |   82.82 |    78.68 |   92.04 |   82.82 | ...1775,1802-1808 
  ...y-pressure.ts |     100 |    96.96 |     100 |     100 | 135               
  ...trics-ring.ts |     100 |      100 |     100 |     100 |                   
  ...s-provider.ts |   68.04 |    52.77 |     100 |   68.04 | ...44-249,282-290 
  daemon-status.ts |   98.63 |    91.57 |     100 |   98.63 | ...1489,1491-1492 
  debug-mode.ts    |     100 |      100 |     100 |     100 |                   
  env-snapshot.ts  |   93.37 |    85.18 |     100 |   93.37 | 114-117,195-202   
  ...-scheduler.ts |   87.34 |    83.87 |     100 |   87.34 | 33-36,48-50,79-81 
  ...d-provider.ts |   92.06 |    87.09 |     100 |   92.06 | ...72,287-293,316 
  ...h-settings.ts |   94.94 |    90.41 |     100 |   94.94 | ...30,708,724,734 
  fast-path.ts     |   90.99 |    81.38 |   95.45 |   90.99 | ...33-542,608-609 
  ...ration-sse.ts |   42.55 |    33.33 |     100 |   42.55 | 23-24,30,33-56    
  health-query.ts  |     100 |      100 |     100 |     100 |                   
  index.ts         |       0 |        0 |       0 |       0 | 1-144             
  ...e-observer.ts |   89.89 |    83.24 |      96 |   89.89 | ...11-512,541-543 
  ...back-binds.ts |     100 |    88.88 |     100 |     100 | 32                
  ...-workspace.ts |    90.9 |    85.71 |     100 |    90.9 | ...30-131,142-143 
  ...iders-edit.ts |     100 |    82.14 |     100 |     100 | 58-60,65,81       
  ...ory-picker.ts |     100 |    86.95 |     100 |     100 | 36,66,92          
  ...sion-audit.ts |     100 |      100 |   93.33 |     100 |                   
  rate-limit.ts    |   92.68 |    88.29 |     100 |   92.68 | ...89-291,303-305 
  ...qwen-serve.ts |   84.46 |    80.62 |    75.6 |   84.46 | ...7591,7597-7598 
  ...tup-errors.ts |     100 |      100 |     100 |     100 |                   
  ...-keepalive.ts |   94.25 |    88.99 |     100 |   94.25 | ...28,532-533,572 
  ...-lifecycle.ts |     100 |      100 |     100 |     100 |                   
  server.ts        |   90.96 |    91.34 |   72.32 |   90.96 | ...2731,2745-2749 
  ...-admission.ts |   98.24 |     94.8 |     100 |   98.24 | 79-80,303-304     
  ...on-helpers.ts |     100 |      100 |     100 |     100 |                   
  ...t-event-id.ts |     100 |    95.23 |     100 |     100 | 12                
  ...-admission.ts |   98.71 |    89.65 |     100 |   98.71 | 68                
  types.ts         |     100 |      100 |     100 |     100 |                   
  ...ion-limits.ts |     100 |      100 |     100 |     100 |                   
  ...t-sessions.ts |   93.72 |    77.93 |     100 |   93.72 | ...51,854,867-869 
  ...l-resolver.ts |   90.32 |    66.66 |     100 |   90.32 | 16,45-46          
  ...ell-static.ts |   92.18 |    88.37 |     100 |   92.18 | ...21-224,267-270 
  ...ace-agents.ts |   66.13 |    70.57 |   92.68 |   66.13 | ...2246,2256-2266 
  ...generation.ts |    95.4 |    82.35 |   66.66 |    95.4 | 55-56,78,92       
  ...-git-state.ts |     100 |    91.93 |    90.9 |     100 | 161,172,202,265   
  ...ace-inputs.ts |     100 |      100 |     100 |     100 |                   
  ...ace-memory.ts |      83 |    74.54 |     100 |      83 | ...30-537,597-604 
  ...ers-status.ts |   98.58 |       79 |     100 |   98.58 | 106,134,174,177   
  ...tion-store.ts |   89.67 |    88.27 |   92.59 |   89.67 | ...91-400,411-414 
  ...e-registry.ts |   93.89 |     87.5 |     100 |   93.89 | ...18-519,525-526 
  ...e-remember.ts |   98.23 |    92.56 |     100 |   98.23 | ...36,340-345,386 
  ...te-runtime.ts |   83.98 |    90.29 |     100 |   83.98 | ...48-156,216-237 
  ...me-storage.ts |     100 |      100 |     100 |     100 |                   
  ...management.ts |   72.63 |    72.72 |      96 |   72.63 | ...88-889,896-900 
  ...lls-status.ts |     100 |    95.45 |     100 |     100 | 152               
  ...reconciler.ts |   91.63 |    84.09 |     100 |   91.63 | ...71-273,306-307 
 ...serve/acp-http |   80.37 |    80.96 |   94.04 |   80.37 |                   
  ...r-registry.ts |   96.92 |    94.87 |     100 |   96.92 | 184-187           
  client-mcp-ws.ts |   54.85 |    58.62 |   72.72 |   54.85 | ...99-300,304-305 
  ...n-registry.ts |   93.03 |    84.26 |   98.52 |   93.03 | ...1624,1671-1682 
  dispatch.ts      |   75.59 |    78.48 |   91.37 |   75.59 | ...5363,5420-5426 
  index.ts         |   82.43 |    80.18 |   91.07 |   82.43 | ...2360,2444-2445 
  json-rpc.ts      |     100 |    96.96 |     100 |     100 | 92                
  ...ach-budget.ts |     100 |      100 |     100 |     100 |                   
  safe-ws-send.ts  |   52.94 |    71.42 |     100 |   52.94 | 33-42,47-55       
  sse-stream.ts    |   98.26 |    88.75 |     100 |   98.26 | 87-88,117         
  ...ort-stream.ts |       0 |        0 |       0 |       0 | 1                 
  ws-stream.ts     |   94.06 |    89.09 |     100 |   94.06 | 50,55,134,138-141 
 src/serve/auth    |   86.86 |     79.7 |   93.87 |   86.86 |                   
  device-flow.ts   |   96.35 |    80.57 |   97.61 |   96.35 | ...1358,1453,1519 
  ...w-provider.ts |   44.24 |    74.07 |   71.42 |   44.24 | ...23-284,297,301 
 ...rve/cdp-tunnel |   87.73 |    76.21 |    97.5 |   87.73 |                   
  ...r-emulator.ts |   93.27 |    77.77 |     100 |   93.27 | ...53-256,282-283 
  ...verse-link.ts |      88 |    76.19 |     100 |      88 | ...28-329,420-423 
  ...l-registry.ts |     100 |      100 |     100 |     100 |                   
  cdp-ws.ts        |   76.28 |    61.29 |    87.5 |   76.28 | ...13-217,223-228 
 ...nel/acceptance |    6.12 |    57.89 |   46.15 |    6.12 |                   
  ...helpers.d.mts |       0 |        0 |       0 |       0 | 1                 
  ...e-helpers.mjs |   97.64 |    70.96 |     100 |   97.64 | 22-23             
  ...mcp-smoke.mjs |       0 |        0 |       0 |       0 | 1-124             
  ...cceptance.mjs |       0 |        0 |       0 |       0 | 1-473             
  ...re-server.mjs |       0 |        0 |       0 |       0 | 1-59              
  ...ols-smoke.mjs |       0 |        0 |       0 |       0 | 1-268             
  real-tab.mjs     |       0 |        0 |       0 |       0 | 1-218             
  ...al-chrome.mjs |       0 |        0 |       0 |       0 | 1-223             
 .../conversations |   92.81 |    90.51 |     100 |   92.81 |                   
  ...me-manager.ts |     100 |      100 |     100 |     100 |                   
  ...-workspace.ts |   88.26 |    82.53 |     100 |   88.26 | ...33-234,246-247 
  ...ion-source.ts |     100 |      100 |     100 |     100 |                   
 src/serve/fs      |   87.27 |    82.01 |     100 |   87.27 |                   
  audit.ts         |     100 |    96.15 |     100 |     100 | 204               
  errors.ts        |     100 |      100 |     100 |     100 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...x-registry.ts |     100 |      100 |     100 |     100 |                   
  paths.ts         |   77.64 |    74.01 |     100 |   77.64 | ...65,594-598,611 
  policy.ts        |   90.52 |    89.18 |     100 |   90.52 | 172-180           
  text-cursor.ts   |   88.23 |       90 |     100 |   88.23 | 74-77,92-95       
  ...ile-system.ts |   87.37 |    81.39 |     100 |   87.37 | ...2811,2821-2822 
 src/serve/live    |   77.56 |    68.68 |   90.08 |   77.56 |                   
  ...en-context.ts |   95.74 |    81.25 |     100 |   95.74 | ...0,66-67,99-100 
  discovery.ts     |   85.77 |    76.92 |      90 |   85.77 | ...49-250,255-256 
  ...structions.ts |     100 |      100 |     100 |     100 |                   
  ...oordinator.ts |   82.67 |    76.75 |   97.01 |   82.67 | ...1319,1351-1353 
  ...-installer.ts |    64.3 |    82.35 |   80.76 |    64.3 | ...45-446,460-472 
  ...oordinator.ts |   75.99 |    65.18 |   85.71 |   75.99 | ...1883,1974-1975 
  ...controller.ts |   67.82 |    79.31 |   72.72 |   67.82 | ...66-278,287-295 
  ...ak-to-user.ts |   96.66 |      100 |   83.33 |   96.66 | 37-38             
  ...sk-service.ts |    86.3 |    59.78 |   93.33 |    86.3 | ...1160,1184-1191 
  ...task-tools.ts |      99 |      100 |   85.71 |      99 | 205-206           
  ...redentials.ts |   96.26 |    93.47 |     100 |   96.26 | 91-94             
  ...me-session.ts |   65.63 |    57.24 |   88.88 |   65.63 | ...2270,2275-2282 
  ...up-context.ts |   94.83 |    77.58 |     100 |   94.83 | ...18,327-330,350 
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/serve/routes  |   85.84 |    80.42 |   94.72 |   85.84 |                   
  a2ui-action.ts   |   96.84 |     88.5 |    87.5 |   96.84 | ...70-272,309-311 
  capabilities.ts  |   98.63 |    95.65 |     100 |   98.63 | 76                
  ...nel-notify.ts |   86.45 |       88 |     100 |   86.45 | ...,83-87,103-104 
  ...l-webhooks.ts |   93.56 |    84.09 |     100 |   93.56 | ...42,292,332,334 
  daemon-status.ts |   85.71 |    83.33 |     100 |   85.71 | 101-108           
  goals.ts         |   98.92 |     90.9 |     100 |   98.92 | 143               
  health.ts        |   99.09 |    91.17 |     100 |   99.09 | 147               
  live-setup.ts    |   33.33 |     37.5 |      50 |   33.33 | ...18-123,130-135 
  live.ts          |    82.4 |    71.42 |     100 |    82.4 | ...-94,96-101,121 
  permission.ts    |     100 |     92.3 |     100 |     100 | 50,98             
  ...uled-tasks.ts |   87.29 |    82.94 |   92.59 |   87.29 | ...1275,1318-1319 
  ...on-runtime.ts |     100 |    90.47 |     100 |     100 | 58,94             
  session.ts       |   86.08 |    82.52 |   90.41 |   86.08 | ...4960,4962-4963 
  sse-events.ts    |   86.82 |    85.71 |   94.11 |   86.82 | ...16-927,930,937 
  usage-stats.ts   |     100 |    95.45 |     100 |     100 | 118               
  ...space-auth.ts |   85.55 |    75.64 |     100 |   85.55 | ...21-326,331,345 
  ...el-control.ts |   86.26 |    78.94 |     100 |   86.26 | ...17-318,339-347 
  ...management.ts |   90.92 |    79.69 |     100 |   90.92 | ...81-482,501-502 
  ...d-contacts.ts |     100 |      100 |     100 |     100 |                   
  ...controller.ts |   83.11 |    79.31 |      90 |   83.11 | ...1033,1039,1042 
  ...extensions.ts |   88.15 |    74.95 |   92.98 |   88.15 | ...2027,2072-2073 
  ...-file-read.ts |      91 |    80.91 |     100 |      91 | ...20-621,624-625 
  ...file-write.ts |   89.58 |    79.16 |     100 |   89.58 | ...84,698-705,786 
  ...t-branches.ts |   75.43 |    66.66 |     100 |   75.43 | ...13-618,627-634 
  ...e-git-diff.ts |   97.32 |    90.56 |     100 |   97.32 | 161-162,189-191   
  ...ce-git-log.ts |     100 |    93.18 |     100 |     100 | 52,77,188         
  workspace-git.ts |   77.08 |    89.65 |     100 |   77.08 | 97-118            
  ...github-prs.ts |   88.26 |    63.46 |     100 |   88.26 | ...38-239,264-265 
  ...-lifecycle.ts |   95.23 |    75.75 |     100 |   95.23 | ...50-151,186-187 
  ...management.ts |   87.44 |    84.23 |     100 |   87.44 | ...1667,1687-1692 
  ...cp-control.ts |    73.2 |    67.54 |   85.71 |    73.2 | ...27-633,644-645 
  ...ace-models.ts |   95.53 |    89.74 |     100 |   95.53 | ...52-157,296-297 
  ...ermissions.ts |    77.9 |    72.41 |     100 |    77.9 | ...69-277,298-316 
  ...e-settings.ts |   75.04 |    72.99 |     100 |   75.04 | ...79-690,696-697 
  ...tup-github.ts |   77.97 |    70.58 |   84.21 |   77.97 | ...46-352,397-398 
  ...ace-skills.ts |    76.9 |    87.15 |     100 |    76.9 | ...29-354,360-394 
  ...ace-status.ts |   82.94 |     74.5 |     100 |   82.94 | ...84-486,490-491 
  ...pace-tools.ts |   75.94 |    69.69 |   66.66 |   75.94 | ...59-164,193-194 
  ...pace-trust.ts |   78.92 |    66.21 |      80 |   78.92 | ...38-343,351-352 
  ...pace-voice.ts |   91.33 |    80.92 |     100 |   91.33 | ...70-673,676-678 
 src/serve/server  |   91.77 |    89.31 |   96.95 |   91.77 |                   
  access-log.ts    |    98.7 |    97.14 |     100 |    98.7 | 118,189           
  ...er-helpers.ts |   63.82 |    77.96 |   81.81 |   63.82 | ...16,330,332-347 
  ...w-registry.ts |    98.8 |    81.81 |     100 |    98.8 | 107               
  ...r-handlers.ts |   97.29 |       75 |     100 |   97.29 | 17                
  ...r-response.ts |    86.7 |    72.77 |     100 |    86.7 | ...57,774,837-846 
  fs-factory.ts    |     100 |    94.54 |     100 |     100 | 42,103,159        
  ...branch-ops.ts |     100 |      100 |     100 |     100 |                   
  ...list-cache.ts |   99.01 |    95.52 |     100 |   99.01 | 184-185           
  ...t-deadline.ts |     100 |      100 |     100 |     100 |                   
  ...iter-setup.ts |      65 |    73.33 |   33.33 |      65 | 30-35,38-43,47-48 
  ...st-helpers.ts |   95.13 |    95.09 |     100 |   95.13 | ...66-168,423-428 
  self-origin.ts   |   76.19 |       80 |     100 |   76.19 | 45-54             
  ...e-features.ts |      95 |     87.5 |     100 |      95 | 182-188           
  ...on-archive.ts |   89.55 |    87.15 |   97.14 |   89.55 | ...32-836,888-889 
  ...ion-export.ts |     100 |    94.44 |     100 |     100 | 64                
  session-list.ts  |   95.86 |    93.37 |     100 |   95.86 | ...-848,1026-1030 
  telemetry.ts     |   99.04 |    97.44 |     100 |   99.04 | ...37,652,794-796 
 src/serve/voice   |    92.7 |    91.48 |   97.67 |    92.7 |                   
  ...ice-config.ts |   84.81 |       30 |     100 |   84.81 | 91-100,104-105    
  voice-ws.ts      |   91.58 |    93.44 |      96 |   91.58 | ...68,483,521-523 
  ...oordinator.ts |     100 |    98.21 |     100 |     100 | 176               
 ...kspace-service |   90.66 |    87.77 |   91.11 |   90.66 |                   
  index.ts         |   90.14 |    87.08 |   89.74 |   90.14 | ...1466-1470,1473 
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/services      |   92.49 |    89.26 |      98 |   92.49 |                   
  ...mandLoader.ts |     100 |    88.88 |     100 |     100 | 105-118           
  ...killLoader.ts |   97.19 |    85.29 |     100 |   97.19 | 142,153-154       
  ...andService.ts |   98.73 |      100 |     100 |   98.73 | 107               
  ...mandLoader.ts |   87.09 |    83.07 |     100 |   87.09 | ...35-340,345-350 
  ...omptLoader.ts |   79.55 |    88.29 |   83.33 |   79.55 | ...48,178,245-246 
  ...mandLoader.ts |   97.77 |    92.15 |     100 |   97.77 | 176,183-184       
  ...nd-factory.ts |   91.42 |    91.66 |     100 |   91.42 | 128,137-144       
  ...ation-tool.ts |     100 |    95.45 |     100 |     100 | 125               
  ...ndMetadata.ts |   98.23 |    96.72 |     100 |   98.23 | 83,87             
  commandUtils.ts  |      96 |     90.9 |     100 |      96 | 48                
  ...and-parser.ts |   90.69 |    85.71 |     100 |   90.69 | 63-66             
  ...ionService.ts |     100 |      100 |     100 |     100 |                   
  prompt-stash.ts  |   96.66 |    92.85 |     100 |   96.66 | 34-35             
  ...tree-lease.ts |   88.23 |    86.48 |     100 |   88.23 | ...94-199,232-233 
  ...low-loader.ts |     100 |    96.15 |     100 |     100 | 88                
  setup-github.ts  |    90.8 |    80.95 |     100 |    90.8 | ...49-450,457-458 
  ...-args-file.ts |   93.93 |    91.66 |    87.5 |   93.93 | 208-210,224-230   
  types.ts         |     100 |      100 |     100 |     100 |                   
  ...e-keyterms.ts |   98.64 |    95.89 |     100 |   98.64 | 116,142-143       
  voice-model.ts   |     100 |      100 |     100 |     100 |                   
  voice-service.ts |    90.4 |    87.87 |     100 |    90.4 | ...81,288,353-358 
  ...e-settings.ts |     100 |    95.23 |     100 |     100 | 19                
  ...ranscriber.ts |   91.77 |    87.11 |   97.22 |   91.77 | ...99-901,904-906 
 ...rvices/insight |     100 |      100 |     100 |     100 |                   
  dates.ts         |     100 |      100 |     100 |     100 |                   
 ...ght/generators |   88.91 |     86.8 |   96.15 |   88.91 |                   
  DataProcessor.ts |   88.28 |    86.77 |   94.73 |   88.28 | ...1362,1366-1373 
  ...tGenerator.ts |   98.24 |    85.71 |     100 |   98.24 | 47                
  ...teRenderer.ts |     100 |      100 |     100 |     100 |                   
 .../insight/types |       0 |       50 |      50 |       0 |                   
  ...sightTypes.ts |       0 |        0 |       0 |       0 |                   
  ...sightTypes.ts |       0 |        0 |       0 |       0 | 1                 
 ...mpt-processors |   97.27 |    94.04 |     100 |   97.27 |                   
  ...tProcessor.ts |     100 |      100 |     100 |     100 |                   
  ...eProcessor.ts |   94.52 |    84.21 |     100 |   94.52 | 46-47,93-94       
  ...tionParser.ts |     100 |      100 |     100 |     100 |                   
  ...lProcessor.ts |   97.41 |    95.65 |     100 |   97.41 | 96-99             
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/services/tips |   97.27 |    84.61 |     100 |   97.27 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  tipHistory.ts    |   92.59 |       70 |     100 |   92.59 | ...24,146,153,162 
  tipRegistry.ts   |     100 |      100 |     100 |     100 |                   
  tipScheduler.ts  |     100 |    91.66 |     100 |     100 | 55                
 src/startup       |   88.99 |    83.47 |    90.9 |   88.99 |                   
  ...p-prefetch.ts |   98.09 |    94.23 |    87.5 |   98.09 | 50,209,225-226    
  ...reeStartup.ts |   80.53 |     74.6 |     100 |   80.53 | ...94,403,409-412 
 src/test-utils    |   94.09 |    79.16 |   77.77 |   94.09 |                   
  ci-env.ts        |      88 |     62.5 |     100 |      88 | 22-23,28          
  ...omMatchers.ts |   69.69 |       50 |      50 |   69.69 | 32-35,37-39,45-47 
  ...mised-lock.ts |     100 |      100 |   66.66 |     100 |                   
  ...andContext.ts |     100 |      100 |     100 |     100 |                   
  render.tsx       |     100 |      100 |     100 |     100 |                   
 src/ui            |   73.24 |    75.52 |   67.03 |   73.24 |                   
  App.tsx          |   33.33 |       75 |   33.33 |   33.33 | 32-86             
  AppContainer.tsx |   74.45 |    72.04 |   68.57 |   74.45 | ...4188,4304-4310 
  ...tionNudge.tsx |    9.58 |      100 |       0 |    9.58 | 24-94             
  ...ackDialog.tsx |    30.3 |      100 |       0 |    30.3 | 26-76             
  ...tionNudge.tsx |    7.69 |      100 |       0 |    7.69 | 25-103            
  colors.ts        |      60 |      100 |   35.29 |      60 | ...52,54-55,60-61 
  constants.ts     |     100 |      100 |     100 |     100 |                   
  keyMatchers.ts   |   95.91 |    97.14 |     100 |   95.91 | 25-26             
  ...tic-colors.ts |     100 |      100 |     100 |     100 |                   
  ...ractiveUI.tsx |   70.51 |       74 |    62.5 |   70.51 | ...09,336,389-394 
  ...inePresets.ts |   96.27 |    83.87 |     100 |   96.27 | ...97,402,410-412 
  textConstants.ts |     100 |      100 |     100 |     100 |                   
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/ui/auth       |   58.76 |    66.66 |   51.06 |   58.76 |                   
  AuthDialog.tsx   |   59.01 |     42.1 |   16.66 |   59.01 | ...25,332-354,358 
  ...nProgress.tsx |       0 |        0 |       0 |       0 | 1-64              
  ...etupSteps.tsx |   60.21 |    70.73 |   57.69 |   60.21 | ...90,794,803,806 
  useAuth.ts       |   94.83 |       75 |     100 |   94.83 | ...33-234,253-259 
  ...rSetupFlow.ts |   43.18 |    33.33 |      50 |   43.18 | ...78-399,416-459 
 src/ui/commands   |   83.35 |    83.55 |   89.88 |   83.35 |                   
  aboutCommand.ts  |     100 |      100 |     100 |     100 |                   
  agentsCommand.ts |   83.78 |      100 |      60 |   83.78 | 30-32,42-44       
  ...odeCommand.ts |    93.1 |    95.23 |     100 |    93.1 | 77-82             
  arenaCommand.ts  |   63.89 |    65.71 |   65.21 |   63.89 | ...01-606,691-699 
  authCommand.ts   |     100 |      100 |     100 |     100 |                   
  branchCommand.ts |     100 |      100 |     100 |     100 |                   
  btwCommand.ts    |   94.32 |    77.41 |     100 |   94.32 | 35-36,114-119     
  bugCommand.ts    |     100 |    77.77 |     100 |     100 | 27,61             
  cdCommand.ts     |    92.3 |    82.75 |     100 |    92.3 | ...,94-99,178,187 
  clearCommand.ts  |    80.9 |    70.83 |     100 |    80.9 | ...28-129,137-146 
  ...essCommand.ts |   68.06 |    54.05 |      75 |   68.06 | ...96-197,211-214 
  ...astCommand.ts |   84.17 |       75 |     100 |   84.17 | ...,91-97,125-130 
  ...ig-command.ts |   93.12 |    88.42 |     100 |   93.12 | ...07-315,321-323 
  ...extCommand.ts |   69.07 |     72.6 |   84.61 |   69.07 | ...78-611,622-623 
  copyCommand.ts   |    98.7 |    96.29 |     100 |    98.7 | 66-67,172,272,323 
  ...or-command.ts |   85.95 |    80.55 |   88.88 |   85.95 | ...68-274,298-309 
  deleteCommand.ts |     100 |      100 |     100 |     100 |                   
  diffCommand.ts   |     100 |    87.87 |     100 |     100 | ...63,231-232,245 
  ...ryCommand.tsx |   81.64 |    87.67 |    90.9 |   81.64 | ...73-278,325-332 
  docsCommand.ts   |     100 |     90.9 |     100 |     100 | 25                
  doctorCommand.ts |   70.16 |    84.61 |      95 |   70.16 | ...29-679,682-816 
  dreamCommand.ts  |   85.45 |    88.88 |     100 |   85.45 | 58-65             
  editorCommand.ts |     100 |      100 |     100 |     100 |                   
  ...rt-command.ts |   80.48 |       75 |     100 |   80.48 | 49-54,69-72,93-98 
  effort-utils.ts  |     100 |      100 |     100 |     100 |                   
  exportCommand.ts |   98.25 |    91.02 |     100 |   98.25 | ...81,198-199,364 
  ...onsCommand.ts |   52.31 |    56.25 |   69.23 |   52.31 | ...09,277-329,390 
  forgetCommand.ts |     100 |       90 |     100 |     100 | 59                
  forkCommand.ts   |     100 |    94.11 |     100 |     100 | 96,147            
  goalCommand.ts   |     100 |    96.49 |     100 |     100 | 139,192           
  helpCommand.ts   |     100 |      100 |     100 |     100 |                   
  ...oryCommand.ts |     100 |      100 |     100 |     100 |                   
  hooksCommand.ts  |   81.13 |    65.71 |   85.71 |   81.13 | ...,86-93,131-132 
  ideCommand.ts    |   60.75 |    64.28 |   41.17 |   60.75 | ...05-306,310-324 
  ...figCommand.ts |   52.83 |    81.25 |      70 |   52.83 | ...74-319,321-330 
  initCommand.ts   |   91.86 |       80 |     100 |   91.86 | 48,83-88          
  ...ghtCommand.ts |   77.87 |    71.42 |     100 |   77.87 | ...44-245,250-272 
  ...ageCommand.ts |   94.44 |    90.14 |     100 |   94.44 | ...13-214,241-251 
  learn-command.ts |     100 |      100 |     100 |     100 |                   
  lspCommand.ts    |     100 |    86.95 |     100 |     100 | 31,101-102        
  mcpCommand.ts    |     100 |      100 |     100 |     100 |                   
  memoryCommand.ts |     100 |      100 |     100 |     100 |                   
  modelCommand.ts  |   85.02 |    82.53 |     100 |   85.02 | ...1089,1123-1128 
  ...onsCommand.ts |     100 |      100 |     100 |     100 |                   
  planCommand.ts   |   78.82 |    76.92 |     100 |   78.82 | 30-35,51-56,68-73 
  quitCommand.ts   |     100 |      100 |     100 |     100 |                   
  recapCommand.ts  |   21.81 |      100 |      50 |   21.81 | 24-73             
  ...ns-command.ts |   98.83 |    81.81 |     100 |   98.83 | 100               
  ...berCommand.ts |     100 |     87.5 |     100 |     100 | 46                
  renameCommand.ts |    89.6 |       90 |     100 |    89.6 | ...72-176,212-219 
  ...oreCommand.ts |   90.96 |    86.04 |     100 |   90.96 | ...41-146,177-178 
  resumeCommand.ts |     100 |      100 |     100 |     100 |                   
  rewindCommand.ts |   81.25 |      100 |      50 |   81.25 | 20-22             
  ...ngsCommand.ts |     100 |      100 |     100 |     100 |                   
  ...hubCommand.ts |   89.47 |       75 |      80 |   89.47 | 54-59             
  skillsCommand.ts |   78.82 |    81.81 |     100 |   78.82 | 37-52,78,97       
  statsCommand.ts  |   90.65 |    76.73 |     100 |   90.65 | ...30-733,825-832 
  ...ineCommand.ts |     100 |      100 |     100 |     100 |                   
  ...aryCommand.ts |   73.04 |     82.3 |      90 |   73.04 | ...20-547,561-565 
  tasksCommand.ts  |   77.22 |    72.13 |     100 |   77.22 | ...46-150,172-177 
  ...tupCommand.ts |     100 |      100 |     100 |     100 |                   
  themeCommand.ts  |     100 |      100 |     100 |     100 |                   
  toolsCommand.ts  |     100 |      100 |     100 |     100 |                   
  trustCommand.ts  |     100 |      100 |     100 |     100 |                   
  types.ts         |     100 |      100 |     100 |     100 |                   
  ...te-command.ts |     100 |    94.11 |     100 |     100 | 74,148            
  vimCommand.ts    |   54.54 |      100 |      50 |   54.54 | 19-29             
  voice-command.ts |   93.57 |       88 |     100 |   93.57 | 35,97-102         
  ...owsCommand.ts |   92.92 |       85 |   66.66 |   92.92 | ...72-177,276-281 
 src/ui/components |   71.96 |    79.54 |   79.56 |   71.96 |                   
  AboutBox.tsx     |     100 |      100 |     100 |     100 |                   
  AnsiOutput.tsx   |   65.57 |      100 |      50 |   65.57 | 69-90             
  ApiKeyInput.tsx  |       0 |        0 |       0 |       0 | 1-97              
  AppHeader.tsx    |    88.7 |       75 |     100 |    88.7 | 36,38-43,45       
  ...odeDialog.tsx |   87.24 |    72.22 |   33.33 |   87.24 | ...85,233-238,245 
  AsciiArt.ts      |     100 |      100 |     100 |     100 |                   
  ...Indicator.tsx |   95.65 |    66.66 |     100 |   95.65 | 27,52             
  ...TextInput.tsx |   88.65 |    90.41 |     100 |   88.65 | ...84-286,300-302 
  Composer.tsx     |   94.49 |    66.66 |     100 |   94.49 | ...-76,88,143,157 
  ...entPrompt.tsx |     100 |      100 |     100 |     100 |                   
  ...ryDisplay.tsx |   75.89 |    62.06 |     100 |   75.89 | ...,88,93-108,113 
  ...geDisplay.tsx |   68.42 |    57.14 |     100 |   68.42 | 16-17,31-32,42-50 
  CronPill.tsx     |     100 |    93.75 |     100 |     100 | 19                
  ...ification.tsx |      84 |       60 |     100 |      84 | 23-24,40-42       
  ...gProfiler.tsx |       0 |        0 |       0 |       0 | 1-36              
  ...ogManager.tsx |       0 |        0 |       0 |       0 | 1-598             
  DiffDialog.tsx   |    53.5 |     37.5 |   69.23 |    53.5 | ...32-737,747-760 
  ...ngsDialog.tsx |       0 |        0 |       0 |       0 | 1-195             
  EffortDialog.tsx |   97.36 |      100 |     100 |   97.36 | 55-56             
  ExitWarning.tsx  |     100 |      100 |     100 |     100 |                   
  ...hProgress.tsx |    87.8 |    33.33 |     100 |    87.8 | 28-31,56          
  ...ustDialog.tsx |     100 |      100 |     100 |     100 |                   
  Footer.tsx       |   81.27 |    69.23 |      50 |   81.27 | ...06,245,267-272 
  ...ngSpinner.tsx |   68.42 |    85.71 |      50 |   68.42 | 35-52,73,80-81    
  GoalPill.tsx     |   93.51 |    81.81 |     100 |   93.51 | 37-38,106-109,123 
  Header.tsx       |   98.65 |    94.73 |     100 |   98.65 | 173,175           
  Help.tsx         |   98.33 |       90 |     100 |   98.33 | ...25,382,448-449 
  ...emDisplay.tsx |   79.28 |    66.99 |     100 |   79.28 | ...08,511,514-520 
  ...ngeDialog.tsx |     100 |      100 |     100 |     100 |                   
  InputPrompt.tsx  |   84.26 |    82.94 |      80 |   84.26 | ...2215,2236,2332 
  ...Shortcuts.tsx |     100 |       88 |     100 |     100 | 98,119            
  ...Indicator.tsx |   98.18 |    97.82 |     100 |   98.18 | 161-162           
  ...firmation.tsx |   91.42 |      100 |      50 |   91.42 | 26-31             
  MainContent.tsx  |   95.58 |    95.06 |   46.15 |   95.58 | ...79,482-486,489 
  MemoryDialog.tsx |   86.59 |    80.15 |     100 |   86.59 | ...34-435,485,553 
  ...geDisplay.tsx |       0 |        0 |       0 |       0 | 1-41              
  ModelDialog.tsx  |   85.22 |    74.08 |     100 |   85.22 | ...1041,1097,1099 
  ...tsDisplay.tsx |     100 |    97.22 |     100 |     100 | 270               
  ...fications.tsx |       0 |        0 |       0 |       0 | 1-56              
  ...onsDialog.tsx |       0 |        0 |       0 |       0 | 1-1004            
  ...ryDisplay.tsx |     100 |      100 |     100 |     100 |                   
  ...icePrompt.tsx |   92.64 |    85.71 |     100 |   92.64 | 102-106,134-139   
  PrepareLabel.tsx |   91.66 |    77.27 |     100 |   91.66 | 73-75,77-79,110   
  ...atePrompt.tsx |       0 |        0 |       0 |       0 | 1-134             
  ...geDisplay.tsx |     100 |      100 |     100 |     100 |                   
  ...ngDisplay.tsx |       0 |        0 |       0 |       0 | 1-39              
  ...hProgress.tsx |   85.25 |    88.46 |     100 |   85.25 | 121-147           
  ...dSelector.tsx |   92.79 |    82.65 |     100 |   92.79 | ...19-323,354-370 
  ...ionPicker.tsx |   83.66 |    72.13 |     100 |   83.66 | ...96,402,444-466 
  ...onPreview.tsx |   93.58 |    83.78 |     100 |   93.58 | ...,70-71,195-197 
  ...ryDisplay.tsx |     100 |      100 |     100 |     100 |                   
  ...putPrompt.tsx |   92.06 |    86.36 |   83.33 |   92.06 | ...,70-72,120-123 
  ...tedDialog.tsx |     100 |      100 |     100 |     100 |                   
  ...ngsDialog.tsx |   71.49 |    73.89 |   69.23 |   71.49 | ...1244,1250-1251 
  ...ionDialog.tsx |    92.3 |    96.15 |   33.33 |    92.3 | 60-63,68-75,164   
  ...putPrompt.tsx |    15.9 |      100 |       0 |    15.9 | 20-63             
  ...Indicator.tsx |   57.14 |      100 |       0 |   57.14 | 12-15             
  ...MoreLines.tsx |       0 |        0 |       0 |       0 | 1-40              
  ...iewDialog.tsx |   97.77 |    87.67 |     100 |   97.77 | ...97,305-307,324 
  ...tsDisplay.tsx |   95.86 |       75 |     100 |   95.86 | 67-71             
  ...ionPicker.tsx |       0 |        0 |       0 |       0 | 1-172             
  ...tivityTab.tsx |    3.94 |      100 |       0 |    3.94 | 27-275            
  StatsDialog.tsx  |    8.64 |      100 |       0 |    8.64 | ...76-111,130-322 
  StatsDisplay.tsx |     100 |      100 |     100 |     100 |                   
  ...ciencyTab.tsx |    78.9 |    56.52 |     100 |    78.9 | ...26,213,262-288 
  ...atmapView.tsx |    8.98 |      100 |       0 |    8.98 | 20-107            
  ...essionTab.tsx |      80 |    66.66 |     100 |      80 | ...70-277,283-300 
  ...ineDialog.tsx |    93.9 |    86.88 |     100 |    93.9 | ...20,282,302-304 
  ...yTodoList.tsx |   96.36 |    88.23 |     100 |   96.36 | 138-141           
  ...nsDisplay.tsx |   95.62 |    87.09 |     100 |   95.62 | ...24-125,273-275 
  ...inalImage.tsx |     100 |    93.93 |     100 |     100 | 75,129            
  ThemeDialog.tsx  |   89.95 |    46.15 |      75 |   89.95 | ...71-173,243-245 
  Tips.tsx         |   93.54 |       75 |     100 |   93.54 | 39-40             
  TodoDisplay.tsx  |     100 |      100 |     100 |     100 |                   
  ...tsDisplay.tsx |     100 |     87.5 |     100 |     100 | 31-32             
  TrustDialog.tsx  |     100 |    83.33 |     100 |     100 | 72-87             
  ...ification.tsx |   36.36 |      100 |       0 |   36.36 | 15-22             
  ...Indicator.tsx |    92.5 |     87.5 |     100 |    92.5 | 50-53             
  ...ackDialog.tsx |       0 |        0 |       0 |       0 | 1-134             
  ...xitDialog.tsx |   80.36 |    43.47 |      60 |   80.36 | ...24-238,248-251 
  ...odeVisuals.ts |   97.22 |    85.71 |     100 |   97.22 | 25                
  ...s-helpers.tsx |   66.25 |    81.25 |      50 |   66.25 | 25-32,46-53,62-72 
 ...nts/agent-view |   55.05 |    69.09 |      50 |   55.05 |                   
  ...atContent.tsx |    9.09 |      100 |       0 |    9.09 | 54-275,281-283    
  ...tChatView.tsx |   21.05 |      100 |       0 |   21.05 | 21-39             
  ...tComposer.tsx |   69.48 |    33.33 |   66.66 |   69.48 | ...51,269,277-279 
  AgentFooter.tsx  |   15.38 |      100 |       0 |   15.38 | 28-65             
  AgentHeader.tsx  |   15.38 |      100 |       0 |   15.38 | 27-64             
  AgentTabBar.tsx  |    87.9 |    63.88 |     100 |    87.9 | ...88,110-118,136 
  ...oryAdapter.ts |     100 |    91.83 |     100 |     100 | 103,109-110,138   
  index.ts         |       0 |        0 |       0 |       0 | 1-12              
 ...mponents/arena |    42.3 |    68.69 |   73.68 |    42.3 |                   
  ArenaCards.tsx   |   73.06 |    71.79 |   85.71 |   73.06 | ...83-185,321-326 
  ...ectDialog.tsx |   83.48 |    69.86 |   88.88 |   83.48 | ...88-392,409-410 
  ...artDialog.tsx |       0 |        0 |       0 |       0 | 1-166             
  ...tusDialog.tsx |       0 |        0 |       0 |       0 | 1-288             
  ...topDialog.tsx |       0 |        0 |       0 |       0 | 1-213             
 ...ackground-view |   85.34 |    84.91 |   92.98 |   85.34 |                   
  ...sksDialog.tsx |   81.87 |    82.77 |   85.71 |   81.87 | ...1853,1965-1971 
  ...TasksPill.tsx |   78.84 |    94.28 |     100 |   78.84 | 64,109-129        
  ...gentPanel.tsx |   97.08 |    86.31 |     100 |   97.08 | 132,442-446,520   
  agent-forest.ts  |    99.2 |    93.93 |     100 |    99.2 | 258               
  ...Visibility.ts |     100 |      100 |     100 |     100 |                   
  ...e-overlay.tsx |    88.2 |    76.47 |     100 |    88.2 | ...36-138,140-142 
 ...nts/extensions |   84.32 |    76.78 |   83.33 |   84.32 |                   
  ...gerDialog.tsx |   82.15 |    76.08 |     100 |   82.15 | ...91-198,258,260 
  TabBar.tsx       |   97.29 |    88.88 |     100 |   97.29 | 33                
  index.ts         |       0 |        0 |       0 |       0 | 1-12              
  types.ts         |     100 |      100 |     100 |     100 |                   
 ...tensions/steps |   46.26 |       85 |   58.82 |   46.26 |                   
  ...ctionStep.tsx |   95.12 |    92.85 |   85.71 |   95.12 | 84-86,89          
  ...etailStep.tsx |       0 |        0 |       0 |       0 | 1-145             
  ...nListStep.tsx |   75.26 |    88.37 |   66.66 |   75.26 | ...53,174,203-209 
  ...electStep.tsx |       0 |        0 |       0 |       0 | 1-83              
  ...nfirmStep.tsx |   16.32 |      100 |       0 |   16.32 | 28-74             
  index.ts         |       0 |        0 |       0 |       0 | 1-11              
 ...xtensions/tabs |   71.92 |    68.21 |   70.83 |   71.92 |                   
  DiscoverTab.tsx  |   68.22 |    67.66 |   55.55 |   68.22 | ...93,656-660,664 
  InstalledTab.tsx |   75.49 |    67.44 |   83.33 |   75.49 | ...77,782-783,820 
  SourcesTab.tsx   |   71.67 |    70.47 |   77.77 |   71.67 | ...28,547,621-633 
 ...tensions/views |    50.7 |    52.38 |   20.83 |    50.7 |                   
  ...tionsView.tsx |   73.75 |    56.36 |   66.66 |   73.75 | ...30,353,369-374 
  ...tionsView.tsx |   43.45 |    44.82 |    6.66 |   43.45 | ...98-405,408-420 
  ...etailView.tsx |    9.24 |      100 |       0 |    9.24 | 40-67,70-163      
 ...mponents/hooks |   87.11 |    81.37 |   91.89 |   87.11 |                   
  ...rListBody.tsx |   95.29 |    85.18 |     100 |   95.29 | 95-98             
  ...etailStep.tsx |   75.32 |    71.42 |      60 |   75.32 | ...56-169,173-186 
  ...etailStep.tsx |     100 |      100 |     100 |     100 |                   
  ...rListStep.tsx |     100 |      100 |     100 |     100 |                   
  ...entHeader.tsx |     100 |    85.71 |     100 |     100 | 47                
  ...rListStep.tsx |     100 |      100 |     100 |     100 |                   
  ...etailStep.tsx |     100 |      100 |     100 |     100 |                   
  ...abledStep.tsx |     100 |      100 |     100 |     100 |                   
  ...sListStep.tsx |     100 |      100 |     100 |     100 |                   
  ...entDialog.tsx |   72.29 |    70.49 |     100 |   72.29 | ...51,563-568,572 
  constants.ts     |     100 |      100 |     100 |     100 |                   
  index.ts         |       0 |        0 |       0 |       0 | 1-13              
  ...erGrouping.ts |     100 |      100 |     100 |     100 |                   
  sourceLabels.ts  |     100 |      100 |     100 |     100 |                   
  types.ts         |     100 |      100 |     100 |     100 |                   
 ...components/mcp |   40.91 |    63.44 |   70.58 |   40.91 |                   
  ...ealthPill.tsx |     100 |      100 |     100 |     100 |                   
  ...entDialog.tsx |   32.09 |    26.19 |      40 |   32.09 | ...12,914,927-933 
  ...valDialog.tsx |   15.06 |      100 |       0 |   15.06 | 40-109            
  constants.ts     |     100 |      100 |     100 |     100 |                   
  index.ts         |       0 |        0 |       0 |       0 | 1-35              
  types.ts         |     100 |      100 |     100 |     100 |                   
  utils.ts         |      97 |       95 |     100 |      97 | 24,113-114        
 ...ents/mcp/steps |   53.94 |    73.51 |   57.14 |   53.94 |                   
  ...icateStep.tsx |    5.65 |      100 |       0 |    5.65 | 40-66,69-308      
  ...electStep.tsx |   10.95 |      100 |       0 |   10.95 | 16-88             
  ...etailStep.tsx |     100 |      100 |     100 |     100 |                   
  ...eListStep.tsx |   99.09 |    97.36 |     100 |   99.09 | 71                
  ...etailStep.tsx |   62.83 |       60 |   33.33 |   62.83 | ...87-296,307-332 
  ...rListStep.tsx |   88.53 |    81.25 |     100 |   88.53 | ...64,170,175-180 
  ...etailStep.tsx |    10.3 |      100 |       0 |    10.3 | ...1,67-79,82-140 
  ToolListStep.tsx |   69.29 |       50 |     100 |   69.29 | ...23,126,135-144 
 ...nents/messages |   90.26 |    86.89 |   85.57 |   90.26 |                   
  ...ionDialog.tsx |   89.23 |     84.9 |   81.81 |   89.23 | ...75,593,611-613 
  BtwMessage.tsx   |     100 |      100 |     100 |     100 |                   
  ...upDisplay.tsx |     100 |    94.73 |     100 |     100 | ...43,289,402,432 
  ...onMessage.tsx |   92.06 |    82.35 |     100 |   92.06 | 58-60,62,64       
  ...nMessages.tsx |   94.11 |    95.91 |   76.92 |   94.11 | ...47-349,352-355 
  DiffRenderer.tsx |   93.17 |    86.02 |     100 |   93.17 | ...07,235-236,302 
  ...tsDisplay.tsx |   97.08 |    77.77 |     100 |   97.08 | 95,97,106         
  ...usMessage.tsx |   81.73 |     65.9 |      75 |   81.73 | ...10-214,222,245 
  ...tsDisplay.tsx |   95.52 |    88.31 |     100 |   95.52 | ...40,142,175-180 
  ...ssMessage.tsx |    12.5 |      100 |       0 |    12.5 | 18-59             
  ...edMessage.tsx |   21.05 |      100 |       0 |   21.05 | 23-39             
  ...sMessages.tsx |   59.04 |       50 |    37.5 |   59.04 | ...21-126,147-159 
  ...ryMessage.tsx |   13.63 |      100 |       0 |   13.63 | 23-64             
  ...onMessage.tsx |   91.87 |    82.63 |     100 |   91.87 | ...49-651,658-660 
  ...upMessage.tsx |   98.38 |    95.38 |     100 |   98.38 | 188-191,422       
  ToolMessage.tsx  |   93.06 |    86.32 |   93.75 |   93.06 | ...1037,1082-1084 
 ...ponents/shared |   86.29 |     82.4 |   94.17 |   86.29 |                   
  ...ctionList.tsx |     100 |      100 |      75 |     100 |                   
  ...tonSelect.tsx |     100 |      100 |     100 |     100 |                   
  EnumSelector.tsx |     100 |    96.42 |     100 |     100 | 58                
  ...rBoundary.tsx |     100 |      100 |     100 |     100 |                   
  MaxSizedBox.tsx  |   84.71 |    86.86 |      90 |   84.71 | ...67-568,685-686 
  MultiSelect.tsx  |   93.58 |       75 |     100 |   93.58 | ...43,199-201,211 
  ...tonSelect.tsx |     100 |      100 |     100 |     100 |                   
  ...ontroller.tsx |     100 |    83.33 |     100 |     100 | 73,93-95          
  ...eSelector.tsx |     100 |       60 |     100 |     100 | 40-45             
  ...lableList.tsx |   81.48 |    84.84 |     100 |   81.48 | 46-66,73-76       
  StaticRender.tsx |     100 |      100 |     100 |     100 |                   
  TextInput.tsx    |    80.8 |    67.24 |      80 |    80.8 | ...36-240,252-258 
  ...ontroller.tsx |     100 |    81.81 |     100 |     100 | 59-62             
  ...apsedTime.tsx |     100 |      100 |     100 |     100 |                   
  ...Indicator.tsx |     100 |      100 |     100 |     100 |                   
  ...lizedList.tsx |   91.49 |    86.66 |   83.33 |   91.49 | ...18-846,859,959 
  text-buffer.ts   |   85.98 |    81.81 |   97.91 |   85.98 | ...2664,2762-2763 
  ...er-actions.ts |   73.93 |    67.22 |     100 |   73.93 | ...32-733,934-936 
 ...ponents/skills |       0 |        0 |       0 |       0 |                   
  ...gerDialog.tsx |       0 |        0 |       0 |       0 | 1-681             
 ...ents/subagents |       0 |        0 |       0 |       0 |                   
  constants.ts     |       0 |        0 |       0 |       0 | 1-71              
  index.ts         |       0 |        0 |       0 |       0 | 1-11              
  reducers.tsx     |       0 |        0 |       0 |       0 | 1-190             
  types.ts         |       0 |        0 |       0 |       0 | 1-125             
  utils.ts         |       0 |        0 |       0 |       0 | 1-102             
 ...bagents/create |       0 |        0 |       0 |       0 |                   
  ...ionWizard.tsx |       0 |        0 |       0 |       0 | 1-299             
  ...rSelector.tsx |       0 |        0 |       0 |       0 | 1-85              
  ...onSummary.tsx |       0 |        0 |       0 |       0 | 1-331             
  ...tionInput.tsx |       0 |        0 |       0 |       0 | 1-177             
  ...dSelector.tsx |       0 |        0 |       0 |       0 | 1-63              
  ...nSelector.tsx |       0 |        0 |       0 |       0 | 1-58              
  ...EntryStep.tsx |       0 |        0 |       0 |       0 | 1-78              
  ToolSelector.tsx |       0 |        0 |       0 |       0 | 1-253             
 ...bagents/manage |   14.14 |    53.19 |    37.5 |   14.14 |                   
  ...ctionStep.tsx |       0 |        0 |       0 |       0 | 1-103             
  ...eleteStep.tsx |       0 |        0 |       0 |       0 | 1-62              
  ...tEditStep.tsx |       0 |        0 |       0 |       0 | 1-124             
  ...ctionStep.tsx |   35.61 |    59.52 |     100 |   35.61 | ...21-433,438-440 
  ...iewerStep.tsx |       0 |        0 |       0 |       0 | 1-73              
  ...gerDialog.tsx |       0 |        0 |       0 |       0 | 1-341             
 ...mponents/views |    70.1 |    72.89 |   61.11 |    70.1 |                   
  ContextUsage.tsx |   71.49 |    64.86 |      80 |   71.49 | ...30-436,473-567 
  DoctorReport.tsx |     9.8 |      100 |       0 |     9.8 | 25-54,57-131      
  ...sionsList.tsx |   88.05 |       75 |     100 |   88.05 | 70-77             
  McpStatus.tsx    |   92.01 |     73.8 |     100 |   92.01 | ...36,175-177,262 
  SkillsList.tsx   |   20.51 |      100 |       0 |   20.51 | 17-20,27-57       
  ToolsList.tsx    |     100 |      100 |     100 |     100 |                   
 src/ui/contexts   |   84.16 |    81.83 |   85.13 |   84.16 |                   
  ...ewContext.tsx |   64.83 |    88.88 |      50 |   64.83 | ...16-219,225-235 
  AppContext.tsx   |      80 |       50 |     100 |      80 | 19-20             
  ...ewContext.tsx |   93.83 |    68.51 |   42.85 |   93.83 | ...44,281-285,317 
  ...igContext.tsx |   81.81 |       50 |     100 |   81.81 | 15-16             
  ...ssContext.tsx |   85.65 |    84.85 |     100 |   85.65 | ...1612-1614,1620 
  ...owContext.tsx |   91.07 |    81.81 |     100 |   91.07 | 47-48,60-62       
  ...deContext.tsx |     100 |      100 |      50 |     100 |                   
  ...onContext.tsx |   80.77 |       80 |    92.3 |   80.77 | ...31-434,443-446 
  ...gsContext.tsx |     100 |      100 |     100 |     100 |                   
  ...usContext.tsx |     100 |      100 |     100 |     100 |                   
  ...ngContext.tsx |   71.42 |       50 |     100 |   71.42 | 17-20             
  ...utContext.tsx |   85.71 |      100 |   66.66 |   85.71 | 13-14             
  ...edContext.tsx |     100 |      100 |      50 |     100 |                   
  ...nsContext.tsx |   88.88 |       50 |     100 |   88.88 | 156-157           
  ...teContext.tsx |   86.66 |       50 |     100 |   86.66 | 235-236           
  ...deContext.tsx |      80 |     87.5 |      75 |      80 | ...11-112,118-120 
  ...rtContext.tsx |     100 |      100 |     100 |     100 |                   
 src/ui/daemon     |   88.35 |    73.51 |   95.45 |   88.35 |                   
  ...ui-adapter.ts |   88.35 |    73.51 |   95.45 |   88.35 | ...74,792-793,879 
 src/ui/editors    |       0 |        0 |       0 |       0 |                   
  ...ngsManager.ts |       0 |        0 |       0 |       0 | 1-67              
 src/ui/hooks      |   85.64 |    83.42 |   87.39 |   85.64 |                   
  ...dProcessor.ts |   85.53 |    85.13 |     100 |   85.53 | ...-970,1017-1018 
  ...ention-ref.ts |   97.72 |       84 |     100 |   97.72 | 65                
  keyToAnsi.ts     |    3.92 |      100 |       0 |    3.92 | 19-77             
  ...esourceRef.ts |     100 |      100 |     100 |     100 |                   
  ...completion.ts |     100 |    95.45 |     100 |     100 | 95                
  ...ention-ref.ts |     100 |      100 |     100 |     100 |                   
  ...dProcessor.ts |   94.62 |    73.58 |     100 |   94.62 | ...87-288,293-294 
  ...dProcessor.ts |   86.86 |    71.67 |   83.33 |   86.86 | ...1540,1562-1566 
  ...rt-command.ts |     100 |      100 |     100 |     100 |                   
  ...sced-flush.ts |     100 |      100 |     100 |     100 |                   
  ...ng-enabled.ts |     100 |      100 |     100 |     100 |                   
  ...oice-input.ts |   92.36 |    81.95 |   66.66 |   92.36 | ...00,502-503,658 
  ...ke-repaint.ts |     100 |      100 |     100 |     100 |                   
  ...amingState.ts |   12.22 |      100 |       0 |   12.22 | 54-157            
  ...agerDialog.ts |   88.23 |      100 |     100 |   88.23 | 20,24             
  ...dScrollbar.ts |     100 |      100 |     100 |     100 |                   
  ...ationFrame.ts |      52 |    63.63 |     100 |      52 | ...59,67-70,76-87 
  ...odeCommand.ts |   58.82 |      100 |     100 |   58.82 | 28,33-48          
  ...enaCommand.ts |      85 |      100 |     100 |      85 | 23-24,29          
  ...aInProcess.ts |   27.92 |       80 |      25 |   27.92 | ...69-170,173-175 
  ...Completion.ts |   86.44 |    88.48 |     100 |   86.44 | ...14-515,525-541 
  ...ifications.ts |   87.82 |    96.77 |     100 |   87.82 | 138-152           
  ...tIndicator.ts |   88.28 |    81.57 |     100 |   88.28 | ...66,175,179-187 
  ...waySummary.ts |   96.26 |       75 |     100 |   96.26 | 126-128,170       
  ...ndTaskView.ts |   94.89 |    77.55 |     100 |   94.89 | 164-168,257,263   
  ...chedScroll.ts |     100 |      100 |     100 |     100 |                   
  ...ketedPaste.ts |    23.8 |      100 |       0 |    23.8 | 19-37             
  ...nchCommand.ts |   95.53 |    83.01 |     100 |   95.53 | ...64-165,289-292 
  ...ompletion.tsx |   97.09 |    87.09 |     100 |   97.09 | ...23-324,334-335 
  ...dMigration.ts |    92.1 |    88.88 |     100 |    92.1 | 42-44             
  useCompletion.ts |   96.29 |    90.56 |     100 |   96.29 | ...17-218,222-223 
  ...nitMessage.ts |     100 |      100 |     100 |     100 |                   
  ...extualTips.ts |   78.26 |       50 |     100 |   78.26 | ...2,75-79,96-104 
  ...eteCommand.ts |   89.52 |    90.69 |     100 |   89.52 | ...98-106,114-115 
  ...ialogClose.ts |   36.11 |       10 |     100 |   36.11 | ...89-195,202-207 
  useDiffData.ts   |       0 |        0 |       0 |       0 | 1-87              
  ...oublePress.ts |   53.12 |       75 |     100 |   53.12 | 33-35,41-54       
  ...orSettings.ts |     100 |      100 |     100 |     100 |                   
  ...Completion.ts |   99.12 |    97.67 |     100 |   99.12 | 182-183           
  ...ionUpdates.ts |   93.72 |    92.98 |     100 |   93.72 | ...87-291,314-320 
  ...agerDialog.ts |   88.88 |      100 |     100 |   88.88 | 21,25             
  ...backDialog.ts |    63.9 |    76.47 |   66.66 |    63.9 | ...66-168,190-191 
  useFocus.ts      |     100 |      100 |     100 |     100 |                   
  ...olderTrust.ts |     100 |    93.33 |     100 |     100 | 62                
  ...ggestions.tsx |   96.47 |    78.94 |     100 |   96.47 | 121,155-156       
  ...miniStream.ts |   86.07 |    82.29 |    73.8 |   86.07 | ...5362-5364,5366 
  ...BranchName.ts |     100 |    94.44 |     100 |     100 | 54                
  ...oryManager.ts |   98.38 |    98.85 |     100 |   98.38 | 141-144           
  ...ooksDialog.ts |    87.5 |      100 |     100 |    87.5 | 19,23             
  ...stListener.ts |     100 |      100 |     100 |     100 |                   
  ...nAuthError.ts |   76.19 |       50 |     100 |   76.19 | 39-40,43-45       
  ...putHistory.ts |   92.59 |    85.71 |     100 |   92.59 | 63-64,72,94-96    
  ...storyStore.ts |     100 |    94.11 |     100 |     100 | 69                
  useKeypress.ts   |     100 |      100 |     100 |     100 |                   
  ...rdProtocol.ts |   36.36 |      100 |       0 |   36.36 | 24-31             
  ...unchEditor.ts |   22.58 |      100 |      50 |   22.58 | 11-32,44-85       
  ...gIndicator.ts |     100 |    96.66 |     100 |     100 | 109               
  useLogger.ts     |      16 |      100 |       0 |      16 | 15-45             
  useMCPHealth.ts  |   10.52 |      100 |       0 |   10.52 | 36-75             
  ...cpApproval.ts |   93.12 |    86.11 |     100 |   93.12 | ...24-127,139-140 
  useMcpDialog.ts  |    87.5 |      100 |     100 |    87.5 | 19,23             
  ...moryDialog.ts |    87.5 |      100 |     100 |    87.5 | 19,23             
  ...oryMonitor.ts |   83.14 |    78.57 |     100 |   83.14 | 54-63,74-79       
  ...ssageQueue.ts |     100 |     97.4 |     100 |     100 | 175,262           
  ...delCommand.ts |     100 |       96 |     100 |     100 | 61                
  ...ouseEvents.ts |   94.89 |       95 |   83.33 |   94.89 | 78-82             
  ...raseCycler.ts |   84.74 |    76.47 |     100 |   84.74 | ...49,52-53,69-71 
  ...rredEditor.ts |   58.33 |    22.22 |     100 |   58.33 | 23-27,29-33       
  ...derUpdates.ts |   85.29 |    80.28 |    92.3 |   85.29 | ...36,351-361,441 
  useQwenAuth.ts   |     100 |      100 |     100 |     100 |                   
  ...lScheduler.ts |   89.48 |    88.88 |     100 |   89.48 | ...54-456,489-499 
  ...oryCommand.ts |       0 |        0 |       0 |       0 | 1-7               
  ...umeCommand.ts |   95.34 |    77.14 |     100 |   95.34 | 124-125,227-232   
  ...ompletion.tsx |   90.67 |    83.33 |     100 |   90.67 | ...02,105,138-141 
  ...ectionList.ts |   97.12 |    96.19 |     100 |   97.12 | ...92-193,247-250 
  ...sionPicker.ts |   92.87 |    90.35 |     100 |   92.87 | ...99-501,503-505 
  ...earchInput.ts |     100 |    97.29 |     100 |     100 | 82                
  ...ngsCommand.ts |   18.75 |      100 |       0 |   18.75 | 10-25             
  ...ellHistory.ts |   93.28 |    80.95 |     100 |   93.28 | ...96,153-154,164 
  ...oryCommand.ts |   85.48 |    58.33 |     100 |   85.48 | 22-28,40,71       
  ...agerDialog.ts |   88.23 |      100 |     100 |   88.23 | 20,24             
  ...Completion.ts |   82.85 |    85.13 |   94.73 |   82.85 | ...78-680,688-724 
  ...tateAndRef.ts |     100 |      100 |     100 |     100 |                   
  ...tatsDialog.ts |     100 |      100 |     100 |     100 |                   
  useStatusLine.ts |   97.32 |    93.93 |     100 |   97.32 | ...18-422,518-525 
  ...eateDialog.ts |   88.23 |      100 |     100 |   88.23 | 14,18             
  ...mInProcess.ts |   27.35 |       80 |      25 |   27.35 | ...82-183,186-188 
  ...tification.ts |     100 |     87.5 |     100 |     100 | 50                
  ...alProgress.ts |   67.34 |    58.82 |   66.66 |   67.34 | 52-53,61-68,79-85 
  ...rminalSize.ts |     100 |      100 |     100 |     100 |                   
  ...emeCommand.ts |    79.2 |    35.29 |     100 |    79.2 | ...15-116,120-121 
  useTimer.ts      |   97.59 |    94.73 |     100 |   97.59 | 17-18             
  ...lMigration.ts |       0 |        0 |       0 |       0 |                   
  ...rustModify.ts |     100 |    90.47 |     100 |     100 | 112,134           
  useTurnDiffs.ts  |   95.12 |    78.57 |     100 |   95.12 | 133-134,156-157   
  ...elcomeBack.ts |   87.36 |     90.9 |     100 |   87.36 | ...,94-96,114-115 
  ...reeSession.ts |   93.75 |       70 |     100 |   93.75 | 47-48,72          
  vim.ts           |      74 |    67.56 |   69.23 |      74 | ...1854-1861,1869 
 src/ui/layouts    |   91.25 |    89.47 |     100 |   91.25 |                   
  ...AppLayout.tsx |   90.99 |     87.5 |     100 |   90.99 | 61-63,111-116,152 
  ...AppLayout.tsx |   91.66 |    92.85 |     100 |   91.66 | 75-80             
 src/ui/models     |   80.72 |       80 |   71.42 |   80.72 |                   
  ...ableModels.ts |   80.72 |       80 |   71.42 |   80.72 | ...,61-71,125-127 
 ...noninteractive |     100 |      100 |    6.66 |     100 |                   
  ...eractiveUi.ts |     100 |      100 |    6.66 |     100 |                   
 src/ui/selection  |   93.56 |    86.13 |     100 |   93.56 |                   
  screen-buffer.ts |   94.73 |    64.28 |     100 |   94.73 | 51-52             
  ...ion-coords.ts |     100 |      100 |     100 |     100 |                   
  ...ction-span.ts |   93.81 |     92.1 |     100 |   93.81 | ...1,45-46,99-100 
  ...tion-state.ts |     100 |      100 |     100 |     100 |                   
  ...ction-text.ts |   93.85 |    93.44 |     100 |   93.85 | 30-34,130-131     
  ...selection.tsx |   91.88 |    78.57 |     100 |   91.88 | ...16-417,446-447 
 src/ui/state      |      95 |    81.81 |     100 |      95 |                   
  extensions.ts    |      95 |    81.81 |     100 |      95 | 69-70,89          
 src/ui/themes     |    98.5 |    73.17 |     100 |    98.5 |                   
  ansi-light.ts    |     100 |      100 |     100 |     100 |                   
  ansi.ts          |     100 |      100 |     100 |     100 |                   
  atom-one-dark.ts |     100 |      100 |     100 |     100 |                   
  ayu-light.ts     |     100 |      100 |     100 |     100 |                   
  ayu.ts           |     100 |      100 |     100 |     100 |                   
  color-utils.ts   |   99.23 |    97.05 |     100 |   99.23 | 277-278           
  default-light.ts |     100 |      100 |     100 |     100 |                   
  default.ts       |     100 |      100 |     100 |     100 |                   
  ...inal-theme.ts |   88.59 |    85.96 |     100 |   88.59 | ...57-261,266-270 
  dracula.ts       |     100 |      100 |     100 |     100 |                   
  github-dark.ts   |     100 |      100 |     100 |     100 |                   
  github-light.ts  |     100 |      100 |     100 |     100 |                   
  googlecode.ts    |     100 |      100 |     100 |     100 |                   
  no-color.ts      |     100 |      100 |     100 |     100 |                   
  qwen-dark.ts     |     100 |      100 |     100 |     100 |                   
  qwen-light.ts    |     100 |      100 |     100 |     100 |                   
  ...tic-tokens.ts |     100 |      100 |     100 |     100 |                   
  ...-of-purple.ts |     100 |      100 |     100 |     100 |                   
  theme-manager.ts |   88.68 |    84.52 |     100 |   88.68 | ...83-392,397-398 
  theme.ts         |     100 |    38.02 |     100 |     100 | ...34-449,457-461 
  xcode.ts         |     100 |      100 |     100 |     100 |                   
 src/ui/utils      |   87.61 |    85.68 |   95.81 |   87.61 |                   
  ...Colorizer.tsx |   80.31 |    85.41 |     100 |   80.31 | ...00-201,313-339 
  ...nRenderer.tsx |   80.07 |     75.6 |     100 |   80.07 | ...70,274,332-333 
  ...wnDisplay.tsx |   92.87 |    93.46 |     100 |   92.87 | ...,955,1002-1020 
  ...idDiagram.tsx |   87.79 |    95.34 |     100 |   87.79 | 156-179           
  ...eRenderer.tsx |   93.63 |    81.77 |   95.23 |   93.63 | ...47-750,803-808 
  ...odeDisplay.ts |   94.28 |    85.71 |     100 |   94.28 | 23,40             
  asciiCharts.ts   |    96.7 |     87.5 |     100 |    96.7 | 170-177,278       
  ...dWorkUtils.ts |     100 |      100 |     100 |     100 |                   
  ...boardUtils.ts |    52.9 |    74.15 |    92.3 |    52.9 | ...29,632-641,644 
  commandUtils.ts  |   98.38 |    92.38 |     100 |   98.38 | 108,136-137,343   
  computeStats.ts  |     100 |      100 |     100 |     100 |                   
  customBanner.ts  |   90.68 |    91.22 |     100 |   90.68 | ...13,324-327,334 
  displayUtils.ts  |   73.84 |    73.91 |     100 |   73.84 | ...34,36-40,42-46 
  formatters.ts    |   94.87 |    98.24 |     100 |   94.87 | 116-119           
  goal-runtime.ts  |   91.42 |       95 |     100 |   91.42 | 32-34             
  gradientUtils.ts |     100 |      100 |     100 |     100 |                   
  highlight.ts     |     100 |      100 |     100 |     100 |                   
  ...gap-notice.ts |     100 |      100 |     100 |     100 |                   
  ...oryMapping.ts |     100 |       95 |     100 |     100 | 44,103            
  historyUtils.ts  |   96.03 |     97.1 |     100 |   96.03 | 103-106           
  ...mage-parts.ts |   97.75 |    94.59 |     100 |   97.75 | 82-83             
  inline-math.ts   |   98.48 |    95.23 |     100 |   98.48 | 129-130           
  input-mouse.ts   |     100 |    85.71 |     100 |     100 | 48,93             
  isNarrowWidth.ts |     100 |      100 |     100 |     100 |                   
  ...olDetector.ts |   68.81 |       75 |   66.66 |   68.81 | ...27-132,160-161 
  latexRenderer.ts |   94.95 |     73.8 |     100 |   94.95 | ...76-178,184-187 
  layoutUtils.ts   |     100 |      100 |     100 |     100 |                   
  list-mouse.ts    |     100 |      100 |     100 |     100 |                   
  ...ightLoader.ts |     100 |       95 |     100 |     100 | 81                
  ...nUtilities.ts |   98.72 |    94.36 |     100 |   98.72 | 145-146           
  ...t-position.ts |     100 |     87.5 |     100 |     100 | 85                
  ...geRenderer.ts |   86.51 |    70.16 |   95.12 |   86.51 | ...1286,1326-1332 
  ...alRenderer.ts |   86.69 |     71.9 |     100 |   86.69 | ...1476,1513-1519 
  ...lsBySource.ts |     100 |    95.23 |     100 |     100 | 84                
  mouse.ts         |   92.85 |    74.19 |     100 |   92.85 | ...38,145,149-152 
  osc8.ts          |   91.33 |    79.03 |     100 |   91.33 | ...73,273,277-278 
  ...red-height.ts |   98.38 |    97.14 |     100 |   98.38 | 195-197           
  ...mConstants.ts |     100 |      100 |     100 |     100 |                   
  restoreGoal.ts   |     100 |      100 |     100 |     100 |                   
  ...storyUtils.ts |   82.86 |    79.48 |     100 |   82.86 | ...88-610,741-742 
  ...ickerUtils.ts |     100 |      100 |     100 |     100 |                   
  ...evel-label.ts |   77.77 |    66.66 |     100 |   77.77 | 18,22-24          
  ...are-cursor.ts |   89.47 |    85.71 |     100 |   89.47 | 39-44             
  ...ataService.ts |   93.17 |     79.1 |     100 |   93.17 | ...14,227,254-256 
  suggestions.ts   |     100 |      100 |     100 |     100 |                   
  ...izedOutput.ts |   95.19 |      100 |   88.88 |   95.19 | 121-126           
  ...nal-buffer.ts |     100 |      100 |     100 |     100 |                   
  ...e-renderer.ts |   90.61 |    83.44 |     100 |   90.61 | ...80,482-484,607 
  ...ize-reflow.ts |     100 |     92.3 |     100 |     100 | 57,62,209,217,347 
  ...wOptimizer.ts |     100 |    94.11 |     100 |     100 | 33,76             
  terminalSetup.ts |    4.37 |      100 |       0 |    4.37 | 44-393            
  textUtils.ts     |   97.94 |    95.49 |   94.11 |   97.94 | ...82-283,443-444 
  ...background.ts |     100 |      100 |     100 |     100 |                   
  todoSnapshot.ts  |   90.42 |    92.85 |     100 |   90.42 | ...06-207,240-241 
  ...isplay-map.ts |     100 |      100 |     100 |     100 |                   
  updateCheck.ts   |     100 |    92.75 |     100 |     100 | 227-239,331       
  windowTitle.ts   |   96.55 |    94.73 |     100 |   96.55 | 56-57             
  ...ow-keyword.ts |     100 |      100 |     100 |     100 |                   
 ...i/utils/export |   75.03 |     60.3 |   94.59 |   75.03 |                   
  collect.ts       |   71.27 |    66.38 |      96 |   71.27 | ...90-633,655-656 
  index.ts         |     100 |      100 |     100 |     100 |                   
  normalize.ts     |   80.42 |    50.68 |     100 |   80.42 | ...59-364,376-378 
  types.ts         |       0 |        0 |       0 |       0 | 1                 
  utils.ts         |     100 |      100 |     100 |     100 |                   
 ...ort/formatters |   52.92 |    47.22 |   71.42 |   52.92 |                   
  html.ts          |   84.61 |       50 |     100 |   84.61 | ...53,57-58,62-63 
  json.ts          |     100 |      100 |     100 |     100 |                   
  jsonl.ts         |   82.45 |     37.5 |     100 |   82.45 | ...48,50-51,65-66 
  markdown.ts      |   36.32 |    47.05 |      50 |   36.32 | ...16-219,233-295 
 src/ui/voice      |   81.27 |    79.92 |   81.94 |   81.27 |                   
  ...d-recorder.ts |     6.2 |      100 |       0 |     6.2 | ...33-159,162-163 
  ...o-recorder.ts |   84.61 |    93.33 |   57.14 |   84.61 | ...16-117,131-136 
  ...me-session.ts |   91.09 |     92.1 |     100 |   91.09 | ...99,305,316-319 
  sox-recorder.ts  |    92.7 |    71.87 |     100 |    92.7 | ...34-135,153-154 
  ...ailability.ts |     100 |      100 |     100 |     100 |                   
  ...e-keyterms.ts |     100 |      100 |     100 |     100 |                   
  voice-model.ts   |     100 |      100 |     100 |     100 |                   
  ...e-recorder.ts |   88.29 |    67.74 |   81.81 |   88.29 | ...,98-99,112,115 
  voice-refine.ts  |     100 |    93.33 |     100 |     100 | 92                
  ...ream-retry.ts |   86.79 |       70 |     100 |   86.79 | 16-18,48-49,59-60 
  ...am-session.ts |   88.02 |    66.66 |   84.61 |   88.02 | ...26,343-345,363 
  ...ranscriber.ts |     100 |      100 |     100 |     100 |                   
 src/utils         |   81.57 |    87.31 |    92.7 |   81.57 |                   
  ...p-profiler.ts |   98.39 |    92.59 |     100 |   98.39 | 141,185,235       
  acpModelUtils.ts |   97.36 |    95.19 |     100 |   97.36 | ...09-210,214-215 
  apiPreconnect.ts |   96.74 |    94.59 |     100 |   96.74 | 167-170           
  ...ol-call-id.ts |   84.61 |       60 |     100 |   84.61 | 26-27,37-38       
  ...ng-failure.ts |     100 |      100 |     100 |     100 |                   
  checks.ts        |   33.33 |      100 |       0 |   33.33 | 23-28             
  ...-api-error.ts |     100 |    96.42 |     100 |     100 | 14                
  cleanup.ts       |   84.05 |    94.11 |      80 |   84.05 | 80,111-121        
  commands.ts      |   97.45 |    96.66 |     100 |   97.45 | 153-155           
  ...Calculator.ts |     100 |      100 |     100 |     100 |                   
  cpuProfiler.ts   |   70.73 |    73.23 |   88.88 |   70.73 | ...27,430-431,438 
  deepMerge.ts     |     100 |    89.65 |     100 |     100 | 41-43,49          
  ...re-runtime.ts |     100 |      100 |     100 |     100 |                   
  ...ScopeUtils.ts |   97.56 |    88.88 |     100 |   97.56 | 67                
  doctorChecks.ts  |   70.31 |    74.57 |     100 |   70.31 | ...95-301,325-341 
  ...putCapture.ts |   90.65 |    86.31 |     100 |   90.65 | ...73,371,373-374 
  ...arResolver.ts |   97.14 |    96.55 |     100 |   97.14 | 125-126           
  errors.ts        |   97.56 |    94.64 |     100 |   97.56 | 69-70,304-305     
  events.ts        |     100 |      100 |     100 |     100 |                   
  ...on-mention.ts |   88.48 |     82.6 |     100 |   88.48 | ...56-160,164-168 
  gitUtils.ts      |   92.85 |    86.66 |     100 |   92.85 | ...13-116,164-167 
  ...AutoUpdate.ts |    93.1 |       94 |      90 |    93.1 | 103,108,179-190   
  ...tyWarnings.ts |     100 |      100 |     100 |     100 |                   
  ...lationInfo.ts |   97.68 |    94.28 |     100 |   97.68 | ...64,381-382,427 
  ...projection.ts |   95.27 |    95.58 |     100 |   95.27 | 140-145           
  jsonc-editor.ts  |   93.18 |    92.66 |     100 |   93.18 | ...80-381,384-385 
  languageUtils.ts |   98.88 |    97.01 |     100 |   98.88 | 184-185           
  load-undici.ts   |     100 |      100 |     100 |     100 |                   
  ...npm-update.ts |   86.64 |    77.02 |     100 |   86.64 | ...03-304,335-345 
  math.ts          |       0 |        0 |       0 |       0 | 1-15              
  ...er-mention.ts |     100 |    66.66 |     100 |     100 | 14,30,44-46       
  ...iagnostics.ts |   94.57 |    83.01 |   88.88 |   94.57 | ...05,311,315-317 
  ...serMessage.ts |     100 |      100 |     100 |     100 |                   
  ...onfigUtils.ts |   94.25 |    91.17 |     100 |   94.25 | ...30,436,439-443 
  ...iveHelpers.ts |   95.13 |    91.79 |     100 |   95.13 | ...53-454,552,565 
  osc.ts           |   97.18 |      100 |    87.5 |   97.18 | 182-183           
  package.ts       |   88.88 |    85.71 |     100 |   88.88 | 31-32             
  ...uggestions.ts |   84.29 |    70.83 |     100 |   84.29 | 70-76,92-103      
  processUtils.ts  |    92.3 |       80 |     100 |    92.3 | 45-46             
  readStdin.ts     |   93.67 |    94.11 |   85.71 |   93.67 | 79-83             
  relaunch.ts      |   95.87 |    89.28 |     100 |   95.87 | 103-105,131       
  resolvePath.ts   |     100 |      100 |     100 |     100 |                   
  runBudget.ts     |   99.35 |    96.77 |     100 |   99.35 | 119               
  sandbox-path.ts  |     100 |      100 |     100 |     100 |                   
  sandbox.ts       |   45.52 |    57.35 |   76.92 |   45.52 | ...1040,1052-1075 
  ...xImageName.ts |     100 |    77.77 |     100 |     100 | 10,18             
  sandboxMounts.ts |     100 |      100 |     100 |     100 |                   
  ...-path-argv.ts |     100 |      100 |     100 |     100 |                   
  sessionPaths.ts  |   90.84 |    90.56 |     100 |   90.84 | ...81-182,185-186 
  settingsUtils.ts |   82.35 |    89.57 |      90 |   82.35 | ...25-743,750-758 
  spawnWrapper.ts  |     100 |      100 |     100 |     100 |                   
  ...ate-verify.ts |     100 |      100 |     100 |     100 |                   
  ...one-update.ts |   39.81 |    77.44 |   62.16 |   39.81 | ...1193,1196-1215 
  ...upProfiler.ts |   98.47 |    94.66 |     100 |   98.47 | 132-133,308       
  ...upWarnings.ts |     100 |      100 |     100 |     100 |                   
  stdioHelpers.ts  |     100 |       90 |     100 |     100 | 23                
  systemInfo.ts    |   95.09 |    90.27 |     100 |   95.09 | ...54-255,260-264 
  ...InfoFields.ts |    87.5 |    65.85 |     100 |    87.5 | ...24-125,146-147 
  ...alSequence.ts |     100 |    97.61 |     100 |     100 | 60                
  ...iffPreview.ts |   76.47 |       25 |     100 |   76.47 | 13,17,23-24       
  ...on-handler.ts |    73.8 |       75 |     100 |    73.8 | 17-18,25-26,67-73 
  ...e-relaunch.ts |   89.61 |    86.66 |      50 |   89.61 | 56-61,83-84       
  ...entEmitter.ts |     100 |      100 |     100 |     100 |                   
  ...ansionHook.ts |     100 |      100 |     100 |     100 |                   
  ...upWarnings.ts |   87.75 |       75 |     100 |   87.75 | 47-48,53-54,57-58 
  version.ts       |     100 |    66.66 |     100 |     100 | 11                
  ...ingHandler.ts |     100 |      100 |     100 |     100 |                   
  ...WithBackup.ts |   65.04 |    77.77 |     100 |   65.04 | 97,112,133-172    
 ...s/housekeeping |   93.51 |    90.95 |   96.96 |   93.51 |                   
  cleanup.ts       |   92.59 |    93.75 |     100 |   92.59 | ...02-205,209-211 
  ...eractionAt.ts |     100 |      100 |     100 |     100 |                   
  scheduler.ts     |      93 |    88.34 |      95 |      93 | ...57-359,411-415 
  throttledOnce.ts |   95.95 |    93.93 |     100 |   95.95 | 77-78,153-154     
-------------------|---------|----------|---------|---------|-------------------
Core Package - Full Text Report
-------------------|---------|----------|---------|---------|-------------------
File               | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
-------------------|---------|----------|---------|---------|-------------------
All files          |   88.01 |    86.56 |   89.56 |   88.01 |                   
 src               |     100 |      100 |     100 |     100 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
 src/__mocks__/fs  |       0 |        0 |       0 |       0 |                   
  promises.ts      |       0 |        0 |       0 |       0 | 1-48              
 src/agents        |   90.45 |    84.65 |   94.88 |   90.45 |                   
  ...transcript.ts |   88.49 |    84.09 |     100 |   88.49 | ...32,640,646-650 
  ...ent-resume.ts |   85.59 |    77.75 |   83.33 |   85.59 | ...1794-1798,1801 
  ...ound-tasks.ts |   94.63 |    90.13 |   96.38 |   94.63 | ...1773,1793-1796 
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...ent-result.ts |    96.8 |    92.68 |     100 |    96.8 | 106,129-131       
  ...n-registry.ts |   94.79 |     87.7 |     100 |   94.79 | ...1067,1081-1083 
  ...w-snapshot.ts |   92.12 |    77.14 |     100 |   92.12 | ...65,189,196-198 
 src/agents/arena  |   76.94 |    68.22 |   78.94 |   76.94 |                   
  ...gentClient.ts |   79.47 |    88.88 |   81.81 |   79.47 | ...68-183,189-204 
  ArenaManager.ts  |   75.89 |     65.2 |   78.57 |   75.89 | ...1887,1893-1894 
  arena-events.ts  |   64.44 |      100 |      50 |   64.44 | ...71-175,178-183 
  diff-summary.ts  |    87.5 |    72.34 |     100 |    87.5 | ...32-133,137-138 
  index.ts         |     100 |      100 |     100 |     100 |                   
  types.ts         |     100 |      100 |     100 |     100 |                   
 ...gents/backends |   78.09 |    85.23 |   76.28 |   78.09 |                   
  ITermBackend.ts  |   97.97 |    93.93 |     100 |   97.97 | ...78-180,255,307 
  ...essBackend.ts |    90.9 |    85.36 |   93.33 |    90.9 | ...70,672,674-675 
  TmuxBackend.ts   |    90.7 |    76.55 |   97.36 |    90.7 | ...87,697,743-747 
  detect.ts        |   31.25 |      100 |       0 |   31.25 | 34-88             
  index.ts         |     100 |      100 |     100 |     100 |                   
  iterm-it2.ts     |     100 |     92.1 |     100 |     100 | 37-38,106         
  tmux-commands.ts |    6.64 |      100 |    3.03 |    6.64 | ...93-363,386-503 
  types.ts         |     100 |      100 |     100 |     100 |                   
 ...agents/runtime |   91.22 |    86.83 |   89.31 |   91.22 |                   
  agent-context.ts |     100 |      100 |     100 |     100 |                   
  agent-core.ts    |   85.07 |     76.8 |   77.77 |   85.07 | ...2291,2337-2339 
  agent-events.ts  |     100 |      100 |     100 |     100 |                   
  ...t-headless.ts |   93.49 |    89.41 |   83.33 |   93.49 | ...96-497,500-501 
  ...nteractive.ts |   81.01 |    82.35 |   76.66 |   81.01 | ...33,535-538,541 
  ...statistics.ts |   98.29 |    82.55 |     100 |   98.29 | 141,165,206,239   
  agent-types.ts   |     100 |      100 |     100 |     100 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...ool-policy.ts |   98.38 |      100 |    92.3 |   98.38 | 85-86             
  ...low-budget.ts |     100 |      100 |     100 |     100 |                   
  ...-scheduler.ts |   97.43 |    96.36 |     100 |   97.43 | 128-130           
  ...ow-journal.ts |   91.76 |    75.86 |     100 |   91.76 | ...38-139,179-181 
  ...chestrator.ts |   92.92 |    90.57 |   84.61 |   92.92 | ...2012,2061-2064 
  ...ow-prompts.ts |     100 |      100 |     100 |     100 |                   
  ...low-runner.ts |   94.85 |     87.5 |   92.85 |   94.85 | ...93,260,280-283 
  ...ow-sandbox.ts |   96.85 |    91.28 |     100 |   96.85 | ...1705,1711-1712 
  ...flow-saved.ts |   96.51 |    94.36 |     100 |   96.51 | 134-135,234-237   
  ...flow-stall.ts |    97.9 |    83.33 |     100 |    97.9 | 138-139,236       
 src/agents/tasks  |     100 |      100 |     100 |     100 |                   
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/agents/team   |   82.72 |    84.65 |   89.05 |   82.72 |                   
  TeamManager.ts   |    73.6 |    80.82 |   79.62 |    73.6 | ...1706,1729-1730 
  identity.ts      |     100 |      100 |     100 |     100 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...sionBridge.ts |     100 |      100 |     100 |     100 |                   
  mailbox.ts       |   96.02 |    87.23 |     100 |   96.02 | 352-358           
  ...ptAddendum.ts |     100 |      100 |     100 |     100 |                   
  tasks.ts         |   89.24 |    82.82 |     100 |   89.24 | ...-994,1038-1039 
  team-events.ts   |   60.52 |      100 |      50 |   60.52 | ...40-144,151-155 
  teamHelpers.ts   |   92.02 |    94.91 |   95.23 |   92.02 | ...31-332,368-378 
  types.ts         |     100 |      100 |     100 |     100 |                   
 ...eam/test-utils |   94.39 |    94.35 |   98.21 |   94.39 |                   
  ...on-harness.ts |   96.49 |       85 |     100 |   96.49 | 128-129,141-142   
  fake-agent.ts    |   98.49 |    95.16 |     100 |   98.49 | 201-203           
  fake-backend.ts  |   86.46 |    97.61 |   95.83 |   86.46 | 124-146           
 src/config        |   84.09 |    86.63 |   75.15 |   84.09 |                   
  approval-mode.ts |     100 |      100 |     100 |     100 |                   
  ...xtDefaults.ts |     100 |      100 |     100 |     100 |                   
  config.ts        |   83.38 |    86.34 |   73.59 |   83.38 | ...8728,8732-8733 
  constants.ts     |     100 |      100 |     100 |     100 |                   
  models.ts        |     100 |      100 |     100 |     100 |                   
  storage.ts       |   94.39 |    91.57 |   88.23 |   94.39 | ...45-446,449-450 
 ...nfirmation-bus |   98.27 |    97.14 |     100 |   98.27 |                   
  message-bus.ts   |   98.14 |    97.05 |     100 |   98.14 | 42-43             
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/core          |   92.41 |    88.11 |    93.3 |   92.41 |                   
  baseLlmClient.ts |    88.4 |     83.8 |   81.81 |    88.4 | ...59,672,678-680 
  client.ts        |   92.27 |    87.55 |   91.76 |   92.27 | ...4101,4199-4200 
  ...tGenerator.ts |   86.34 |    87.34 |   84.61 |   86.34 | ...96-497,542-548 
  ...lScheduler.ts |   90.05 |    84.67 |   96.15 |   90.05 | ...6219,6247-6263 
  geminiChat.ts    |    94.7 |    90.12 |   95.53 |    94.7 | ...5052,5100-5101 
  geminiRequest.ts |     100 |      100 |     100 |     100 |                   
  genai-compat.ts  |     100 |      100 |     100 |     100 |                   
  ...MediaLimit.ts |     100 |       96 |     100 |     100 | 96                
  ...htProtocol.ts |    9.09 |      100 |       0 |    9.09 | ...9,62-66,69-110 
  ...ream-error.ts |     100 |      100 |     100 |     100 |                   
  logger.ts        |   87.41 |    87.02 |     100 |   87.41 | ...64-568,614-628 
  ...lay-buffer.ts |     100 |      100 |     100 |     100 |                   
  ...dispatcher.ts |     100 |      100 |     100 |     100 |                   
  ...tyDefaults.ts |     100 |      100 |     100 |     100 |                   
  ...olExecutor.ts |   93.54 |    83.33 |      50 |   93.54 | 49-50             
  ...on-helpers.ts |   93.49 |    78.57 |     100 |   93.49 | ...10-211,228-229 
  ...issionFlow.ts |   98.97 |    96.96 |     100 |   98.97 | 107               
  ...try-policy.ts |     100 |      100 |     100 |     100 |                   
  ...ell-policy.ts |   94.89 |    88.54 |     100 |   94.89 | ...51-252,297-298 
  prompts.ts       |   93.64 |    91.42 |   83.33 |   93.64 | ...1209,1412-1413 
  ...ing-effort.ts |     100 |      100 |     100 |     100 |                   
  ...n-recovery.ts |   95.13 |       80 |     100 |   95.13 | ...06-107,142-144 
  ...t-profiler.ts |    97.9 |    81.15 |   88.23 |    97.9 | 117,124-125,130   
  ...port-retry.ts |     100 |      100 |     100 |     100 |                   
  tokenLimits.ts   |     100 |    91.89 |     100 |     100 | 87,122-139        
  ...reparation.ts |     100 |      100 |     100 |     100 |                   
  ...tion-guard.ts |   90.38 |    94.73 |     100 |   90.38 | 83-87             
  ...allIdUtils.ts |   98.41 |    93.47 |     100 |   98.41 | 36,45             
  ...okTriggers.ts |   99.45 |    92.43 |     100 |   99.45 | 182,193           
  ...terruption.ts |     100 |     92.3 |     100 |     100 | 86,104            
  turn.ts          |   98.67 |    93.07 |     100 |   98.67 | ...79,707-708,755 
  ...l-fallback.ts |     100 |      100 |     100 |     100 |                   
 ...ntentGenerator |   96.33 |    88.12 |   96.15 |   96.33 |                   
  ...tGenerator.ts |   97.24 |    86.72 |   94.87 |   97.24 | ...1436,1465,1476 
  converter.ts     |   96.19 |    89.25 |     100 |   96.19 | ...1329,1550-1552 
  index.ts         |       0 |        0 |       0 |       0 | 1-21              
  usage.ts         |     100 |      100 |     100 |     100 |                   
 ...ntentGenerator |   88.78 |    72.36 |   89.47 |   88.78 |                   
  ...tGenerator.ts |   87.18 |    71.83 |   88.88 |   87.18 | ...58-364,382-383 
  index.ts         |     100 |       80 |     100 |     100 | 50                
 ...ntentGenerator |   95.99 |    90.61 |   90.69 |   95.99 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...tGenerator.ts |   95.92 |    89.96 |   90.24 |   95.92 | ...1272-1273,1301 
  ...tDetection.ts |     100 |      100 |     100 |     100 |                   
 ...ntentGenerator |   91.86 |    90.62 |   95.61 |   91.86 |                   
  constants.ts     |     100 |      100 |     100 |     100 |                   
  converter.ts     |    91.3 |    89.49 |   96.87 |    91.3 | ...1942,2111-2126 
  errorHandler.ts  |     100 |      100 |     100 |     100 |                   
  index.ts         |   68.25 |    82.35 |      50 |   68.25 | 44-53,74-78,90-94 
  ...tGenerator.ts |    66.4 |    70.58 |   88.88 |    66.4 | ...51-157,168-169 
  pipeline.ts      |   95.48 |    91.27 |     100 |   95.48 | ...1309,1317,1416 
  ...ix-caching.ts |   95.23 |    92.85 |     100 |   95.23 | 45-46,69-70       
  ...ureContext.ts |     100 |      100 |     100 |     100 |                   
  ...ingOptions.ts |       0 |        0 |       0 |       0 | 1                 
  ...CallParser.ts |   92.24 |     92.4 |     100 |   92.24 | ...28-529,549-552 
  ...kingParser.ts |     100 |    96.87 |     100 |     100 | 42                
  types.ts         |       0 |        0 |       0 |       0 | 1                 
 ...rator/provider |   97.39 |    92.28 |    98.5 |   97.39 |                   
  dashscope.ts     |   98.36 |    95.08 |   96.42 |   98.36 | ...08-709,851-852 
  deepseek.ts      |   94.91 |    89.36 |     100 |   94.91 | ...31-132,145-146 
  default.ts       |   99.18 |    97.05 |     100 |   99.18 | 208               
  index.ts         |     100 |      100 |     100 |     100 |                   
  mimo.ts          |   94.11 |    66.66 |     100 |   94.11 | 29,52-53          
  minimax.ts       |     100 |      100 |     100 |     100 |                   
  mistral.ts       |   96.07 |    73.33 |     100 |   96.07 | 32-33             
  modelscope.ts    |     100 |      100 |     100 |     100 |                   
  types.ts         |       0 |        0 |       0 |       0 |                   
  utils.ts         |     100 |      100 |     100 |     100 |                   
  zai.ts           |   92.13 |    82.14 |     100 |   92.13 | ...,39-40,135-137 
 src/extension     |   87.71 |    84.62 |   92.57 |   87.71 |                   
  ...ive-safety.ts |     100 |      100 |     100 |     100 |                   
  ...-converter.ts |   80.55 |    73.66 |     100 |   80.55 | ...1133,1179-1180 
  corruptFile.ts   |     100 |       50 |     100 |     100 | 40-45             
  ...-converter.ts |     100 |      100 |     100 |     100 |                   
  ...me-refresh.ts |     100 |      100 |     100 |     100 |                   
  ...sion-store.ts |   90.94 |    86.26 |   97.91 |   90.94 | ...1230-1236,1280 
  ...ionManager.ts |   83.89 |    82.86 |   81.72 |   83.89 | ...2832,2861-2862 
  ...references.ts |     100 |     90.9 |     100 |     100 | ...05,129,197,200 
  ...onSettings.ts |    92.3 |     94.4 |     100 |    92.3 | ...98-501,570-571 
  ...-converter.ts |    75.9 |    85.71 |   85.71 |    75.9 | ...98,202,214-248 
  github.ts        |   90.48 |    82.71 |     100 |   90.48 | ...4,994-995,1005 
  http-client.ts   |   84.61 |       80 |     100 |   84.61 | 20-21             
  i18n.ts          |   78.26 |       96 |      50 |   78.26 | 104-110,116-123   
  index.ts         |     100 |      100 |     100 |     100 |                   
  marketplace.ts   |   88.39 |    83.11 |     100 |   88.39 | ...08,494,507-508 
  ...ork-policy.ts |   89.72 |       90 |     100 |   89.72 | ...36,148-154,156 
  npm.ts           |   89.02 |    81.81 |     100 |   89.02 | ...86-688,695-700 
  override.ts      |   94.11 |    93.33 |     100 |   94.11 | 63-64,81-82       
  ...-converter.ts |   94.89 |    90.41 |     100 |   94.89 | ...50-151,222-224 
  redaction.ts     |     100 |      100 |     100 |     100 |                   
  settings.ts      |   66.26 |      100 |      50 |   66.26 | 81-107,141-146    
  ...ceRegistry.ts |   94.01 |    83.14 |     100 |   94.01 | ...38-344,365-366 
  storage.ts       |     100 |      100 |     100 |     100 |                   
  ...ableSchema.ts |     100 |      100 |     100 |     100 |                   
  variables.ts     |   88.95 |    84.21 |     100 |   88.95 | ...32-235,238-241 
  ...extraction.ts |   85.77 |       81 |   89.47 |   85.77 | ...02-205,260-261 
 ...ent-plugins-v1 |   84.94 |    79.51 |     100 |   84.94 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  manifest.ts      |   81.87 |    84.48 |     100 |   81.87 | ...55-156,161-174 
  mcp.ts           |   84.98 |    79.56 |     100 |   84.98 | ...88-389,419-420 
  paths.ts         |     100 |    94.44 |     100 |     100 | 59                
  skills.ts        |   82.31 |    63.88 |     100 |   82.31 | ...38-141,150-151 
 src/followup      |   79.94 |    79.28 |    90.9 |   79.94 |                   
  followupState.ts |   98.44 |    95.74 |     100 |   98.44 | 236-237           
  index.ts         |     100 |      100 |     100 |     100 |                   
  overlayFs.ts     |   96.29 |    88.88 |     100 |   96.29 | 78,108,122        
  speculation.ts   |   71.88 |    65.71 |   71.42 |   71.88 | ...55-656,663-664 
  ...onToolGate.ts |   97.97 |     87.5 |     100 |   97.97 | 105,110           
  ...nGenerator.ts |   72.03 |    81.15 |   83.33 |   72.03 | ...68-219,331-333 
 src/generated     |       0 |        0 |       0 |       0 |                   
  git-commit.ts    |       0 |        0 |       0 |       0 | 1-10              
 src/goals         |   92.86 |    88.82 |   94.22 |   92.86 |                   
  ...eGoalStore.ts |   87.61 |    88.88 |   86.66 |   87.61 | ...85-188,196-204 
  ...t-verifier.ts |   96.27 |     90.9 |     100 |   96.27 | ...20,143-146,163 
  ...checkpoint.ts |   81.48 |    76.19 |     100 |   81.48 | ...02-105,115-118 
  goal-evidence.ts |   88.34 |    87.02 |    97.5 |   88.34 | ...1162,1185-1188 
  ...projection.ts |   66.66 |    72.97 |   33.33 |   66.66 | ...87,190,194-196 
  ...ersistence.ts |   87.29 |    85.96 |    87.5 |   87.29 | ...53-154,185-190 
  goal-protocol.ts |      96 |    93.75 |     100 |      96 | 167-168           
  goal-reducer.ts  |   94.91 |    92.06 |   96.96 |   94.91 | ...27,501,519-520 
  goal-runtime.ts  |   96.86 |    89.86 |   95.74 |   96.86 | ...1295-1296,1417 
  goal-tools.ts    |   98.22 |    93.02 |      95 |   98.22 | ...46-147,248-249 
  ...rn-context.ts |     100 |      100 |     100 |     100 |                   
  goal-verifier.ts |   92.46 |    92.85 |     100 |   92.46 | ...69-172,185-187 
  goal-wire.ts     |       0 |        0 |       0 |       0 | 1-28              
  goalHook.ts      |   96.91 |    92.42 |     100 |   96.91 | 115-120,221-222   
  goalJudge.ts     |   95.84 |    87.09 |     100 |   95.84 | ...55-356,448-449 
  index.ts         |     100 |      100 |     100 |     100 |                   
 src/hooks         |   88.07 |    86.25 |   88.54 |   88.07 |                   
  ...okRegistry.ts |   86.48 |    77.08 |     100 |   86.48 | ...41-344,362-369 
  ...bortSignal.ts |     100 |      100 |     100 |     100 |                   
  context-usage.ts |     100 |      100 |     100 |     100 |                   
  ...terpolator.ts |   96.66 |    93.33 |     100 |   96.66 | 66-67             
  ...HookRunner.ts |   96.68 |    87.23 |     100 |   96.68 | 110-112,231-233   
  ...Aggregator.ts |   96.57 |    91.48 |     100 |   96.57 | ...20-321,402,404 
  ...entHandler.ts |   95.57 |    84.76 |   94.73 |   95.57 | ...1040-1041,1051 
  hookPlanner.ts   |   87.55 |    85.54 |   86.66 |   87.55 | ...22-226,233-244 
  hookRegistry.ts  |   92.53 |    85.43 |     100 |   92.53 | ...39,458,462,466 
  hookRunner.ts    |   62.65 |    72.34 |   66.66 |   62.65 | ...70-771,780-781 
  hookSystem.ts    |   87.64 |     98.5 |   70.83 |   87.64 | ...58-759,765-766 
  ...HookRunner.ts |   79.06 |    66.66 |      80 |   79.06 | ...33-434,452-456 
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...edCallback.ts |     100 |      100 |     100 |     100 |                   
  ...HookRunner.ts |   94.19 |    84.37 |   81.81 |   94.19 | ...76-384,458-459 
  ...SkillHooks.ts |   78.75 |       75 |   66.66 |   78.75 | 62-66,137-152     
  ...oksManager.ts |   94.87 |    88.88 |     100 |   94.87 | ...84,325,327-329 
  ssrfGuard.ts     |   86.45 |    87.91 |     100 |   86.45 | ...85,289-295,301 
  stopHookCap.ts   |     100 |      100 |     100 |     100 |                   
  trustedHooks.ts  |      90 |    52.63 |     100 |      90 | ...53,66-67,97-98 
  types.ts         |   94.25 |    96.09 |   88.88 |   94.25 | ...46-547,632-636 
  urlValidator.ts  |     100 |      100 |     100 |     100 |                   
  ...it-context.ts |     100 |      100 |     100 |     100 |                   
 src/ide           |   76.98 |    85.03 |   79.03 |   76.98 |                   
  constants.ts     |     100 |      100 |     100 |     100 |                   
  detect-ide.ts    |     100 |      100 |     100 |     100 |                   
  ide-client.ts    |   69.16 |    84.65 |   68.29 |   69.16 | ...1068,1097-1105 
  ide-installer.ts |   89.06 |    79.31 |     100 |   89.06 | ...36,143-147,160 
  ideContext.ts    |     100 |      100 |     100 |     100 |                   
  process-utils.ts |   84.84 |    71.79 |     100 |   84.84 | ...37,151,193-194 
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/lsp           |   58.96 |    70.57 |   66.14 |   58.96 |                   
  ...nfigLoader.ts |   80.55 |       72 |   95.45 |   80.55 | ...02-504,508-514 
  ...ionFactory.ts |   42.81 |    73.07 |      50 |   42.81 | ...76-427,433-450 
  ...Normalizer.ts |   23.09 |    13.72 |   30.43 |   23.09 | ...04-905,909-924 
  ...verManager.ts |   75.73 |     80.1 |   79.66 |   75.73 | ...1346,1352-1382 
  ...eLspClient.ts |   32.78 |       80 |   16.66 |   32.78 | ...89-293,299-300 
  ...LspService.ts |      60 |    73.36 |   78.26 |      60 | ...1575,1635-1645 
  configHash.ts    |     100 |      100 |     100 |     100 |                   
  constants.ts     |     100 |      100 |     100 |     100 |                   
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/mcp           |    82.3 |    77.81 |   78.33 |    82.3 |                   
  configHash.ts    |     100 |      100 |     100 |     100 |                   
  constants.ts     |     100 |      100 |     100 |     100 |                   
  ...h-provider.ts |   86.95 |      100 |   33.33 |   86.95 | ...,93,97,101-102 
  ...h-provider.ts |   79.31 |    58.06 |     100 |   79.31 | ...26-933,940-942 
  ...en-storage.ts |   98.78 |    97.95 |     100 |   98.78 | 106-107           
  oauth-utils.ts   |   73.61 |    85.48 |    92.3 |   73.61 | ...46-366,392-421 
  ...n-provider.ts |   89.83 |       96 |   45.45 |   89.83 | ...43,147,151-152 
 .../token-storage |   82.12 |    88.19 |   89.28 |   82.12 |                   
  ...en-storage.ts |     100 |      100 |     100 |     100 |                   
  ...en-storage.ts |   87.08 |    87.03 |   95.23 |   87.08 | ...00-201,214-215 
  ...en-storage.ts |     100 |      100 |     100 |     100 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...en-storage.ts |   68.14 |    82.35 |   64.28 |   68.14 | ...81-295,298-314 
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/memory        |   87.83 |    83.81 |   90.47 |   87.83 |                   
  ...y-document.ts |   89.52 |    84.61 |     100 |   89.52 | ...24-325,329-330 
  ...nel-memory.ts |   97.36 |    96.63 |   96.42 |   97.36 | ...91-293,367-368 
  const.ts         |   94.28 |     92.3 |     100 |   94.28 | 66-67             
  dream.ts         |    64.6 |    72.22 |      50 |    64.6 | ...04-109,124-165 
  ...entPlanner.ts |     100 |    83.33 |     100 |     100 | 136,146           
  entries.ts       |   75.59 |    84.84 |   83.33 |   75.59 | ...56-157,172-180 
  extract.ts       |   92.41 |    79.41 |     100 |   92.41 | 56-61,100,119-122 
  ...entPlanner.ts |   91.59 |    76.74 |     100 |   91.59 | ...05,114-117,293 
  ...ionPlanner.ts |       0 |        0 |       0 |       0 | 1                 
  forget.ts        |   81.83 |       75 |   83.33 |   81.83 | ...51,474,478-507 
  indexer.ts       |   94.14 |       84 |     100 |   94.14 | ...32-233,334,337 
  ...kill-agent.ts |   97.94 |    89.36 |     100 |   97.94 | 82-83,179-180     
  manager.ts       |    78.4 |    82.29 |   77.77 |    78.4 | ...1482,1495-1497 
  ...ent-config.ts |   86.99 |    82.69 |   86.36 |   86.99 | ...69,389,396-402 
  memoryAge.ts     |   90.47 |       80 |     100 |   90.47 | 50-51             
  paths.ts         |     100 |      100 |     100 |     100 |                   
  ...ing-skills.ts |     100 |       72 |     100 |     100 | 31-35,73-78,97    
  prompt.ts        |   97.26 |    86.79 |     100 |   97.26 | ...10-218,222,225 
  recall.ts        |   82.06 |       75 |    90.9 |   82.06 | ...59-364,395-406 
  refresh.ts       |   93.58 |    89.58 |     100 |   93.58 | ...75-176,183-184 
  ...ceSelector.ts |    93.1 |    81.81 |     100 |    93.1 | ...25,127-128,136 
  remember.ts      |   98.89 |    90.19 |     100 |   98.89 | 50,70             
  scan.ts          |   93.12 |    77.41 |     100 |   93.12 | ...08-109,154,157 
  scopes.ts        |     100 |      100 |     100 |     100 |                   
  ...et-scanner.ts |     100 |      100 |     100 |     100 |                   
  ...entPlanner.ts |   77.24 |    74.07 |   72.22 |   77.24 | ...52-456,459,465 
  status.ts        |   10.52 |      100 |       0 |   10.52 | 41-98             
  store.ts         |   92.92 |    81.81 |     100 |   92.92 | ...16-117,147-148 
  ...git-status.ts |     100 |     87.5 |     100 |     100 | 30                
  ...cret-guard.ts |     100 |      100 |     100 |     100 |                   
  ...emory-sync.ts |   94.24 |    82.85 |     100 |   94.24 | ...34-236,246-247 
  types.ts         |     100 |      100 |     100 |     100 |                   
  ...ontextFile.ts |   81.21 |     79.1 |   81.81 |   81.21 | ...63-277,291-296 
 src/mocks         |       0 |        0 |       0 |       0 |                   
  msw.ts           |       0 |        0 |       0 |       0 | 1-9               
 src/models        |   92.55 |    88.97 |   91.13 |   92.55 |                   
  constants.ts     |     100 |      100 |     100 |     100 |                   
  ...tor-config.ts |   97.77 |    91.83 |     100 |   97.77 | 155,161,171       
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...nfigErrors.ts |   74.22 |    47.82 |   84.61 |   74.22 | ...,67-74,106-117 
  ...igResolver.ts |   98.71 |    93.33 |     100 |   98.71 | 166,328,334       
  modelRegistry.ts |     100 |    98.11 |     100 |     100 | 177,261           
  modelsConfig.ts  |   89.36 |    86.93 |   88.09 |   89.36 | ...1404,1433-1434 
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/output        |     100 |      100 |     100 |     100 |                   
  ...-formatter.ts |     100 |      100 |     100 |     100 |                   
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/permissions   |   83.79 |    91.17 |   71.07 |   83.79 |                   
  autoMode.ts      |   97.66 |    93.13 |     100 |   97.66 | ...82-589,635,712 
  ...transcript.ts |      98 |       84 |     100 |      98 | 200-201           
  classifier.ts    |      94 |    94.54 |     100 |      94 | 158-165,389-393   
  ...erousRules.ts |     100 |    89.36 |     100 |     100 | 110,133,147,175   
  ...alTracking.ts |     100 |      100 |     100 |     100 |                   
  ...e-commands.ts |   86.77 |     73.8 |     100 |   86.77 | 131-141,210-214   
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...on-manager.ts |   86.63 |    89.01 |      80 |   86.63 | ...1111,1217-1221 
  rule-parser.ts   |   94.49 |     92.7 |     100 |   94.49 | ...1447,1481-1483 
  ...-semantics.ts |   70.44 |    91.09 |   46.66 |   70.44 | ...2237,2311-2314 
  types.ts         |     100 |      100 |     100 |     100 |                   
 ...sifier-prompts |   99.04 |    95.23 |     100 |   99.04 |                   
  system-prompt.ts |   99.04 |    95.23 |     100 |   99.04 | 220               
 src/prompts       |   83.63 |      100 |    87.5 |   83.63 |                   
  mcp-prompts.ts   |   18.18 |      100 |       0 |   18.18 | 11-19             
  ...t-registry.ts |     100 |      100 |     100 |     100 |                   
 src/providers     |   83.71 |     78.6 |   81.25 |   83.71 |                   
  all-providers.ts |     100 |      100 |     100 |     100 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  install.ts       |   93.11 |     84.5 |     100 |   93.11 | ...56-257,330-331 
  ...der-config.ts |   75.85 |    74.04 |   78.26 |   75.85 | ...73-474,502-503 
  types.ts         |       0 |        0 |       0 |       0 | 1                 
 ...viders/presets |   97.82 |    91.66 |   63.63 |   97.82 |                   
  ...oding-plan.ts |   87.34 |      100 |       0 |   87.34 | 81-83,86-88,90-93 
  ...a-standard.ts |     100 |      100 |     100 |     100 |                   
  ...token-plan.ts |     100 |      100 |     100 |     100 |                   
  ...m-provider.ts |   97.05 |    81.25 |      75 |   97.05 | 118-119           
  deepseek.ts      |     100 |      100 |     100 |     100 |                   
  grok.ts          |     100 |      100 |     100 |     100 |                   
  idealab.ts       |     100 |      100 |     100 |     100 |                   
  minimax.ts       |     100 |      100 |     100 |     100 |                   
  modelscope.ts    |     100 |      100 |     100 |     100 |                   
  openrouter.ts    |     100 |      100 |     100 |     100 |                   
  requesty.ts      |     100 |      100 |     100 |     100 |                   
  zai.ts           |     100 |      100 |     100 |     100 |                   
 src/qwen          |   85.41 |    78.76 |   95.89 |   85.41 |                   
  ...tGenerator.ts |   98.64 |    98.18 |     100 |   98.64 | 105-106           
  qwenOAuth2.ts    |   82.79 |    73.75 |   90.62 |   82.79 | ...1205-1221,1251 
  ...kenManager.ts |   85.36 |    76.61 |     100 |   85.36 | ...52-757,778-783 
 src/resources     |     100 |      100 |     100 |     100 |                   
  ...e-registry.ts |     100 |      100 |     100 |     100 |                   
 src/services      |    90.3 |    85.75 |    96.9 |    90.3 |                   
  ...ionTrailer.ts |     100 |      100 |     100 |     100 |                   
  ...llRegistry.ts |   98.48 |    87.28 |     100 |   98.48 | 81-82,105,474-475 
  branch-points.ts |     100 |    95.23 |     100 |     100 | ...20,211,224,327 
  ...ionService.ts |   97.51 |    96.15 |     100 |   97.51 | ...,929,1072-1080 
  ...ingService.ts |   91.92 |    86.38 |    94.8 |   91.92 | ...2365,2392-2393 
  ...ttribution.ts |   91.73 |    87.71 |      90 |   91.73 | ...80-685,826-827 
  ...utSlimming.ts |    97.2 |    94.17 |     100 |    97.2 | ...39-340,378-381 
  cronScheduler.ts |   94.17 |    90.45 |      98 |   94.17 | ...1333,1736-1737 
  cronTasksFile.ts |   96.31 |    91.81 |     100 |   96.31 | ...11,336-337,483 
  cronTasksLock.ts |   94.44 |    89.47 |     100 |   94.44 | ...02-103,132-133 
  ...eryService.ts |   96.22 |    93.54 |      90 |   96.22 | 121,155-156,161   
  ...oryService.ts |   88.17 |    79.02 |    92.3 |   88.17 | ...1303,1344-1347 
  fileReadCache.ts |    97.5 |    96.07 |     100 |    97.5 | 349-350,363-364   
  ...temService.ts |    92.8 |    84.68 |   94.11 |    92.8 | ...53,479-486,531 
  ...ratedFiles.ts |      96 |    88.23 |     100 |      96 | 119-120,146-147   
  gitInit.ts       |     100 |      100 |     100 |     100 |                   
  ...reeService.ts |    73.7 |    68.49 |   95.83 |    73.7 | ...2196,2225-2226 
  ...on-service.ts |   87.38 |       72 |     100 |   87.38 | ...01-305,343-344 
  ...references.ts |   98.39 |    88.88 |     100 |   98.39 | 154-155,215-216   
  ...ionService.ts |   98.26 |    97.35 |     100 |   98.26 | ...13-714,761-762 
  ...ticsDumper.ts |   98.37 |    95.23 |     100 |   98.37 | 185-186           
  ...ureMonitor.ts |   95.82 |    90.52 |   97.05 |   95.82 | ...60,861,875-877 
  ...orRegistry.ts |   97.22 |    90.99 |     100 |   97.22 | ...55-456,609-610 
  ...ttachments.ts |   97.74 |     90.9 |     100 |   97.74 | 298-308,646       
  ...pi-history.ts |   98.94 |    88.88 |     100 |   98.94 | 43                
  ...ersistence.ts |   91.66 |    80.75 |     100 |   91.66 | ...1060-1061,1089 
  ...tory-state.ts |     100 |    95.23 |     100 |     100 | 31                
  ...on-service.ts |   94.49 |    92.26 |   97.14 |   94.49 | ...98-600,656-664 
  ...ce-service.ts |    98.5 |    94.11 |    90.9 |    98.5 | 64-65             
  ...ken-counts.ts |     100 |       96 |     100 |     100 | 58                
  ...ipt-reader.ts |   93.71 |    91.05 |   97.77 |   93.71 | ...2755-2756,2833 
  ...turn-state.ts |   94.11 |     90.9 |   91.66 |   94.11 | 108-112,129-130   
  ...est-helper.ts |       0 |        0 |       0 |       0 | 1-65              
  ...iter-lease.ts |   83.14 |    74.47 |   97.61 |   83.14 | ...2433,2445-2448 
  sessionRecap.ts  |   67.56 |    43.47 |     100 |   67.56 | ...60,178,180-183 
  ...ionService.ts |   89.31 |    85.79 |   96.05 |   89.31 | ...2643,2657-2677 
  sessionTitle.ts  |   95.75 |    77.41 |     100 |   95.75 | ...53-256,287-288 
  ...ionService.ts |   84.43 |    78.45 |   97.18 |   84.43 | ...2496,2502-2507 
  ...pInhibitor.ts |   97.42 |    92.77 |     100 |   97.42 | ...30,169,369-370 
  ...Estimation.ts |     100 |    94.11 |     100 |     100 | 118               
  ...ageService.ts |   97.76 |    91.59 |   93.75 |   97.76 | ...61-262,366,567 
  ...ite-origin.ts |     100 |    93.33 |     100 |     100 | 32                
  ...UseSummary.ts |   94.63 |    88.46 |     100 |   94.63 | ...62-164,214-215 
  ...rd-service.ts |     100 |    88.37 |     100 |     100 | ...29,145-146,241 
  ...oryService.ts |   90.72 |    84.07 |     100 |   90.72 | ...06-509,561-562 
  ...reeCleanup.ts |   14.42 |      100 |   33.33 |   14.42 | 58-186            
  ...ionService.ts |   88.36 |     87.7 |     100 |   88.36 | ...48-449,465-466 
 ...icrocompaction |    98.9 |    95.08 |     100 |    98.9 |                   
  microcompact.ts  |    98.9 |    95.08 |     100 |    98.9 | ...40,749,758-759 
 ...s/visionBridge |   98.81 |    92.12 |     100 |   98.81 |                   
  ...capability.ts |     100 |      100 |     100 |     100 |                   
  ...part-utils.ts |     100 |      100 |     100 |     100 |                   
  ...ion-bridge.ts |   98.72 |    82.35 |     100 |   98.72 | 65,71             
  ...-constants.ts |     100 |      100 |     100 |     100 |                   
  ...ge-service.ts |   98.61 |     94.7 |     100 |   98.61 | ...06,666,679-680 
 src/skills        |   89.29 |    85.92 |   93.61 |   89.29 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...activation.ts |     100 |    93.33 |     100 |     100 | 93,112            
  skill-curator.ts |   89.71 |    81.54 |     100 |   89.71 | ...01-902,904-907 
  skill-load.ts    |   94.84 |    87.69 |     100 |   94.84 | ...03,223,235-237 
  skill-manager.ts |   84.82 |    85.29 |   83.33 |   84.82 | ...1243,1250-1254 
  skill-paths.ts   |   90.42 |     87.5 |     100 |   90.42 | ...19-120,125-126 
  symlinkScope.ts  |     100 |      100 |     100 |     100 |                   
  types.ts         |   97.91 |    98.03 |     100 |   97.91 | 277-278           
 ...ataviz/scripts |   80.06 |    95.23 |   88.23 |   80.06 |                   
  ...te_palette.js |   80.06 |    95.23 |   88.23 |   80.06 | 261-296,306-328   
 ...s/bundled/loop |   97.48 |    95.77 |     100 |   97.48 |                   
  ...omous-loop.ts |     100 |      100 |     100 |     100 |                   
  ...-task-file.ts |   94.85 |     92.4 |     100 |   94.85 | ...56,367,375-376 
  ...k-resolver.ts |     100 |      100 |     100 |     100 |                   
 src/subagents     |   87.72 |    89.01 |   96.55 |   87.72 |                   
  ...ter-schema.ts |     100 |    98.07 |     100 |     100 | 99                
  ...tin-agents.ts |     100 |      100 |     100 |     100 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...nt-manager.ts |   84.48 |    85.91 |   94.87 |   84.48 | ...1582,1659-1660 
  types.ts         |     100 |      100 |     100 |     100 |                   
  validation.ts    |   92.46 |    95.18 |     100 |   92.46 | 47-52,63-68,71-76 
 src/telemetry     |    82.4 |    84.26 |   85.74 |    82.4 |                   
  ...ty-tracker.ts |     100 |      100 |     100 |     100 |                   
  config.ts        |     100 |      100 |     100 |     100 |                   
  constants.ts     |     100 |      100 |     100 |     100 |                   
  ...on-metrics.ts |   99.08 |    80.95 |     100 |   99.08 | 185,199           
  ...on-tracing.ts |   76.92 |    75.71 |   73.68 |   76.92 | ...88,395-397,413 
  ...attributes.ts |   96.98 |    91.37 |     100 |   96.98 | ...47-348,366-367 
  ...ag-metrics.ts |     100 |    77.77 |     100 |     100 | 21,40             
  ...t-loop-lag.ts |   96.85 |    85.71 |     100 |   96.85 | 170-173           
  ...-exporters.ts |   65.78 |    83.33 |   55.55 |   65.78 | ...04-105,108-109 
  ...ai-content.ts |    74.5 |    66.41 |   91.66 |    74.5 | ...1480,1493-1502 
  ...i-provider.ts |     100 |       99 |     100 |     100 | 99                
  ...ai-request.ts |   87.52 |    92.79 |   83.78 |   87.52 | ...55-561,564-570 
  gen-ai-usage.ts  |     100 |      100 |     100 |     100 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...t.circular.ts |       0 |        0 |       0 |       0 | 1-111             
  ...-processor.ts |   99.12 |    96.03 |      95 |   99.12 | 150,379-380       
  ...t.circular.ts |       0 |        0 |       0 |       0 | 1-128             
  loggers.ts       |   60.73 |    78.01 |   66.66 |   60.73 | ...1507,1524-1544 
  metrics.ts       |   80.37 |    82.35 |   80.95 |   80.37 | ...1150,1153-1164 
  otlp-urls.ts     |     100 |      100 |     100 |     100 |                   
  ...attributes.ts |     100 |      100 |     100 |     100 |                   
  ...ime-config.ts |       0 |        0 |       0 |       0 | 1                 
  sanitize.ts      |      80 |    83.33 |     100 |      80 | 35-36,41-42       
  ...rters-grpc.ts |     100 |      100 |     100 |     100 |                   
  ...rters-http.ts |     100 |      100 |     100 |     100 |                   
  sdk-impl.ts      |   93.89 |    86.32 |      75 |   93.89 | ...39,489-490,506 
  sdk.ts           |    82.7 |     90.9 |   66.66 |    82.7 | ...00-204,242-264 
  ...on-context.ts |     100 |      100 |     100 |     100 |                   
  ...ion-events.ts |     100 |      100 |     100 |     100 |                   
  ...on-tracing.ts |   91.13 |    88.64 |    97.5 |   91.13 | ...1914,1943-1946 
  ...etry-utils.ts |     100 |      100 |     100 |     100 |                   
  ...l-decision.ts |     100 |      100 |     100 |     100 |                   
  trace-context.ts |     100 |      100 |     100 |     100 |                   
  ...e-id-utils.ts |     100 |      100 |     100 |     100 |                   
  tracer.ts        |   98.56 |    88.63 |     100 |   98.56 | 52,101            
  types.ts         |   83.09 |    88.31 |   86.36 |   83.09 | ...1467,1471-1478 
  uiTelemetry.ts   |   97.18 |    93.93 |      88 |   97.18 | ...70,314,461-462 
 ...ry/qwen-logger |   74.23 |     80.7 |      70 |   74.23 |                   
  event-types.ts   |       0 |        0 |       0 |       0 |                   
  qwen-logger.ts   |   74.23 |    80.53 |   69.49 |   74.23 | ...1122,1160-1161 
 src/test-utils    |   96.38 |    98.61 |   83.33 |   96.38 |                   
  config.ts        |     100 |      100 |     100 |     100 |                   
  ...st-helpers.ts |   94.11 |       90 |     100 |   94.11 | 69-70             
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...mised-lock.ts |     100 |      100 |     100 |     100 |                   
  mock-tool.ts     |   94.85 |      100 |   78.78 |   94.85 | ...53,227-228,241 
  ...aceContext.ts |     100 |      100 |     100 |     100 |                   
 src/tools         |   86.29 |     85.1 |   88.82 |   86.29 |                   
  ...erQuestion.ts |   89.71 |    80.76 |   91.66 |   89.71 | ...66-367,374-375 
  ...-registrar.ts |    77.7 |    66.66 |   66.66 |    77.7 | ...72-277,292-294 
  ...ub-session.ts |   89.67 |     91.3 |   81.81 |   89.67 | ...03-304,315-322 
  cron-create.ts   |   90.64 |    92.85 |   72.72 |   90.64 | ...,73-74,223-231 
  cron-delete.ts   |   97.56 |      100 |   83.33 |   97.56 | 31-32             
  cron-list.ts     |   98.23 |    95.34 |    87.5 |   98.23 | 57-58             
  diffOptions.ts   |     100 |      100 |     100 |     100 |                   
  display-image.ts |   87.42 |    84.84 |   88.88 |   87.42 | ...29-134,194-195 
  edit.ts          |   82.76 |    86.77 |   81.25 |   82.76 | ...45-746,865-915 
  ...r-worktree.ts |   83.14 |    67.56 |    87.5 |   83.14 | ...84-187,278-279 
  enterPlanMode.ts |      85 |     82.6 |    87.5 |      85 | ...28-133,161-175 
  exit-worktree.ts |   83.29 |    83.65 |   94.44 |   83.29 | ...14-515,537-538 
  exitPlanMode.ts  |      95 |    85.29 |     100 |      95 | ...21-325,344,378 
  ...permission.ts |     100 |      100 |     100 |     100 |                   
  glob.ts          |   96.33 |     88.5 |     100 |   96.33 | ...24-225,373,376 
  grep.ts          |   90.73 |    86.61 |   85.71 |   90.73 | ...76-677,727-728 
  ...adTracking.ts |     100 |      100 |     100 |     100 |                   
  image-gen.ts     |   91.66 |    77.41 |    90.9 |   91.66 | ...13-214,221-222 
  list-agents.ts   |   94.02 |    82.35 |   83.33 |   94.02 | 31-32,47-48       
  loop-wakeup.ts   |   99.27 |    92.85 |     100 |   99.27 | 45                
  ls.ts            |   96.74 |    90.27 |     100 |   96.74 | 176-181,212,216   
  lsp.ts           |   72.71 |     59.5 |   90.32 |   72.71 | ...1212,1214-1215 
  ...nt-manager.ts |   82.13 |    80.47 |   85.71 |   82.13 | ...3234,3236-3237 
  mcp-client.ts    |   80.03 |    86.58 |   89.47 |   80.03 | ...2272,2276-2279 
  ...ry-timeout.ts |     100 |      100 |     100 |     100 |                   
  mcp-errors.ts    |     100 |      100 |     100 |     100 |                   
  ...pool-entry.ts |   79.21 |    85.71 |   81.57 |   79.21 | ...1341,1349-1350 
  ...ool-events.ts |       8 |      100 |       0 |       8 | 132-158           
  mcp-pool-key.ts  |   97.46 |    93.93 |     100 |   97.46 | 176-177           
  ...ce-content.ts |   96.55 |    91.17 |     100 |   96.55 | 80-82             
  mcp-retry.ts     |   97.67 |    95.65 |     100 |   97.67 | 131-132           
  ...ion-config.ts |     100 |      100 |     100 |     100 |                   
  mcp-status.ts    |     100 |      100 |     100 |     100 |                   
  mcp-tool.ts      |   98.35 |    93.71 |     100 |   98.35 | ...-990,1045-1046 
  ...sport-pool.ts |   83.98 |     80.3 |   88.46 |   83.98 | ...1409,1416-1420 
  ...ace-budget.ts |   87.27 |     82.6 |     100 |   87.27 | ...00-305,340-345 
  memory-config.ts |     100 |      100 |     100 |     100 |                   
  ...iable-tool.ts |     100 |    84.61 |     100 |     100 | 101,108           
  monitor.ts       |   91.82 |    83.09 |   88.46 |   91.82 | ...99,612,810-815 
  notebook-edit.ts |   85.71 |    77.08 |   81.25 |   85.71 | ...96-912,958-959 
  ...escendants.ts |   36.17 |    64.51 |   55.55 |   36.17 | ...46-310,385-390 
  ...nforcement.ts |   83.21 |    90.69 |     100 |   83.21 | 147-158,207-220   
  read-file.ts     |   95.49 |    88.52 |   86.66 |   95.49 | ...49,464,536-537 
  ...p-resource.ts |   96.85 |      100 |   91.66 |   96.85 | 92-96             
  ...d-artifact.ts |   91.18 |    86.71 |    87.5 |   91.18 | ...26-427,441-453 
  ripGrep.ts       |    94.6 |    87.26 |   95.23 |    94.6 | ...33-734,740-741 
  ...-transport.ts |   71.42 |    55.55 |   71.42 |   71.42 | ...36-137,143-144 
  send-message.ts  |   81.13 |    89.74 |    62.5 |   81.13 | ...80-286,363-371 
  ...n-mcp-view.ts |   94.07 |    91.89 |    90.9 |   94.07 | 131-139           
  shell.ts         |   78.96 |    84.29 |      93 |   78.96 | ...5036,5111-5112 
  skill-utils.ts   |     100 |      100 |     100 |     100 |                   
  skill.ts         |   91.39 |    92.55 |      90 |   91.39 | ...84,488,534-556 
  ...eticOutput.ts |   95.12 |      100 |      80 |   95.12 | 87-88             
  task-create.ts   |    94.4 |    93.33 |   81.81 |    94.4 | 45-49,63-64,95    
  task-list.ts     |   78.22 |    84.21 |   83.33 |   78.22 | ...66,105,109-116 
  task-stop.ts     |   93.14 |    96.15 |   85.71 |   93.14 | 39-40,54-64       
  task-update.ts   |   82.89 |    83.92 |    92.3 |   82.89 | ...14-422,454-465 
  team-create.ts   |   97.22 |    85.71 |   83.33 |   97.22 | 48-49,129-130     
  team-delete.ts   |   86.74 |    83.33 |   83.33 |   86.74 | 37-38,42-48,72-73 
  ...n-approval.ts |   92.14 |    96.77 |   77.77 |   92.14 | 38-39,42-43,93-99 
  todoWrite.ts     |   95.13 |    87.85 |   93.33 |   95.13 | ...23-527,540-545 
  tool-error.ts    |     100 |      100 |     100 |     100 |                   
  tool-names.ts    |     100 |      100 |     100 |     100 |                   
  tool-registry.ts |   78.57 |    79.59 |    82.6 |   78.57 | ...89-990,998-999 
  tool-search.ts   |   96.19 |    89.72 |   93.33 |   96.19 | ...09,259-264,426 
  tools.ts         |   93.11 |    92.53 |   91.66 |   93.11 | ...69-570,586-592 
  ...reapproved.ts |   99.27 |    94.11 |     100 |   99.27 | 170               
  web-fetch.ts     |   96.05 |    90.54 |   96.77 |   96.05 | ...85-786,800-801 
  web-search.ts    |   90.58 |    83.57 |      80 |   90.58 | ...1025,1083-1086 
  write-file.ts    |   86.72 |    84.92 |   88.88 |   86.72 | ...25-828,865-900 
  zoom-image.ts    |   95.76 |    93.75 |      90 |   95.76 | 54-59,203-204     
 src/tools/agent   |   86.92 |    87.48 |   88.59 |   86.92 |                   
  agent.ts         |   85.51 |    86.38 |   86.17 |   85.51 | ...4333,4367-4377 
  fork-profile.ts  |   93.65 |       90 |     100 |   93.65 | ...33-134,171-174 
  fork-subagent.ts |   98.73 |       95 |     100 |   98.73 | 101-102,173       
 ...tools/artifact |   95.78 |    92.51 |   88.63 |   95.78 |                   
  artifact-tool.ts |   91.46 |    88.46 |   71.42 |   91.46 | ...13-314,322-325 
  ...-publisher.ts |     100 |    85.71 |     100 |     100 | 32                
  ...-publisher.ts |   96.74 |    97.72 |    87.5 |   96.74 | 29-30,156-157     
  html.ts          |     100 |    96.77 |     100 |     100 | 122               
  ...-publisher.ts |     100 |       80 |     100 |     100 | 30                
  oss-publisher.ts |    98.1 |    91.48 |     100 |    98.1 | 43-45             
  publisher.ts     |     100 |      100 |     100 |     100 |                   
 ...s/computer-use |   90.21 |    82.17 |   78.08 |   90.21 |                   
  bootstrap.ts     |   59.42 |    80.95 |   41.66 |   59.42 | ...35-339,341-345 
  client.ts        |   80.11 |       90 |   77.77 |   80.11 | ...97,242-243,274 
  constants.ts     |     100 |    94.73 |     100 |     100 | 129,256           
  downloader.ts    |   65.29 |    52.77 |   58.33 |   65.29 | ...99-300,316-355 
  index.ts         |     100 |      100 |     100 |     100 |                   
  install-state.ts |   94.44 |    72.72 |     100 |   94.44 | 44-45             
  ...n-detector.ts |     100 |     87.5 |     100 |     100 | 50                
  schemas.ts       |     100 |      100 |     100 |     100 |                   
  tool.ts          |    96.3 |    85.71 |     100 |    96.3 | 75-76,184,252-258 
 ...tools/workflow |   86.51 |    84.81 |      75 |   86.51 |                   
  workflow.ts      |   86.51 |    84.81 |      75 |   86.51 | ...67,512,514-515 
 src/utils         |   92.89 |    89.67 |    96.9 |   92.89 |                   
  LruCache.ts      |     100 |      100 |     100 |     100 |                   
  ...Controller.ts |     100 |      100 |     100 |     100 |                   
  ...ssageQueue.ts |     100 |      100 |     100 |     100 |                   
  ...cFileWrite.ts |   94.94 |    92.47 |     100 |   94.94 | ...43-544,651-655 
  bareMode.ts      |   81.81 |      100 |      50 |   81.81 | 18-19             
  ...ry-content.ts |   98.45 |    95.45 |     100 |   98.45 | 132-133,159-160   
  browser.ts       |   86.84 |    78.94 |     100 |   86.84 | 34,36-37,65-66    
  btwUtils.ts      |   13.95 |      100 |       0 |   13.95 | 17-31,34-55       
  bundlePaths.ts   |     100 |      100 |     100 |     100 |                   
  ...on-context.ts |     100 |      100 |     100 |     100 |                   
  ...igResolver.ts |     100 |      100 |     100 |     100 |                   
  ...engthError.ts |   91.06 |    89.47 |     100 |   91.06 | ...46-147,154-155 
  ...n-branches.ts |   95.88 |    94.11 |      95 |   95.88 | ...98-499,511-524 
  ...tion-chain.ts |     100 |      100 |     100 |     100 |                   
  cronDisplay.ts   |     100 |    97.61 |     100 |     100 | 46                
  cronParser.ts    |   95.34 |    93.33 |     100 |   95.34 | 41-42,47-48,70-71 
  debugLogger.ts   |   96.66 |    96.61 |   88.88 |   96.66 | 192-196           
  editHelper.ts    |   93.63 |     83.9 |     100 |   93.63 | ...27-428,462-463 
  editor.ts        |   97.65 |    95.45 |     100 |   97.65 | ...35-336,338-339 
  encoding.ts      |     100 |      100 |     100 |     100 |                   
  env.ts           |     100 |      100 |     100 |     100 |                   
  ...arResolver.ts |   94.28 |    88.88 |     100 |   94.28 | 28-29,125-126     
  ...entContext.ts |   96.63 |    90.13 |   96.66 |   96.63 | ...42,444-445,512 
  errorParsing.ts  |     100 |      100 |     100 |     100 |                   
  ...rReporting.ts |   95.65 |    93.33 |     100 |   95.65 | 37-38             
  errors.ts        |   83.39 |    95.17 |    61.9 |   83.39 | ...81-397,401-407 
  fetch.ts         |   90.68 |    82.51 |     100 |   90.68 | ...72,483-484,503 
  file-identity.ts |     100 |      100 |     100 |     100 |                   
  fileUtils.ts     |   94.87 |    92.97 |   96.15 |   94.87 | ...1907,1915-1916 
  forkedAgent.ts   |   92.45 |    82.35 |   93.75 |   92.45 | ...34,642,647-654 
  formatters.ts    |     100 |      100 |     100 |     100 |                   
  ...eUtilities.ts |    92.4 |    86.95 |     100 |    92.4 | ...52-158,168-169 
  ...rStructure.ts |   94.39 |    94.28 |     100 |   94.39 | ...29-132,343-348 
  getPty.ts        |   31.57 |       50 |     100 |   31.57 | 26-38             
  git-branches.ts  |    91.6 |    84.21 |    92.3 |    91.6 | ...90,405-410,570 
  ...fig-safety.ts |   97.01 |       80 |     100 |   97.01 | 53-54             
  gitDiff.ts       |   95.19 |    81.36 |     100 |   95.19 | ...1073,1419-1420 
  gitDirect.ts     |   98.84 |    94.28 |     100 |   98.84 | 234,318           
  ...noreParser.ts |   94.48 |    93.22 |     100 |   94.48 | ...23-124,158-159 
  gitUtils.ts      |   78.83 |    82.35 |    87.5 |   78.83 | ...22-123,164-215 
  github-prs.ts    |   95.74 |    82.27 |     100 |   95.74 | 216,314-322       
  iconvHelper.ts   |     100 |      100 |     100 |     100 |                   
  ...rePatterns.ts |     100 |      100 |     100 |     100 |                   
  image-view.ts    |   95.08 |    93.33 |     100 |   95.08 | ...62-166,234-238 
  ...ionManager.ts |     100 |     90.9 |     100 |     100 | 27                
  ...lPromptIds.ts |     100 |      100 |     100 |     100 |                   
  ...on-context.ts |     100 |      100 |     100 |     100 |                   
  jsonl-utils.ts   |   95.41 |    93.61 |     100 |   95.41 | ...27-328,370-373 
  ...-detection.ts |     100 |      100 |     100 |     100 |                   
  ...iconv-lite.ts |     100 |      100 |     100 |     100 |                   
  ...simple-git.ts |   96.77 |    91.66 |     100 |   96.77 | 38                
  ...m-headless.ts |      96 |    88.88 |     100 |      96 | 34                
  ...iagnostics.ts |    96.4 |     94.2 |     100 |    96.4 | ...66,293-294,376 
  ...yDiscovery.ts |    92.4 |    89.13 |     100 |    92.4 | ...28,331,522-525 
  ...tProcessor.ts |   94.01 |       90 |     100 |   94.01 | ...47-353,445-446 
  ...Inspectors.ts |     100 |      100 |     100 |     100 |                   
  modelId.ts       |   98.96 |    98.21 |     100 |   98.96 | 153               
  ...kerChecker.ts |    90.9 |    91.66 |     100 |    90.9 | 73-79             
  notebook.ts      |   94.57 |    89.91 |   95.83 |   94.57 | ...21,333,385-387 
  openaiLogger.ts  |   91.66 |    89.74 |     100 |   91.66 | ...26-228,251-256 
  osc8.ts          |   54.26 |    64.86 |   83.33 |   54.26 | ...72-195,197-257 
  partUtils.ts     |     100 |    98.64 |     100 |     100 | 211               
  pathReader.ts    |     100 |      100 |     100 |     100 |                   
  paths.ts         |   90.88 |     90.6 |     100 |   90.88 | ...25-626,628-630 
  pdf.ts           |   92.17 |    85.81 |     100 |   92.17 | ...64-565,606-611 
  projectPath.ts   |     100 |      100 |     100 |     100 |                   
  projectRoot.ts   |   71.73 |    78.57 |     100 |   71.73 | 54-66             
  ...ectSummary.ts |   89.62 |    72.41 |     100 |   89.62 | ...40-145,196-199 
  ...tIdContext.ts |     100 |      100 |     100 |     100 |                   
  proxyUtils.ts    |     100 |      100 |     100 |     100 |                   
  ...rDetection.ts |   71.15 |       86 |     100 |   71.15 | ...-90,96-101,147 
  ...noreParser.ts |   92.63 |    91.66 |     100 |   92.63 | ...77-178,197-198 
  rateLimit.ts     |   93.75 |    89.62 |     100 |   93.75 | ...13,218-219,262 
  ...text-range.ts |   96.98 |    87.15 |     100 |   96.98 | ...87-688,763-764 
  readManyFiles.ts |   95.75 |    80.86 |     100 |   95.75 | ...05,558,568-572 
  retry.ts         |   96.09 |    92.52 |     100 |   96.09 | ...67,558-559,577 
  retryContext.ts  |     100 |      100 |     100 |     100 |                   
  ...sification.ts |   97.63 |    97.08 |     100 |   97.63 | ...17,251-252,278 
  retryPolicy.ts   |   97.72 |    90.56 |     100 |   97.72 | 130-131           
  ripgrepUtils.ts  |   90.04 |    93.43 |   95.45 |   90.04 | ...55-565,598-599 
  ...sDiscovery.ts |   97.46 |    93.05 |     100 |   97.46 | ...04,182-183,202 
  ...iagnostics.ts |   83.08 |     67.5 |   92.59 |   83.08 | ...23,543-544,550 
  ...tchOptions.ts |   84.87 |    86.71 |   96.29 |   84.87 | ...71,696,725-734 
  ...odelPrefix.ts |     100 |      100 |     100 |     100 |                   
  runtimeStatus.ts |   97.77 |    91.48 |     100 |   97.77 | 172-173           
  safe-mode.ts     |     100 |      100 |     100 |     100 |                   
  safeJsonParse.ts |     100 |      100 |     100 |     100 |                   
  ...nStringify.ts |     100 |      100 |     100 |     100 |                   
  ...-child-env.ts |     100 |      100 |     100 |     100 |                   
  ...aConverter.ts |   98.03 |    97.75 |     100 |   98.03 | 100,102-103       
  ...aValidator.ts |   92.09 |    83.65 |   90.47 |   92.09 | ...60,882-883,896 
  ...r-launcher.ts |   96.35 |    93.97 |   85.71 |   96.35 | ...35-336,347-348 
  sedEditParser.ts |   91.78 |    92.18 |     100 |   91.78 | ...66-569,645-646 
  ...nIdContext.ts |     100 |      100 |     100 |     100 |                   
  ...orageUtils.ts |   96.21 |    85.21 |     100 |   96.21 | ...70,386,466,485 
  ...-pager-env.ts |     100 |      100 |     100 |     100 |                   
  ...fety-rules.ts |     100 |     89.7 |     100 |     100 | ...01,304,309-311 
  shell-utils.ts   |   86.26 |    88.58 |     100 |   86.26 | ...2295,2302-2306 
  ...lAstParser.ts |    98.3 |    91.59 |     100 |    98.3 | ...1340-1342,1352 
  ...ContextEnv.ts |     100 |       92 |     100 |     100 | 50-52             
  ...nlyChecker.ts |   96.33 |    96.57 |     100 |   96.33 | ...83-284,292-293 
  sideQuery.ts     |   86.82 |    86.66 |     100 |   86.82 | ...79-185,187-193 
  ...pEventSink.ts |     100 |       80 |     100 |     100 | 61                
  ...tGenerator.ts |     100 |      100 |     100 |     100 |                   
  ...ameContext.ts |     100 |      100 |     100 |     100 |                   
  symlink.ts       |   77.77 |       50 |     100 |   77.77 | 44,54-59          
  ...e-encoding.ts |   85.96 |    76.47 |     100 |   85.96 | 58-61,64-65,78-79 
  ...emEncoding.ts |   96.36 |    91.17 |     100 |   96.36 | 59-60,124-125     
  terminalSafe.ts  |     100 |      100 |     100 |     100 |                   
  ...Serializer.ts |   98.72 |       90 |     100 |   98.72 | 42-43,134,201-203 
  testUtils.ts     |   53.33 |      100 |   33.33 |   53.33 | ...53,59-64,70-72 
  ...-constants.ts |     100 |      100 |     100 |     100 |                   
  textUtils.ts     |      65 |      100 |      75 |      65 | 56-75             
  thoughtUtils.ts  |     100 |    95.65 |     100 |     100 | 99                
  ...-converter.ts |   95.23 |    85.71 |     100 |   95.23 | 36-37             
  ...name-utils.ts |     100 |      100 |     100 |     100 |                   
  ...-finalizer.ts |   97.66 |     90.9 |     100 |   97.66 | 165-166,168-172   
  ...-retention.ts |     100 |    95.83 |     100 |     100 | 116               
  tool-utils.ts    |    95.2 |    93.61 |     100 |    95.2 | ...58-159,162-163 
  ...ultCleanup.ts |   54.62 |       64 |      75 |   54.62 | ...03-105,108-134 
  ...Compaction.ts |   96.13 |    96.42 |     100 |   96.13 | ...34-339,341-346 
  ...pt-records.ts |   87.55 |    86.13 |     100 |   87.55 | ...78-482,512-527 
  truncation.ts    |   90.61 |    90.59 |     100 |   90.61 | ...53-461,498-504 
  windowsPath.ts   |   89.47 |    79.31 |     100 |   89.47 | ...57-58,62,90-91 
  ...aceContext.ts |   95.39 |    89.47 |     100 |   95.39 | ...16-317,321-322 
  xml.ts           |    97.8 |    87.69 |     100 |    97.8 | 98-99             
  yaml-parser.ts   |   83.87 |    77.27 |     100 |   83.87 | ...31-234,239-240 
 ...ils/filesearch |   83.94 |    80.72 |   94.73 |   83.94 |                   
  crawlCache.ts    |     100 |      100 |     100 |     100 |                   
  crawler.ts       |    82.9 |    76.81 |   95.08 |    82.9 | ...1563,1597-1598 
  fileSearch.ts    |   93.78 |    87.67 |     100 |   93.78 | ...71-272,274-275 
  fzfWorker.ts     |       0 |        0 |       0 |       0 | 1-109             
  ...rkerHandle.ts |   84.05 |    75.43 |   89.47 |   84.05 | ...30-334,340-341 
  ignore.ts        |     100 |    97.36 |     100 |     100 | 187               
  result-cache.ts  |     100 |    93.75 |     100 |     100 | 49                
 ...uest-tokenizer |   69.76 |    75.47 |   85.29 |   69.76 |                   
  ...eTokenizer.ts |   65.72 |    74.02 |    92.3 |   65.72 | ...65-466,479-533 
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...tTokenizer.ts |   68.39 |    69.49 |    90.9 |   68.39 | ...24-325,327-328 
  ...ageFormats.ts |   76.92 |      100 |   33.33 |   76.92 | 46-49,56-57       
  textTokenizer.ts |     100 |      100 |     100 |     100 |                   
  types.ts         |       0 |        0 |       0 |       0 | 1                 
-------------------|---------|----------|---------|---------|-------------------

For detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run.

@doudouOUC
doudouOUC requested a review from wenshao August 12, 2026 15:36
@doudouOUC doudouOUC self-assigned this Aug 12, 2026
@doudouOUC
doudouOUC marked this pull request as ready for review August 12, 2026 15:41
@doudouOUC
doudouOUC enabled auto-merge August 12, 2026 15:41
@qwen-code-ci-bot

qwen-code-ci-bot commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Qwen Triage finishedview run. See the stage comments in this thread for the result.

Qwen Triage 已完成 —— 查看运行。结果见本线程中的各阶段评论。

@qwen-code-ci-bot

qwen-code-ci-bot commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Re-run after review rounds R8–R12 and the rebase onto main — gate re-checked at e7ea3b2194.

Template ✓ (complete, unchanged).

Problem: settled long ago. The count-only 256-frame pre-attach cap with silent eviction is a tracked item of the daemon memory workstream (#8091), and a maintainer's real-daemon, no-mock A/B on the predecessor head observed the failure directly: base silently dropped 44 of 300 JSON-RPC replies (callers left waiting forever) and retained +613 MB RSS after 128 × ~1 MiB replies, while this PR's head failed closed at the documented cap and settled back to baseline. "Does the problem exist" is not a question on this PR.

Direction: aligned — one checklist line of #8091, design doc in-repo, continuation of already-merged increments (#8245, #8423, #8462, #8508).

Size: 27 files, +3,785/−492. Breakdown: 1,919 production logic lines, 2,295 test, 63 docs/E2E-plan. Production grew +259 since the last pass — the fixes rounds R8–R12 shook out. It spans three packages (acp-bridge, cli, sdk-typescript) → core infrastructure under the two-tier rule, clearing both the 500-line maintainer-awareness bar and the 1,000-line large-PR advisory. The prior note that the estimator fix, byte bounds, and ownership transaction would have been three easier reviews stays on the record rather than blocking.

Approach: unchanged and still right — serialize once, charge serialized UTF-8 bytes at admission, tiered stream/connection/process-global budgets, refusal retires the exact owner instead of evicting an older frame, ownership grants provisional until local delivery. The delta since the last gate pass is review-shaken fix commits (delivery-failure escalation to the caller, teardown-safe logging) plus a rebase whose only tail commit (e7ea3b2194) is a test-fixture alignment — no scope creep, the file list is unchanged.

Risk: no high-risk revert-correlated paths matched. The two items carried out of round 12 are assessed in the Stage 2 comment: the SSE split-write finding (R12-1) is successfully disputed in my independent reading, and the settle-time requeue asymmetry (R9-1) is a genuine trade-off that needs a maintainer call.

Moving on to code review. 🔍 Maintainer note unchanged: per the core-module two-tier rule, a cross-package PR of this size needs a human sign-off before merge regardless of how clean the automated review comes back.

中文说明

R8–R12 审查轮次及 rebase 到 main 之后的 re-run——已在 e7ea3b2194 重新过门。

模板完整 ✓(未变化)。

问题:早已确立。只计帧数的 256 帧 pre-attach 上限加静默淘汰是 daemon 内存工作流(#8091)的跟踪项;维护者已在先驱 head 上以真实 daemon 无 mock A/B 直接观测到失败形态:base 静默丢弃 300 条 JSON-RPC 回复中的 44 条(调用方永久挂起),128 × ~1 MiB 回复后 RSS 滞留 +613 MB,而本 PR 的 head 在文档化上限处 fail closed 并回落基线。"问题是否存在"在本 PR 上不是疑问。

方向:对齐——#8091 清单一行,设计文档在仓库内,是已合并增量(#8245#8423#8462#8508)的延续。

规模:27 个文件,+3,785/−492。构成:1,919 行生产逻辑、2,295 行测试、63 行文档/E2E 计划。生产行较上次过门增加 259 行——即 R8–R12 震出的修复。跨三个包(acp-bridgeclisdk-typescript)→ 按双层规则属核心基础设施,同时越过 500 行维护者知会线与 1,000 行大 PR 建议线。上一轮"估算器修复、字节设界、ownership 事务化本可拆成三个更易审的 PR"的记录在案,不构成阻塞。

方案:未变且仍然正确——一次性序列化、按序列化后的 UTF-8 字节在准入时计费、stream/connection/进程全局三级预算、拒绝时精确关闭当事 owner 而非淘汰旧帧、ownership 在本地投递前保持 provisional。上次过门之后的增量是审查震出的修复 commit(投递失败向调用方升级、teardown 安全日志)外加一次 rebase——其唯一尾 commit(e7ea3b2194)只是测试 fixture 对齐,无范围蔓延,文件清单未变。

风险:未命中 revert 相关高风险路径。第 12 轮带出的两项在 Stage 2 评论中评估:SSE 拆分写入发现(R12-1)经我独立判读成立地被驳回;settle 时重入队的不对称(R9-1)是真实的取舍,需要维护者拍板。

进入代码审查 🔍 给维护者的说明不变:按核心模块双层规则,这种跨包规模的 PR 合并前需要人工签核,与自动审查多干净无关。

Qwen Code · qwen3.8-max

Reviewed at e7ea3b219406335d4b2b1d8956aead98378c4011 · re-run with @qwen-code /triage

@qwen-code-ci-bot

qwen-code-ci-bot commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Code review

Re-run focus: a full re-read of the diff at the rebased head e7ea3b2194 (rounds R8–R12 since the last gate pass), plus an independent assessment of the two items round 12 left open. Static review — no PR code built or executed. My independent proposal from the problem statement alone (serialize once, charge serialized bytes at admission, tiered fail-closed budgets that retire the exact owner, delivery-tied ownership) still matches what shipped; nothing in the delta since the last pass changes that.

No new Critical findings from this side. The settlement machinery holds up under re-read: admission is checked twice around serialization (before and after, so a concurrent admission can't sneak past an await), the lease/ownership accounting pairs one-to-one on every commit/detach/rollback path I traced, destroy() settles transport callbacks first and receipts one tick later (setImmediate) so close-triggered outcomes win, and the once-only settled guards make double-settlement impossible either way. The post-rebase tail commit is test-only (transport.test.ts fixture alignment), and writeStderrLineSafe used by the WS teardown logging is a pre-existing base helper.

The two open items from round 12:

  • R12-1 (SSE split writes advancing the id: cursor) — the author's dispute holds. I checked this against SSE semantics rather than taking the round's word: the reconnect cursor (the last-event-ID string) is committed only when a blank line dispatches the event, not when the id: line is parsed — so a frame interrupted between its id: line and its \n\n cannot move the cursor, and resume replays it from the previous cursor. The four sub-writes run inside one serialized write chain (no interleaving of other frames or heartbeats mid-frame), and a single res.write could always be partially flushed at the TCP level, so split writes change no atomicity the base had. The author's real EventSource probe (close after the id: line → reconnect with the prior cursor → replay of the incomplete event, SSE 17/17, EventBus replay 2/2) is consistent with that reading. The one residual is client-side: a consumer that commits ids on parse rather than on dispatch would misbehave — but that is true on base as well and is not what EventSource does.
  • R9-1 (conn-scoped settle requeues only on closed, session-scoped on any non-delivered) — genuinely unresolved, and correctly escalated. A connection-scoped frame settling outcome_unknown is discarded rather than re-buffered; the author declined twice on the ground that the frame may have fully delivered, so replay could duplicate a completed JSON-RPC response. The counter-consideration is real too: a dropped response can hang its caller — the exact failure mode this PR exists to eliminate — and the code's own at-least-once comment ("a duplicate JSON-RPC response is identifiable by its request id, while dropping the only response hangs the caller") argues the other way for these id-bearing frames. Mitigating context: a conn-scoped outcome_unknown settle happens while the connection stream is dying, so the client usually observes the transport death and retries rather than hanging blind. Both costs are documented; neither answer is derivable from the code alone. This is a maintainer call, not a review finding — and the concrete residuals the reviewer filed from this territory (R12-2, R12-4) are Suggestion-grade and deferred under the post-five-round Critical-only rule, recorded in-thread.

Everything else round 12 carried (R12-2/3/4, R11-2) stays deferred under that same rule — visible in-thread, not dropped.

sequenceDiagram
    participant P1 as Dispatcher
    participant P2 as AcpConnection
    participant P3 as PreAttachBudget
    participant P4 as Stream writer
    P1->>P2: reply with ownership receipt
    P2->>P2: serialize once to UTF-8 Buffer
    alt live stream and empty buffer
        P2->>P4: sendSerialized, no lease needed
    else must buffer
        P2->>P3: admission - stream frames, connection frames and bytes, global lease
        P3-->>P2: lease, or refuse and close exact owner with 1013
        P2->>P2: buffer frame and charge owner
        P4-->>P2: attach
        P2->>P4: sendSerialized and markPendingDelivery
    end
    P4-->>P2: write callback settles delivered, unknown, or discarded
    P2->>P3: release lease
    P2->>P1: delivered commits ownership, unknown re-checks identity, discarded rolls back
Loading
Files changed (17 of 27 shown)
File What changed
packages/cli/src/serve/acp-http/connection-registry.ts Core of the PR: PreparedFrame with serialized payload, lease, and receipt; tiered admission; owner retirement; generation-counted ownership identity; settle-time requeue policy; retire-time settlement ordering
packages/cli/src/serve/acp-http/connection-registry.test.ts ~1,165 new lines pinning eviction replacement, byte caps, shared budget, teardown races, re-entry, identity generations, requeue asymmetries
packages/cli/src/serve/acp-http/dispatch.ts Ownership receipts for new/load/resume/fork; provisional until delivered; outcomeUnknown commit-vs-detach; notification forms rejected; failed-delivery error reporting to the caller
packages/cli/src/serve/acp-http/pre-attach-budget.ts New process-global frame/byte budget with leases, high-water, guard-failure counters
packages/cli/src/serve/acp-http/sse-stream.ts sendSerialized with DeliveryResult incl. outcome_unknown; frame written as four serialized sub-writes; close-vs-write ordering settled per write
packages/cli/src/serve/acp-http/ws-stream.ts Same settlement contract for WebSocket; mid-send close and callback errors settle unknown; 1013 close-reason plumbing; teardown logging via writeStderrLineSafe
packages/cli/src/serve/acp-http/transport-stream.ts TransportStream gains sendSerialized, DeliveryResult incl. outcome_unknown, close-with-reason
packages/cli/src/serve/acp-http/index.ts One shared budget across primary and dynamic mounts; snapshot surfaces limits and usage
packages/cli/src/serve/daemon-status.ts Additive limits and runtime.preAttach counters; acpMounts in full status
packages/cli/src/serve/run-qwen-serve.ts Bootstrap status shape for the new fields
packages/acp-bridge/src/json-string-bytes.ts Estimator matching JSON.stringify byte-for-byte incl. escaping and surrogates, with exact fast path
packages/acp-bridge/src/spawnChannel.ts Prepared-response estimation uses the new estimator
packages/sdk-typescript/src/daemon/types.ts Optional additive SDK mirror of the new status fields; tolerant connection diagnostic shape
.qwen/e2e-tests/2026-08-12-daemon-acp-http-pre-attach-bounds.md E2E plan: 128 x 1 MiB baseline, global competition, stalled writer, rollback
docs/design/2026-07-31-daemon-capacity-model-and-memory-bounds.md Workstream doc updated: bounds landed, live-queue bytes still deferred
docs/design/daemon-acp-http/README.md Row updated to the new close-the-owner semantics
docs/design/daemon-acp-http/sse-resumable-stream.md Buffer representation and compatibility section updated
…and 10 more test files Focused coverage for estimator, budget, SSE/WS settlement, status surface, workspace-qualified mounts

Testing evidence (CI run — no PR code executed locally)

Unattended re-run; nothing was built or run here — the evidence is the PR's own CI on the reviewed commit, fetched via API. All five pull_request workflow runs on e7ea3b2194 completed green; there are zero failed checks on this commit. Skipped, as on every head of this PR: Integration Tests (CLI, No Sandbox) and the macOS/Windows unit-test legs (the matrix runs ubuntu for PR CI) — the first was also disclosed by the round-12 review as not reviewed. The still-running review-pr check on the commit is bot orchestration, not PR CI.

CI results for e7ea3b2194 (all completed):

Check Conclusion
Test (ubuntu-latest, Node 22.x) ✅ success
Serve A/B (ubuntu-latest, Node 22.x) ✅ success
Desktop Shell (ubuntu-22.04) ✅ success
Desktop Shell (windows-2022) ✅ success
Live Host (macos-latest) ✅ success
Real daemon E2E / Java 11 ✅ success
web-shell E2E Smoke (ubuntu-latest, Node 22.x) ✅ success
Dependency CVE audit ✅ success
Secret scan (TruffleHog) ✅ success
Classify PR ✅ success
macos-latest / Java 21 ✅ success
ubuntu-latest / Java 11 ✅ success
ubuntu-latest / Java 17 ✅ success
ubuntu-latest / Java 21 ✅ success
windows-latest / Java 21 ✅ success
Integration Tests (CLI, No Sandbox) ⏭️ skipped
Test (macos-latest, Node 22.x) ⏭️ skipped
Test (windows-latest, Node 22.x) ⏭️ skipped

One row per check name (latest run) on the reviewed commit. / 每个检查名一行(取该 commit 最新一次运行)。

The behavioural evidence stack: a maintainer's real-daemon, no-mock A/B on predecessor head aea72fd (base vs head bundles, hand-written ACP-over-HTTP client) confirmed the byte bound at exactly the documented cap, exact-owner refusal, delivery-tied ownership, and the 44 silently-dropped replies on base becoming a fail-closed 404 on head — with two honest gaps matching the PR's own non-goals (global ceiling proven shared but not driven to exhaustion; live attached-but-stalled WS/SSE queues unbounded by design). Windows and Linux remain author-untested, and the WS 1013 close path is unit-covered only.

Not verified here: current-head daemon behaviour has not been independently re-run by this review — the maintainer A/B predates the R8–R12 fixes and the rebase, and the author's focused-test counts (46/46, 442/442, 14/14) are the author's claim, not evidence this pass re-executed. Sandboxed verification would settle the remainder: @qwen-code /verifyin flight right now from this re-run (run 31892503278), A/B-ing the byte bounds, exact-owner refusal, and delivery-tied ownership on e7ea3b2194 itself against the base build; its report posts in this thread when it lands.

中文说明

代码审查:本次 re-run 在 rebase 后的 head e7ea3b2194 上完整重读 diff(距上次过门经历了 R8–R12),并独立评估第 12 轮留下的两项。静态审查——未构建或执行任何 PR 代码。仅凭问题陈述写出的独立方案(一次序列化、准入时按序列化字节计费、分级 fail-closed 预算精确关闭当事 owner、ownership 绑定投递)依然与实现一致;上次过门之后的增量没有改变这一点。

本侧未发现新的 Critical。结算机制复读后依然成立:准入在序列化前后各检查一次(并发准入无法借 await 插队);我所走查的 commit/detach/rollback 各路径上 lease/ownership 记账一一配对;destroy() 先让 transport 回调落定、延一拍(setImmediate)再结算回执;once-only settled 守卫使任一路径都不可能二次结算。rebase 后的尾 commit 只动测试(transport.test.ts fixture 对齐);WS teardown 日志所用的 writeStderrLineSafe 是 base 中既有 helper。

第 12 轮的两项未决:

  • R12-1(SSE 拆分写入提前推进 id: 游标)——作者的驳回成立。我按 SSE 语义独立核对而非照单全收:重连游标(last-event-ID 字符串)只在空行派发事件时提交,而不是在解析到 id: 行时——因此在 id: 行与 \n\n 之间中断的帧不可能推进游标,resume 会从上一个游标重放它。四段子写入运行在同一条串行写链内(帧间、心跳均无法插入),且单个 res.write 在 TCP 层本来就可能被部分刷出——拆分写入没有改变 base 就有的原子性。作者的 EventSource 实测(id: 行后断开 → 以旧游标重连 → 残缺事件被重放;SSE 17/17、EventBus replay 2/2)与该解读一致。唯一残留是客户端侧:按解析而非按派发提交 id 的消费者会出错——但 base 上同样如此,EventSource 也不是这种行为。
  • R9-1(conn 级 settle 仅在 closed 时重入队,session 级在任何非 delivered 时重入队)——真实未决,且升级处理是对的。conn 级帧以 outcome_unknown 落定时被丢弃而非重新缓冲;作者两次拒绝修改,理由是该帧可能已完整投递,重放会复制一条已完成的 JSON-RPC 响应。反向考量同样真实:丢弃响应可能挂死调用方——正是本 PR 要消灭的失败形态——且代码自带的 at-least-once 注释("重复的 JSON-RPC 响应可按请求 id 识别,丢弃唯一响应则挂死调用方")对这些带 id 的帧恰好支持另一边。缓解背景:conn 级 outcome_unknown 落定发生在连接流垂死之际,客户端通常能观测到 transport 死亡并重试,而非盲目挂等。两种代价都有据可查,且都无法仅从代码推出——这是维护者的决断,不是审查发现;reviewer 从此区域带出的具体残留(R12-2、R12-4)为 Suggestion 级,已按五轮后 Critical-only 规则延期并记录在帖。

第 12 轮携带的其余项(R12-2/3/4、R11-2)按同一规则保持延期——在帖中可见,未被丢弃。

测试证据(CI 运行,本地未执行 PR 代码):无人值守 re-run,本地未构建未运行——证据为所审 commit 上 PR 自身 CI 经 API 拉取。e7ea3b2194 上五个 pull_request 工作流运行全部完成且全绿;该 commit 上失败的检查为零。与本 PR 历次 head 一样被跳过:Integration Tests (CLI, No Sandbox) 与 macOS/Windows 单测腿(PR CI 矩阵跑 ubuntu)——前者第 12 轮审查也已披露为未审查。该 commit 上仍在运行的 review-pr 检查是机器人编排,不是 PR CI。

行为证据链:维护者在先驱 head aea72fd 上的真实 daemon 无 mock A/B(base 与 head 双 bundle、手写 ACP-over-HTTP 客户端)确认字节边界精确停在文档上限、拒绝只关闭当事 owner、ownership 绑定投递、base 上静默丢弃的 44 条回复在 head 上变为 fail-closed 404——并如实留下两个与 PR 自述非目标一致的缺口(全局上限已证明共享但未推到耗尽;已 attach 但阻塞的 live WS/SSE 队列按设计仍无界)。Windows 与 Linux 仍未经作者测试,WS 1013 close 路径仍仅有单测覆盖。

本处未验证:当前 head 的 daemon 级行为本审查未独立复跑——维护者 A/B 早于 R8–R12 修复与 rebase;作者的聚焦测试计数(46/46、442/442、14/14)是作者声明,非本次复跑的证据。沙箱验证将收口其余部分:@qwen-code /verify ——本次 re-run 已触发、正在运行(run 31892503278),在 e7ea3b2194 本身上对字节设界、精确 owner 拒绝、投递绑定 ownership 做 base A/B;报告完成后发布在本帖。

Qwen Code · qwen3.8-max

Reviewed at e7ea3b219406335d4b2b1d8956aead98378c4011 · re-run with @qwen-code /triage

@qwen-code-ci-bot

qwen-code-ci-bot commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Confidence: 3/5 — clean review; the cap is policy plus one open trade-off, not doubt about the code. A ~1,900-production-line change crossing three packages is core infrastructure under the two-tier rule, which keeps the bot's approval off and hands the merge decision to a maintainer — and round 12 left exactly one question only a maintainer can answer.

Stepping back over the whole arc: twelve review rounds, and the pattern is still the one you want to see — every round's Critical was fixed in the next commit with regression coverage attached, and the round-12 close-out is a disputed finding plus a trade-off, not a defect. I re-read the full diff at the rebased head and found nothing new to block on; the settlement machinery (generation-counted ownership identity, honest outcome_unknown, once-only settlement, delivery-failure errors back to the caller) is the strongest part of the PR, and it exists purely so the daemon can never lie about what happened to a frame.

On the two round-12 residuals, my independent read:

  • R12-1 is settled. The author's WHATWG argument holds on its own merits — the reconnect cursor commits on event dispatch, not on parsing the id: line — and the four sub-writes are serialized in one write chain, so I consider the dispute successful. No code change was needed, and none was made.
  • R9-1 is a genuine maintainer call. Drop-on-settle risks a hung caller; duplicate-on-replay risks a repeated JSON-RPC response. Both costs are documented, the author has declined twice with a consistent rationale, and the code's own at-least-once comment cuts the other way — this cannot be resolved from the diff, and the bot's round-12 CHANGES_REQUESTED review stands on it until it is.

The evidence stack is as complete as this repo gets: CI fully green on the reviewed head; a maintainer's real-daemon A/B on the predecessor head that watched base silently drop 44 replies while this PR's head failed closed at the exact documented cap; and the sandboxed /verify A/B on the current head is in flight from this re-run (run 31892503278), report to follow in this thread. The deferred Suggestions from rounds six through twelve (R6-2, R6-3/4, R7-1/2, R11-2, R12-2/3/4) are all recorded in-thread per the post-five-round Critical-only rule — visible, not dropped; they are follow-up-issue material if a maintainer wants them tracked.

What keeps this from an approval is standing policy and the open item, not a code finding:

  • Two-tier rule: Stage-0-escalated core infrastructure caps at 3/5 and merges on a human sign-off. No standing human approval exists on the current head — @yiliang114's full-diff approval on aea72fd was dismissed by the pushes since, and @wenshao's last review is a changes-requested from 44269010, nine commits before the rebase.
  • R9-1 needs the human call described above.

Verdict: defer to maintainer — nothing blocks from this side beyond the open trade-off. @wenshao, this is yours when the /verify report lands: decide R9-1 (drop-on-settle vs duplicate-on-replay for conn-scoped ambiguous deliveries), and if the answer is "the author's trade-off stands", dismiss or re-affirm your review accordingly and merge on the two-tier sign-off.

中文说明

置信度:3/5 —— 审查干净;封顶来自政策加一项未决取舍,而非对代码的疑虑。约 1,900 行生产逻辑跨三个包,按双层规则属核心基础设施,机器人不投批准票,合并决定交由维护者——而第 12 轮恰好留下一个只有维护者能回答的问题。

退一步看整条弧线:十二轮审查,形态依然是最理想的那种——每一轮的 Critical 都在下一个 commit 修复并附回归覆盖,第 12 轮的收尾是一项被成功驳回的发现加一项取舍,而不是缺陷。我在 rebase 后的 head 上完整重读了 diff,没有新的可阻塞项;结算机制(带代数的 ownership 身份、如实的 outcome_unknown、once-only 落定、投递失败向调用方回错误)是 PR 中最扎实的部分,其唯一目的是让 daemon 永远不谎报帧的下落。

对第 12 轮的两项残留,我的独立判读:

  • R12-1 已了结。作者的 WHATWG 论据本身成立——重连游标在事件派发时提交,而非解析到 id: 行时——且四段子写入在同一条写链内串行,因此我认为驳回成立。无需代码改动,也确实没有改。
  • R9-1 是真实的维护者决断。settle 时丢弃有挂死调用方的风险;重放有重复 JSON-RPC 响应的风险。两种代价都有据可查,作者已两次以一致的理由拒绝修改,而代码自带的 at-least-once 注释又指向另一边——这无法从 diff 推出;机器人第 12 轮的 CHANGES_REQUESTED 就建立在它之上,直到它被回答。

就本仓库而言,证据链已近乎完整:所审 head 上 CI 全绿;维护者在先驱 head 上的真实 daemon A/B 亲见 base 静默丢弃 44 条回复而本 PR 的 head 在文档上限处精确 fail closed;针对当前 head 的沙箱 /verify A/B 正由本次 re-run 执行(run 31892503278),报告将发布在本帖。第六轮至第十二轮延期的 Suggestion(R6-2、R6-3/4、R7-1/2、R11-2、R12-2/3/4)均按五轮后 Critical-only 规则记录在帖——可见、未被丢弃;如需跟踪,可作为后续 issue 素材。

挡住批准的只有既定政策与未决项,不是任何代码发现:

  • 双层规则:Stage 0 升级过的核心基础设施封顶 3/5,凭人工签核合并。当前 head 上没有有效的人工批准——@yiliang114aea72fd 上的全 diff approve 已被其后的 push 撤销;@wenshao 的最近一次 review 是停留在 44269010(rebase 前九个 commit)的 changes-requested。
  • R9-1 需要上述人工决断。

结论:转交维护者——除未决取舍外,本侧已无阻塞。@wenshao,待 /verify 报告落地后由你定夺:裁决 R9-1(conn 级歧义投递的 settle 丢弃 vs 重放复制);若答案是"作者的取舍成立",则撤销或重申你的 review,按双层规则签核合并。

Qwen Code · qwen3.8-max

Reviewed at e7ea3b219406335d4b2b1d8956aead98378c4011 · re-run with @qwen-code /triage

yiliang114
yiliang114 previously approved these changes Aug 12, 2026

@yiliang114 yiliang114 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the full diff (26 files) with focus on the byte-bounding, overflow semantics, and lease/receipt lifecycle. Approving.

Byte-bound correctness

  • Limits are enforced on real serialized sizes: frames are frozen via JSON.stringifyBuffer at prepareAndBuffer time, and budget checks run against payload.byteLength (plus a synchronous re-validation of stream/binding identity after serialization — no TOCTOU since it's all within one tick).
  • Three tiers all enforced: per-stream 256 frames, per-connection 1024 frames / 64 MB, daemon-global 4096 frames / 256 MB via shared AcpPreAttachBudget (one instance shared across workspace mounts, covered by tests). Subtraction-form checks (bytes > maxBytes - usedBytes) avoid overflow. The old pushCapped frame-count-only path is fully removed — no unbounded pre-attach growth path remains.

Overflow/discard semantics

  • Overflow changed from silent drop-oldest to explicit retirement: session stream closed or connection retired with WS close 1013 "Resource limit", stderr log, and daemon-status counters (preAttachGuardFailures, high-water marks, used frames/bytes). Observable, not silent.
  • DeliveryReceipt + ownership-commit-on-delivery is a real improvement: session/new|load|resume|fork now only commit clientId/ownership after the success reply is actually delivered (canCommitSessionOwnership re-validates binding identity, closingSessions, destroyed state); undelivered replies roll the session back (detach / orphan removal) instead of leaking owned-but-unreachable sessions. Notification forms of these methods are now rejected, closing a session-leak path.

Transport interaction

  • Both transports settle in-flight sendSerialized promises on close (activeSendClosers / activeWriteClosers), so leases backing pending deliveries are always released and accounting unwinds during teardown — covered by the "keeps a lease until an in-flight delivery settles after teardown" tests.
  • SSE doWrite now waits for both the write callback and drain and settles false on close/finish/error; WS enqueueSend keeps the serialized write chain and settles on socket close.
  • Bridge-side estimatePreparedResponseBytes switched to escape-aware estimateJsonStringBytes, fixing the previous undercount for escaped strings; property-tested against JSON.stringify for all UTF-16 code unit classes.

Test coverage: byte-exact boundary ("accepts the exact byte limit and rejects the next byte"), cross-mount budget sharing, re-entry/serialization races, receipt-callback throws, teardown-vs-delivery races, notification rejection, and bootstrap status shape. Solid.

Nits (non-blocking)

  • P2: an attached-but-stalled SSE client (open socket, never reads) can pin its flushed backlog's lease until the socket dies, since doWrite waits on drain indefinitely; bounded by the budget but up to the global cap can be held, and later connections then fail pre-attach buffering. Bounded + observable is strictly better than the pre-PR unbounded state; a write-side stall timeout on live streams would be a good follow-up.
  • P3: SseStream.close() ignores the TransportCloseReason (WS surfaces 1013); resource-limit closes on SSE are indistinguishable from a normal stream end client-side.
  • P3: sendSerialized issues up to 4 res.write calls per SSE frame (id line / data: / payload / \n\n); a single coalesced write would cut syscalls under throughput.

CI: Test (ubuntu-latest, Node 22.x) is red on DaemonSessionProvider.test.tsx ("keeps the current attachment live while a same-session load fails") — a fully mocked webui React timing test. Not related to this PR: this branch's two earlier runs today (e64e891, a76a5af) were fully green, the last commit only touches daemon-status/run-qwen-serve/SDK types, and today's main run is red on the same job. Flake, not gating.

@doudouOUC

Copy link
Copy Markdown
Collaborator Author

@qwen-code /triage

@qwen-code-ci-bot

qwen-code-ci-bot commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Sandboxed verification: ✅ passed — merge-ready (agent verdict) - workflow run

Ran the PR in an isolated, token-free container: A/B against the base build, mock-free harness assertions, targeted gates. Advisory evidence for human reviewers — not a review, an approval, or a CI check.

Scripted assertions: 558 passed · 0 failed · 558 total

中文 — 判定:✅ 通过 · 可合入(agent 判定)

沙箱验证在隔离、无凭证的容器中执行了该 PR 的代码(与 base 构建 A/B 对照、无 mock harness 断言、定向门禁)。仅作为评审证据,不构成评审、批准或 CI 检查

脚本断言:558 通过 · 0 失败 · 558 总计

Verification report

PR #9007 Deep Verification — fix(serve): Bound ACP HTTP pre-attach buffers by bytes

Verdict: merge-ready — 558 scripted assertions executed, 558 passed / 0 failed. Verified head: aea72fd30bc79a6cc17ca4573ffbb50f66135c7e (git rev-parse HEAD^2), base tip 50097c154cb25aae5d244cf185375453fe088bcc. One non-blocking finding (a coverage gap, below).

中文摘要
  • 结论: merge-ready。558 条脚本化断言全部通过(A/B 40 条、估算器 oracle 8 条、聚焦测试门 510 条),0 失败。
  • A/B 结论: 中心主张成立。head 在 per-stream(256 帧)、per-connection(帧/字节)、进程级全局预算三层边界上 fail-closed:第 N+1 帧/字节拒绝时精确关闭肇事的 session(连接存活)或整个 connection(close code 1013),旁观者连接的帧不被淘汰;泄漏租约在投递挂起期间持续计费、客户端关闭后归零;delivery receipt 在 teardown 时 discarded、上线投递后 delivered。base 对照组验证了相反行为:第 257 个带 id 帧静默淘汰最旧帧(buffer[0].id 从 1 变 2,连接照常存活)、无 id 回复可涨过 256“上限”(至 1024 硬顶)、无字节边界(3×120KiB 全量保留)、无全局预算。
  • 估算器: 对全部 65536 个 UTF-16 码元、2000 条随机串、对抗性 surrogate/转义组合与 JSON.stringify 实际 UTF-8 字节逐字节相等;early-exit 语义正确;2MB 输入 17ms(线性)。base 公式在需转义形状上系统性少计费(700×U+0001 少 3500 字节)。
  • 空转检测(mutation): M2(估算器回退)精确杀死 1 条新测试;M1(预算拒绝关闭)杀死 6 条边界测试(均为行为断言);M3b 正向对照杀死 7 条回滚测试。M3 幸存: 删除 canCommitSessionOwnership 提交门后 309/309 仍绿——分类为覆盖缺口(非死代码、非 harness 故障),见 Findings。
  • 未覆盖: 真实 daemon E2E(128×1MiB RSS、动态 workspace mount、qwen serve 全栈);per-commit 归因(浅克隆仅 aggregate 可达);Windows;live 队列(PR 自述非目标)。

Central claim + A/B

Central claim: daemon-owned ACP HTTP pre-attach buffering is bounded by frame count and serialized bytes at per-stream / per-connection / process-global scope, and refusal fails closed on the admitting owner instead of silently evicting an older frame.

The A/B drives the compiled dist/ of each arm through a real loopback HTTP server (express + the real SseStream + a real HTTP client). The acp-http dist import closure is node-builtins-only (verified per file), so no workspace symlink can contaminate an arm. Witness: 01-ab-head-arm.png, 02-ab-base-arm.png.

Cell Scenario HEAD (this PR) BASE (50097c15)
C1 257 id-bearing frames, one session, no stream attached #257 refused (failed); owning session closed; connection survives; guard logs ACP pre-attach frame limit all 257 accepted (void API); session stays open; buffer capped at 256 by silently evicting the oldest frame (buffer[0].id = 2, id 1 lost; id 257 admitted)
C2 257 id-less replies #257 refused; session closed buffer grows to 257 > "256 cap" (id-less frames exempt from eviction up to the 1024 hard cap — unbounded-growth path)
C3 3 × ~120 KiB frames, 300 KB per-connection byte limit (constructor seam) frames 1–2 buffered; #3 refused; connection retired (registry.size 1→0); guard logs connection budget all 3 retained (~360 KB charged nowhere — no byte bound exists); connection alive
C4 two connections, shared 6-frame global budget A:3 + B:3 = 6 charged; B's 4th refused; B destroyed, bystander A intact with all 3 frames (no cross-connection eviction); guardFailures counted exactly once no global budget — both connections retain everything (B holds 4)
C5 buffered pre-attach frames flushed on attach, real SSE wire 3 frames reach the wire byte-equal, in order; all delivery promises resolve delivered same delivery parity (3/3 byte-equal) — normal path unchanged
C6 3 × 256 KiB buffered, attach with a stalled writer charged at buffering (786,582 B); at the delivery seam pendingDeliveryFrames=3, budget usedFrames=3 still charged; after client close all counters return to 0/0 n/a (no lease accounting on base)
C7 delivery-receipt lifecycle (commit/rollback signal) teardown before attach → receipt discarded; while buffered → unsettled; wire delivery → delivered n/a (base sendConn has no receipt parameter — ownership was granted pre-delivery by construction)

Head arm: 28/28; base arm: 12/12 (every base cell asserts the predicted base behaviour, including the silent-eviction oracle). C6's mid-flight snapshot is taken synchronously at the delivery seam (settlement needs ≥1 async hop); loopback kernel buffering otherwise drains a JS-level "stalled" client, so the seam snapshot is the deterministic observation of lease retention — the same seam a truly TCP-stalled writer holds open longer.

Secondary claim 1 (transactional ownership). Registry half proven in C7 (receipt discarded on teardown / delivered only on wire delivery). Dispatch half (ownershipReceipt wiring into session/new|load|resume|fork, notification rejection) exercised by the green transport suite (309 tests) and mutations M3/M3b below; a base-side dispatch A/B would require the full bridge and is listed under Not covered.

Secondary claim 2 (estimator). Wire oracle = Buffer.byteLength(JSON.stringify(·)) itself: exact equality on all 65,536 single UTF-16 code units, 2,000 seeded random strings, adversarial surrogate/escape combos; early-exit returns exactly min(actual, limit+1) across a full limit sweep; 2 MB mixed payload in 17 ms. Replaying the base formula (mechanical reproduction of the reverted hunk) against the same oracle shows systematic under-charging on every escape-requiring shape (700×U+0001: actual 4202, base charged 702 — under by 3500; object shape {content:…}: 4214 vs 714), while head is exact. Witness: 03-estimator-oracle.png.

Targeted gates (pristine tree)

Suite Result
acp-bridge spawnChannel.test.ts + json-string-bytes.test.ts 2 files, 46/46
cli pre-attach-budget + connection-registry + sse-stream + ws-stream + transport + daemon-status 6 files, 443/443 (transport 309, connection-registry 50)
sdk-typescript daemon-public-surface.test.ts 1 file, 14/14
cli dispatch-error.test.ts + dispatch.sandbox.test.ts (extra: dispatch.ts is heavily changed) 2 files, 7/7

Matches the PR's claimed local counts (46 / 442±1 / 14). All green on Linux, the OS the PR's test table marks "not tested".

Mutation matrix (vacuity)

Witness: 04-mutation-matrix-and-gates.png. Raw logs in logs/mut-*.log.

Mutant Change Suite Result First failing assertion
M2 spawnChannel.ts: revert estimator hunks to the exact base formula (Buffer.byteLength+2/+3) acp-bridge focused KILLED — 1 red / 45 green expected [Function] to throw an error (the new admission test; behavioural, not compile)
M1 registry: disable per-connection + global refusal (if (false)) connection-registry + pre-attach-budget KILLED — 6 red / 47 green expected { …(2) } to be undefined (tryReserve must refuse)
M3 dispatch: remove the canCommitSessionOwnership gate in delivered() transport.test.ts SURVIVED — 0 red / 309 green
M3b dispatch: disable rollback-on-discard (positive control) transport.test.ts KILLED — 7 red / 302 green expected [] to include '550e8400-…' (rolled-back session id must vanish)

M3b proves the suite can go red through the receipt mechanism in that exact file, so M3's survival is not harness failure. Classification of the M3 survivor: coverage gap, not dead code — the gate is live: it catches the close-race where a conn-stream write settles delivered while/after session/close runs for that id (closingSessions membership); without the gate ownSession() would re-add a session being torn down. No test drives that interleaving. The other half of the transaction (rollback-on-discard) is pinned by 7 tests. Note also the deliberate double per-stream frame check around serialization in prepareAndBuffer is re-entry defence (a toJSON re-entering the registry mid-JSON.stringify), pinned by the suite's serialization-reentry test — not dead duplication.

Findings

  1. Suggestion — ownership commit gate is unpinned (coverage gap, M3 survivor). The delivered() path of ownershipReceipt is the only part of the new transaction no test asserts: removing the canCommitSessionOwnership check leaves all 309 transport tests green, while the symmetric rollback path is pinned by 7 tests. The guard is real (close-race on a live connection stream), so a regression here would be silent. A fixture that would pin it: session/new reply in flight on a live connection stream, session/close for that id landing before the write settles, then assert the session is not re-owned. Not merge-blocking — the guard exists and is correct as written; this is completeness reporting.

Not covered

  • Real-daemon E2E (committed plan steps 1–9: 128 × 1 MiB distinct-payload RSS, dynamic-workspace mounts competing on the real daemon, GET /daemon/status?detail=full on a live qwen serve): not executed — the PR itself states this scenario was not run locally either. The A/B above proves the same mechanisms at the registry/stream level over real HTTP/SSE; this reproduces the handling (bounds, refusal attribution, lease accounting), not the end-to-end RSS trigger.
  • Per-commit attribution: the metadata lists 4 commits; the depth-2 merge-ref checkout makes only the aggregate reachable (git rev-list HEAD^1..HEAD^2 at a shallow boundary returns a grafted 1). Verified the aggregate HEAD^1..HEAD diff.
  • Dispatch-level A/B against base for ownership transactionality (would need the full bridge runtime); covered instead by C7 + gates + M3/M3b.
  • Ordinary live SSE/WS new-frame queues and transient single-frame JSON.stringify amplification (PR-declared non-goals); Windows; repo-wide lint/typecheck (PR's own CI ran them; the base-control npm run build and a cold HEAD-core typecheck ran clean here as part of A/B setup).

Methodology

Environment: node:22-bookworm CI container, Node v22.23.2, tree at refs/pull/9007/merge (depth 2), npm ci + npm run build pre-run at HEAD. A/B harness (ab-pre-attach.mjs) imports each arm's compiled packages/cli/dist/src/serve/acp-http/*.js — closure verified node-builtin-only via per-file import scan and node --check, so the control cannot silently load head code; base control built in git worktree tmp/base-tree at HEAD^1 with npm run build -w packages/cli (final build EXIT=0, 0 TS errors, after wiring the worktree to the root node_modules plus per-package node_modules directories, which the worktree lacks — earlier build attempts failing on 222 TS errors were this environmental gap plus a missing generated git-commit.ts, not a base-source problem; packages/core is untouched by the PR, confirmed by diff, and a cold tsc --noEmit of HEAD core exits 0). Estimator oracle (estimator-oracle.mjs) compares against JSON.stringify bytes directly and replays the base formula mechanically from the reverted hunk. Gates ran via npx vitest run <exact files> inside each package. Mutations applied in place with file backups, each restored and verified by empty git diff afterwards; raw per-cell logs in logs/. One pre-existing environmental artifact: the PR's own E2E-plan file was absent from the worktree (root-owned read-only .qwen/ directory prevented restore); it was read from git show HEAD: and does not affect build or tests.

Evidence images

01-ab-head-arm

02-ab-base-arm

03-estimator-oracle

04-mutation-matrix-and-gates

Harness scripts and raw logs are in the workflow run artifacts (7-day retention).

Qwen Code · sandboxed verification

@qwen-code-ci-bot

Copy link
Copy Markdown
Collaborator

Triage re-run completed without a new review.

⚠️ The bot has neither a verdict nor a deferral on aea72fd30bc79a6cc17ca4573ffbb50f66135c7e — no APPROVED, CHANGES_REQUESTED, or COMMENTED review of its own. A DISMISSED one does not count: dismiss_stale_reviews voids the bot's approval on every push, which is exactly when a fresh one is needed. If this re-run was meant to review or approve, it did not, and an approval left by another account is a separate vote that does not count as the bot's own.

⚠️ 机器人在 aea72fd30bc79a6cc17ca4573ffbb50f66135c7e既没有裁决也没有 defer —— 没有属于它自己的 APPROVEDCHANGES_REQUESTEDCOMMENTED 评审。DISMISSED 不算:dismiss_stale_reviews 会在每次推送时作废机器人的批准,而那恰恰是需要一次新批准的时刻。如果这次重跑本应评审或批准,那么它没有做到;而其他账号留下的批准是另一张票,不能算作机器人自己的。

The stage comments above were updated with the latest result. View workflow run.

上方各阶段评论已更新为最新结果。查看工作流运行

@wenshao

wenshao commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Maintainer verification — real daemon, no mocks

I built two full bundles from source (npm ci && npm run build && npm run bundle) — this PR's head aea72fd and its merge base a32ec1e — and drove both with a hand-written ACP-over-HTTP client (POST /acp, SSE GET /acp, and a real WebSocket upgrade). Nothing inside the daemon is stubbed: real qwen serve, real dispatcher, real transport, isolated QWEN_HOME and workspace per arm, macOS 26.6 / Node v24.18.1.

The lever for ~1 MiB replies is config-only, so the payloads are genuine dispatcher output rather than injected frames: the fixture registers 245 models under modelProviders, which makes every session/new and session/set_config_option reply carry 1,025,198 B of real configOptions JSON.

This closes the evidence gap the PR itself names ("that real daemon RSS scenario was not executed in this local pass"). The byte bound, the per-owner refusal, the status surface, the shared global budget and the ownership transactionality all behave as described. Two things are worth a maintainer's attention before merge — they are noted in §6 and §7, and neither is a regression.


1. The pre-attach byte bound holds against a real daemon

One connection, session stream never attached, 128 × ~1 MiB replies.

byte bound

base (a32ec1e) head (aea72fd)
frames admitted 128 (all) 65, refused at 66
retained at end bufferedSessionFrames: 128 usedFrames: 0, usedBytes: 0
high-water bytes not tracked 66,637,870 B ≤ the 67,108,864 B cap
settled RSS delta (+30 s) +613 MB +132.5 MB

The refusal lands exactly where the constant says it should: 65 frames × 1,025,198 B = 66,637,870 B fits, the 66th would cross 64 MiB, and that admission closes the connection. Reproduced identically across two independent runs.

One honest caveat on the RSS column: at equal frame counts head's RSS is not lower than base's (transient JSON.stringify amplification, which the PR explicitly lists as out of scope). The win is the ceiling and the release, not the instantaneous footprint.

2. Silent eviction becomes fail-closed — this is the strongest argument for the breaking change

300 × session/list on a connection with no stream attached, then the stream is attached and replies are counted.

frame cap

On base, all 300 POSTs are accepted with 202, but only 256 replies ever arrive. Request ids 1–44 are gone, with 44 matching dropped frame lines in the daemon log — 44 callers left waiting forever for a response that no longer exists. On head, the 258th POST returns 404 Unknown Acp-Connection-Id and the connection is retired with resource guard: ACP pre-attach frame limit. A client that is told its connection died can recover; a client waiting on an evicted reply cannot.

3. Refusal closes only the admitting owner

The daemon stayed healthy on both arms after the guard fired: a fresh initialize + session/new succeeded immediately, and full.acpMounts attributes preAttachGuardFailures: 1 to the mount that caused it.

4. Status and SDK surface

status

All five limits are exposed with the documented values, the runtime counters track and release correctly, and per-mount attribution is populated. The same endpoint on base has none of these fields.

5. Ownership is transactional with local delivery

lifecycle

  • Notification form of session/new creates a live session on base and creates nothing on head — the documented breaking change, confirmed on the wire.
  • Provisional ownership: while its reply is still buffered, head reports ownedSessionCount: 0 for the connection (base reports 1), and deleting the connection before delivery rolls the fresh session back.
  • Stalled SSE writer: 8 buffered frames → attach a reader that never reads → pendingDeliveryFrames: 7 with usedBytes: 7,176,386 still charged → close the socket → every counter returns to 0. The lease is held through the stall exactly as claimed.

6. One global budget across mounts — verified, but not to exhaustion

scope

With --workspace A --workspace B, a connection on /acp and one on /workspaces/<id>/acp charge the same process-global counter: 5 + 5 frames, and usedBytes is exactly the sum (10,251,980 B), with correct per-connection workspaceId / primary attribution.

I did not drive this to the 4,096-frame / 256 MiB global ceiling — reaching it needs four-plus connections each parked just under their own 64 MiB cap, i.e. ~250 MiB of live buffers. The sharing is proven; the global refusal edge is still only covered by unit tests.

7. Scope note: an attached-but-unread WebSocket is still unbounded

Same fixture, WS transport, client stops reading its socket after session/new:

frames sent to a stalled WS reader daemon RSS delta preAttach.usedBytes
20 × ~1 MiB +142 MB 0
40 × ~1 MiB +268 MB 0
60 × ~1 MiB +358 MB 0
90 × ~1 MiB +526 MB 0

These frames take the live fast path into WsStream's write chain and never reach the pre-attach budget, so nothing is charged, nothing is refused, and no 1013 is sent. This is consistent with the PR's own non-goals ("ordinary live SSE/WS new-frame queues … remain outside this PR"), so I am flagging it as scope, not as a defect — but it does mean the daemon-memory story is not closed by this PR, and the same behaviour is present on base. For the same reason I could not exercise the documented WS 1013 close code from a black-box client: on a WS transport the socket serves as both connection and session stream, so the pre-attach path is never entered in normal flow. That path remains covered by unit tests only.

8. Independent check of the JSON byte estimator

I wrote my own differential oracle (not the PR's test) against the built package: every UTF-16 code unit standalone, every code unit in escaping-sensitive context, astral code points across all planes, 40,000 deterministic random strings, and 5,000 randomized early-exit limit cases.

strings_checked: 108,636    exact_mismatches: 0
limit_contract_checked: 5,000    violations: 0
verdict: MATCHES JSON.stringify

9. Test suites reproduce on head

package result
acp-bridge (json-string-bytes, bridge, spawnChannel) 614/614 across 3 files
cli (pre-attach-budget, connection-registry, sse-stream, ws-stream, transport, daemon-status, run-qwen-serve) 691/691 across 7 files
sdk-typescript (daemon-public-surface) 14/14

(Counts are higher than the PR body's 46/442 because I ran the whole files rather than a filtered subset.)


Verdict

Everything the PR claims about the pre-attach byte bound, per-owner refusal, delivery-tied ownership and the status surface reproduces on a real daemon, and the base-vs-head contrast is decisive — most of all the 44 silently dropped JSON-RPC replies on base. From a verification standpoint this is good to merge. §6 and §7 are follow-up scope for the tracking issue, not blockers: the global ceiling is proven-shared but not driven to exhaustion, and live WS/SSE queues remain unbounded by design after this change.

Not covered: Windows and Linux, the WS 1013 close path, and the global 256 MiB refusal edge.

中文版本

维护者本地验证 —— 真实 daemon,无 mock

我从源码构建了两份完整 bundle(npm ci && npm run build && npm run bundle):本 PR head aea72fd 和它的 merge base a32ec1e,然后用手写的 ACP-over-HTTP 客户端(POST /acp、SSE GET /acp、真实 WebSocket upgrade)分别驱动。daemon 内部没有任何桩:真实 qwen serve、真实 dispatcher、真实 transport,每条腿独立 QWEN_HOME 和 workspace,环境为 macOS 26.6 / Node v24.18.1。

产生 ~1 MiB 回复的杠杆完全来自配置,因此 payload 是真实的 dispatcher 输出而不是注入帧:fixture 在 modelProviders 下注册了 245 个模型,使每个 session/newsession/set_config_option 回复都携带 1,025,198 B 的真实 configOptions JSON。

这补上了 PR 自己声明的证据缺口("该真实 daemon RSS 场景本次本地未执行")。字节边界、按 owner 精确拒绝、status surface、跨 mount 共享全局预算,以及 ownership 事务性,行为都与描述一致。合并前有两点值得维护者注意,见 §6 和 §7,两者都不是回归。

1. 真实 daemon 上字节边界成立

单连接,session stream 始终不 attach,128 × ~1 MiB 回复。

base (a32ec1e) head (aea72fd)
接纳帧数 128(全部) 65,第 66 帧被拒
结束时保留 bufferedSessionFrames: 128 usedFrames: 0usedBytes: 0
字节高水位 无统计 66,637,870 B ≤ 67,108,864 B 上限
冷却 30 秒后 RSS 增量 +613 MB +132.5 MB

拒绝点与常量完全吻合:65 × 1,025,198 = 66,637,870 B 可容纳,第 66 帧会越过 64 MiB,于是这次 admission 关闭连接。两次独立运行结果一致。

RSS 一栏有一个如实的说明:在相同帧数下 head 的 RSS 并不低于 base(JSON.stringify 的瞬时放大,PR 已明确列为非目标)。收益在于上限和释放,而不是瞬时占用。

2. 静默淘汰变为 fail closed —— 这是支持该 breaking change 最有力的证据

在未 attach stream 的连接上发 300 次 session/list,然后 attach stream 统计回复。

base:300 次 POST 全部 202,但只有 256 条回复到达;请求 id 1–44 消失,daemon 日志有 44 行对应的 dropped frame —— 44 个调用方永远等待一个已不存在的响应。head:第 258 次 POST 返回 404 Unknown Acp-Connection-Id,连接以 resource guard: ACP pre-attach frame limit 退场。被告知连接已断的客户端可以恢复,而等待被淘汰回复的客户端不能。

3. 拒绝只关闭发起 admission 的 owner

两条腿在 guard 触发后 daemon 都保持健康:新的 initialize + session/new 立即成功,full.acpMountspreAttachGuardFailures: 1 归因到触发它的 mount。

4. status 与 SDK surface

五个 limits 都以文档值暴露,runtime 计数正确累计与释放,per-mount 归因有值。base 上同一端点完全没有这些字段。

5. ownership 与本地投递构成事务

  • session/new 的 notification 形式在 base 上会创建 live session,在 head 上什么都不创建 —— 文档中的 breaking change,在线协议层面得到确认。
  • provisional ownership:回复仍在缓冲时,head 上该连接的 ownedSessionCount: 0(base 为 1);在投递前删除连接会回滚这个 fresh session。
  • 阻塞的 SSE writer:缓冲 8 帧 → attach 一个永不读取的 reader → pendingDeliveryFrames: 7usedBytes: 7,176,386 仍被计费 → 关闭 socket → 所有计数归零。lease 在阻塞期间保持,与描述一致。

6. 跨 mount 共享同一预算 —— 已验证,但未跑到耗尽

使用 --workspace A --workspace B/acp 上的连接与 /workspaces/<id>/acp 上的连接计入同一进程级计数器:5 + 5 帧,usedBytes 正好是两者之和(10,251,980 B),per-connection 的 workspaceId / primary 归因正确。

没有把它推到 4,096 帧 / 256 MiB 的全局上限:要触达需要四个以上连接各自停在自己 64 MiB 上限之下,即约 250 MiB 的活缓冲。共享已被证明,全局拒绝的边界目前仍只有单测覆盖。

7. 范围说明:已 attach 但不读取的 WebSocket 仍然无界

同一 fixture,WS transport,客户端在 session/new 后停止读取 socket:

发给阻塞 WS reader 的帧数 daemon RSS 增量 preAttach.usedBytes
20 × ~1 MiB +142 MB 0
40 × ~1 MiB +268 MB 0
60 × ~1 MiB +358 MB 0
90 × ~1 MiB +526 MB 0

这些帧走 live 快路径进入 WsStream 的写队列,从不到达 pre-attach 预算,因此不计费、不拒绝、也不会发 1013。这与 PR 自己的非目标一致("普通 live SSE/WS 新帧队列……不在本 PR 范围内"),所以我把它标为范围问题而非缺陷 —— 但这意味着 daemon 内存这条线并没有被本 PR 收口,且 base 上行为相同。同样的原因,我无法从黑盒客户端触发文档中的 WS 1013 close code:WS transport 下同一 socket 既是 connection stream 也是 session stream,正常流程根本不进入 pre-attach 路径。该路径目前仅有单测覆盖。

8. JSON 字节估算器的独立校验

我针对已构建的包写了自己的差分 oracle(不是 PR 自带的测试):每个 UTF-16 code unit 单独、每个 code unit 处于转义敏感上下文、覆盖全部平面的 astral code point、40,000 个确定性随机字符串,以及 5,000 个随机化的提前退出 limit 用例。

strings_checked: 108,636    exact_mismatches: 0
limit_contract_checked: 5,000    violations: 0
verdict: MATCHES JSON.stringify

9. head 上测试套件复现

结果
acp-bridgejson-string-bytesbridgespawnChannel 3 个文件 614/614
clipre-attach-budgetconnection-registrysse-streamws-streamtransportdaemon-statusrun-qwen-serve 7 个文件 691/691
sdk-typescriptdaemon-public-surface 14/14

(数量高于 PR 正文的 46/442,因为我跑的是整文件而不是过滤后的子集。)

结论

PR 关于 pre-attach 字节边界、按 owner 拒绝、ownership 绑定投递以及 status surface 的全部声明,都在真实 daemon 上复现,base 与 head 的对比结论明确 —— 尤其是 base 上 44 条被静默丢弃的 JSON-RPC 回复。从验证角度可以合并。§6 与 §7 属于 tracking issue 的后续范围,不是阻塞项:全局上限已证明共享但未跑到耗尽,live WS/SSE 队列在本次改动后按设计仍然无界。

未覆盖:Windows 与 Linux、WS 1013 close 路径、全局 256 MiB 拒绝边界。

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not reviewed: build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally.

Not explored to full depth (tool budget reached): PR #9007 bounds the daemon's ACP HTTP pre-attach bufferin...: none — all checks above completed within the tool budget.; You are review agent reverse-audit — Reverse audit agen...: none — all checks I started were completed within budget.; chunk 3: I could not execute the test file (the review worktree has no node_modules). All assertions were manually traced against the implementation instead.; chunk 3: could not execute connection-registry.test.ts to confirm it passes (no node_modules in the review worktree); all assertions were verified by manual trace ag…; You are review agent reverse-audit — Reverse audit agen...: none — all checks I started were completed within budget., and 9 more.

Not reviewed: reverse audit — did not converge within the reverse-audit round cap of 5.

中文说明

未审查:build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally。

未探索到全部深度(达到工具调用预算):PR #9007 bounds the daemon's ACP HTTP pre-attach bufferin...:none — all checks above completed within the tool budget.;You are review agent reverse-audit — Reverse audit agen...:none — all checks I started were completed within budget.;chunk 3:I could not execute the test file (the review worktree has no node_modules). All assertions were manually traced against the implementation instead.;chunk 3:could not execute connection-registry.test.ts to confirm it passes (no node_modules in the review worktree); all assertions were verified by manual trace ag…;You are review agent reverse-audit — Reverse audit agen...:none — all checks I started were completed within budget.,另有 9 条。

未审查:反向审计——在 5 轮的反审轮数上限内未收敛。

— qwen3.8-max via Qwen Code /review (v0.21.10)

Comment thread packages/sdk-typescript/test/unit/daemon-public-surface.test.ts Outdated
Comment thread packages/sdk-typescript/test/unit/daemon-public-surface.test.ts Outdated
Comment thread packages/sdk-typescript/test/unit/daemon-public-surface.test.ts Outdated
Comment thread packages/sdk-typescript/test/unit/daemon-public-surface.test.ts
Comment thread packages/sdk-typescript/test/unit/daemon-public-surface.test.ts
Comment thread packages/cli/src/serve/acp-http/connection-registry.test.ts
Comment thread packages/cli/src/serve/acp-http/connection-registry.ts
Comment thread packages/cli/src/serve/acp-http/connection-registry.ts
Comment thread packages/cli/src/serve/acp-http/connection-registry.test.ts
Comment thread packages/cli/src/serve/acp-http/ws-stream.ts
doudouOUC added a commit that referenced this pull request Aug 12, 2026
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
@doudouOUC

Copy link
Copy Markdown
Collaborator Author

Addressed the latest review round in d0de7770ad.

Review items Action
3 Critical SDK type-assertion failures Fixed: restored the compactedReplayMaxBytes: number pin and replaced the three disjoint toMatchTypeOf assertions with exact same-key literal-shape toEqualTypeOf checks.
21 Suggestions Deferred: this PR has exceeded roughly five review rounds, so per repository policy this round lands only Critical correctness fixes. Each suggestion is recorded in its review thread for follow-up.

Verification: explicit TypeScript compilation of the test file (0 diagnostics), negative mutation checks for all four type-pin groups, SDK public-surface tests 14/14, SDK typecheck, root ESLint, Prettier, and git diff --check.

Comment thread packages/cli/src/serve/acp-http/dispatch.ts Outdated
Comment thread packages/cli/src/serve/acp-http/connection-registry.ts Outdated
Comment thread packages/sdk-typescript/src/daemon/types.ts Outdated

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not reviewed: build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally.

Not explored to full depth (tool budget reached): PR #9007 bounds daemon ACP HTTP pre-attach buffering by f...: none — all planned checks completed within budget.; PR #9007 bounds daemon ACP HTTP pre-attach buffering by f...: none (~17 of ~53 tool calls used; all planned checks completed).; PR #9007 bounds daemon ACP HTTP pre-attach buffering by f...: none — all checks I started were completed within budget.; PR #9007 bounds daemon ACP HTTP pre-attach buffering by f...: none — all planned checks (baseline frame-write comparison, replay exclusivity, fake-vs-real attached shapes, receipt result mapping, onFatalConnection wiri…; PR #9007 bounds daemon ACP HTTP pre-attach buffering by f...: none — all planned checks completed within budget., and 11 more.

Not reviewed: reverse audit — did not converge within the reverse-audit round cap of 5.

中文说明

未审查:build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally。

未探索到全部深度(达到工具调用预算):PR #9007 bounds daemon ACP HTTP pre-attach buffering by f...:none — all planned checks completed within budget.;PR #9007 bounds daemon ACP HTTP pre-attach buffering by f...:none (~17 of ~53 tool calls used; all planned checks completed).;PR #9007 bounds daemon ACP HTTP pre-attach buffering by f...:none — all checks I started were completed within budget.;PR #9007 bounds daemon ACP HTTP pre-attach buffering by f...:none — all planned checks (baseline frame-write comparison, replay exclusivity, fake-vs-real attached shapes, receipt result mapping, onFatalConnection wiri…;PR #9007 bounds daemon ACP HTTP pre-attach buffering by f...:none — all planned checks completed within budget.,另有 11 条。

未审查:反向审计——在 5 轮的反审轮数上限内未收敛。

— qwen3.8-max via Qwen Code /review (v0.21.10)

Comment thread packages/cli/src/serve/acp-http/connection-registry.ts
doudouOUC added a commit that referenced this pull request Aug 12, 2026
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
@doudouOUC

Copy link
Copy Markdown
Collaborator Author

Addressed the current Critical review batch in 056cd846b1.

Review item Action Verification
session/fork crossed runtime generations Fixed: generation-scoped the mutation and pinned branch/config/rollback to one runtime bridge Workspace-qualified replacement regression
Detached SSE session could retire a shared WebSocket Fixed: persisted stable session transport ownership across detach Detached-SSE overflow regression; shared-WS fatal behavior retained
SDK full-status shape broke legacy connection fixtures Fixed: restored optional connectionIdPrefix Legacy [{}] fixture and SDK public-surface type assertions
Deferred ownership reply could resurrect a closed session Fixed: added ref-counted per-session close generations with teardown cleanup Stale/fresh identity regression and 1,000-session baseline probe

Local verification: CLI focused tests 100/100, SDK public-surface tests 14/14, CLI and SDK typecheck, focused ESLint, repository build, full lint, and git diff --check all passed. Independent post-fix probes confirmed all four reproductions are closed and ownership state returns to baseline.

@doudouOUC
doudouOUC force-pushed the agent/daemon-acp-http-pre-attach-bounds branch from 4425139 to e7ea3b2 Compare August 15, 2026 10:28
@github-actions

Copy link
Copy Markdown
Contributor

Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration.

中文

请勿对活跃的 PR 执行 rebase 或 force-push,因为这会使已有的评审评论失效。另外,供日后参考:作为集成流程的一部分,机器人始终会自动将所有改动压缩(squash)为单个提交。

@doudouOUC

Copy link
Copy Markdown
Collaborator Author

Rebased this PR onto main at 9f8f65dde0 and force-pushed the conflict resolution as e7ea3b2194.

Action Result
Rebase Preserved the PR's 15 commits and all required co-author footers.
session/fork conflict Kept the current-main BridgeBranchedSession contract while retaining generation-scoped runtime selection and receipt-backed ownership rollback.
Test conflict Merged both independent test additions, removed the superseded duplicate fork fixture, and aligned the persistent-fork assertions with current main's branch-1 fixture.
Verification ACP transport + workspace-qualified 365/365; broader focused CLI 521/521; bridge 47/47; SDK 14/14; focused startup-status 1/1; git diff --check clean; two broad diff audits clean.

The repository-wide local build/typecheck remains blocked in unchanged areas by the current workspace's stale/unbuilt package declarations and the installed sharp type surface. No failure references the ACP HTTP rebase resolution; GitHub CI has been retriggered on the new SHA.

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partially reviewed — gaps disclosed.

Unresolved, please confirm:

  • [Critical] R9-1 (connection-registry.ts:1254): the connection-scoped settle-time requeue in settlePreparedAttempt fires only for outcome === 'closed' while the sibling session-scoped branch requeues any outcome !== 'delivered'; a conn-scoped frame settling 'outcome_unknown' is discarded rather than re-buffered. Author declined twice (comments 3787351742, 3788206580): outcome_unknown may have delivered the complete frame, so replay can duplicate a completed JSON-RPC response. The mechanism is present at the reviewed commit; whether drop-on-settle or duplicate-on-replay is the correct tradeoff cannot be settled from the code alone. The concrete unanswered-request residuals reachable in this territory are filed as new findings R12-2 and R12-4.

Not reviewed: reverse audit — stopped at the 5-round cap without two consecutive dry rounds (round 5 reported one finding, verified post-cap).

Not reviewed: build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally.

Not reviewed: build-and-test — webui suite did not run (whole-call budget) and the web-shell suite timed out (infrastructure); focused changed-workspace suites and dependents ran green apart from failures measured pre-existing on the merge base (test-delta netNew: []).

中文说明

仅完成部分审查,审查缺口已披露。

未决,请确认:共 1 条(原文未翻译,列表见上方英文部分)。

未审查:reverse audit — stopped at the 5-round cap without two consecutive dry rounds (round 5 reported one finding, verified post-cap)。

未审查:build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally。

未审查:build-and-test — webui suite did not run (whole-call budget) and the web-shell suite timed out (infrastructure); focused changed-workspace suites and dependents ran green apart from failures measured pre-existing on the merge base (test-delta netNew: [])。

— qwen3.8-max via Qwen Code /review (v0.21.12)

Comment thread packages/cli/src/serve/acp-http/sse-stream.ts
Comment thread packages/cli/src/serve/acp-http/dispatch.ts
Comment thread packages/cli/src/serve/acp-http/dispatch.ts
Comment thread packages/cli/src/serve/acp-http/dispatch.ts
Comment thread packages/cli/src/serve/acp-http/connection-registry.ts
@doudouOUC

Copy link
Copy Markdown
Collaborator Author

Review round 12 follow-up (HEAD e7ea3b2):

Finding Disposition Evidence
R12-1 Disputed; no code change WHATWG commits the parsed last-event-ID buffer to the EventSource reconnect string only when a blank line dispatches the event. A real SseStream/EventSource probe closed after the id line and reconnected with the prior cursor; EventBus replayed the incomplete event. Focused verification: SSE 17/17, EventBus replay 2/2.
R12-2 Deferred Suggestion-level serialization/re-entry edge case; excluded by the repository post-five-round Critical-only gate.
R12-3 Deferred Suggestion-level serialization-failure edge case; excluded by the repository post-five-round Critical-only gate.
R12-4 Deferred Suggestion-level serialization-time re-entry edge case; excluded by the repository post-five-round Critical-only gate.
R11-2 Deferred Maintenance cleanup with no runtime failure; excluded by the repository post-five-round Critical-only gate.

No branch changes were made. All five review threads were answered without duplicate replies.

@doudouOUC

doudouOUC commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator Author

@qwen-code /triage

1 similar comment
@doudouOUC

Copy link
Copy Markdown
Collaborator Author

@qwen-code /triage

@qwen-code-ci-bot

qwen-code-ci-bot commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

Sandboxed verification: ✅ passed — merge-ready (agent verdict) - workflow run

Ran the PR in an isolated, token-free container: A/B against the base build, mock-free harness assertions, targeted gates. Advisory evidence for human reviewers — not a review, an approval, or a CI check.

Scripted assertions: 947 passed · 0 failed · 947 total

中文 — 判定:✅ 通过 · 可合入(agent 判定)

沙箱验证在隔离、无凭证的容器中执行了该 PR 的代码(与 base 构建 A/B 对照、无 mock harness 断言、定向门禁)。仅作为评审证据,不构成评审、批准或 CI 检查

脚本断言:947 通过 · 0 失败 · 947 总计

Verification report

PR #9007 Deep Verification (follow-up round) — fix(serve): Bound ACP HTTP pre-attach buffers by bytes

Verdict: merge-ready — 947 scripted assertions executed, 947 passed / 0 failed. Verified head: e7ea3b219406335d4b2b1d8956aead98378c4011 (git rev-parse HEAD^2), base tip 9f8f65dde043c10cb6a13ea1d4a03928d83d98dc (HEAD^1 = metadata snapshot baseRefOid; they agree this round). Follow-up to the round that verified head 23f1af33 against base 299d29c4. Delta since then: the branch was rebased onto the new base tip 9f8f65dd — which is #8817 "feat: support fork from any conversation" — plus one test-only commit e7ea3b21 (align ACP fork fixtures after rebase). The merge ref is trivial (git diff HEAD^2 HEAD is empty), so what ships is exactly the rebased PR head on the new base. One carried-forward Suggestion stands (re-measured below); no new finding.

中文 — 判定:✅ 通过 · 可合入(agent 判定)

沙箱验证在隔离、无凭证容器中执行了该 PR 的代码(与 base 构建 A/B 对照、无 mock harness 断言、定向门禁)。仅作为评审证据,不构成评审、批准或 CI 检查

脚本断言:947 通过 · 0 失败 · 947 总计

  • 结论merge-ready。本轮增量 = rebase 到包含 feat: support fork from any conversation #8817(任意会话 fork/checkpoint 分支)的新 base + 一笔测试夹具对齐提交 e7ea3b21。所有上轮测量均在新 head/base 上重新执行(输入闭包变化,不做Shortcut沿用)。
  • A/B 结论:中心主张重新验证成立(见 A/B 表):head 33/33 fail-closed(第 257 帧/超字节只关闭肇事 owner、旁观者连接不受影响、全局预算精确计费、teardown 无预算泄漏);base 19/19 复现预测的坏行为(静默淘汰最旧帧、id-less 缓冲涨过 256、无字节/全局边界、无 receipt 机制)。
  • 增量(fork 面):对齐后的 fork 夹具与 feat: support fork from any conversation #8817 后真实 BridgeBranchedSession 形状一致(restored 字段 + forkedFrom);fork 相关测试 5/5 通过;正向对照 M3b 的 16 条红测试中包含全部 4 条 fork 回滚测试(detach/kill/persistent fork/workspace-generation 回滚),证明对齐没有丢失钉住力。ACP session/fork 仅转发 name(不带 atRecordId),恒走 restore 分支返回完整形状,dispatch 的类型转换安全。
  • Findings:上轮唯一 Suggestion(ownership commit 门无 dispatch 级测试钉住,M3 幸存)仍然存在:移除该门后 transport + dispatch 三套件 372/372 全绿;正向对照 M3b 杀死 16 条(上轮 9 条,回滚半钉得更紧)。谓词本身在 registry 级有单测。分类仍为覆盖缺口,非死代码、非阻塞。
  • 未覆盖:真实 daemon E2E(128×1MiB RSS 等,PR 自述本地亦未跑);per-commit 归因(浅克隆);Windows;live 队列(PR 非目标)。

Previous-finding status (follow-up round)

# Finding (previous round, head 23f1af33) Severity Status at e7ea3b21
1 Ownership commit gate (canCommitSessionOwnership consulted in ownershipReceipt.delivered()) unpinned by any dispatch-level test — M3 survivor Suggestion (coverage gap) stands — re-measured: with the gate removed (M3), transport + dispatch trio run 372/372 green (suite grew from 364 last round). Positive control M3b (disable rollback-on-discard) now kills 16 tests (was 9) — the rollback half got more pinned, the commit half remains unpinned. The predicate itself stays unit-pinned at registry level (rejects an ownership commit while session/close is in flight, connection-registry.test.ts:968), which is why M3 leaves every suite green: M3 removes the caller, not the predicate.

All carried-forward measurements were re-run at the new head and new base — the input closure changed (rebase onto #8817 + fixture commit), so nothing was carried by shortcut. The previous round's harnesses were rebuilt from the dist API (artifact dir from run 31760035992 does not persist across runs).

Central claim + A/B

Central claim: daemon-owned ACP HTTP pre-attach buffering is bounded by frame count and serialized bytes at per-stream / per-connection / process-global scope, and refusal fails closed on the admitting owner instead of silently evicting an older frame.

Each arm's compiled dist is driven directly over real loopback HTTP (real SseStream, real fetch client). Head arm = the workflow-built packages/cli/dist; base arm = the six HEAD^1 modules transpiled with esbuild into a parallel tree (tmp/base-dist/). The import closure of every module both arms load is node-builtins + relative paths only — scripted check in harness/matrix-check.mjs asserts no package imports and that the base eviction marker (MAX_BUFFERED_FRAMES = 256) exists only in the base module — so no workspace symlink can contaminate either arm. package.json/package-lock.json are untouched by the PR (verified), so there is no dependency confound. Witnesses: 01-ab-head-arm-bounds-fail-closed.png, 02-ab-base-arm-silent-eviction.png.

Cell Scenario HEAD (e7ea3b21) BASE (9f8f65dd)
C1 257 id-bearing frames, one session, no stream attached #257 refused (failed); owning session binding closed+removed; connection survives; guard callback + guardFailures fire exactly once; teardown releases all 256 leases (no budget leak) all 257 accepted (void API); buffer capped at 256 by silently evicting the oldest (buffer[0].id 1→2; stderr dropped frame id 1)
C2 257 id-less replies #257 refused; session closed; connection survives buffer grows to 257 > 256 (id-less "irreplaceable", exempt to the 1024 hard cap)
C3 3 × ~120 KiB frames vs 300 KB per-connection cap (constructor seam) frames 1–2 buffered, bytes charged exactly (245,850 B); #3 refused; connection destroyed; guard logs connection budget all 3 retained; no byte bound; connection alive
C4 two connections, shared 6-frame global budget A:3+B:3 charged; B's 4th refused; B destroyed; bystander A intact with all 3; guardFailures counted exactly once no global budget exists — B retains all 4; registry ctor has no budget seam; AcpPreAttachBudget export absent
C5 buffered frames flushed on attach, real SSE wire 3 frames byte-equal, in order; all 3 send promises resolve delivered identical wire parity (void API)
C6 lease accounting while delivery is pending (deterministic hanging stream seam) bytes/frames charged exactly at buffering; pendingDeliveryFrames=3 during stall; all counters 0 after teardown; high-water retained no lease accounting — pendingDeliveryFrames/preAttachOwned* fields absent from diagnostic
C7 delivery-receipt lifecycle unsettled while buffered; teardown → discarded; wire delivery → delivered (frame byte-intact) sendConn accepts no receipt (arity 1); ownership granted pre-delivery by construction

Head arm 33/33; base arm 19/19 (every base assertion encodes the predicted broken behaviour; C5 checks are shared parity cells). Note: C3/C4 use constructor-seam caps (300 KB / 6 frames) to make triggers affordable; production defaults (64 MiB / 1024 conn, 256 MiB / 4096 global) are the same code paths, and the exact-cap boundary tests live in the committed suites (M1 red list below).

Delta probes (rebase onto #8817 + fixture commit)

Fork surface (the #8817 intersection). #8817 added checkpoint-anchored branching (sourceType/sourceId/atRecordId on BridgeBranchSessionRequest, "crash-safe ownership and referenced backups"). Interaction checks:

  • Dispatch forwards only name — ACP session/fork never passes atRecordId, so branchSession always takes the restore path and returns the full BridgeBranchedSession shape; the persisted-only BridgePersistedBranchedSession variant (which lacks clientId/attached) is only produced when atRecordId !== undefined, i.e. the REST/web-shell path ACP dispatch never uses. The as BridgeBranchedSession cast in dispatch is therefore safe. (Static trace of bridge.ts branchSession + dispatch.ts fork case.)
  • Aligned fixtures are faithful: the mock branchSession in transport.test.ts returns sessionId/workspaceCwd/attached/clientId/state/displayName/forkedFrom — exactly restored-shape ∪ forkedFrom from the post-feat: support fork from any conversation #8817 bridgeTypes.ts.
  • Aligned fixtures still pin: fork-filtered transport run 5/5 green; and the M3b positive control's red list contains all four fork-rollback tests — removes an undelivered persistent fork when the connection closes, 'detach'/'kill' a restored fork when the connection closes before the reply, and rolls back session/fork through the bridge generation that created it (workspace-qualified). The fixture alignment did not remove the teeth.
  • Fork rollback flows into the pre-existing shared deleteDaemonSessionIfOrphan (unchanged by this PR, from server/session-archive.ts), so feat: support fork from any conversation #8817's persisted-fork cleanup semantics are what the rollback inherits — the PR only decides when it fires.

Ambiguous WebSocket deliveries (re-measured with real ws 8.21.0 server/client over loopback, paused receiver, ws-ambiguity.mjs; witness 03-ws-ambiguous-delivery-preserved.png): healthy send → delivered + byte-equal frame; accepted-but-unconfirmed send whose socket terminates mid-flight → outcome_unknown; buffered frame flushed onto a WS stream that dies mid-delivery → receipt settles exactly outcomeUnknown, never discarded (ownership is not rolled back for a delivery that may have happened). 5/5 at the new head.

Estimator (wire oracle = Buffer.byteLength(JSON.stringify(·)) itself, estimator-oracle.mjs; witness 04-estimator-oracle-exact.png): exact equality on all 65,536 single UTF-16 code units, 2,000 seeded random strings, 31 adversarial surrogate/escape shapes; early-exit returns exactly min(actual, limit+1) across a 363-point limit sweep; 2 MB mixed payload exact in 30 ms. Base formula replay (Buffer.byteLength(s)+2) under-charges 18/31 shapes — 700×U+0001: actual 4202 vs base 702, matching the PR's own test plan number.

Mutation matrix (re-run live at the new head)

Witness: 05-mutation-matrix-at-new-head.png. Raw logs logs/mut-*.log; scripted verdicts in harness/matrix-check.mjs (10/10). All mutants reverted afterwards; git diff on the four mutated files clean.

Mutant Change Suite Result First failing assertion
M1 registry: disable per-connection byte + global lease refusal connection-registry + pre-attach-budget KILLED — 4 red / 62 green bounds retained serialized payload bytes before stream attachment (+ accepts the exact byte limit and rejects the next byte, + 2 cross-workspace budget tests)
M2 spawnChannel: revert estimator to base formula acp-bridge spawnChannel KILLED — 1 red / 41 green charges JSON string escaping before admitting prepared responses (expected [Function] to throw an error — the intended behavioral assertion)
M3 dispatch: remove canCommitSessionOwnership gate in delivered() transport + dispatch trio SURVIVED — 0 red / 372 green
M3b dispatch: disable rollback-on-discard (positive control) transport + dispatch trio KILLED — 16 red / 356 green rolls back an undelivered fresh session when the connection closes (+15, incl. all 4 fork-rollback tests)
M4 dispatch: delete failed-delivery error-frame retry in replyConn transport + dispatch trio KILLED — 2 red / 370 green the two session/load … cannot be serialized (live+buffered) tests
M5 ws-stream: flatten outcome_unknowndelivered ws-stream KILLED — 2 red / 20 green close() marks an active accepted send outcome unknown (+ peer-loss-race test)

M3b/M4/M5 prove the harness can make every relevant suite red through the receipt/ambiguity/retry mechanisms, so M3's survival is a coverage statement, not harness failure. M3 escalation note: the finer half of the same receipt (rollback) dies with 16 red, and the commit gate's predicate is pinned at registry level — the gap is precisely "no dispatch-level test drives a close/generation race through delivered()".

Findings

  1. Suggestion (carried forward, stands) — ownership commit gate unpinned at dispatch level. Reproduce: python3 harness/mut-apply.py m3 (removes the canCommitSessionOwnership consultation from ownershipReceipt.delivered() in dispatch.ts), then cd packages/cli && npx vitest run src/serve/acp-http/transport.test.ts src/serve/acp-http/dispatch-error.test.ts src/serve/acp-http/dispatch.sandbox.test.ts src/serve/acp-http/workspace-qualified-acp.test.ts → 372/372 green; mut-apply.py m3b → 16 red. The gate is live, not dead code: closeSessionStream bumps the ownership generation and session/close interposes, so a reply whose write settles after a close race is exactly the interleaving the gate decides. A fixture that would pin it: session/new (or session/fork) reply in flight on a live connection stream, session/close for that id landing before the write settles, then assert the session is not re-owned. Not merge-blocking — the guard exists and is correct as written; completeness reporting only.

No new findings this round.

Not covered

  • Real-daemon E2E (committed plan: 128 × 1 MiB distinct-payload RSS, dynamic-workspace mounts, stalled-writer inspection, live GET /daemon/status?detail=full): not executed — the PR states it was not run locally either. The plan file is intact in git (git show HEAD:.qwen/e2e-tests/2026-08-12-daemon-acp-http-pre-attach-bounds.md, 31 lines) but cannot be materialized in this worktree: .qwen/ is root-owned read-only (dr-xr-xr-x root root) — environmental, identical to the previous round. The A/B above proves the same mechanisms at registry/stream level over real HTTP/SSE/WS; that is the handling, not the end-to-end RSS trigger.
  • Per-commit attribution: the depth-2 merge-ref checkout is grafted (git rev-list HEAD^1..HEAD^2 returns 1 vs the snapshot's 16 commits), so only the aggregate HEAD^1..HEAD diff was verified. The fixture commit e7ea3b21's own parent is unreachable; its effect was scoped by fixture-shape validation + fork-filtered run + M3b red list instead of an isolated diff.
  • Dispatch-level A/B against base for ownership transactionality (needs the full bridge runtime): covered by C7 + gates + M3/M3b/M4 + WS probe instead.
  • Ordinary live SSE/WS new-frame queues and transient single-frame JSON.stringify amplification (PR-declared non-goals); Windows (PR tested macOS only); repo-wide lint/typecheck (PR's own CI ran them; the workflow pre-ran npm ci + npm run build at HEAD, which compiled every touched file clean).
  • The WS close-code 1013 claim beyond code inspection: retireConnection passes { code: 1013, reason: 'Resource limit' } (read in dist; exercised through the committed overflow tests in the gate), but my harness asserted destroyed=true rather than the wire code on a shared WS.

Methodology

Environment: node:22-bookworm CI container, Node v22.23.2, tree at refs/pull/9007/merge (depth 2, grafted), npm ci + npm run build pre-run at HEAD. A/B harness (harness/ab-pre-attach.mjs) imports each arm's compiled modules by direct relative path — head from the workflow-built packages/cli/dist, base from tmp/base-dist/ (six HEAD^1 modules transpiled with esbuild, format=esm target=node22); a scratch worktree at HEAD^1 supplied the sources and was git worktree remove --forced after capture. Arm isolation is scripted (no package imports in either closure; base eviction marker present only in base). WS probe (harness/ws-ambiguity.mjs) uses the real ws 8.21.0 package with a paused receiver to keep writes genuinely in flight. Estimator oracle (harness/estimator-oracle.mjs) compares against JSON.stringify bytes directly and replays the base formula mechanically. Gates ran via npx vitest run <exact files> per package (CLI 812, acp-bridge 47, SDK 14). Mutations applied by harness/mut-apply.py with backups under mut-backup/, each restored and verified by empty git diff. Evidence captures via scripts/verify-capture.mjs; raw per-cell logs in logs/.

Evidence images

01-ab-head-arm-bounds-fail-closed

02-ab-base-arm-silent-eviction

03-ws-ambiguous-delivery-preserved

04-estimator-oracle-exact

05-mutation-matrix-at-new-head

Harness scripts and raw logs are in the workflow run artifacts (7-day retention).

Qwen Code · sandboxed verification

@qwen-code-ci-bot

Copy link
Copy Markdown
Collaborator

Triage re-run completed without a new review.

The bot already has a review of its own on e7ea3b219406335d4b2b1d8956aead98378c4011, which still stands.

机器人在 e7ea3b219406335d4b2b1d8956aead98378c4011 上已有自己的评审,且仍然有效。

The stage comments above were updated with the latest result. View workflow run.

上方各阶段评论已更新为最新结果。查看工作流运行

@wenshao

wenshao commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

Maintainer re-verification at e7ea3b2 — real daemon, no mocks

Second pass. My earlier report covered aea72fd; since then the branch was rebased onto a newer main and picked up two commits, so I rebuilt both arms from scratch and re-ran everything against the current head.

Two full bundles built from source (npm install && npm run build && npm run bundle) — head e7ea3b2 and its merge base 9f8f65d — each started as a real qwen serve daemon with an isolated QWEN_HOME, a primary and a secondary --workspace, and driven by a hand-written ACP-over-HTTP client (POST /acp, SSE GET /acp, raw sockets for the stall cases). Nothing inside the daemon is stubbed. macOS 26.6, Node v24.18.1.

This pass also closes the one gap I left open last time (§6 there): the process-global 256 MiB budget is now driven all the way to refusal, across two workspace mounts. Everything the PR claims still reproduces at e7ea3b2. Two non-blocking observations for the author are in §6.


1. The byte bound holds, and base has no ceiling but frame count

One connection, connection stream never attached, identical 8,000,091-byte JSON-RPC replies pushed one at a time.

byte bound

Base accepts all 300 POSTs and never refuses anything; daemon RSS climbs monotonically from 205 MB to 2,674 MB on a single connection. Head buffers 8 frames (64,000,728 B) and refuses the 9th admission, closing exactly that connection — the 9th POST still gets its 202 because the HTTP ack precedes the reply, and the 10th returns 404. The high-water figure sits against the documented 67,108,864 B cap, and usedFrames/usedBytes return to 0 once the owner is retired.

Base's only bound here is the 256-frame count, so its per-connection ceiling scales with payload size: ~2 GB retained at 8 MB/frame, against a 64-connection cap.

2. Silent eviction becomes fail-closed

300 small requests on a connection with no stream, then the stream is attached and the replies that actually arrive are counted.

frame cap

On base the client receives ids 45…300 — ids 1–44 are gone, matched by exactly 44 pre-attach buffer full … dropped frame lines in the daemon log. Those 44 callers wait forever. On head the 258th POST returns 404 Unknown Acp-Connection-Id as a JSON-RPC error and the stream attach 404s too. A client told its connection died can recover; a client waiting on an evicted reply cannot. This remains the strongest argument for the breaking change.

3. One process-global budget, driven to exhaustion (the gap from last pass)

global budget

Four connections — two on /acp, two on /workspaces/ad70a753414d7209/acp — each parked at 8 frames, just under their own 64 MiB ceiling. usedBytes accumulates as the exact sum across both mounts, up to 256,002,976 B (95.4% of the 256 MiB global cap). The fifth connection is admitted for two more frames (high-water 264,003,069 B) and then refused; the sixth, on the other mount, repeats it identically.

Three things worth calling out:

  • The refusal is the global guard — resource guard: ACP pre-attach daemon budget ×2, and zero per-connection guard lines. The two guards are distinguishable in the log.
  • Nothing is evicted from another owner. Connections 1–4 still hold 8 frames / 64,000,744 B each after both refusals.
  • With the budget 95.4% full, a fresh connection still initializes, creates a real session with a real ACP child, and receives its reply on the wire, with ownership committed only after delivery.

4. Ownership transactionality and the status surface

lifecycle

  • Notification form of session/new: base creates a live session the caller can never address (it learns no session id); head creates nothing and logs session/new notification rejected. The documented breaking change, confirmed on the wire.
  • Provisional ownership: while the reply is still buffered, head reports ownedSessionCount: 0 / sessionBindingCount: 0 with the frame charged (1 frame / 1,238 B); base reports 1 / 1. Deleting the connection before delivery rolls the fresh session back with nothing leaked.
  • Stalled writer: 8 buffered frames → attach a socket that never reads → frames move to pendingDeliveryFrames: 8 with usedBytes still charged. The lease is genuinely held through the stall.
  • All five limits are exposed with the documented values; base has none of them. Per-mount preAttachGuardFailures attributes each failure to the mount whose connection tripped it.

5. The two commits added since my last pass

  • bcccd377 (WS teardown logging safety)writeStderrLine throws on EPIPE or a closed fd, so the old ordering could skip this.close() and strand the stream. I mutation-tested it: reverting only ws-stream.ts to its pre-commit state makes exactly the two new tests fail with an unhandled write EPIPE, so the fix is load-bearing and the coverage is real. Note the same ordering is present on base too — this is a pre-existing latent bug the PR happens to fix, not a regression it introduced. Unit-level only; I could not produce a throwing stderr fd against a live macOS daemon (Node writes stderr asynchronously to pipes there).
  • e7ea3b21 — test fixture alignment only.

6. Two observations for the author (neither blocking)

a. The committed E2E plan's step 5 does not match the shipped behaviour, and the behaviour is the better of the two. The plan says that after closing a stalled writer's socket, "all counters return to the pre-test baseline". Observed: 7 of the 8 in-flight frames are requeued into the buffer and stay charged (bufferedConnectionFrames: 7, usedBytes: 56,000,637), because these are irreplaceable JSON-RPC replies being held for a reconnect. They only return to zero after the connection itself is reaped at the 10-second grace. That is the correct behaviour — dropping them would hang their callers — but the plan text reads like a bug report against it. Worth a one-line correction in .qwen/e2e-tests/….

b. A refinement of the live-queue scope note I raised last time. With a stream attached-but-unread from the start, 40 × 8 MB frames are all accepted with usedBytes: 0 and guardFailures: 0 while RSS grows +450 MB — the live path is still uncharged, as the PR's non-goals say. But the moment that socket closes, the in-flight frames are requeued, charged, and the per-connection guard fires and retires the connection. So the exposure is narrower than I implied last time: unbounded only while the stalled transport stays open, then bounded at close. The WS 1013 close code still has no black-box path in normal flow (on WS the same socket is both connection and session stream, so the pre-attach path is not entered) and remains unit-test-only.

7. Independent checks

  • JSON byte estimator — my own differential oracle against the built package (not the PR's tests): every UTF-16 code unit standalone and in escaping-sensitive context, astral code points across all planes, lone surrogates, 40,000 deterministic random strings, 5,000 randomized early-exit limit cases. 175,447 strings checked, 0 mismatches; 5,000 limit-contract cases, 0 violations.
  • Why that fix matters, quantified. The pre-fix estimator charged Buffer.byteLength(s) + 2. Against what JSON.stringify actually emits, for 1 MiB inputs: control characters were under-charged (1,048,578 charged vs 6,291,458 real), quotes, backslashes and lone surrogates , plain ASCII exact. That under-charge is what let the daemon→child NDJSON queue retain more than its maxQueuedBytes.
  • Focused suites on headcli 777/777 across 8 files, acp-bridge 47/47 across 2 files, sdk-typescript 14/14. All green.

Verdict

Everything this PR claims about the pre-attach byte bound, per-owner refusal, the shared global budget, delivery-tied ownership and the status surface reproduces on a real daemon at e7ea3b2, and the base-vs-head contrast is decisive — 44 silently dropped JSON-RPC replies and an unbounded 2.6 GB single connection on base, both bounded and observable on head. From a verification standpoint this is good to merge. §6a is a doc nit; §6b narrows, rather than widens, the remaining scope.

Not covered: Windows and Linux, the WS 1013 close path, and a throwing-stderr test of bcccd377 against a live daemon.

中文版本

维护者复验(head e7ea3b2)—— 真实 daemon,无 mock

这是第二轮。我之前的报告针对的是 aea72fd;此后分支 rebase 到了更新的 main 并新增两个 commit,因此我重新从零构建两条腿,对当前 head 全量重跑。

两份完整 bundle 均从源码构建(npm install && npm run build && npm run bundle):head e7ea3b2 与其 merge base 9f8f65d。每条腿都以真实 qwen serve 启动,独立 QWEN_HOME,注册一个 primary 和一个 secondary --workspace,由手写的 ACP-over-HTTP 客户端驱动(POST /acp、SSE GET /acp、阻塞场景用裸 socket)。daemon 内部无任何桩。环境 macOS 26.6、Node v24.18.1。

本轮同时补上了我上次留下的唯一缺口(上次 §6):进程级 256 MiB 全局预算这次被推到了真正的拒绝点,且跨两个 workspace mount。PR 的全部声明在 e7ea3b2 上依旧复现。两条非阻塞的观察见 §6。

1. 字节边界成立,而 base 除帧数外没有任何上限

单连接,connection stream 始终不 attach,逐条推送 8,000,091 字节的 JSON-RPC 回复。

base 接受全部 300 次 POST,从不拒绝;单条连接就把 daemon RSS 从 205 MB 单调推到 2,674 MB。head 缓冲 8 帧(64,000,728 B)后拒绝第 9 次 admission,并且只关闭这一条连接 —— 第 9 次 POST 仍返回 202(HTTP ack 早于回复),第 10 次返回 404。该高水位对应文档中的 67,108,864 B 上限;owner 退场后 usedFrames / usedBytes 归零。

base 在这里唯一的边界是 256 帧的计数,所以它的单连接天花板随 payload 大小放大:8 MB/帧时保留约 2 GB,再乘以 64 连接上限。

2. 静默淘汰变为 fail-closed

在无 stream 的连接上发 300 个小请求,然后 attach stream 统计真正到达的回复。

base 上客户端收到 id 45…300,id 1–44 消失,daemon 日志中恰好有 44 行 pre-attach buffer full … dropped frame。这 44 个调用方将永远等待。head 上第 258 次 POST 返回 404 Unknown Acp-Connection-Id(JSON-RPC error 形式),随后的 stream attach 同样 404。被告知连接已断的客户端可以恢复,等待被淘汰回复的客户端不能。这仍然是支持该 breaking change 最有力的证据。

3. 单一进程级预算,推到耗尽(上次的缺口)

四条连接 —— 两条在 /acp,两条在 /workspaces/ad70a753414d7209/acp —— 各停在 8 帧,正好低于自身 64 MiB 上限。usedBytes 按两个 mount 的精确求和累积,直到 256,002,976 B(全局 256 MiB 上限的 95.4%)。第五条连接再被接纳两帧(高水位 264,003,069 B)后被拒绝;第六条在另一个 mount 上完全重现同一结果。

三点值得强调:

  • 触发的是全局 guard —— resource guard: ACP pre-attach daemon budget ×2,且没有任何 per-connection guard 日志。两种 guard 在日志里可区分。
  • 不会淘汰其他 owner 的帧。 两次拒绝之后,连接 1–4 仍各自持有 8 帧 / 64,000,744 B。
  • 在预算已占 95.4% 的情况下,新连接依然可以 initialize、创建带真实 ACP 子进程的 session,并且在线协议上收到回复,ownership 也确实在投递之后才提交。

4. ownership 事务性与 status surface

  • session/new 的 notification 形式:base 会创建一个调用方永远无法寻址的 live session(它拿不到 session id);head 什么都不创建,并打印 session/new notification rejected。文档中的 breaking change 在线协议层面得到确认。
  • provisional ownership:回复仍在缓冲时,head 报告 ownedSessionCount: 0 / sessionBindingCount: 0,同时该帧已计费(1 帧 / 1,238 B);base 报告 1 / 1。在投递前删除连接会回滚这个 fresh session,无泄漏。
  • 阻塞的 writer:缓冲 8 帧 → attach 一个永不读取的 socket → 帧转入 pendingDeliveryFrames: 8usedBytes 仍被计费。lease 确实在阻塞期间保持。
  • 五个 limits 均以文档值暴露,base 一个都没有。per-mount 的 preAttachGuardFailures 正确归因到触发它的那个 mount。

5. 上次之后新增的两个 commit

  • bcccd377(WS teardown 日志安全) —— writeStderrLine 在 EPIPE 或 fd 关闭时会抛异常,旧的调用顺序可能因此跳过 this.close(),把 stream 遗留下来。我做了变异测试:仅把 ws-stream.ts 回退到该 commit 之前,恰好有两个新测试以未捕获的 write EPIPE 失败,说明修复是承重的、覆盖是真实的。注意 base 上存在同样的顺序问题 —— 这是 PR 顺手修掉的既有隐患,不是它引入的回归。该项仅有单测层面证据:在 macOS 的真实 daemon 上我造不出会抛异常的 stderr fd(Node 在该平台对管道 stderr 是异步写)。
  • e7ea3b21 —— 仅测试 fixture 对齐。

6. 给作者的两点观察(都不阻塞)

a. 已提交的 E2E 计划第 5 步与实际行为不符,而实际行为更优。 计划写的是:关闭阻塞 writer 的 socket 后「所有计数返回测试前基线」。实测:8 个在途帧中有 7 个被重新入队并继续计费bufferedConnectionFrames: 7usedBytes: 56,000,637),因为它们是不可替代的 JSON-RPC 回复,正被保留以待重连。只有当连接本身在 10 秒 grace 后被回收,计数才归零。这才是正确行为 —— 丢弃它们会挂住调用方 —— 但计划里的措辞读起来像是在指控这个行为。建议在 .qwen/e2e-tests/… 里改一行。

b. 对我上次提出的 live 队列范围问题的修正。 若 stream 从一开始就 attach 但对端不读,40 × 8 MB 帧全部被接受,usedBytes: 0guardFailures: 0,同时 RSS 增长 +450 MB —— live 路径确实不计费,与 PR 的非目标一致。但该 socket 一旦关闭,在途帧会被重新入队、计费,per-connection guard 随即触发并让连接退场。所以这个敞口比我上次表述的更窄:只在阻塞的 transport 保持打开期间无界,关闭时即被收口。WS 1013 close code 在正常流程下仍无黑盒路径(WS 下同一 socket 既是 connection stream 也是 session stream,根本不进入 pre-attach 路径),依旧只有单测覆盖。

7. 独立校验

  • JSON 字节估算器 —— 我自己写的差分 oracle,针对已构建的包(不是 PR 自带测试):每个 UTF-16 code unit 单独及处于转义敏感上下文、覆盖全部平面的 astral code point、孤立代理项、40,000 个确定性随机字符串、5,000 个随机化的提前退出 limit 用例。校验 175,447 个字符串,0 处不一致;5,000 个 limit 契约用例,0 处违例。
  • 这个修复为什么重要(量化)。 修复前的估算按 Buffer.byteLength(s) + 2 计费。以 1 MiB 输入对照 JSON.stringify 实际输出:控制字符少计 6 倍(计 1,048,578,实际 6,291,458),双引号、反斜杠和孤立代理项少计 2 倍,纯 ASCII 精确。正是这个少计让 daemon→child 的 NDJSON 队列保留量可以超过 maxQueuedBytes
  • head 上的聚焦测试 —— cli 8 个文件 777/777,acp-bridge 2 个文件 47/47,sdk-typescript 14/14,全绿。

结论

本 PR 关于 pre-attach 字节边界、按 owner 精确拒绝、共享全局预算、ownership 绑定投递以及 status surface 的全部声明,都在 e7ea3b2 的真实 daemon 上复现,base 与 head 的对比结论明确 —— base 上 44 条被静默丢弃的 JSON-RPC 回复,以及单条连接无界增长到 2.6 GB,在 head 上都被收口且可观测。从验证角度可以合并。§6a 是文档措辞问题;§6b 是把剩余范围收窄而非扩大。

未覆盖:Windows 与 Linux、WS 1013 close 路径,以及在真实 daemon 上对 bcccd377 做 stderr 抛异常的测试。

@doudouOUC

Copy link
Copy Markdown
Collaborator Author

Thanks for the full real-daemon re-verification. I independently checked both non-blocking observations against this exact head. §6a is accurate: step 5 of the committed E2E plan says counters return immediately to baseline, while the shipped reconnect-safe behavior requeues known-undelivered replies and keeps them charged until reconnect or grace expiry. I am deferring that documentation-only correction under the repository post-five-review-round Critical-only gate. §6b matches the PR explicit live-queue non-goal and requires no branch change. No code changes were made.

@qwen-code-ci-bot qwen-code-ci-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partially reviewed — gaps disclosed.

Not reviewed: build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally.

Not reviewed: reverse audit — stopped at the 5-round cap without two consecutive dry rounds (round 5's candidates were all ruled already-discussed or deferred ledger items).

Not explored to full depth (tool budget reached): chunk 10: could not run pre-attach-budget.test.ts (no node_modules in the worktree or the parent checkout; installing the full dependency tree was too costly for the re…; chunk 10: could not execute pre-attach-budget.test.ts (no node_modules in the worktree or parent checkout; a full install exceeded the remaining budget) — assertions we….

中文说明

仅完成部分审查,审查缺口已披露。

未审查:build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally。

未审查:reverse audit — stopped at the 5-round cap without two consecutive dry rounds (round 5's candidates were all ruled already-discussed or deferred ledger items)。

未探索到全部深度(达到工具调用预算):chunk 10:could not run pre-attach-budget.test.ts (no node_modules in the worktree or the parent checkout; installing the full dependency tree was too costly for the re…;chunk 10:could not execute pre-attach-budget.test.ts (no node_modules in the worktree or parent checkout; a full install exceeded the remaining budget) — assertions we…

— qwen3.8-max via Qwen Code /review (v0.21.12)

Comment thread packages/cli/src/serve/acp-http/connection-registry.ts
Comment thread packages/cli/src/serve/acp-http/connection-registry.test.ts
Comment thread packages/cli/src/serve/acp-http/connection-registry.test.ts
Comment thread packages/cli/src/serve/acp-http/dispatch.ts
Comment thread packages/cli/src/serve/acp-http/ws-stream.test.ts
@doudouOUC

Copy link
Copy Markdown
Collaborator Author

Round 13 review handling at exact HEAD e7ea3b219406335d4b2b1d8956aead98378c4011

Finding Decision Evidence
R13-1 connection settle replay Not taken Real WS and SSE probes show outcome_unknown, and even SSE failed, can follow complete peer-visible frames; blanket replay can duplicate a complete JSON-RPC response. The supported HTTP client rejects connection-scoped pendings when that SSE route terminates rather than hanging through reconnect.
R13-2 bare test guards Deferred Valid test hardening, but no current production defect; excluded by the post-five-round Critical-only gate.
R13-3 sibling-session assertion Deferred Useful mutation coverage, but the current targeted-retirement implementation is correct; excluded by the Critical-only gate.
R13-4 session fallback on ambiguous outcome Not taken Exact-head race probes delivered success before settling outcome_unknown; adding the fallback produced a second contradictory INTERNAL_ERROR for the same id. The supported HTTP client rejects a closed session route and does not cross-resolve session pendings from the connection stream.
R13-7 WS delivered-path test Deferred Useful regression witness, but the production branch is currently correct; excluded by the Critical-only gate.

Verification: real transport and registry probes passed 9/9; focused AcpHttpTransport scope and no-hang regressions passed 3/3. Worktree remains clean. No code change or push in this round.

@wenshao

wenshao commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

Re-verified after round 13 — no code changed, so I tested the two declined Criticals instead

First, the boring part: there is no new code to verify. The head is still e7ea3b219406335d4b2b1d8956aead98378c4011, byte-identical to what I verified in my previous report; main moved on but the merge base is unchanged at 9f8f65d, so the diff is the same. Everything in that report still stands.

What did change is that round 13 raised two Criticals and both were declined on empirical grounds, with the reviewer citing probes and the author citing counter-probes. That is the only open question left on this PR, so I re-ran both against a real qwen serve daemon — raw-socket SSE client with a proper HTTP chunked-transfer decoder, asking one question: does a request the daemon accepted with 202 ever get a reply?

The two findings came out differently.

round 13 adjudication


R13-1 — reproduced, deterministically

One connection-scoped reply, the connection SSE stream torn down mid-write, then a reconnect well inside the 10-second grace window. Two runs per arm, identical results:

stream torn down mid-write base 9f8f65d head e7ea3b2 head + the suggested one-line widening
graceful close (FIN) never answered answered on reconnect answered on reconnect
abrupt reset (RST), 8 MB reply never answered never answered answered on reconnect
abrupt reset (RST), 2 MB reply never answered never answered answered on reconnect
control — buffered pre-attach, and normal live delivery answered answered answered

Three things this settles:

  1. The PR genuinely fixes the graceful-close case. FIN → 'closed' → requeued → redelivered on reconnect. Base loses it. That is a real improvement and it is why the neighbouring gap is visible at all.
  2. The declining rationale does not hold for the reset case. The argument was that 'failed' can follow a complete peer-visible frame, so replaying risks a duplicate. In these trials the client decoded 0 chunks / 0 bytes of the reply before the reset — there is nothing to duplicate, and the daemon logged SSE write failed, closing stream: write EPIPE ×4, i.e. the reject path that the connection-scoped requeue does not cover. The client did everything right, reconnected inside the documented grace window, and never got an answer.
  3. The suggested fix works. Mutating only that one predicate (outcome === 'closed'outcome !== 'delivered') in the built bundle flips both RST rows to answered, with no duplicate observed in any trial, and no change to the controls. Bundle restored afterwards; SHA-256 verified identical.

But it is not a regression. Base never answers any of these cases, including the one this PR fixes. So R13-1 is an unfixed neighbour of a real improvement, not something the PR breaks — which is a follow-up argument, not a merge blocker.

R13-4 — I could not reproduce it

48 real-transport trials across four shapes, each driving a session-scoped reply while a concurrent session/close deletes the binding underneath it:

shape trials entered the teardown window never answered
sequential close, 0–9 ms after the reply request 12 0 0
close fired concurrently with the reply request 20 0 — ownership was revoked first 0
stalled reader, 216 KB reply (write never pends) 6 0 0
stalled reader, 5.26 MB reply (write genuinely pends) 10 7 0

The last shape is the one that matters: with ~400 registered models the session/set_config_option reply is 5,265,294 B, which is far past the socket buffer of a paused reader, so the write is provably still in flight when session/close runs. Seven of ten trials landed inside exactly the window R13-4 describes — and every one of them was answered on the connection stream with the documented synthetic INTERNAL_ERROR "Response delivery failed", i.e. the 'failed' | 'closed' branch the finding calls too narrow. The outcome_unknown state the finding needs was never reached through the real SSE transport.

The source-level asymmetry is real and plain to read. On this evidence the reachable failure is not, which is consistent with the author's position. I am not claiming it is impossible — only that I could not get there from a client, and neither shape I could build produced an unanswered id.

One methodology note against myself: an earlier version of this harness reported R13-4 as reproduced. That was my bug — the stalled reader was never resumed, so I was judging delivery on a socket I had refused to read. Every number above comes from the corrected harness, which drains the socket before deciding.


Where this leaves the merge decision

Unchanged from my previous report: good to merge. Everything the PR claims still reproduces on a real daemon at this head. R13-1 is real and worth a follow-up issue — the one-line widening is verified to work — but base is no better, so holding this PR for it would keep the 2.6 GB unbounded connection and the 44 silently dropped replies in main to fix a case that main also gets wrong. R13-4 did not survive black-box testing.

中文版本

Round 13 后的复验 —— 没有代码变更,所以我改为验证两条被拒绝的 Critical

先说结论中平淡的部分:没有新代码需要验证。 head 仍是 e7ea3b219406335d4b2b1d8956aead98378c4011,与我上一份报告验证的完全一致;main 前进了,但 merge base 仍是 9f8f65d,diff 没变。那份报告的全部结论继续成立。

真正变化的是:round 13 提出了两条 Critical,两条都以实测为由被拒绝 —— reviewer 附了探针证据,作者附了反向探针证据。这是本 PR 目前唯一悬而未决的问题,所以我针对真实 qwen serve daemon 重跑了这两条:裸 socket 的 SSE 客户端配上完整的 HTTP chunked 解码器,只问一个问题:daemon 已用 202 接受的请求,最终有没有拿到回复?

两条结论并不相同。

R13-1 —— 可确定性复现

单条 connection 作用域回复,connection SSE 流在写入中途被拆除,然后在 10 秒 grace 窗口内重连。每条腿两轮,结果一致:

写入中途拆除流的方式 base 9f8f65d head e7ea3b2 head + 建议的单行放宽
优雅关闭(FIN) 永不应答 重连后应答 重连后应答
强制重置(RST),8 MB 回复 永不应答 永不应答 重连后应答
强制重置(RST),2 MB 回复 永不应答 永不应答 重连后应答
对照 —— pre-attach 缓冲、以及正常 live 投递 应答 应答 应答

这解决了三件事:

  1. 本 PR 确实修好了优雅关闭这一情形。 FIN → 'closed' → 重入队 → 重连后重新投递。base 会丢。这是真实的改进,也正因为如此相邻的缺口才显现出来。
  2. 拒绝理由在 RST 情形下不成立。 理由是 'failed' 可能发生在完整、对端可见的帧之后,因此重放有重复风险。但在这些试验中,客户端在重置前解码到 0 个 chunk / 0 字节 —— 没有任何东西可被重复,且 daemon 日志有 4 次 SSE write failed, closing stream: write EPIPE,即 connection 作用域重入队未覆盖的 reject 路径。客户端一切照做、在文档规定的 grace 窗口内重连,却永远拿不到应答。
  3. 建议的修复有效。 只把那一个谓词(outcome === 'closed'outcome !== 'delivered')变异进已构建产物,两行 RST 结果都翻转为「已应答」,且任何试验中都未观察到重复,对照组也无变化。变异后产物已还原,SHA-256 校验一致。

但这不是回归。 base 上这些情形一个都不应答,包括本 PR 修好的那一个。所以 R13-1 是一个真实改进旁边尚未修复的邻居,而不是本 PR 引入的问题 —— 这是后续项的论据,不是合并阻塞项。

R13-4 —— 我无法复现

48 次真实传输试验,覆盖四种形态,每次都在并发 session/close 删除 binding 的同时驱动一个 session 作用域回复:

形态 试验数 进入拆除窗口 永不应答
回复请求后 0–9 ms 顺序关闭 12 0 0
关闭与回复请求并发发出 20 0 —— 所有权先被撤销 0
阻塞读取端,216 KB 回复(写入不会挂起) 6 0 0
阻塞读取端,5.26 MB 回复(写入真正挂起) 10 7 0

最后一种形态才是关键:注册约 400 个模型后,session/set_config_option 的回复达 5,265,294 字节,远超暂停读取端的 socket 缓冲,因此 session/close 执行时写入确实仍在途中。10 次中有 7 次精确落入 R13-4 描述的窗口 —— 而每一次都在 connection 流上以文档所述的合成 INTERNAL_ERROR "Response delivery failed" 得到了应答,也就是该 finding 认为过窄的 'failed' | 'closed' 分支。该 finding 所需的 outcome_unknown 状态,在真实 SSE 传输中从未被触达。

源码层面的不对称是真实存在且一目了然的。但就这些证据而言,可触达的失败并不存在,这与作者的立场一致。我并不主张它不可能发生 —— 只是我无法从客户端到达那里,我能构造的两种形态都没有产生未被应答的 id。

一条针对我自己的方法学说明:本 harness 的早期版本曾报告 R13-4「已复现」。那是我的错误 —— 阻塞的读取端始终没有恢复读取,我是在一个自己拒绝读取的 socket 上判断投递结果。上面所有数字均来自修正后的 harness,它会在判定前先把 socket 读空。

这对合并决策意味着什么

与上一份报告一致:可以合并。 PR 的全部声明在该 head 的真实 daemon 上依旧复现。R13-1 是真实存在的,值得开一个后续 issue —— 那一行放宽已被验证有效 —— 但 base 并不更好,为它扣住本 PR,等于为了一个 main 同样处理错误的情形,把 2.6 GB 无界连接和 44 条被静默丢弃的回复继续留在 main 里。R13-4 未能通过黑盒验证。

@doudouOUC

Copy link
Copy Markdown
Collaborator Author

Round 13 maintainer re-verification addendum

  • R13-1 is accepted as a real adjacent failure mode, but not a regression introduced by this PR. It remains deferred to a follow-up because the current failed / outcome_unknown results conflate known-not-sent writes with peer-visible ambiguous writes; blanket outcome !== 'delivered' replay is therefore not safe as the production fix.
  • R13-4 needs no code change in this PR. The corrected real-daemon harness did not reproduce an unanswered id, and ambiguous-outcome fallback can produce a second contradictory response when the original reply reached the peer.
  • The maintainer conclusion is still good to merge. HEAD is unchanged; no code change or push was made.

Current state: 0 unresolved threads, 22 passing checks, mergeable without conflicts. GitHub still reports the earlier bot CHANGES_REQUESTED review.

@wenshao

wenshao commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

@Qwen-Coder /triage

@yiliang114 yiliang114 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — +1 per maintainer request. CI green at e7ea3b2.

@doudouOUC
doudouOUC dismissed qwen-code-ci-bot’s stale review August 16, 2026 11:59

already have 2 approves,3ks

@doudouOUC
doudouOUC added this pull request to the merge queue Aug 16, 2026
Merged via the queue into main with commit 62014c0 Aug 16, 2026
311 of 316 checks passed

@wenshao wenshao left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partially reviewed — gaps disclosed. Suggestions are inline.

Not reviewed: build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally.

Not explored to full depth (tool budget reached): chunk 16: completing vitest run test/unit/daemon-public-surface.test.ts in packages/sdk-typescript — one attempt timed out after 5 minutes with no output; since the add….

中文说明

仅完成部分审查,审查缺口已披露。 建议见行内评论。

未审查:build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI and its suite did not run locally。

未探索到全部深度(达到工具调用预算):chunk 16:completing vitest run test/unit/daemon-public-surface.test.ts in packages/sdk-typescript — one attempt timed out after 5 minutes with no output; since the add…

— qwen3.8-max via Qwen Code /review (v0.21.11)

settled = true;
if (attached) {
try {
void runtime.bridge.detachClient(sessionId, clientId).catch(() => {});

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Suggestion] ownershipReceipt's attached rollback arm swallows async detach failures silently: detachClient(...).catch(() => {}) leaves no log, while the non-attached arm (removeOrphanSession) logs qwen serve: /acp orphan killSession(...) failed: ..., and the pre-PR fork-race cleanup logged both arms. detachClient itself has no internal failure logging. — Concrete cost: if a rollback detach fails (bridge error, session state racing), the daemon-issued clientId stays registered in the bridge's voter/known-client sets and there is no log line anywhere for an operator to correlate the phantom participant with; the detach path strictly lost observability versus the removed code.

Suggested change
void runtime.bridge.detachClient(sessionId, clientId).catch(() => {});
void runtime.bridge.detachClient(sessionId, clientId).catch((err) => {
writeStderrLineSafe(
`qwen serve: /acp orphan detachClient(${logSafe(sessionId)}) failed: ${logSafe(errMsg(err))}`,
);
});
中文说明

[Suggestion] ownershipReceipt 的 attached 回滚分支会静默吞掉异步 detach 失败:detachClient(...).catch(() => {}) 不打任何日志,而非 attached 分支(removeOrphanSession)会打印 qwen serve: /acp orphan killSession(...) failed: ...,且 PR 之前的 fork-race 清理对两个分支都有日志。detachClient 自身也没有失败日志。— 具体代价:如果回滚 detach 失败(bridge 错误、session 状态竞态),daemon 签发的 clientId 会残留在 bridge 的 voter/known-client 集合中,运维没有任何日志可用来关联这个幽灵参与者;相对被删除的代码,detach 路径严格失去了可观测性。

— qwen3.8-max via Qwen Code /review (v0.21.11)

Comment on lines +1957 to +1964
if ((closeRaced || replayArmRaced) && !conn.destroyed) {
conn.sendConn(
error(
id,
RPC.INTERNAL_ERROR,
`session ${sessionId} was closed during load; retry`,
),
);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Suggestion] The retry error sent when replayArmRaced fires without closeRaced misstates the cause — the session was not closed; the load lost an ownership-generation race (armInitialReplay() returned false because canCommitSessionOwnership failed on a replaced binding). — Failure scenario: a session/load for an already-owned session races a generation replacement while configOptionsFor awaits; the client receives session … was closed during load; retry even though no close is in flight — this PR's own test does not arm initial replay on a replacement session generation asserts this -32603 while conn.ownsSession('sess-1') is true immediately afterwards. The same message also fires when the actual closer was a resource-guard retirement (failOwnercloseSessionStream), where no session/close ever happened. An operator correlating this error hunts a close that never happened.

Suggested change
if ((closeRaced || replayArmRaced) && !conn.destroyed) {
conn.sendConn(
error(
id,
RPC.INTERNAL_ERROR,
`session ${sessionId} was closed during load; retry`,
),
);
if ((closeRaced || replayArmRaced) && !conn.destroyed) {
conn.sendConn(
error(
id,
RPC.INTERNAL_ERROR,
replayArmRaced && !closeRaced
? `session ${sessionId} load lost an ownership race; retry`
: `session ${sessionId} was closed during load; retry`,
),
);
中文说明

[Suggestion]replayArmRaced 触发而 closeRaced 未触发时,发出的重试错误措辞与真实原因不符——session 并未被关闭,而是 load 输掉了一次 ownership generation 竞态(armInitialReplay()canCommitSessionOwnership 在已被替换的 binding 上失败而返回 false)。— 失败场景:对已拥有 session 的 session/loadconfigOptionsFor await 期间遭遇 generation 替换;客户端收到 session … was closed during load; retry,但此刻并没有任何 close 在进行——本 PR 自带的测试 does not arm initial replay on a replacement session generation 正是在断言这个 -32603 的同时 conn.ownsSession('sess-1') 为 true。同样的措辞也会在资源守卫触发退役(failOwnercloseSessionStream)时出现,而那里从未发生过 session/close。运维按此错误排查时,会去寻找一个从未发生的 close。

— qwen3.8-max via Qwen Code /review (v0.21.11)

Comment on lines +413 to +417
pendingDeliveryFrames += binding.buffer.filter(
(prepared) =>
prepared.lease !== undefined &&
prepared.deliveryAttempt !== undefined,
).length;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Suggestion] Per-connection pendingDeliveryFrames in getDiagnostic scans session buffers plus pendingDeliveries, but never connBuffer — a conn reply requeued by settlePreparedAttempt's conn arm lands in connBuffer with a lease that stays markPendingDelivery()-ed, so the global budget keeps counting it while this diagnostic does not. — Failure scenario (probe-verified at this commit): a conn reply delivered live when the conn stream closes with 'closed' is requeued into connBuffer with a marked lease; GET /daemon/status then shows top-level pendingDeliveryFrames: 1 while the owning connection's diagnostic shows pendingDeliveryFrames: 0 (the frame appears only in bufferedConnectionFrames) — an operator summing per-connection counters to reconcile against the global figure sees a permanent unexplained discrepancy until the frame is redelivered or discarded. Suggested fix — count the same lease && deliveryAttempt shape over connBuffer after the loop:

pendingDeliveryFrames += this.connBuffer.filter(
  (prepared) =>
    prepared.lease !== undefined &&
    prepared.deliveryAttempt !== undefined,
).length;
中文说明

[Suggestion] getDiagnostic 中的单连接 pendingDeliveryFrames 只统计 session buffer 和 pendingDeliveries,从不统计 connBuffer —— 被 settlePreparedAttempt conn 分支重入队的连接回复会带着仍处于 markPendingDelivery() 状态的 lease 落入 connBuffer,全局预算继续计数,而该连接诊断却不计。— 失败场景(已在被审 commit 上用探针验证):conn 流以 'closed' 关闭时,一条已 live 投递的连接回复被重入队进 connBuffer 且 lease 已标记;GET /daemon/status 顶层显示 pendingDeliveryFrames: 1,而所属连接的诊断显示 pendingDeliveryFrames: 0(该帧只出现在 bufferedConnectionFrames 中)——运维用单连接计数对账全局数字时,会看到一个直到该帧被重投或丢弃之前都 permanent 无法解释的差值。建议修复:在循环之后对 connBuffer 按同样的 lease && deliveryAttempt 条件计数。

— qwen3.8-max via Qwen Code /review (v0.21.11)

@qwen-code-ci-bot

Copy link
Copy Markdown
Collaborator

Released in v0.21.13.

doudouOUC added a commit to doudouOUC/qwen-code that referenced this pull request Aug 17, 2026
* fix(acp): Account for JSON string escaping in response budgets

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

* fix(serve): Bound ACP HTTP pre-attach buffers by bytes

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

* fix(serve): Preserve ACP pre-attach stream scope

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

* fix(serve): Expose ACP guard failures by workspace

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

* codex: address PR review feedback (QwenLM#9007)

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

* codex: address PR review feedback (QwenLM#9007)

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

* codex: address PR review feedback (QwenLM#9007)

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

* fix(serve): Preserve ambiguous WebSocket deliveries

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

* fix(serve): Report failed ACP response delivery

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

* codex: address PR review feedback (QwenLM#9007)

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

* codex: address PR review feedback (QwenLM#9007)

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

* codex: address PR review feedback (QwenLM#9007)

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

* codex: address PR review feedback (QwenLM#9007)

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

* codex: address PR review feedback (QwenLM#9007)

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

* fix(cli): make websocket teardown logging safe

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

* test(serve): align ACP fork fixtures after rebase

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

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants