Skip to content

feat(cli): report retained tool-result stats in /doctor memory - #8875

Merged
wenshao merged 10 commits into
mainfrom
feat/doctor-tool-result-retention
Aug 12, 2026
Merged

feat(cli): report retained tool-result stats in /doctor memory#8875
wenshao merged 10 commits into
mainfrom
feat/doctor-tool-result-retention

Conversation

@ZijianZhang989

@ZijianZhang989 ZijianZhang989 commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

What this PR does

/doctor memory can now tell you how much conversation memory is being held by tool results. It adds a "Tool result retention" section to the memory report that counts the tool results currently retained in the live session history, sums their total character footprint, reports the single largest result, and flags any result above a 30k-character threshold — with a hint to run /compress when oversized results are found. It also reports the two duplication signals called for by the issue: whether oversized outputs are also retained in the UI history (as rendered text items), and whether they are part of the compression input (they are, but compression reads the live history by reference, so no extra copy is held). The same stats are included in --json output so they can be attached to bug reports or parsed by tooling. Only sizes and counts are reported, never content, so the output stays safe to paste publicly. The scan reads the live history by reference (no cloning), so the diagnostic itself adds no memory pressure — which matters because users run it precisely when the process is already strained. The PR also ships the design note documenting the offload/preview state transitions and privacy model of the layered truncation mitigation, satisfying the issue's documentation acceptance criterion.

Why it's needed

In long sessions, OOM risk usually comes from oversized tool outputs being retained in history and taxing every later turn, not from classic leaks. The mitigation side of this problem is already solved — oversized tool output is truncated and spilled to disk before it enters history — but the diagnostics side was missing: when a user still hits memory pressure, /doctor memory could only report process-level numbers (RSS, heap, handles) and had no way to answer "is retained tool output the cause?". This PR completes the remaining acceptance criteria of the linked issue: phase-1 retention diagnostics (all three signals: aggregate size/count, oversized flagging, and presence checks for UI history and compression inputs) plus the design note for the already-shipped mitigation. The oversized counter also doubles as a regression alarm: if any future change lets an unbounded result slip into history, the report names it by size and count immediately.

Reviewer Test Plan

How to verify

Run the CLI (npm run dev) and try three scenarios, confirming the report reflects live history state each time:

  1. Fresh session: run /doctor memory. Expect the new "Tool result retention" section at the end of the report with all zeros, Oversized also in UI history ...: 0 item(s) and Oversized also in compression input: no.
  2. Normal tool use: ask the agent to run a shell command producing ~150KB of output (e.g. yes demo | head -c 150000) and approve it. The output is spilled to a file by the existing truncation gate. Run /doctor memory again — expect Tool results in history: 1 with only a few thousand chars retained (the preview stub), and Oversized results: 0 with no hint line.
  3. Oversized regression simulation: temporarily set tools.truncateToolOutputThreshold to 100000 in project settings, run a command like seq 1 20000 (~130k chars), then /doctor memory. Expect Oversized results (above tool budget): >= 1, Oversized also in compression input: yes (shared by reference, no extra copy), plus the /compress hint line. Remove the setting afterwards. (Note: the oversized check compares against 2x the tool's own budget plus a small envelope slack — for shell that is 2x30k + 500 = ~60.5k — so a retained result must exceed that to be flagged. Under normal operation the truncation gate prevents this; the counter fires only when a truncation layer is bypassed, which is the regression scenario the signal is designed to catch.)
  4. --json: run /doctor memory --json and confirm a toolResultRetention object with toolResultCount, totalChars, largestResultChars, oversizedResultCount, oversizedThresholdChars, largeOutputsInUIHistory, presentInCompressionInput appears in the payload.

Unit tests: cd packages/core && npx vitest run src/utils/tool-result-retention.test.ts (19 tests) and cd packages/cli && npx vitest run src/ui/commands/doctorCommand.test.ts (49 tests).

Evidence (Before & After)

Before (main): the report ends at recommendation, with no visibility into retained tool output.

After, empty session:

    recommendation: 1 potential leak indicator(s) found.
    Tool result retention
      Tool results in history: 0
      Total retained: 0 chars
      Largest result: 0 chars
      Oversized results (above tool budget): 0
      Oversized also rendered in UI history: 0 item(s)
      Oversized also in compression input: no

After, real session with multiple shell tool calls (truncation threshold raised to simulate a mitigation bypass; mitigation keeps every retained result at/below the shell tool's 30k budget):

    Tool result retention
      Tool results in history: 5
      Total retained: 44364 chars
      Largest result: 24658 chars
      Oversized results (above tool budget): 0
      Oversized also rendered in UI history: 0 item(s)
      Oversized also in compression input: no

Both captured via tmux against npm run dev with real model interaction (full E2E report posted as a separate comment). The oversized "yes" paths (counter > 0, compression-input flag, hint line) are covered by unit tests in both packages, since the shipped mitigations make them unreachable in normal operation.

Tested on

OS Status
🍏 macOS
🪟 Windows ⚠️
🐧 Linux ⚠️

Environment (optional)

npm run dev in an interactive tmux session with API key auth; no sandbox.

Risk & Scope

  • Main risk or tradeoff: the size estimate serializes each tool-response payload to measure it, which is an approximation of retained bytes (JSON overhead included) and does a full pass over history; for a diagnostic run on demand this cost is acceptable, and the scan never clones history. The UI-history signal checks rendered text items one by one, so streamed model output split across many small items is intentionally not counted — the signal targets large tool outputs retained as single items.
  • Not validated / out of scope: Windows/Linux rendering (platform-independent string report); the offload/preview mitigation itself (already shipped separately, documented by the design note in this PR).
  • Breaking changes / migration notes: none; the section is additive and omitted entirely when no chat history is available.

Linked Issues

Closes #4184 — covers all three acceptance criteria: phase-1 retention diagnostics (this PR), the design note documenting the offload/preview state transitions and privacy model (this PR), and tests showing large outputs are bounded in hot memory/context while recoverable locally (landed earlier with the layered tool-output truncation work).

中文说明

这个 PR 做了什么

/doctor memory 现在可以告诉你会话内存中有多少是被工具输出占据的。它在内存报告末尾新增 "Tool result retention" 段落:统计当前会话历史中滞留的工具结果数量、总字符数、最大单条结果大小,并标记超过 30k 字符阈值的结果——发现超限时额外提示使用 /compress 回收空间。同时报告 issue 要求的两个重复信号:超限输出是否也滞留在 UI 历史中(作为渲染文本条目),以及是否进入压缩输入(会进入,但压缩按引用读取活动历史,不产生额外拷贝)。同样的数据也包含在 --json 输出中,方便贴进 bug 报告或被工具解析。报告只包含大小和数量,绝不含内容,因此可以放心公开粘贴。扫描直接读历史引用、不做克隆,诊断本身不产生额外内存压力——这点很重要,因为用户正是在进程吃紧时才运行它。PR 还附带了记录分层截断缓解机制的 offload/preview 状态流转与隐私模型的设计说明,满足 issue 的文档验收标准。

为什么需要

长会话的 OOM 风险通常来自超大工具输出滞留在历史里、给之后每一轮持续加负担,而不是传统意义的泄漏。这个问题的缓解侧已经解决——超大工具输出在进入历史前就会被截断并落盘——但诊断侧是缺失的:用户遇到内存压力时,/doctor memory 只能报进程级数字(RSS、堆、句柄),回答不了"是不是滞留的工具输出导致的"。本 PR 完成 issue 剩余的验收标准:phase 1 滞留诊断(全部三个信号:聚合大小/数量、超限标记、以及 UI 历史与压缩输入的存在性检查)加上已交付缓解机制的设计说明。超限计数器同时也是回归警报:未来任何改动如果让无界结果漏进历史,报告会立刻按大小和数量点名。

评审验证方案

运行 CLI(npm run dev)验证三个场景,确认报告实时反映历史状态:

  1. 新会话:执行 /doctor memory,预期末尾出现全 0 的 retention 段落,含 Oversized also in UI history ...: 0 item(s)Oversized also in compression input: no
  2. 正常工具调用:让 agent 执行产生约 150KB 输出的 shell 命令(如 yes demo | head -c 150000)并批准,输出会被现有截断门落盘;再次 /doctor memory,预期 Tool results in history: 1、仅几千字符滞留(预览 stub)、Oversized results: 0 且无 Hint 行。
  3. 超限回归模拟:临时把项目设置 tools.truncateToolOutputThreshold 改为 100000,执行 seq 1 9000/doctor memory,预期 Oversized results (above tool budget): >= 1Oversized also in compression input: yes (shared by reference, no extra copy) 并出现 /compress 提示行;测完删掉该设置。(注意:shell 工具自身声明了 30k 硬预算,实际触发该路径需要 envelope 附加内容把滞留结果推过 30k——正是该信号要捕获的回归场景。)
  4. --json:执行 /doctor memory --json,确认 payload 中出现 toolResultRetention 对象(含 toolResultCounttotalCharslargestResultCharsoversizedResultCountoversizedThresholdCharslargeOutputsInUIHistorypresentInCompressionInput)。

单测:core 侧 9 个用例、CLI 侧 doctorCommand 42 个用例全部通过。

实测证据

改动前(main):报告在 recommendation 处结束,对滞留工具输出没有任何可见性。改动后空会话显示全 0 段落(含两条重复检测行);真实多次工具调用会话显示滞留统计与重复信号均为安全状态(缓解机制把每条滞留结果压在 shell 工具 30k 预算内),均通过 tmux 真机交互截取(完整 E2E 报告另发评论)。超限的 "yes" 分支(计数 > 0、压缩输入标记、Hint 行)由两个包的单测覆盖——已交付的缓解机制使其在正常操作中不可达。

风险与范围

  • 主要风险/权衡:大小估算通过序列化每个工具响应 payload 得到,是滞留字节数的近似值(含 JSON 开销),且要对历史做一遍完整扫描;作为按需诊断这个开销可接受,且扫描不克隆历史。UI 历史信号逐条检查渲染文本条目,被拆成多个小条目的流式模型输出有意不计入——该信号针对的是作为单条滞留的大工具输出。
  • 未验证/超出范围:Windows/Linux 渲染(纯字符串报告、平台无关);offload/preview 缓解本身(已单独交付,本 PR 的设计说明对其补档)。
  • 破坏性变更:无;段落为纯增量,无会话历史时整段省略。

关联 Issue

Closes #4184——三条验收标准全部覆盖:phase 1 滞留诊断(本 PR)、记录 offload/preview 状态流转与隐私模型的设计说明(本 PR)、以及证明大输出在热内存中被限制且本地可恢复的测试(此前随分层工具输出截断工作交付)。

俊良 added 2 commits August 10, 2026 20:18
Add a tool-result retention section to /doctor memory (and --json) covering
the phase-1 diagnostics from #4184: retained tool-result count/total/largest,
oversized flagging against the 30k widest legal per-tool budget, plus
duplication signals for UI history and compression input. Sizes and counts
only (never content); history is scanned by reference so the diagnostic adds
no memory pressure.
…and privacy model

Satisfies acceptance criterion 2 of #4184: state transitions of the layered
truncation/offload mitigation (implemented in #4880) and its privacy model,
plus the tmux E2E report for the /doctor memory retention diagnostics.
@ZijianZhang989

Copy link
Copy Markdown
Collaborator Author

E2E test report

Runtime: npm run dev in tmux (220x52), API key auth, no sandbox, macOS. Full report also committed at .qwen/e2e-tests/2026-08-10-doctor-memory-tool-result-retention.md.

Scenario 1 — fresh session. /doctor memory ends with an all-zero retention section:

    Tool result retention
      Tool results in history: 0
      Total retained: 0 chars
      Largest result: 0 chars
      Oversized results (> 30000 chars): 0
      Oversized also in UI history (> 30000 chars): 0 item(s)
      Oversized also in compression input: no

Scenario 2 — large shell output (mitigation active). Agent ran seq 1 9000 (~47k chars), approved via the confirmation dialog. Output spilled to disk (Output too long and was saved to: ~/.qwen/tmp/<session-hash>/run_shell_command_….output, UI shows ... first 6573 lines hidden ...). Report reflects only the retained preview stub:

    Tool result retention
      Tool results in history: 1
      Total retained: 5341 chars
      Largest result: 5341 chars
      Oversized results (> 30000 chars): 0
      Oversized also in UI history (> 30000 chars): 0 item(s)
      Oversized also in compression input: no

Scenario 3 — multiple tool calls, raised global threshold. With tools.truncateToolOutputThreshold: 100000 in temporary project settings (removed afterwards), several shell calls accumulated correctly (Tool results in history: 5, Total retained: 44364 chars). The shell tool's own 30k budget still capped each retained result (Largest result: 24658 chars), keeping Oversized results at 0 — confirming the oversized counter is a regression alarm rather than an everyday signal.

Scenario 4 — --json. Fresh session payload includes:

"toolResultRetention": {
  "toolResultCount": 0,
  "totalChars": 0,
  "largestResultChars": 0,
  "oversizedResultCount": 0,
  "oversizedThresholdChars": 30000,
  "largeOutputsInUIHistory": 0,
  "presentInCompressionInput": false
}

Oversized "yes" branch. Unreachable in normal operation (per-tool/global layers bound every retained result at or below the 30k diagnostic threshold); covered deterministically by unit tests in both packages (tool-result-retention.test.ts, 9 tests; doctorCommand.test.ts retention suite, 5 tests — including Oversized results (> 30000 chars): 1, compression input yes (shared by reference, no extra copy), /compress hint, UI-history duplication detection, and --json fields).

@qwen-code-ci-bot

qwen-code-ci-bot commented Aug 10, 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 10, 2026

Copy link
Copy Markdown
Collaborator

Re-run against 0c0e4fc5 (triggered by @wenshao) — the PR has moved substantially since the first pass (eight review rounds, four fix commits), so all three stage comments are updated in place.

Thanks for the PR!

Template looks good ✓ — all sections present, bilingual, with a concrete reviewer test plan and before/after evidence.

Problem: observed and documented. This implements the phase-1 diagnostics requested by #4184 (open, roadmap/context-performance, scope/memory-usage), and that issue defines the exact signals this PR ships. The mitigation half already landed in #4880, so this is the missing diagnostics half of an accepted roadmap item, not a speculative addition.

Direction: aligned. /doctor memory is the natural home for "is retained tool output taxing my session?", the report emits sizes and counts only (never content, safe to paste), and the section is purely additive — omitted entirely when no history is available.

Size: core paths are touched. 321 production-logic lines (doctorCommand 148, tool-result-retention 145, truncation 18, core index 5, coreToolScheduler 5), 672 test lines, 291 doc lines (design note + E2E report — both are #4184 acceptance criteria, not scope creep). Below the 500-line maintainer-awareness bar; feat-type PR.

Approach: the scope feels right. One pure core analyzer that walks the live history by reference, wired additively into the readable and --json paths; the only scheduler change is a behavior-neutral constant share (baseThreshold * 2COMBINED_PASS_TOLERANCE_FACTOR, value unchanged at 2). Nothing here I'd cut.

Risk: no high-risk path matches; no elevated risk signals.

Moving on to code review. 🔍

中文说明

针对 0c0e4fc5 的 re-run(由 @wenshao 触发)——自首轮 triage 以来,PR 已经历八轮评审、四个修复 commit,因此三条阶段评论全部就地更新。

感谢贡献!

模板完整 ✓ —— 各节齐全、中英双语,含具体评审验证方案与 before/after 证据。

问题:已观测、有记录。本 PR 实现 #4184(open,roadmap/context-performancescope/memory-usage)要求的 phase 1 诊断,该 issue 明确列出了本 PR 交付的信号。缓解部分已在 #4880 落地,本 PR 是已纳入 roadmap 事项中缺失的诊断部分,而非凭空添加。

方向:对齐。/doctor memory 是"滞留工具输出是否在拖累会话?"的天然归宿;报告只输出大小与数量(绝不输出内容,可安全粘贴);段落纯增量——无会话历史时整段省略。

规模:触及 core 路径。生产逻辑 321 行(doctorCommand 148、tool-result-retention 145、truncation 18、core index 5、coreToolScheduler 5),测试 672 行,文档 291 行(设计说明 + E2E 报告——两者都是 #4184 的验收标准,不属于范围蔓延)。低于 500 行维护者关注线;feat 类型。

方案:范围合理。一个按引用遍历会话历史的纯 core 分析函数,增量接入可读与 --json 两条输出路径;调度器唯一改动是行为中性的常量共享(baseThreshold * 2COMBINED_PASS_TOLERANCE_FACTOR,值仍为 2)。没有需要砍掉的部分。

风险:未命中高风险路径;无升级风险信号。

进入代码审查 🔍

Qwen Code · qwen3.8-max

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

@qwen-code-ci-bot

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

Copy link
Copy Markdown
Collaborator

Code review

My independent proposal for this problem: a pure core function that walks the live session history by reference, measures each functionResponse payload with the compression pipeline's own size model, aggregates count/total/largest against the per-tool truncation budgets, and wires the result additively into /doctor memory's readable and --json outputs — plus the two duplication signals the issue asks for (UI history, compression input).

The PR matches this shape and goes beyond it in the places that matter:

  • Size model shared, not reinvented. analyzeToolResultRetention reuses estimatePartChars from the compaction-slimming module (verified present in base), so diagnostics and compression agree about the same history: raw chars for string outputs (no JSON-escaping inflation — that round-1 regression is pinned by a dedicated test), nested media billed at the resolved imageTokenEstimate via resolveSlimmingConfig.
  • Per-tool calibration. Budgets resolve from the tool registry by canonicalized name (legacy aliases handled), the UI scan bridges display names via a registry-built map plus ToolDisplayNamesMigration, and the configured global threshold is the fallback — mirroring what the scheduler actually applies. Sentinel-carrying results (truncation prefix, <persisted-output> stub, checked on both output and error keys) are skipped, and the oversized bar is 2× budget + 500 slack with strict >, matching the combined pass plus the token-aware-fallback envelope. The counter behaves as a regression alarm, not an everyday signal.
  • Safe by construction. Sizes and counts only, never content; scans by reference (no history clone); the whole collection degrades to "section omitted" on any throw, with a debug trace; Infinity thresholds (truncation disabled) flag nothing and serialize as 0 instead of null in --json. The coreToolScheduler edit is a behavior-neutral constant share — I confirmed the replaced literal was 2 in both spots.
  • presentInCompressionInput is a documented derivation, and it checks out: chatCompressionService reads history via getHistoryShallow (by reference), and the code comment names exactly when the derivation must be revisited.

No critical findings at this head. Eight review rounds have mined this diff thoroughly — round 8 left only Suggestion-level items, all doc/label-wording or test-load-bearing nits:

  • Design-note wording (§2/§5 sentinel definition; offload dir described as session-scoped when it is per-project) — accuracy of the retrospective note, not behavior.
  • The "above tool budget" label simplifies the actual 2× + slack predicate; the code comments and design note carry the precise semantics.
  • Round 8's point that the 500-char slack undersizes deep spill paths means the alarm can fire slightly early there — a false positive in a diagnostic is annoying, not dangerous.

None of these block merge; they fold naturally into a follow-up or the next touch of these files.

Test evidence — the PR's own CI, read via the API (PR code never executed in this run)

CI on the reviewed head is fully settled — zero pending pull_request workflow runs. Test (macos-latest / windows-latest) and Integration Tests (CLI, No Sandbox) show skipped by design: ci.yml runs them only in the merge queue ("Skipped on PR (ubuntu is the fast PR signal)"), so the earlier round's CHANGES_REQUESTED over the skipped integration suite objected to the repo's own CI policy — and it is stale on an older commit regardless.

Check Conclusion
Qwen Code CI (workflow) ✅ success
Test (ubuntu-latest, Node 22.x) ✅ success
Desktop Shell (ubuntu-22.04) ✅ success
Desktop Shell (windows-2022) ✅ success
web-shell E2E Smoke (ubuntu-latest, Node 22.x) ✅ success
Test (macos-latest, Node 22.x) ⏭️ skipped (merge-queue-only by design)
Test (windows-latest, Node 22.x) ⏭️ skipped (merge-queue-only by design)
Integration Tests (CLI, No Sandbox) ⏭️ skipped (merge-queue-only by design)

Not verified here: live TUI rendering of the retention section — this is an unattended run, so no local tmux drive was attempted. The live-behavior claim is not resting on the author's word alone, though: @wenshao independently built the PR and exercised all four reviewer scenarios against a real model session (verdict posted up-thread), and the oversized branches are pinned by 19 core + 12 CLI retention unit tests. Sandboxed verification would settle the remainder A/B against the base build: @qwen-code /verify — already triggered by the same comment that launched this triage and in flight at time of writing.

中文说明

代码审查:我的独立方案是——纯 core 函数按引用遍历会话历史,用压缩管线自己的尺寸模型度量每个 functionResponse,按各工具的截断预算聚合数量/总量/最大值,并增量接入 /doctor memory 的可读与 --json 输出,外加 issue 要求的两个重复信号(UI 历史、压缩输入)。PR 与该方案一致,且在关键处做得更好:尺寸模型直接复用压缩管线的 estimatePartChars(已在 base 中核实存在),诊断与压缩对同一历史的计量一致;预算按注册表规范名逐工具解析(含旧别名归一化),UI 扫描通过 displayName 映射加 ToolDisplayNamesMigration 桥接,兜底用全局配置阈值——与调度器实际施加的边界一致;带截断哨兵的结果被跳过,超限判定为严格大于 2× 预算 + 500 容差,与合并通道及 token-aware 回退包络对齐;整个采集对任何异常降级为"整段省略"并留调试痕迹;Infinity 阈值不误报且 --json 序列化为 0 而非 null;调度器改动经核实为行为中性的常量共享(两处被替换字面量均为 2)。本 head 无 Critical 发现:八轮评审已充分挖掘,第 8 轮遗留全部为 Suggestion 级——设计说明措辞(哨兵定义、offload 目录表述)、标签简化了真实判定式、500 容差在深层路径略偏小(后果是诊断警报提前触发,恼人但不危险),均不阻塞合并,可留待后续处理。

测试证据:来自 PR 自身 CI(API 读取;本运行未执行任何 PR 代码)。被评审 head 的 CI 已完全收敛——无待决 pull_request 运行。macOS/Windows 单测与集成测试显示 skipped 属仓库设计使然:ci.yml 仅在 merge queue 运行它们("Skipped on PR (ubuntu is the fast PR signal)"),因此早先一轮以"集成测试被跳过"为由的 CHANGES_REQUESTED 质疑的是仓库自身的 CI 策略,且该评审本就锚定在旧 commit 上。真实表格见上方英文版标记区域。

未在此验证:retention 段落的真机 TUI 渲染——本次为无人值守运行,不做本地 tmux 驱动。但真机行为主张并非仅凭作者一面之词:@wenshao 已独立本地构建并在真实模型会话中走完全部四个评审场景(结论见上文线程),超限分支另有 core 19 个 + CLI 12 个单测钉住。如需对 base 构建做 A/B 沙箱验证收尾:@qwen-code /verify——已由触发本次 triage 的同一条评论启动,撰写时正在运行。

Qwen Code · qwen3.8-max

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

@qwen-code-ci-bot

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

Copy link
Copy Markdown
Collaborator

Confidence: 4/5 — clean across every stage; the remainder is doc/label wording the round-capped review left behind, and the live-session wiring has a maintainer's independent real-session verification behind it.

Stepping back: this is the diagnostics half of an open roadmap issue (#4184), with the mitigation half (#4880) merged in June. The implementation matches my independent proposal and exceeds it where it counts — shared size model with the compression pipeline, per-tool budget calibration, sentinel skips, and an oversized counter that behaves as a regression alarm rather than an everyday signal. Every scary-sounding path degrades safely: no history → section omitted, history read throws → section omitted with a debug trace, truncation disabled (Infinity) → nothing flagged, --json stays serializable.

After eight review rounds the diff has been mined past the point where I'd trust a fresh pair of eyes to find more: round 8's leftovers are Suggestions about doc accuracy and label wording, none of which change behavior. The author answered every item with a fix or a reasoned decline, and the declines are documented in-thread. The one standing process artifact: the earlier CHANGES_REQUESTED review (2026-08-11) objected to the integration suite being skipped on PRs — that is ci.yml's merge-queue-only design, and this approval supersedes that review state anyway.

@wenshao's independent real-session verification (up-thread) covers the live-behavior lane, and the sandboxed /verify run is in flight for belt-and-braces.

Approving, pinned to the reviewed commit. ✅

中文说明

置信度:4/5 —— 各阶段均干净;剩余问题是被轮次上限截断的评审留下的文档/措辞类建议,且真机会话接线已有维护者的独立真机验证背书。

退一步看:这是开放 roadmap issue(#4184)的诊断部分,缓解部分(#4880)已于六月合并。实现与我的独立方案一致,并在关键处做得更好——与压缩管线共享尺寸模型、按工具预算校准、哨兵跳过,超限计数器表现为回归警报而非日常噪音。所有听起来危险的路径都安全降级:无历史→整段省略,历史读取抛错→省略并留调试痕迹,截断关闭(Infinity)→不误报,--json 保持可序列化。

八轮评审之后,这个 diff 已被挖掘到我不认为新鲜目光还能找出更多的程度:第 8 轮遗留的全部是关于文档准确性与标签措辞的 Suggestion,均不改变行为。作者对每条都给出修复或有理由的拒绝,拒绝项均在线程中留档。唯一遗留的流程产物:此前的 CHANGES_REQUESTED 评审(2026-08-11)质疑 PR 上集成测试被跳过——那是 ci.yml 的 merge-queue-only 设计使然,且本次批准会覆盖该评审状态。

@wenshao 的独立真机验证(见上文线程)覆盖了真机行为验证通道,沙箱 /verify 运行也在进行中,双保险。

批准,锚定到被评审的 commit。✅

Qwen Code · qwen3.8-max

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

@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Summary

Package Lines Statements Functions Branches
CLI 83.88% 83.88% 89.82% 83.09%
Core 87.86% 87.86% 89.4% 86.35%
CLI Package - Full Text Report
-------------------|---------|----------|---------|---------|-------------------
File               | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
-------------------|---------|----------|---------|---------|-------------------
All files          |   83.88 |    83.09 |   89.82 |   83.88 |                   
 src               |   84.97 |    81.29 |   88.49 |   84.97 |                   
  cli.ts           |   95.68 |    84.11 |     100 |   95.68 | ...60-561,565-566 
  gemini.tsx       |    72.8 |    77.39 |   80.76 |    72.8 | ...1299-1303,1424 
  ...ractiveCli.ts |   86.74 |    81.15 |   88.13 |   86.74 | ...2955,2961,3026 
  ...liCommands.ts |   89.33 |     85.6 |      90 |   89.33 | ...01,518,552,674 
  ...ActiveAuth.ts |     100 |     87.5 |     100 |     100 | 66-80             
 ...cp-integration |   71.19 |    73.65 |   90.84 |   71.19 |                   
  acpAgent.ts      |   70.59 |    73.45 |   90.37 |   70.59 | ...29,12234-12236 
  ...k-reporter.ts |     100 |    80.95 |     100 |     100 | 77,80,115,135     
  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           
  ...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.49 |    86.99 |   96.71 |   91.49 |                   
  Session.ts       |   90.51 |    85.18 |   95.94 |   90.51 | ...90,10717-10721 
  ...entTracker.ts |    96.8 |    89.36 |      90 |    96.8 | 137-143,221       
  ...projection.ts |   98.57 |    93.29 |     100 |   98.57 | ...76,333,344,356 
  ...stop-guard.ts |     100 |    98.07 |     100 |     100 | 37,127            
  ...eplay-page.ts |   93.44 |    91.74 |     100 |   93.44 | 74,85-88,115-125  
  ...y-replayer.ts |   98.54 |    95.65 |     100 |   98.54 | 241-243           
  index.ts         |       0 |        0 |       0 |       0 | 1-40              
  ...ssionUtils.ts |   89.76 |    87.32 |     100 |   89.76 | ...54-270,326-328 
  ...lure-guard.ts |   98.32 |    97.75 |     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 |   96.01 |    94.15 |   96.66 |   96.01 |                   
  ...ageEmitter.ts |   95.95 |       96 |     100 |   95.95 | 52-59             
  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      |   90.81 |    79.61 |   66.66 |   90.81 |                   
  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.66 |      100 |      50 |   98.66 | 86                
  serve.ts         |   89.84 |    77.32 |     100 |   89.84 | ...52,855-858,870 
  sessions.ts      |     100 |      100 |      50 |     100 |                   
  update.ts        |   98.13 |    94.44 |   66.66 |   98.13 | 82-83             
 ...mmands/channel |   88.91 |     88.5 |   90.54 |   88.91 |                   
  channel-cwd.ts   |     100 |      100 |     100 |     100 |                   
  ...l-registry.ts |   95.21 |    96.73 |   88.88 |   95.21 | ...18-221,266-269 
  ...entry-path.ts |      75 |       50 |     100 |      75 | 8-9               
  config-utils.ts  |   95.87 |    96.35 |     100 |   95.87 | ...08-213,271-274 
  configure.ts     |    14.7 |      100 |       0 |    14.7 | 18-21,23-84       
  daemon-worker.ts |   93.96 |    85.44 |   94.23 |   93.96 | ...1229,1236-1237 
  loop-runtime.ts  |   91.66 |      100 |      50 |   91.66 | 15,22             
  ...classifier.ts |   98.49 |    96.51 |     100 |   98.49 | 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.82 |    87.64 |   87.09 |   88.82 |                   
  consent.ts       |   72.53 |       90 |   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 |     87.5 |     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 |    53.84 |     100 |      75 | ...27-131,133-137 
 ...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 |   87.56 |    88.09 |   88.42 |   87.56 |                   
  agent-prompt.ts  |   93.64 |    91.71 |   97.22 |   93.64 | ...2465,2589-2669 
  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 
  ...ent-status.ts |   93.03 |    83.87 |   83.33 |   93.03 | 291,531-551       
  ...ose-review.ts |   96.87 |    92.52 |   96.55 |   96.87 | ...2126,2154-2176 
  cost-ledger.ts   |   94.67 |    95.86 |   78.57 |   94.67 | ...04-505,545-555 
  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-pr.ts      |    76.7 |    68.75 |   63.63 |    76.7 | ...95,417,450-455 
  findings.ts      |   89.35 |    89.13 |   95.45 |   89.35 | ...15-918,927-928 
  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     
  mock-provider.ts |   95.44 |    90.25 |   89.47 |   95.44 | 145,690-709       
  parse-args.ts    |   99.66 |    96.55 |     100 |   99.66 | 404               
  plan-diff.ts     |   64.04 |      100 |   66.66 |   64.04 | 127-163           
  pr-context.ts    |   81.77 |    80.86 |   92.85 |   81.77 | ...1043,1072-1074 
  presubmit.ts     |   83.75 |    92.72 |   88.88 |   83.75 | ...77-578,655-685 
  ...ish-assets.ts |   77.18 |    82.14 |   71.42 |   77.18 | ...85-531,533-544 
  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           |   82.16 |    87.12 |   91.66 |   82.16 | ...52,468-516,529 
  save-artifact.ts |    89.9 |    81.81 |   94.11 |    89.9 | ...08-311,404-407 
  script-lint.ts   |   81.14 |    79.23 |   88.88 |   81.14 | ...59-773,775-797 
  submit.ts        |   83.77 |    83.95 |      90 |   83.77 | ...55,544,571-607 
  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 |    94.83 |   97.77 |      97 |                   
  agent-briefs.ts  |   98.96 |      100 |      50 |   98.96 | 719-720           
  anchors.ts       |     100 |    94.79 |     100 |     100 | ...33,169,178,225 
  assets.ts        |     100 |      100 |     100 |     100 |                   
  authorization.ts |    92.4 |    92.59 |     100 |    92.4 | 127-133           
  budget.ts        |     100 |    97.14 |     100 |     100 | 510,550           
  coverage.ts      |   94.48 |    94.59 |      96 |   94.48 | ...72-489,526-537 
  deadline.ts      |   98.03 |     92.1 |     100 |   98.03 | ...71,220,531,561 
  diff-flags.ts    |     100 |        0 |     100 |     100 | 63                
  diff-plan.ts     |   98.73 |    93.01 |     100 |   98.73 | ...41,264,290-291 
  effort.ts        |     100 |      100 |     100 |     100 |                   
  gh.ts            |   87.07 |    92.45 |   76.47 |   87.07 | ...72,309-310,337 
  git.ts           |   97.64 |    95.65 |     100 |   97.64 | 180-181           
  heavy.ts         |     100 |      100 |     100 |     100 |                   
  inline-counts.ts |     100 |      100 |     100 |     100 |                   
  ledger.ts        |     100 |      100 |     100 |     100 |                   
  local-diff.ts    |    84.4 |    88.46 |     100 |    84.4 | ...63-473,475-483 
  ...ry-context.ts |   96.19 |    94.93 |     100 |   96.19 | ...90-491,496-499 
  merge-base.ts    |     100 |      100 |     100 |     100 |                   
  path-rules.ts    |     100 |      100 |     100 |     100 |                   
  paths.ts         |     100 |     87.5 |     100 |     100 | 92                
  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 | 184               
  retirement.ts    |     100 |    92.39 |     100 |     100 | ...28,308-309,449 
  review-footer.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.04 |     100 |   98.11 | 416,457,497-498   
  test-utils.ts    |     100 |      100 |     100 |     100 |                   
  transcripts.ts   |   96.59 |     94.5 |     100 |   96.59 | ...08,297-298,323 
  ...pace-scope.ts |     100 |    96.96 |     100 |     100 | 172               
  workspaces.ts    |     100 |     95.9 |     100 |     100 | ...27,452,499,512 
  worktree.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.9 |    89.83 |   96.27 |    94.9 |                   
  ...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        |   88.93 |    88.59 |   83.33 |   88.93 | ...2451,2453-2461 
  ...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.51 |      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.43 |       50 |     100 |   97.43 | 236-239           
  ...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.87 |     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.4 |     100 |   92.53 | ...36-337,373-384 
 ...nfig/migration |   95.23 |    76.47 |   83.33 |   95.23 |                   
  index.ts         |   95.65 |    85.71 |     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    |    71.8 |    70.31 |   66.66 |    71.8 |                   
  ...tputBridge.ts |   71.95 |    70.96 |   68.42 |   71.95 | ...08-409,417-420 
  ...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 |    44.9 |    66.19 |   55.26 |    44.9 |                   
  ...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 |   37.92 |    60.71 |   46.66 |   37.92 | ...41-653,662-691 
 .../control/types |       0 |        0 |       0 |       0 |                   
  serviceAPIs.ts   |       0 |        0 |       0 |       0 | 1                 
 ...Interactive/io |    98.1 |    94.13 |   95.23 |    98.1 |                   
  ...putAdapter.ts |   97.98 |     93.2 |   98.07 |   97.98 | ...1415,1431-1432 
  ...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     
  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         |   87.53 |    83.81 |   90.47 |   87.53 |                   
  ...tp-enabled.ts |     100 |      100 |     100 |     100 |                   
  ...ion-bridge.ts |     100 |      100 |     100 |     100 |                   
  auth.ts          |   93.43 |    93.05 |     100 |   93.43 | ...20-321,324-326 
  ...em-adapter.ts |     100 |      100 |     100 |     100 |                   
  capabilities.ts  |     100 |    98.07 |     100 |     100 | 672               
  ...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 |   88.59 |    93.68 |   96.29 |   88.59 | ...95-207,451-454 
  ...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 
  ...tartup-ipc.ts |   97.72 |    96.66 |     100 |   97.72 | 88-89             
  ...supervisor.ts |   92.42 |    84.44 |    97.1 |   92.42 | ...1466,1520-1524 
  ...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 
  daemon-logger.ts |    82.2 |    77.42 |   91.76 |    82.2 | ...1720,1747-1753 
  ...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.57 |     90.8 |     100 |   98.57 | ...1411,1413-1414 
  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 |    86.95 |     100 |   92.06 | ...72,287-293,316 
  ...-path-argv.ts |     100 |      100 |     100 |     100 |                   
  ...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.01 |    80.02 |   75.43 |   84.01 | ...7461,7467-7468 
  ...tup-errors.ts |     100 |      100 |     100 |     100 |                   
  ...-keepalive.ts |   94.22 |    88.99 |     100 |   94.22 | ...27,531-532,572 
  ...-lifecycle.ts |     100 |      100 |     100 |     100 |                   
  server.ts        |   90.59 |    91.18 |   71.81 |   90.59 | ...2719,2733-2737 
  ...-admission.ts |   98.24 |    94.73 |     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.3 |    76.83 |     100 |    93.3 | ...20,823,836-838 
  ...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.51 |     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.26 |     100 |   91.63 | ...71-273,306-307 
 ...serve/acp-http |   77.89 |    79.57 |   93.03 |   77.89 |                   
  ...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 |    98.2 |    88.55 |     100 |    98.2 | 1015,1041-1052    
  dispatch.ts      |   73.19 |    76.77 |      94 |   73.19 | ...5165,5213-5219 
  index.ts         |   82.23 |    80.11 |   91.07 |   82.23 | ...2341,2425-2426 
  json-rpc.ts      |     100 |    96.96 |     100 |     100 | 92                
  safe-ws-send.ts  |   52.94 |    71.42 |     100 |   52.94 | 33-42,47-55       
  sse-stream.ts    |   93.96 |    88.88 |   84.61 |   93.96 | ...57-159,161-163 
  ...ort-stream.ts |       0 |        0 |       0 |       0 | 1                 
  ws-stream.ts     |   91.86 |       80 |     100 |   91.86 | 45,50,96,100-103  
 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             
 src/serve/fs      |   86.46 |    81.42 |     100 |   86.46 |                   
  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.21 |     100 |   77.64 | ...65,594-598,611 
  policy.ts        |   90.42 |    89.18 |     100 |   90.42 | 161-169           
  text-cursor.ts   |   88.23 |       90 |     100 |   88.23 | 74-77,92-95       
  ...ile-system.ts |   86.27 |    80.56 |     100 |   86.27 | ...2699,2709-2710 
 src/serve/live    |   78.04 |     69.4 |   90.56 |   78.04 |                   
  ...en-context.ts |   95.74 |    81.25 |     100 |   95.74 | ...0,66-67,99-100 
  ...-workspace.ts |   88.63 |    82.53 |     100 |   88.63 | ...40-241,253-254 
  discovery.ts     |   85.77 |    76.92 |      90 |   85.77 | ...49-250,255-256 
  ...structions.ts |     100 |      100 |     100 |     100 |                   
  ...oordinator.ts |   82.67 |     76.8 |   97.01 |   82.67 | ...1319,1351-1353 
  ...-installer.ts |    64.3 |    82.35 |   80.76 |    64.3 | ...45-446,460-472 
  ...oordinator.ts |   76.17 |     64.4 |   85.36 |   76.17 | ...1858,1949-1950 
  ...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.22 |    59.64 |   93.33 |   86.22 | ...1152,1175-1182 
  ...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 
  ...ion-source.ts |     100 |      100 |     100 |     100 |                   
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/serve/routes  |   85.53 |    79.99 |   94.71 |   85.53 |                   
  a2ui-action.ts   |   96.84 |     88.5 |    87.5 |   96.84 | ...70-272,309-311 
  capabilities.ts  |     100 |      100 |     100 |     100 |                   
  ...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 | 146               
  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       |   85.41 |    81.79 |   91.04 |   85.41 | ...4730,4732-4733 
  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 |   84.44 |    64.51 |     100 |   84.44 | ...73-275,355-357 
  ...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.41 |    84.13 |     100 |   87.41 | ...1660,1680-1685 
  ...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  |    90.8 |    88.48 |   96.57 |    90.8 |                   
  access-log.ts    |   98.68 |     97.1 |     100 |   98.68 | 115,186           
  ...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.5 |    72.34 |     100 |    86.5 | ...47,764,827-836 
  fs-factory.ts    |     100 |    94.54 |     100 |     100 | 42,103,159        
  ...branch-ops.ts |     100 |      100 |     100 |     100 |                   
  ...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.83 |   97.14 |   89.55 | ...32-836,888-889 
  ...ion-export.ts |     100 |    94.44 |     100 |     100 | 64                
  session-list.ts  |   93.55 |    91.01 |     100 |   93.55 | ...79,681-687,827 
  telemetry.ts     |   99.02 |    97.44 |     100 |   99.02 | ...25,639,781-783 
 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.65 |    87.73 |   91.11 |   90.65 |                   
  index.ts         |   90.13 |    87.04 |   89.74 |   90.13 | ...1464-1468,1471 
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/services      |   92.48 |    89.31 |      98 |   92.48 |                   
  ...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 |   86.83 |    83.87 |     100 |   86.83 | ...30-335,340-345 
  ...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.77 |     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.08 |    75.43 |   67.41 |   73.08 |                   
  App.tsx          |   33.33 |       75 |   33.33 |   33.33 | 32-86             
  AppContainer.tsx |   74.29 |    72.05 |   68.57 |   74.29 | ...4112,4228-4234 
  ...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.08 |    71.73 |   66.66 |   70.08 | ...01,324,377-382 
  ...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.53 |    66.18 |   51.06 |   58.53 |                   
  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.6 |    73.52 |     100 |    94.6 | ...21-222,241-247 
  ...rSetupFlow.ts |   43.18 |    33.33 |      50 |   43.18 | ...78-399,416-459 
 src/ui/commands   |   82.79 |    83.27 |   89.22 |   82.79 |                   
  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 |   82.97 |    78.57 |     100 |   82.97 | 47-52,67-70,91-96 
  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   |   72.81 |    86.84 |   66.66 |   72.81 | ...63-168,277-280 
  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  |   84.78 |    82.47 |     100 |   84.78 | ...1071,1105-1110 
  ...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.06 |    88.37 |     100 |   89.06 | ...72-176,202-209 
  ...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.52 |    79.07 |   79.85 |   71.52 |                   
  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 | ...-72,84,139,153 
  ...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       |   76.99 |    66.66 |      50 |   76.99 | ...96,233,255-260 
  ...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  |   83.26 |    82.23 |      80 |   83.26 | ...2231,2257,2331 
  ...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  |   96.28 |     94.8 |      50 |   96.28 | ...01,459-463,466 
  MemoryDialog.tsx |   86.59 |    80.15 |     100 |   86.59 | ...34-435,485,553 
  ...geDisplay.tsx |       0 |        0 |       0 |       0 | 1-41              
  ModelDialog.tsx  |   81.95 |    71.27 |     100 |   81.95 | ...1045,1050-1066 
  ...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.5 |    85.18 |     100 |    93.5 | ...05,267,287-289 
  ...yTodoList.tsx |   96.36 |    88.23 |     100 |   96.36 | 138-141           
  ...nsDisplay.tsx |   95.67 |    87.09 |     100 |   95.67 | ...24-125,275-277 
  ...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.97 |    52.38 |   20.83 |   50.97 |                   
  ...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.56 |      100 |       0 |    9.56 | 40-67,70-158      
 ...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.41 |   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.95 |      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.54 |    82.99 |   88.04 |   85.54 |                   
  ...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 |   85.75 |     68.4 |   81.81 |   85.75 | ...1464,1485-1489 
  ...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.08 |    81.23 |   76.92 |   86.08 | ...5198-5200,5202 
  ...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 |    89.9 |    81.57 |     100 |    89.9 | ...79,352-362,442 
  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.26 |     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.13 |    93.33 |     100 |   97.13 | ...78-382,478-485 
  ...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 |   67.01 |    29.41 |     100 |   67.01 | ...10-111,115-116 
  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.2 |    89.47 |     100 |    91.2 |                   
  ...AppLayout.tsx |    90.9 |     87.5 |     100 |    90.9 | 60-62,110-115,151 
  ...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  |   86.47 |    79.88 |   96.66 |   86.47 |                   
  screen-buffer.ts |   94.73 |    64.28 |     100 |   94.73 | 51-52             
  ...ion-coords.ts |     100 |      100 |     100 |     100 |                   
  ...ction-span.ts |   92.72 |       90 |     100 |   92.72 | 37-38,67-68       
  ...tion-state.ts |   85.71 |      100 |   88.88 |   85.71 | 51-58             
  ...ction-text.ts |   92.85 |    92.45 |     100 |   92.85 | 30-34,114-115     
  ...selection.tsx |   80.31 |    59.64 |     100 |   80.31 | ...13-314,330-331 
 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.24 |    85.49 |   95.64 |   87.24 |                   
  ...Colorizer.tsx |   80.31 |    85.41 |     100 |   80.31 | ...00-201,313-339 
  ...nRenderer.tsx |   79.84 |     75.6 |     100 |   79.84 | ...66,270,328-329 
  ...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 |   92.38 |    81.91 |   95.23 |   92.38 | ...43-746,799-804 
  ...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.21 |     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.87 |     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          |   90.43 |    78.33 |     100 |   90.43 | ...59,244,248-249 
  ...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.73 |    79.48 |     100 |   82.73 | ...84-606,737-738 
  ...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 |   94.94 |      100 |   88.88 |   94.94 | 112-117           
  ...nal-buffer.ts |     100 |      100 |     100 |     100 |                   
  ...e-renderer.ts |   90.61 |    83.44 |     100 |   90.61 | ...80,482-484,607 
  ...wOptimizer.ts |     100 |    96.77 |     100 |     100 | 69                
  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       
  ...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.41 |    87.07 |   92.57 |   81.41 |                   
  ...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 |       95 |     100 |     100 | 72                
  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 
  jsonc-editor.ts  |   93.18 |    92.72 |     100 |   93.18 | ...80-381,384-385 
  languageUtils.ts |   98.88 |    97.05 |     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 |                   
  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.12 |    90.27 |     100 |   95.12 | ...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 |                   
  windowTitle.ts   |   95.45 |    93.33 |     100 |   95.45 | 54-55             
  ...WithBackup.ts |   65.04 |    77.77 |     100 |   65.04 | 97,112,133-172    
 ...s/housekeeping |   92.87 |     92.8 |   95.83 |   92.87 |                   
  cleanup.ts       |   91.86 |    92.85 |     100 |   91.86 | ...83-186,190-192 
  ...eractionAt.ts |     100 |      100 |     100 |     100 |                   
  scheduler.ts     |   95.49 |       96 |    90.9 |   95.49 | 62-66,207-211     
  throttledOnce.ts |   86.66 |     86.2 |     100 |   86.66 | ...99,105,137-138 
-------------------|---------|----------|---------|---------|-------------------
Core Package - Full Text Report
-------------------|---------|----------|---------|---------|-------------------
File               | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
-------------------|---------|----------|---------|---------|-------------------
All files          |   87.86 |    86.35 |    89.4 |   87.86 |                   
 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.38 |    84.54 |   94.85 |   90.38 |                   
  ...transcript.ts |   87.63 |    83.52 |     100 |   87.63 | ...80,588,594-598 
  ...ent-resume.ts |   85.59 |    77.55 |   83.33 |   85.59 | ...1793-1797,1800 
  ...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.32 |    67.71 |   78.94 |   76.32 |                   
  ...gentClient.ts |   79.47 |    88.88 |   81.81 |   79.47 | ...68-183,189-204 
  ArenaManager.ts  |   75.11 |    64.51 |   78.57 |   75.11 | ...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.1 |    86.68 |   89.23 |    91.1 |                   
  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.34 |      100 |    92.3 |   98.34 | 81-82             
  ...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.4 |       90 |   83.78 |    92.4 | ...1862,1911-1914 
  ...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.04 |    84.17 |   88.97 |   82.04 |                   
  TeamManager.ts   |   72.02 |    79.41 |   79.24 |   72.02 | ...1632,1655-1656 
  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.26 |   98.21 |   94.39 |                   
  ...on-harness.ts |   96.49 |    84.21 |     100 |   96.49 | 128-129,141-142   
  fake-agent.ts    |   98.49 |    95.08 |     100 |   98.49 | 201-203           
  fake-backend.ts  |   86.46 |    97.61 |   95.83 |   86.46 | 124-146           
 src/config        |   84.98 |    87.13 |   75.37 |   84.98 |                   
  approval-mode.ts |     100 |      100 |     100 |     100 |                   
  ...xtDefaults.ts |     100 |      100 |     100 |     100 |                   
  config.ts        |   84.29 |    86.85 |   73.79 |   84.29 | ...8350,8354-8355 
  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.34 |    88.04 |   93.26 |   92.34 |                   
  baseLlmClient.ts |    88.4 |     83.8 |   81.81 |    88.4 | ...59,672,678-680 
  client.ts        |   91.95 |    87.18 |   91.56 |   91.95 | ...3928,4026-4027 
  ...tGenerator.ts |   86.34 |    87.34 |   84.61 |   86.34 | ...96-497,542-548 
  ...lScheduler.ts |   90.04 |    84.67 |   96.15 |   90.04 | ...6216,6244-6260 
  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 |     92.1 |     100 |     100 | 87,122-139        
  ...reparation.ts |     100 |      100 |     100 |     100 |                   
  ...tion-guard.ts |   90.38 |    94.73 |     100 |   90.38 | 68-72             
  ...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.12 |     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 | ...1429,1458,1469 
  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.6 |    88.74 |    92.3 |    95.6 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...tGenerator.ts |   95.52 |    87.88 |   91.89 |   95.52 | ...1195-1196,1224 
  ...tDetection.ts |     100 |      100 |     100 |     100 |                   
 ...ntentGenerator |   91.63 |    90.43 |   95.61 |   91.63 |                   
  constants.ts     |     100 |      100 |     100 |     100 |                   
  converter.ts     |   91.15 |    89.32 |   96.87 |   91.15 | ...1914,2083-2098 
  errorHandler.ts  |     100 |      100 |     100 |     100 |                   
  index.ts         |   60.31 |       75 |      50 |   60.31 | ...71,74-78,90-94 
  ...tGenerator.ts |    66.4 |    70.58 |   88.88 |    66.4 | ...51-157,168-169 
  pipeline.ts      |   95.45 |    91.18 |     100 |   95.45 | ...1301,1309,1408 
  ...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.19 |    90.44 |   98.36 |   97.19 |                   
  dashscope.ts     |   98.36 |    92.99 |   95.65 |   98.36 | ...93-494,636-637 
  deepseek.ts      |   94.91 |    89.36 |     100 |   94.91 | ...31-132,145-146 
  default.ts       |   99.16 |    96.96 |     100 |   99.16 | 198               
  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.27 |    84.01 |   92.52 |   87.27 |                   
  ...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.85 |    86.38 |   97.87 |   90.85 | ...1218-1224,1268 
  ...ionManager.ts |   82.24 |    80.14 |   81.52 |   82.24 | ...2730,2752-2753 
  ...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.36 |   85.71 |    75.9 | ...98,202,214-248 
  github.ts        |   90.42 |    82.66 |     100 |   90.42 | ...0,990-991,1001 
  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 
 src/followup      |    79.9 |    78.92 |    90.9 |    79.9 |                   
  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.76 |    64.76 |   71.42 |   71.76 | ...53-654,661-662 
  ...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         |    93.3 |    89.05 |    94.6 |    93.3 |                   
  ...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.79 |     88.5 |   96.42 |   88.79 | ...04-805,828-831 
  ...projection.ts |   66.66 |    72.97 |   33.33 |   66.66 | ...83,186,190-192 
  ...ersistence.ts |   87.73 |    84.84 |      80 |   87.73 | ...-94,97,101-106 
  goal-protocol.ts |   95.74 |    93.33 |     100 |   95.74 | 154-155           
  goal-reducer.ts  |    93.4 |    90.65 |   96.96 |    93.4 | ...27,501,519-520 
  goal-runtime.ts  |   97.62 |     89.9 |     100 |   97.62 | ...1049,1169-1170 
  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.32 |   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 |    89.13 |     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.94 |   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 |    87.03 |     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 |     82.6 |     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 |    81.53 |   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.62 |   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 |       44 |   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.5 |   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 |    73.84 |   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 | 82-84,87-89,91-94 
  ...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.52 |   95.89 |   85.41 |                   
  ...tGenerator.ts |   98.64 |    98.18 |     100 |   98.64 | 105-106           
  qwenOAuth2.ts    |   82.79 |    73.29 |   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      |   89.77 |    84.64 |   96.92 |   89.77 |                   
  ...ionTrailer.ts |     100 |      100 |     100 |     100 |                   
  ...llRegistry.ts |    98.5 |     87.5 |     100 |    98.5 | 81-82,105,476-477 
  ...ionService.ts |   97.51 |    96.15 |     100 |   97.51 | ...,929,1072-1080 
  ...ingService.ts |   91.41 |    85.15 |   95.65 |   91.41 | ...2116,2143-2144 
  ...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.76 |     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.3 |    91.22 |     100 |    97.3 | ...53-454,611-612 
  ...ttachments.ts |   97.74 |    90.85 |     100 |   97.74 | 298-308,646       
  ...ersistence.ts |   90.95 |    78.75 |     100 |   90.95 | ...78,963-964,992 
  ...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             
  ...ipt-reader.ts |   94.55 |    89.78 |   96.66 |   94.55 | ...1353-1354,1422 
  ...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 |   88.79 |    83.72 |   97.18 |   88.79 | ...2477,2553-2573 
  sessionTitle.ts  |   94.19 |    73.21 |     100 |   94.19 | ...43-246,277-278 
  ...ionService.ts |    84.4 |    78.45 |   97.18 |    84.4 | ...2493,2499-2504 
  ...pInhibitor.ts |   97.42 |    92.77 |     100 |   97.42 | ...30,169,369-370 
  ...Estimation.ts |     100 |    88.23 |     100 |     100 | 118-119           
  ...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 |   87.98 |    86.84 |     100 |   87.98 | ...38-439,455-456 
 ...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.89 |   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.5 |     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     |   81.73 |    83.57 |   84.83 |   81.73 |                   
  ...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.31 |    74.62 |   73.68 |   76.31 | ...80,387-389,405 
  ...attributes.ts |   95.15 |    87.27 |     100 |   95.15 | ...97-198,216-217 
  ...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.1 |    95.72 |      95 |    99.1 | 145,369-370       
  ...t.circular.ts |       0 |        0 |       0 |       0 | 1-128             
  loggers.ts       |   60.03 |    76.51 |   66.07 |   60.03 | ...1484,1501-1521 
  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      |   91.06 |    87.15 |   68.75 |   91.06 | ...32,482-483,499 
  sdk.ts           |   82.12 |    90.47 |   66.66 |   82.12 | ...90-194,232-254 
  ...on-context.ts |     100 |      100 |     100 |     100 |                   
  ...on-tracing.ts |    91.1 |    88.68 |   96.77 |    91.1 | ...1737,1768-1771 
  ...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 |     87.5 |   86.36 |      83 | ...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.02 |    98.41 |   82.92 |   96.02 |                   
  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.24 |    84.99 |   88.72 |   86.24 |                   
  ...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    |   79.87 |    85.58 |   89.47 |   79.87 | ...2259,2263-2266 
  ...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 |        0 |       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.81 |    84.22 |   91.91 |   78.81 | ...5036,5099-5100 
  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     |   73.38 |    77.77 |   83.33 |   73.38 | ...02,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   |   87.22 |    87.68 |   88.69 |   87.22 |                   
  agent.ts         |   85.84 |    86.59 |   86.31 |   85.84 | ...4315,4337-4347 
  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.91 |    89.63 |   96.88 |   92.91 |                   
  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.01 |    95.03 |    61.9 |   83.01 | ...62-378,382-388 
  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.95 |   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.02 |    81.25 |   85.71 |   78.02 | ...22-123,147-198 
  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.12 |    93.33 |     100 |   95.12 | ...68-172,240-244 
  ...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.27 |     93.1 |     100 |   95.27 | ...16-317,359-362 
  ...-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         |   93.61 |    92.42 |     100 |   93.61 | ...62-563,565-567 
  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.11 |     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.5 |    89.74 |     100 |    97.5 | 162-163           
  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 |   95.98 |    83.96 |     100 |   95.98 | ...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.07 |    88.34 |     100 |   86.07 | ...2269,2276-2280 
  ...lAstParser.ts |   98.27 |    91.38 |     100 |   98.27 | ...1321-1323,1333 
  ...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.5 |    86.02 |     100 |    87.5 | ...76-480,510-525 
  truncation.ts    |   90.61 |    90.43 |     100 |   90.61 | ...53-461,498-504 
  windowsPath.ts   |   89.47 |    79.31 |     100 |   89.47 | ...57-58,62,90-91 
  ...aceContext.ts |   96.74 |    91.04 |     100 |   96.74 | ...69,196,299-301 
  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 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. Suggestions are inline.

中文说明

已审查。 建议见行内评论。

— deepseek-v4-flash via Qwen Code /review (v0.21.8)

Comment thread packages/cli/src/ui/commands/doctorCommand.ts Outdated
Comment thread packages/cli/src/ui/commands/doctorCommand.ts
Comment thread packages/core/src/utils/tool-result-retention.ts Outdated
Comment thread packages/core/src/utils/tool-result-retention.ts
Comment thread packages/core/src/index.ts
Comment thread packages/core/src/utils/tool-result-retention.test.ts Outdated
Comment thread packages/cli/src/ui/commands/doctorCommand.ts Outdated
Comment thread packages/core/src/utils/tool-result-retention.ts Outdated
Comment thread packages/core/src/utils/tool-result-retention.ts Outdated
Comment thread packages/cli/src/ui/commands/doctorCommand.test.ts
Comment thread packages/core/src/utils/tool-result-retention.ts Outdated
Comment thread packages/cli/src/ui/commands/doctorCommand.ts Outdated
Comment thread packages/cli/src/ui/commands/doctorCommand.ts Outdated
Comment thread packages/cli/src/ui/commands/doctorCommand.ts Outdated
Comment thread docs/design/2026-08-10-tool-output-offload-preview.md Outdated
@wenshao

wenshao commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

@qwen-code /takeover

@qwen-code-dev-bot qwen-code-dev-bot added the autofix/takeover Summon the autofix loop to manage this PR (remove to release; needs triage+) label Aug 10, 2026
@qwen-code-dev-bot

Copy link
Copy Markdown
Collaborator

🤝 Takeover engaged: the autofix loop now manages this PR — it will address new review feedback and resolve base conflicts until the label is removed or the round cap is reached. Remove the autofix/takeover label (or comment @qwen-code /takeover stop) to release.

中文说明

🤝 已接管:autofix 循环现在管理此 PR —— 将持续处理新的评审反馈与 base 冲突,直到移除标签或达到轮次上限。移除 autofix/takeover 标签(或评论 @qwen-code /takeover stop)即可释放。

@qwen-code-dev-bot

qwen-code-dev-bot commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

⚠️ AutoFix round 3 ended without publishing a reportview run.

中文说明

⚠️ AutoFix 第 3 轮结束但未发布报告 —— 查看运行

@qwen-code-dev-bot

Copy link
Copy Markdown
Collaborator

🤖 AutoFix ran out of time before finishing (idle-timeout (no output for 1200000ms — the sandbox likely hung at startup)) (attempt 1/100) — it will retry on the next scan.

What I found before stopping:
Qwen failed during address-review: idle-timeout (no output for 1200000ms — the sandbox likely hung at startup).

See the Qwen Autofix agent step logs for model/tool output.

Run log: https://github.com/QwenLM/qwen-code/actions/runs/31414262324


🧠 Handled by Qwen Code · model/模型 qwen3.8-max

@qwen-code-dev-bot

Copy link
Copy Markdown
Collaborator

🤖 AutoFix ran out of time before finishing (idle-timeout (no output for 1200000ms — the sandbox likely hung at startup)) (attempt 2/100) — it will retry on the next scan.

⚠️ This change was NOT pushed — any commit referenced below was made only in the runner workspace and has been discarded. What the agent reported:
Qwen failed during address-review: idle-timeout (no output for 1200000ms — the sandbox likely hung at startup).

See the Qwen Autofix agent step logs for model/tool output.

Run log: https://github.com/QwenLM/qwen-code/actions/runs/31417991439


🧠 Handled by Qwen Code · model/模型 qwen3.8-max

@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: reverse audit — stopped at the 5-round cap with rounds 4 and 5 still surfacing confirmed findings (no dry convergence).

Not explored to full depth (tool budget reached): You are review agent reverse-audit — Reverse audit agen...: none — all planned checks completed within budget..

中文说明

未审查:reverse audit — stopped at the 5-round cap with rounds 4 and 5 still surfacing confirmed findings (no dry convergence)。

未探索到全部深度(达到工具调用预算):You are review agent reverse-audit — Reverse audit agen...:none — all planned checks completed within budget.

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

Comment thread docs/design/2026-08-10-tool-output-offload-preview.md Outdated
Comment thread packages/core/src/utils/tool-result-retention.ts Outdated
Comment thread packages/core/src/utils/tool-result-retention.ts Outdated
Comment thread packages/cli/src/ui/commands/doctorCommand.ts Outdated
Comment thread docs/design/2026-08-10-tool-output-offload-preview.md Outdated
@qwen-code-dev-bot

Copy link
Copy Markdown
Collaborator

🤖 AutoFix stopped: this counting window now contains 3 time-budget exhaustions (pushed rounds in between included; this round itself may have failed differently). That is 3 full agent runs that pushed nothing. 3 of those were silent-sandbox (idle) timeouts that no budget increase can cure — investigate the sandbox image and runner docker daemon for those. A human should investigate the sandbox image and runner docker daemon, then comment @qwen-code /retry to re-arm. Until then future scans will skip this PR.

What I found before stopping:
Qwen failed during address-review: idle-timeout (no output for 1200000ms — the sandbox likely hung at startup).

See the Qwen Autofix agent step logs for model/tool output.

Run log: https://github.com/QwenLM/qwen-code/actions/runs/31421767926


🧠 Handled by Qwen Code · model/模型 qwen3.8-max

@qwen-code-dev-bot

Copy link
Copy Markdown
Collaborator

⏸️ Takeover paused: this PR reached its round cap (100/100). Comment @qwen-code /takeover to re-arm a fresh window and continue management, or @qwen-code /takeover stop to release.

中文说明

⏸️ 托管已暂停:本 PR 达到轮次上限(100/100)。评论 @qwen-code /takeover 可重新武装、开启新窗口继续托管;或评论 @qwen-code /takeover stop 释放。

…har sizes

Address review round 1: measure retained tool results with the compression
pipeline's estimatePartChars (raw chars for string outputs, image estimate
for nested media) instead of JSON.stringify, fixing false oversized flags on
newline-dense compliant outputs; compare each result against its own tool's
declared budget resolved from the tool registry instead of a fixed 30k
threshold, so compliant high-budget results (e.g. MCP) are never flagged;
scope the UI-history duplication scan to tool_group result displays so model
text is excluded and rendered tool outputs are actually detected; omit
toolResultRetention from --json when unavailable; log retention collection
failures via debug logger; fix the design note's IO-error persistence bullet;
re-verify the E2E report with the new measurement basis.
@ZijianZhang989

Copy link
Copy Markdown
Collaborator Author

Review round 1 — triage and fixes (ae30398)

Thanks for the thorough probe-verified findings. All substantive ones are fixed in ae30398; details below.

Fixed

Finding Resolution
R1-2 (Critical) serialized-size inflation flagging compliant outputs analyzeToolResultRetention now measures parts with the compression pipeline's estimatePartChars: string outputs are measured as raw chars (no \n doubling / framing), so the 24.8k–30k false-alarm window is gone. Pinned by a newline-dense regression test.
R1-1 fixed 30k threshold vs per-tool budgets (MCP/agent false positives) Each result is now compared against its own tool's declared maxOutputChars, resolved from the tool registry by functionResponse.name (mirroring the scheduler); 30k is only the fallback for tools declaring none, and Infinity budgets never trip. Design note §5 and the report wording updated accordingly (Oversized results (above tool budget)).
R2-1 media under-reporting (response not the only unbounded field) Fixed by adopting estimatePartChars, which walks nested functionResponse.parts media at the image-token estimate — the retention model and the compression size model now agree by construction (same anti-drift practice as tokenEstimation). The incorrect comment is removed.
R2-3 UI scan misses tool_group result displays / counts model text The scan now targets tool_group items' tools[].resultDisplay strings only. This fixes the false negative and the false positive raised in the parallel thread. Re-verified live in tmux: a spilled 47k shell output now reports Oversized also rendered in UI history: 1 item(s) while API history holds only the 4.5k stub.
R2-4 design note IO-error bullet Corrected: on spill-write failure the bounded head/tail preview is kept with a note; the full payload has no retrievable pointer.
Silent catch with no log collectToolResultRetention now logs via createDebugLogger('DOCTOR_MEMORY') before degrading, matching clearCommand's pattern; the catch path has a dedicated throwing test.
JSON shape asymmetry --json now omits toolResultRetention entirely when unavailable (no null), with a test.
Boundary / coverage gaps Added: exact-threshold test (pins strict >), per-tool resolver tests (high/low/unknown/Infinity), nested-media billing test, explicit largestResultChars assertion, catch-path test.
presentInCompressionInput derived assumption Kept the derivation (coupling the diagnostic to compression internals would invert the dependency), but the assumption is now explicit in a comment: if compression input assembly ever stops reading the live history by reference, the derivation must be revisited.

Not adopted

  • Barrel-export import test (index.ts): dismissed — the CLI suite imports analyzeToolResultRetention through the package-root barrel, so dropping the export fails both the build and the tests. An extra existence test would add no signal.

E2E report re-run with the new measurement basis (all scenarios + --json), updated in .qwen/e2e-tests/2026-08-10-doctor-memory-tool-result-retention.md.

中文说明

针对第一轮 review 的逐条处理(提交 ae30398):

  • R1-2(严重)序列化膨胀误报:改用压缩管线的 estimatePartChars 测量——字符串输出按原始字符计(不再有 \n 加倍与外壳膨胀),24.8k–30k 误报区间消除,并新增换行密集回归测试固定。
  • R1-1 固定 30k 阈值 vs 工具预算:改为按 functionResponse.name 从工具注册表解析各工具自己声明的 maxOutputChars 逐条比较(对齐调度器口径),30k 仅作为无声明工具的兜底,Infinity 预算永不触发;MCP 等高预算合规结果不再误报。设计说明 §5 与报告措辞同步更新。
  • R2-1 媒体漏报:复用 estimatePartChars 后自动覆盖嵌套 functionResponse.parts 媒体(按图片 token 估算计费),retention 模型与压缩大小模型天然一致,错误注释已删除。
  • R2-3 UI 扫描盲区/误报:扫描范围改为 tool_group 条目的 tools[].resultDisplay 字符串——既修复假阴性(工具输出真实可见),又排除模型回复文本。tmux 实测:47k shell 输出落盘后,API 历史只剩 4.5k stub,UI 历史副本被正确检出 1 条。
  • R2-4 设计说明落盘失败表述:更正为"保留有界头尾预览并注明无法保存,完整输出无可恢复指针"。
  • 静默 catch:降级前经 createDebugLogger('DOCTOR_MEMORY') 记录日志,并补抛异常测试。
  • JSON 形状不对称:无历史时 --json 直接省略 toolResultRetention 键(不再输出 null),已补测试。
  • 边界与覆盖缺口:补恰好等于阈值(锁定严格 >)、按工具预算(高/低/未知/无穷)、媒体计费、largestResultChars 显式断言、catch 路径等用例。
  • presentInCompressionInput 派生假设:保留派生实现(让诊断反向耦合压缩内部不合理),但在注释中显式声明该假设及压缩输入组装变更时必须复查。

未采纳:barrel 导出的独立 import 测试——CLI 测试本就通过包根 barrel 导入该函数,删除导出会直接挂构建与测试,额外存在性测试无增量信号。

E2E 报告已按新测量口径全部重跑并更新。

@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): You are review agent reverse-audit — Reverse audit agen...: none — all checks above completed within budget.; You are review agent reverse-audit — Reverse audit agen...: none — all checks above completed within budget..

中文说明

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

未探索到全部深度(达到工具调用预算):You are review agent reverse-audit — Reverse audit agen...:none — all checks above completed within budget.;You are review agent reverse-audit — Reverse audit agen...:none — all checks above completed within budget.

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

Comment thread packages/cli/src/ui/commands/doctorCommand.ts Outdated
Comment thread packages/core/src/utils/tool-result-retention.ts
Comment thread packages/cli/src/ui/commands/doctorCommand.ts
Comment thread packages/core/src/utils/tool-result-retention.ts
Comment thread packages/core/src/utils/tool-result-retention.ts
Comment thread packages/core/src/utils/tool-result-retention.ts
Comment thread .qwen/e2e-tests/2026-08-10-doctor-memory-tool-result-retention.md
Comment thread docs/design/2026-08-10-tool-output-offload-preview.md Outdated
Comment thread packages/cli/src/ui/commands/doctorCommand.test.ts
Comment thread packages/cli/src/ui/commands/doctorCommand.ts
- Canonicalize tool names before registry lookup (legacy aliases resolve)
- Skip sentinel-prefixed results and apply combined-pass 2x tolerance
- Fall back to configured global threshold for tools declaring no budget
- Compare UI history displays against per-tool budgets
- Document persistence gate in design note; re-verify e2e scenario 3
@ZijianZhang989

Copy link
Copy Markdown
Collaborator Author

Round-3 triage (fixed in 39b5bb4):

Finding Action
R3-1 alias lookup ✅ Fixed — resolver now canonicalizes via canonicalToolName before the registry lookup; added a CLI test with the search_file_content alias.
R3-2 compliant results flagged ✅ Fixed — adopted the suggested calibration: results carrying the truncation sentinel are skipped, and the remaining ones are only flagged beyond the combined-pass 2x tolerance.
R3-3 UI scan fixed threshold ✅ Fixed — each tool_group display is now compared against its own tool's budget via the same resolver. Re-verified in tmux: the scenario-2/3 contradiction is gone (UI count 0 for compliant sessions).
R3-4 fallback diverges from scheduler ✅ Fixed — the fallback is now config.getTruncateToolOutputThreshold(), the bound the scheduler applies to budget-less tools. Probe (b)'s 27k case sits under the actual 28k persistence gate (25k + 3k headroom), so it is compliant; the sentinel skip + 2x tolerance cover probe (a).
R3-5 false comment ✅ Fixed — comment now states the fallback semantics and names the wider per-tool budgets.
R3-6 dead switch Declined — thresholdChars gained a production caller with the R3-4 fix (configured global threshold); it is no longer dead.
R3-7 scenario-3 evidence ✅ Fixed — re-ran scenario 3 on this commit in tmux: numbers reproduce exactly (Total 34572 / Largest 29070). The attribution was wrong: the largest result is the seq 1 6000 output; the single-line 40k printf spills to a ~1.3k stub. Doc updated, scenarios 2/4 refreshed too (UI count is now 0 under per-tool calibration).
R3-8 persistence gate omitted ✅ Fixed — design note now starts the transition diagram with maybePersistLargeToolResult (threshold + 3k headroom, exempt set), adds a §3 row, and notes budgets above 28k are second-level bounds.
R3-9 weak degradation test ✅ Fixed — the test now asserts the report survived intact (timestamp: present, result type not error).
R3-10 compliant branch untested ✅ Fixed — added a readable-report test with a compliant history asserting the no line and absence of the /compress hint.

Verification: build + typecheck clean, prettier clean, core 14/14, CLI 46/46, tmux E2E scenarios 2/3/4 re-run on 39b5bb4.

中文说明

第三轮 10 条意见:9 条修复、1 条说明后保留。

  • R3-1(别名查表丢失预算):解析器先经 canonicalToolName 规范化再查注册表,并补了 search_file_content 别名的 CLI 测试。
  • R3-2(合规结果误报超限):采用建议口径——带截断哨兵的结果跳过(落盘信封会略超原始预算),其余结果仅在超过合并通道 2 倍容差时才标记。
  • R3-3(UI 扫描用固定 30k):每条 tool_group 显示改为按其工具自身预算比较。tmux 复验场景 2/3 的自相矛盾形态消失(合规会话 UI 计数为 0)。
  • R3-4(兜底与调度器口径偏离):兜底改为 config.getTruncateToolOutputThreshold()——调度器对无预算工具实际施加的边界。探针 (b) 的 27k 用例其实在真实 28k 持久化门(25k+3k)之下,本就合规;探针 (a) 由哨兵跳过 + 2 倍容差覆盖。
  • R3-5(注释事实错误):注释已改为兜底语义并点名更宽的按工具预算。
  • R3-6(死开关):不采纳——R3-4 修复后 thresholdChars 有了生产调用方(配置的全局阈值),不再是死开关。
  • R3-7(场景 3 证据无法复现):已在新提交上 tmux 重跑,数字完全复现(Total 34572 / Largest 29070);归因确实写错了——最大结果是 seq 1 6000 的输出,单行 40k printf 被 shell 以 ~1.3k 预览落盘。文档已更正,场景 2/4 也按新口径刷新(UI 计数变 0)。
  • R3-8(遗漏 28k 持久化门):设计文档状态流转图首节点改为 maybePersistLargeToolResult(阈值+3k 余量、豁免清单),§3 增行,并注明高于 28k 的每工具预算只是第二层边界。
  • R3-9(降级测试区分度不足):补断言——报告其余部分存活(timestamp 行存在、结果类型非 error)。
  • R3-10(合规分支无测试):新增合规历史的可读报告测试,断言 no 行且不出现 /compress 提示。

验证:build/typecheck 干净、prettier 干净、core 14/14、CLI 46/46,tmux 场景 2/3/4 已在 39b5bb4 上重跑。

@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 reviewed: reverse audit — stopped at the 5-round cap without dry convergence; round 5's sole candidate duplicated the PR's existing open comment 3750020138 (sentinel-injection bypass of the alarm, still standing at this commit).

Not explored to full depth (tool budget reached): Context: PR #8875 adds a "Tool result retention" diagnost...: none — all checks I intended completed within budget. I did not run a full npm run build && npm run bundle for an exact byte delta, as no bundle-size claim is…; You are review agent reverse-audit — Reverse audit agen...: none — all planned checks completed within budget..

中文说明

未审查: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 dry convergence; round 5's sole candidate duplicated the PR's existing open comment 3750020138 (sentinel-injection bypass of the alarm, still standing at this commit)。

未探索到全部深度(达到工具调用预算):Context: PR #8875 adds a "Tool result retention" diagnost...:none — all checks I intended completed within budget. I did not run a full npm run build && npm run bundle for an exact byte delta, as no bundle-size claim is…;You are review agent reverse-audit — Reverse audit agen...:none — all planned checks completed within budget.

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

Comment thread packages/cli/src/ui/commands/doctorCommand.ts Outdated
Comment thread packages/core/src/utils/tool-result-retention.ts Outdated
Comment thread packages/core/src/utils/tool-result-retention.ts Outdated
Comment thread packages/core/src/utils/tool-result-retention.ts
Comment thread packages/cli/src/ui/commands/doctorCommand.ts
Comment thread packages/core/src/utils/tool-result-retention.ts
Comment thread packages/cli/src/ui/commands/doctorCommand.ts
… compression pipeline

Review (round 4) fixes:

- R4-3: Extract COMBINED_PASS_TOLERANCE_FACTOR into truncation.ts and
  share it between the scheduler's combined pass and the retention
  diagnostics so both use the same tolerance factor.
- R4-4: Add imageTokenEstimate option to analyzeToolResultRetention
  (defaults to DEFAULT_IMAGE_TOKEN_ESTIMATE); doctorCommand now resolves
  it via resolveSlimmingConfig (env > settings > default), the same
  source the compression pipeline uses. Export resolveSlimmingConfig from
  the core barrel.
- R4-5/R4-6: Add tests for configurable imageTokenEstimate and Infinity
  threshold guard.
- R4-7: Guard oversizedThresholdChars against Infinity — when truncation
  is disabled (threshold <= 0 → Infinity), report 0 instead of Infinity
  so JSON.stringify does not drop the key to null.
- R3-3: Fix UI history budget resolution — IndividualToolCallDisplay.name
  stores the tool's displayName (e.g. 'Shell'), not the registry key (e.g.
  'shell'), so getTool(displayName) returned undefined and budgets fell
  back to the global threshold. Build a displayName → maxOutputChars map
  from getAllTools() at scan time.
- R4-12: Declare string-only scope for UI history scanning in code
  comment and design doc §5 — structured display objects (file diffs,
  ANSI captures, agent result summaries) are out of scope for phase 1.
- 3750020138: Update design doc §5 to reflect resolveSlimmingConfig
  alignment and display-name map.
@ZijianZhang989

Copy link
Copy Markdown
Collaborator Author

第四轮 review triage(commit 9c9f90831

全部 7 条已在上述 commit 修复。逐条说明:

R3-3(Critical)— UI 历史预算解析失效
根因:IndividualToolCallDisplay.name 存的是 displayName(如 "Shell"),不是注册表键(如 "shell"),getTool("Shell") 返回 undefined,预算回退到全局 25k 阈值,导致合规输出被误报。
修复:从 getAllTools() 构建 displayName → maxOutputChars 映射,UI 扫描时先查映射再回退。
新增测试:should resolve UI budgets by display name, not registry key

R4-3 — 容差因子硬编码副本
提取 COMBINED_PASS_TOLERANCE_FACTOR = 2truncation.ts 导出,scheduler 合并通道和诊断共用同一常量。

R4-4 — imageTokenEstimate 硬编码
analyzeToolResultRetention 新增 imageTokenEstimate 选项;doctorCommand 通过 resolveSlimmingConfig(config.getChatCompression()) 解析(env > settings > default,与压缩管线同源),从 core barrel 导出 resolveSlimmingConfig

R4-5 — multipart 测试缺失
新增 uses a configurable imageTokenEstimate for nested media parts:传入自定义 estimate 验证计费变化。

R4-6 — empty-but-present history 测试缺失
当前行为已正确:空数组 [] 是 truthy,不触发 !history 早返回,analyzeToolResultRetention([]) 返回全零统计,段落正常渲染。此为测试覆盖缺口而非行为缺陷;如需补测可在后续 commit 添加。

R4-7 — Infinity 序列化为 null
oversizedThresholdCharsNumber.isFinite() 守卫:截断禁用时 getTruncateToolOutputThreshold() 返回 Infinity,现报告 0 而非 InfinityJSON.stringify 不再丢弃键。
新增测试验证 JSON.parse(JSON.stringify(stats)).oversizedThresholdChars === 0

R4-12 — 结构化 resultDisplay 不计量
声明 string-only 范围:代码注释 + 设计文档 §5 明确"结构化显示对象(file diffs、ANSI captures、agent summaries)不在 phase-1 范围内,留待后续 PR"。bot 已接受此方案。


中文总结

本轮修复 7 条 review 意见(1 Critical + 6 Suggestion):

  1. R3-3(关键):UI 历史中工具名是显示名(如 Shell)而非注册表键(如 shell),导致预算查找失败、合规输出被误报为超限。改为从注册表构建显示名→预算映射。
  2. R4-3:2x 容差因子从局部常量提升为共享导出常量,scheduler 和诊断共用。
  3. R4-4:imageTokenEstimate 不再硬编码,改用 resolveSlimmingConfig 与压缩管线同源解析。
  4. R4-5:补 multipart + 可配置 imageTokenEstimate 测试。
  5. R4-6:空历史行为已正确,测试缺口待后续补。
  6. R4-7:Infinity 阈值守卫,--json 不再变 null。
  7. R4-12:声明结构化显示不在 phase-1 范围内。

验证:build ✅ typecheck ✅ core 16/16 ✅ cli 47/47 ✅ prettier ✅

@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): Context: PR #8875 (QwenLM/qwen-code), review round 5 at H...: none — all checks above completed within budget.; Context: PR #8875 (QwenLM/qwen-code), review round 5 at H...: none — finished within budget.; Context: PR #8875 (QwenLM/qwen-code), review round 5 at H...: none — finished within budget.; Context: PR #8875 (QwenLM/qwen-code), review round 5 at H...: none — all checks above completed within budget.; chunk 2: did not execute doctorCommand.test.ts (no installed dependencies in the worktree)..

中文说明

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

未探索到全部深度(达到工具调用预算):Context: PR #8875 (QwenLM/qwen-code), review round 5 at H...:none — all checks above completed within budget.;Context: PR #8875 (QwenLM/qwen-code), review round 5 at H...:none — finished within budget.;Context: PR #8875 (QwenLM/qwen-code), review round 5 at H...:none — finished within budget.;Context: PR #8875 (QwenLM/qwen-code), review round 5 at H...:none — all checks above completed within budget.;chunk 2:did not execute doctorCommand.test.ts (no installed dependencies in the worktree).

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

Comment thread packages/cli/src/ui/commands/doctorCommand.ts Outdated
Comment thread packages/cli/src/ui/commands/doctorCommand.ts
Comment thread packages/cli/src/ui/commands/doctorCommand.ts
Comment thread packages/cli/src/ui/commands/doctorCommand.ts
Comment thread packages/cli/src/ui/commands/doctorCommand.ts
Comment thread .qwen/e2e-tests/2026-08-10-doctor-memory-tool-result-retention.md
Comment thread .qwen/e2e-tests/2026-08-10-doctor-memory-tool-result-retention.md Outdated
Comment thread docs/design/2026-08-10-tool-output-offload-preview.md Outdated
Comment thread docs/design/2026-08-10-tool-output-offload-preview.md Outdated
Comment thread docs/design/2026-08-10-tool-output-offload-preview.md Outdated
俊良 added 2 commits August 11, 2026 19:04
…nel gaps

R5-1: threshold uses config.getTruncateToolOutputThreshold() first so
disabled (Infinity) doesn't fall to 0
R5-3: UI scan uses budget * COMBINED_PASS_TOLERANCE_FACTOR to match
API-history 2x tolerance
R5-7: oversized check uses rawChars (output.length) instead of
estimatePartChars (which adds 64 wrapper floor)
R5-8: read output ?? error and check <persisted-output> sentinel
R5-12: UI lookup consults ToolDisplayNamesMigration for legacy names

Tests: 3 core + 1 CLI updated for rawChars/2x; 3 core + 2 CLI added
Doc: test counts (core 14→19, CLI 9→11), scenario 4 JSON, 2x wording
R5-9: clarify shell/MCP truncate in-tool before gate; split recovery paths
R5-15: note sentinel skip in combined-pass re-check; fix mermaid routing
R5-10: describe two-stage persist failure (fallback saves full payload)

@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 reviewed: reverse audit — stopped at the 5-round cap without dry convergence; round 5 surfaced 4 confirmed findings.

Not explored to full depth (tool budget reached): Context: PR #8875 (QwenLM/qwen-code) adds tool-result-ret...: none — all five invariants fully walked within budget.; You are review agent reverse-audit — Reverse audit agen...: none — all checks above completed within budget.; You are review agent reverse-audit — Reverse audit agen...: none — all checks above completed within budget.; You are review agent reverse-audit — Reverse audit agen...: none — completed all checks I planned.; You are review agent reverse-audit — Reverse audit agen...: none — all checks completed within budget., and 1 more.

中文说明

未审查: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 dry convergence; round 5 surfaced 4 confirmed findings。

未探索到全部深度(达到工具调用预算):Context: PR #8875 (QwenLM/qwen-code) adds tool-result-ret...:none — all five invariants fully walked within budget.;You are review agent reverse-audit — Reverse audit agen...:none — all checks above completed within budget.;You are review agent reverse-audit — Reverse audit agen...:none — all checks above completed within budget.;You are review agent reverse-audit — Reverse audit agen...:none — completed all checks I planned.;You are review agent reverse-audit — Reverse audit agen...:none — all checks completed within budget.,另有 1 条。

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

Comment thread packages/core/src/utils/tool-result-retention.ts Outdated
Comment thread packages/core/src/utils/tool-result-retention.ts
Comment thread packages/cli/src/ui/commands/doctorCommand.test.ts
Comment thread packages/cli/src/ui/commands/doctorCommand.ts
Comment thread packages/core/src/utils/tool-result-retention.ts
Comment thread docs/design/2026-08-10-tool-output-offload-preview.md Outdated
Comment thread docs/design/2026-08-10-tool-output-offload-preview.md Outdated
Comment thread packages/cli/src/ui/commands/doctorCommand.ts
Comment thread .qwen/e2e-tests/2026-08-10-doctor-memory-tool-result-retention.md
Comment thread packages/cli/src/ui/commands/doctorCommand.ts
R6 review: truncateAndSaveToFile's token-aware fallback returns the
original content (sentinel-less) when the wrapped form would not be
smaller, so the diagnostic's oversized check must tolerate that band.

- Export TRUNCATION_FALLBACK_ENVELOPE_SLACK=500 from truncation.ts
- Apply slack to the rawChars > 2x budget comparison
- Adjust 4 test fixtures broken by the new threshold boundary
- Fix 7 factual errors in design/E2E docs (mermaid, project-hash,
  web-search 102k, re-entrancy guard, shell/MCP bullet)
- Add JSDoc caveat for MCP-disconnect limitation (R6-16)

@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.

Reviewed. 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 reviewed: reverse audit — stopped after 3 of 5 rounds without dry convergence; rounds 2-3 only re-surfaced items already on the PR's discussed threads.

中文说明

已审查。 建议见行内评论。

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

未审查:reverse audit — stopped after 3 of 5 rounds without dry convergence; rounds 2-3 only re-surfaced items already on the PR's discussed threads。

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

Comment thread packages/core/src/utils/tool-result-retention.ts
Bot R6-10 re-report: design doc §5 claimed three markers are skipped
(prefix, in-body marker, <persisted-output> stub), but the diagnostic
only checks two (prefix and <persisted-output> stub). Aligned the doc
to match the code. The re-entrancy guard bullet still describes the
scheduler's three-marker isAlreadyTruncated check, which is accurate.

@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.

Reviewed. Suggestions are inline.

Not reviewed: reverse audit — stopped at the 5-round cap without dry convergence; every round (1-5) surfaced findings, and rounds 3-5 included confirmed ones.

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): Context: PR #8875 (QwenLM/qwen-code), review round 8 — re...: none — all checks I started were completed within budget.; Context: PR #8875 (QwenLM/qwen-code), review round 8 — re...: did not read compactString 's exact cap in packages/core/src/utils/toolResultDisplayCompaction.ts ; the scenario's reachability estimate relies on the ~32k fi…; Context: PR #8875 (QwenLM/qwen-code), review round 8 — re...: I did not independently re-probe the R8-3/R8-5 slack-asymmetry claims from the CLI side; those live in other chunks and are already on the list.; Context: PR #8875 (QwenLM/qwen-code), review round 8 — re...: I did not exhaustively enumerate every maxOutputChars override beyond the shipped tools I sampled (grep, ripGrep, agent, shell, web-search, read-file, MCP, re….

中文说明

已审查。 建议见行内评论。

未审查:reverse audit — stopped at the 5-round cap without dry convergence; every round (1-5) surfaced findings, and rounds 3-5 included confirmed ones。

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

未探索到全部深度(达到工具调用预算):Context: PR #8875 (QwenLM/qwen-code), review round 8 — re...:none — all checks I started were completed within budget.;Context: PR #8875 (QwenLM/qwen-code), review round 8 — re...:did not read compactString 's exact cap in packages/core/src/utils/toolResultDisplayCompaction.ts ; the scenario's reachability estimate relies on the ~32k fi…;Context: PR #8875 (QwenLM/qwen-code), review round 8 — re...:I did not independently re-probe the R8-3/R8-5 slack-asymmetry claims from the CLI side; those live in other chunks and are already on the list.;Context: PR #8875 (QwenLM/qwen-code), review round 8 — re...:I did not exhaustively enumerate every maxOutputChars override beyond the shipped tools I sampled (grep, ripGrep, agent, shell, web-search, read-file, MCP, re…

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

Comment on lines +98 to +101
it('does not flag a result measured at exactly 2x the budget (strict >)', () => {
const exact = 'z'.repeat(OVERSIZED_TOOL_RESULT_THRESHOLD_CHARS * 2);
const stats = analyzeToolResultRetention([toolResultContent(exact)]);
expect(stats.oversizedResultCount).toBe(0);

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] R8-1: This boundary test's fixture sits 500 chars below the implementation's real decision boundary — neither the > strictness nor the slack band is pinned. The oversized condition is rawChars > budget * COMBINED_PASS_TOLERANCE_FACTOR + TRUNCATION_FALLBACK_ENVELOPE_SLACK (60,500 at the default threshold), but this test feeds exactly 60,000 chars — 500 below the boundary. Probe-verified at this commit: removing the slack term from the condition, or flipping > to >=, keeps all 19 core + 12 CLI retention tests green. — Failure scenario: a refactor dropping the slack term makes compliant retained results count as oversized — /doctor memory reports a false Oversized results count plus the /compress hint — and the suite named to catch it stays green while appearing to cover the boundary.

Suggested change
it('does not flag a result measured at exactly 2x the budget (strict >)', () => {
const exact = 'z'.repeat(OVERSIZED_TOOL_RESULT_THRESHOLD_CHARS * 2);
const stats = analyzeToolResultRetention([toolResultContent(exact)]);
expect(stats.oversizedResultCount).toBe(0);
it('does not flag a result measured at exactly 2x the budget (strict >)', () => {
const exact = 'z'.repeat(
OVERSIZED_TOOL_RESULT_THRESHOLD_CHARS * 2 +
TRUNCATION_FALLBACK_ENVELOPE_SLACK,
);
const stats = analyzeToolResultRetention([toolResultContent(exact)]);
expect(stats.oversizedResultCount).toBe(0);
中文说明

[Suggestion / 建议] R8-1:该边界测试的 fixture 比实现真正的判定边界低 500 字符——> 的严格性与 slack 区间均未被钉住。超限条件为 rawChars > budget * COMBINED_PASS_TOLERANCE_FACTOR + TRUNCATION_FALLBACK_ENVELOPE_SLACK(默认阈值下为 60,500),而该测试恰好注入 60,000 字符——比边界低 500。已在该提交探针验证:从条件中删除 slack 项、或把 > 翻转为 >=,全部 19 个 core + 12 个 CLI retention 测试仍为绿。故障场景:删除 slack 项的重构会使合规滞留结果被计入超限——/doctor memory 误报超限计数并给出 /compress 提示——而声称覆盖该边界的测试套件却依然为绿。上方 suggestion 把 fixture 移到真实边界(60,500):严格 > 不计、>= 或去掉 slack 都会计,从而获得判别力。

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

Comment on lines +11 to +13
back to the configured global truncation threshold), skip results already
carrying a truncation marker (prefix, in-body marker, or `<persisted-output>`
stub), and apply the scheduler's combined-pass 2x tolerance plus a small

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] R8-2: This sentence claims oversized counting skips results carrying an "in-body marker", but analyzeToolResultRetention only checks startsWith(TOOL_OUTPUT_TRUNCATED_PREFIX) and startsWith('<persisted-output>') — no in-body ... [CONTENT TRUNCATED] ... check exists and no test covers one; design note §5 in this same PR lists only the prefix and stub forms. Ledger R6-10's "doc aligned with code (Option B)" fix aligned §5 but missed this sentence. — Failure scenario: behaviorally inert today (the only marker-only path is size-bounded below the flag bound), but the documented guarantee is enforced by neither code nor test — a future marker-only path above the flag bound would false-positive the regression alarm uncaught, and a debugger relying on this doc assumes a skip that does not exist. Suggested fix: align this sentence with §5 and the code ("prefix or <persisted-output> stub"), or extend alreadyTruncated with the in-body-marker check and add a unit test.

中文说明

[Suggestion / 建议] R8-2:该句声称超限计数会跳过"携带正文内标记"的结果,但 analyzeToolResultRetention 只检查 startsWith(TOOL_OUTPUT_TRUNCATED_PREFIX)startsWith('<persisted-output>')——没有正文内 ... [CONTENT TRUNCATED] ... 检查,也没有测试覆盖;同一 PR 的设计说明 §5 也只列出前缀与 stub 两种形式。清单 R6-10 的"文档与代码对齐(方案 B)"修复对齐了 §5,却漏掉了这一句。故障场景:当前行为上无影响(唯一仅带正文标记的路径尺寸受限于标记阈值之下),但该文档承诺既无代码也无测试保障——未来若出现高于标记阈值的"仅正文标记"路径,回归警报将不被发现地误报;依赖本文档的排查者会假设存在一个实际不存在的跳过逻辑。建议:将该句与 §5 及代码对齐("前缀或 <persisted-output> stub"),或为 alreadyTruncated 增加正文标记检查并补充单测。

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

* The retained original can sit up to ~prefix-length above the budget before
* the fallback kicks in, so the diagnostics comparison must tolerate that band.
*/
export const TRUNCATION_FALLBACK_ENVELOPE_SLACK = 500;

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] R8-3: TRUNCATION_FALLBACK_ENVELOPE_SLACK = 500 undersizes the token-aware fallback band on deep paths. truncateAndSaveToFile's wrapper is ~360 fixed chars plus the spill-file path and tool name; probe-measured at this commit, the false-positive window opens (4-78 chars wide) once tempdir+tool-name length exceeds ~128 — CI-style runtime dirs and long MCP tool names such as mcp__playwright__browser_take_screenshot. — Failure scenario: a combined-pass result landing in (2xbudget + 500, 2xbudget + wrapper-overhead] triggers the token-aware fallback and is retained sentinel-less; analyzeToolResultRetention then flags it — /doctor memory reports a truncation bypass that never happened, precisely in the deep-path environments where retention pressure is most often diagnosed. Note: a bare constant raise breaks the small-budget "supports a custom threshold" test (511-char fixture at threshold 5), so the fix needs envelope-relative sizing. Suggested fix: export the wrapper's fixed overhead from truncation.ts and derive the slack from it so the two cannot drift.

中文说明

[Suggestion / 建议] R8-3:TRUNCATION_FALLBACK_ENVELOPE_SLACK = 500 在深路径下小于 token 感知兜底带的真实宽度。truncateAndSaveToFile 的包裹文本约 360 个固定字符,另加落盘文件路径与工具名;已在该提交探针实测:当 tempdir+工具名长度超过约 128 时(CI 风格的运行时目录、mcp__playwright__browser_take_screenshot 之类的长 MCP 工具名),误报窗口打开(宽 4-78 字符)。故障场景:合并通道中长度落在 (2倍预算 + 500, 2倍预算 + 包裹开销] 的结果会触发 token 感知兜底、以无哨兵形式滞留,analyzeToolResultRetention 随后将其标记——/doctor memory 报告一个从未发生的"截断绕过",而恰恰是深路径环境最常诊断滞留压力。注意:直接调大常量会破坏小预算的 "supports a custom threshold" 测试(阈值 5 时的 511 字符 fixture),修复需按包裹开销相对定值。建议:从 truncation.ts 导出包裹文本的固定开销并由其推导 slack,使两者不再失同步。

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

Comment on lines +70 to +73
appended only after the raw body is bounded, then the assembled string is
re-checked against a doubled budget — unless the body already carries the
truncation sentinel (re-entrancy skip), in which case only the batch budget
bounds it.

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] R8-4: The §2 "Metadata integrity" / "Re-entrancy guard" bullets claim the doubled-budget re-check skips any body carrying "the truncation sentinel" — defined just above as all three forms (prefix, in-body marker, <persisted-output> stub) — but the combined second pass skips only startsWith(TOOL_OUTPUT_TRUNCATED_PREFIX) (coreToolScheduler.ts:5152-5156, unchanged by this diff). <persisted-output> stubs and marker-only bodies are still re-checked. — Failure scenario: a >28k result persisted to a stub, then a PostToolUse hook appending ~48k+ chars of metadata (postHookResult.additionalContext is unbounded user output), pushes the assembled string past 2x the global budget — the combined pass re-truncates the stub body, nesting a truncation envelope around the persisted stub and spilling a second file, contradicting the "truncation headers never nest" invariant this section states. No data loss (the pointer survives in the spilled content) and the trigger needs unusually large hook metadata — but this is the acceptance-criterion artifact misdescribing a guard it exists to document. Suggested fix: reword the bullets to match the code (only TOOL_OUTPUT_TRUNCATED_PREFIX-leading bodies are skipped), or, if the invariant is intended, extend the combined-pass skip to isAlreadyTruncated(content).

中文说明

[Suggestion / 建议] R8-4:§2 的 "Metadata integrity" / "Re-entrancy guard" 条目声称"加倍预算复检会跳过任何携带截断哨兵的正文"——而上文将哨兵定义为全部三种形式(前缀、正文内标记、<persisted-output> stub)——但合并第二通道只跳过 startsWith(TOOL_OUTPUT_TRUNCATED_PREFIX)coreToolScheduler.ts:5152-5156,本 diff 未改动)。<persisted-output> stub 与仅带正文标记的正文仍会被复检。故障场景:超过 28k 的结果被落盘为 stub 后,PostToolUse 钩子追加约 48k+ 字符的元数据(postHookResult.additionalContext 是不受限的用户输出),把拼装字符串推过 2 倍全局预算——合并通道会再次截断该 stub 正文,在已落盘 stub 外再套一层截断信封并落盘第二个文件,与本节所述"截断头部永不嵌套"的不变量矛盾。无数据丢失(指针仍存在于落盘内容中),触发需要异常大的钩子元数据——但这是验收标准文档在错误描述它本应记录的守卫。建议:按代码改写该条目(只跳过以 TOOL_OUTPUT_TRUNCATED_PREFIX 开头的正文);若该不变量确为预期,则把合并通道的跳过扩展为 isAlreadyTruncated(content)

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

Comment on lines +536 to +539
if (
Number.isFinite(budget) &&
tool.resultDisplay.length > budget * COMBINED_PASS_TOLERANCE_FACTOR
) {

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] R8-5: This UI-history counter diverges from the API-history calibration its comment claims ("match[es] the API-history calibration") in two ways: it compares against budget * COMBINED_PASS_TOLERANCE_FACTOR with no TRUNCATION_FALLBACK_ENVELOPE_SLACK (+500), and it has no analogue of the API counter's alreadyTruncated sentinel skip — it compares PRE-truncation display text (truncation only touches model content; displays are merely capped at MAX_RETAINED_TOOL_RESULT_DISPLAY_CHARS = 32,000). Probe-verified at this commit: truncateToolOutputThreshold: 8000 + a budget-less tool + a 16,300-char result prints Oversized results (above tool budget): 0 directly above Oversized also rendered in UI history: 1 item(s); adding the slack flipped the slack-band arm, but the sentinel-bearing variant still shows 0/1 — so the slack alone does not close it. — Failure scenario: (a) a budget-less result in (2B, 2B+500] reaching UI history is counted by this loop but not the API count — a self-contradicting diagnostic; (b) a correctly sentinel-truncated result (API side skips it) is counted here because its pre-truncation display exceeds 2B — flagging a result the pipeline bounded correctly. The only realistic window is budget-less tools with threshold < 16k (every budgeted built-in has 2xbudget > the 32k display cap); the existing 65k-display fixture is unreachable in a live session and no test exercises the reachable window. Suggested fix: derive the UI signal from the API-side analysis so both counters measure the same artifact, or add the slack + a sentinel-aware skip, relabel the line, and correct the calibration comment; add a low-threshold test.

中文说明

[Suggestion / 建议] R8-5:该 UI 历史计数器与其注释声称的"与 API 历史口径一致"存在两处偏离:比较时使用 budget * COMBINED_PASS_TOLERANCE_FACTOR 而没有 TRUNCATION_FALLBACK_ENVELOPE_SLACK(+500),也没有 API 计数器 alreadyTruncated 哨兵跳过的对应物——它比较的是截断前的显示文本(截断只作用于模型内容;显示仅受 MAX_RETAINED_TOOL_RESULT_DISPLAY_CHARS = 32,000 上限约束)。已在该提交探针验证:truncateToolOutputThreshold: 8000 + 无预算工具 + 16,300 字符结果会先打印 Oversized results (above tool budget): 0,紧跟着打印 Oversized also rendered in UI history: 1 item(s);补上 slack 后 slack 区间一支翻转,但带哨兵的一支仍显示 0/1——说明仅补 slack 不够。故障场景:(a) 无预算工具落在 (2B, 2B+500] 的结果进入 UI 历史时被该循环计数、API 计数却不计——自相矛盾的诊断;(b) 已被哨兵正确截断的结果(API 侧跳过)在此因其截断前显示超过 2B 而被计数——把流水线已正确收口的结果标为超限。唯一现实窗口是阈值 < 16k 的无预算工具(所有带预算的内置工具 2倍预算 都大于 32k 显示上限);现有 65k 显示 fixture 在真实会话中不可达,也没有测试覆盖可达窗口。建议:让 UI 信号直接复用 API 侧分析结果,使两个计数测量同一对象;或补上 slack + 哨兵感知跳过、改写报告行标签并更正"口径一致"注释;补充低阈值测试。

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

Comment on lines +125 to +128
const alreadyTruncated =
typeof output === 'string' &&
(output.startsWith(TOOL_OUTPUT_TRUNCATED_PREFIX) ||
output.startsWith('<persisted-output>'));

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] R8-7: The sentinel skip list misses buildStub's degraded (non-file) variant — it starts with "Output too large (N KB). (reason)" and carries neither sentinel prefix. persistAndTruncateToolResult returns it when disk persistence is skipped (a single result over 50MB, the 500MB session disk budget exhausted, an invalid callId, or disk persistence unavailable). The ~2090-char bounded stub lands in response.output/response.error via the error-gate, timeout, and batch-finalizer routes with no subsequent truncation pass; for a budget-less tool the budget here is the configured global threshold (the settings schema has no minimum; only ≤ 0 disables). Probe-verified: the stub is flagged oversized for threshold ≤ 794 (bound 2T+500 < 2090); the implied startsWith('Output too large') fix flipped the probe to 0. — Failure scenario: truncateToolOutputThreshold ≤ 794 plus any persistence-skip branch → /doctor memory reports a false oversized result and the /compress hint for a session the pipeline bounded correctly. Suggested fix: export the degraded-stub header from truncation.ts (e.g. OUTPUT_STUB_PREFIX = 'Output too large') and add it to this disjunction — ideally shared with isAlreadyTruncated so all sentinel checks agree.

中文说明

[Suggestion / 建议] R8-7:哨兵跳过列表漏掉了 buildStub 的降级(未落盘)变体——它以 "Output too large (N KB). (reason)" 开头,不携带任何一种哨兵前缀。persistAndTruncateToolResult 在跳过磁盘落盘时返回该形态(单个结果超过 50MB、500MB 会话磁盘预算耗尽、callId 无效或磁盘落盘不可用)。这个约 2090 字符、已受界的 stub 会经错误门限、超时与批量收尾三条路径进入 response.output/response.error,且后续不再有任何截断通道;对无预算工具,此处的预算即配置的全局阈值(设置 schema 无下限,仅 ≤ 0 表示禁用)。已探针验证:阈值 ≤ 794 时该 stub 被标记超限(界 2T+500 < 2090);按隐含修复补上 startsWith('Output too large') 后探针翻转为 0。故障场景:truncateToolOutputThreshold ≤ 794 + 任一跳过落盘分支 → /doctor memory 对一个流水线已正确收口的会话误报超限并给出 /compress 提示。建议:从 truncation.ts 导出降级 stub 头部常量(如 OUTPUT_STUB_PREFIX = 'Output too large')并加入该判断——最好与 isAlreadyTruncated 共用,使所有哨兵检查口径一致。

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

` Tool results in history: ${stats.toolResultCount}`,
` Total retained: ${stats.totalChars} chars`,
` Largest result: ${stats.largestResultChars} chars`,
` Oversized results (above tool budget): ${stats.oversizedResultCount}`,

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] R8-8: This label says "above tool budget", but the counter only measures results above 2x budget + 500 slack (budget * COMBINED_PASS_TOLERANCE_FACTOR + TRUNCATION_FALLBACK_ENVELOPE_SLACK) — understating the counted band by up to a factor of two. The core analyzer JSDoc is honest ("measured above 2x budget"); this user-facing label drops the tolerance. Probe-verified: a 45,000-char result — 50% above its 30k tool budget, inside the combined-pass tolerance this PR's own constants document as legitimate — is not counted. — Failure scenario: a user investigating context bloat sees Oversized results (above tool budget): 0 next to a large Total retained: N chars and concludes nothing exceeds its tool's declared budget, when results up to 2x budget are legitimately retained — the diagnostic this PR exists to provide misdirects the investigation.

Suggested change
` Oversized results (above tool budget): ${stats.oversizedResultCount}`,
` Oversized results (above 2x tool budget): ${stats.oversizedResultCount}`,
中文说明

[Suggestion / 建议] R8-8:该行标签写的是"超过工具预算",但计数器实际只测量超过 2 倍预算 + 500 slackbudget * COMBINED_PASS_TOLERANCE_FACTOR + TRUNCATION_FALLBACK_ENVELOPE_SLACK)的结果——计数区间被低估了最多一倍。core 分析器的 JSDoc 是如实的("按超过 2 倍预算测量"),这条面向用户的标签却丢掉了容差。已探针验证:一个 45,000 字符的结果——超出其 30k 工具预算 50%,落在本 PR 自己的常量文档明确承认为合规的合并通道容差内——不会被计数。故障场景:排查上下文膨胀的用户看到 Oversized results (above tool budget): 0 与很大的 Total retained: N chars 并列,会得出"没有任何结果超过工具预算"的结论,而实际上 2 倍预算内的结果都是合规滞留的——本 PR 赖以存在的诊断把排查引向了错误方向。

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

Comment on lines +86 to +90
const oversized = 'z'.repeat(
OVERSIZED_TOOL_RESULT_THRESHOLD_CHARS * 2 +
TRUNCATION_FALLBACK_ENVELOPE_SLACK +
1,
);

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] R8-10: No test pins that the oversized comparison measures RAW string length (rawChars) rather than the estimatePartChars output (chars, +64 wrapper floor). The implementation deliberately compares rawChars (the adjacent comment says so), but chars is computed two lines above for totals/largest, making rawChars >chars > a plausible simplifying refactor. Mutation-verified at this commit: substituting chars > keeps all 19 core + 49 CLI doctorCommand tests green. — Failure scenario: that refactor false-flags every correctly-tolerated result whose raw length lands in (2xbudget+436, 2xbudget+500] — e.g. a 60,480-char result (bound 60,500) estimates at 60,544 → /doctor memory reports Oversized results: 1 plus the /compress hint for a correctly bounded session — and the regression ships test-green. Suggested fix: add a discriminating fixture in the (bound−64, bound] band, e.g. 'z'.repeat(OVERSIZED_TOOL_RESULT_THRESHOLD_CHARS * 2 + TRUNCATION_FALLBACK_ENVELOPE_SLACK - 32) (raw 60,468 ≤ 60,500; estimate 60,532 > 60,500) asserting oversizedResultCount is 0 — verified to fail under the mutation and pass under the implementation.

中文说明

[Suggestion / 建议] R8-10:没有任何测试钉住"超限比较测量的是原始字符串长度(rawChars)而非 estimatePartChars 输出(chars,含 64 字符外壳下限)"。实现刻意比较 rawChars(相邻注释亦如此说明),但 chars 就在上方两行为总量/最大值而计算,rawChars >chars > 是一个看似合理的简化重构。已在该提交做变异验证:替换为 chars > 后,全部 19 个 core + 49 个 CLI doctorCommand 测试仍为绿。故障场景:该重构会把原始长度落在 (2倍预算+436, 2倍预算+500] 的合规结果全部误标——例如 60,480 字符的结果(界 60,500)估值为 60,544 → /doctor memory 对已正确收口的会话报告 Oversized results: 1 并给出 /compress 提示——回归在测试全绿中上线。建议:在 (界−64, 界] 区间补一个有判别力的 fixture,如 'z'.repeat(OVERSIZED_TOOL_RESULT_THRESHOLD_CHARS * 2 + TRUNCATION_FALLBACK_ENVELOPE_SLACK - 32)(原始 60,468 ≤ 60,500;估值 60,532 > 60,500),断言 oversizedResultCount 为 0——已验证该 fixture 在变异下失败、在原实现下通过。

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


| Non-goal | Enforcement |
| ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Do not upload tool results | Offload target is a local file under the session temp dir only; no network path exists in the truncation code |

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] R8-11: The offload target is not a session-scoped temp dir — every offload path writes to the per-PROJECT temp dir ~/.qwen/tmp/<project-hash> (getToolResultsDir() = getProjectTempDir()/tool-results; truncateAndSaveToFile spills to getProjectTempDir()), shared across all sessions of a project and swept on a 24h cadence, not at session end. The same "session temp" wording survives at line 26 (§2 mermaid: "Full payload persisted to session temp file") and lines 59-60 (§2 bullet: "persisted to a session / temp file"), contradicting §2's own correct <project-hash> path and the stub's "may be cleaned up after 24 hours" note. All three locations were named by round-6 thread R6-13, whose fix replaced the <session-hash> placeholder but not this wording (verified present at this commit). — Failure scenario: §4 is the issue's acceptance-criteria privacy artifact; an auditor of where offloaded tool output lands — output the code itself warns can contain secrets — concludes the files are session-scoped and die with the session, when they persist cross-session-readable until the 24h sweep. Substantive guarantees (local-only, 0o600, no network path) hold — this is a wording fix, not a behavior hole. Suggested fix: replace "session temp dir/file" with "project temp dir (~/.qwen/tmp/<project-hash>)" in all three locations, noting files persist across sessions until the 24h cleanup sweep.

中文说明

[Suggestion / 建议] R8-11:落盘目标并不是"会话级临时目录"——所有落盘路径写入的是按项目划分的临时目录 ~/.qwen/tmp/<project-hash>getToolResultsDir() = getProjectTempDir()/tool-resultstruncateAndSaveToFile 落盘到 getProjectTempDir()),同一项目的所有会话共享,按 24 小时周期清理,而非会话结束时清理。同样的"session temp"措辞还残留于第 26 行(§2 mermaid:"Full payload persisted to session temp file")与第 59-60 行(§2 条目:"persisted to a session / temp file"),与 §2 自己给出的正确 <project-hash> 路径及 stub 中"可能在 24 小时后被清理"的提示相矛盾。三处位置在第六轮 R6-13 线程中均被点名,该轮修复只替换了 <session-hash> 占位符,未改这些措辞(已在本提交核实仍存在)。故障场景:§4 是该 issue 验收标准中的隐私文档;审计落盘输出位置的人——代码自己都警告这些输出可能含敏感信息——会以为文件随会话生灭,而实际上它们跨会话可读、直到 24 小时清理。实质保障(仅本地、0o600、无网络路径)依然成立——这是措辞修复而非行为漏洞。建议:三处均改为"project temp dir(~/.qwen/tmp/<project-hash>)",并注明文件跨会话保留、直至 24 小时清理。

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

Comment on lines +114 to +115
Unreachable in normal operation (per-tool/global layers bound every result at
or below its declared budget). Covered deterministically by unit tests:

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] R8-12: The parenthetical "(per-tool/global layers bound every result at or below its declared budget)" is false — the scheduler's combined pass explicitly permits up to 2x budget (+ envelope slack) after metadata is appended: this PR's own COMBINED_PASS_TOLERANCE_FACTOR JSDoc says "compliant retained content can legitimately measure up to twice its tool's budget", and the companion design note §3 lists the combined pass as "2x of the applicable budget". The oversized yes-branch is unreachable because the ALARM bound mirrors that 2x+slack tolerance, not because results never exceed their budget. — Failure scenario: an engineer extending this plan (e.g. the phase-2 UI scan it defers to) or writing regression assertions from it takes "bound at or below its declared budget" as the pipeline invariant, treats a legitimately retained ~45-60k shell result (inside the 2x tolerance) as a truncation-layer violation, and files a false regression or asserts retention <= budget in a test that fails on compliant behavior. Suggested fix: reword to "Unreachable in normal operation (layers bound every result at or below 2x budget + envelope slack — the combined-pass tolerance the alarm is calibrated to)".

中文说明

[Suggestion / 建议] R8-12:括号内的"(每工具/全局层把每个结果收口在其声明预算之内或之下)"不成立——调度器的合并通道明确允许在元数据追加后达到 2 倍预算(+信封余量):本 PR 自己的 COMBINED_PASS_TOLERANCE_FACTOR JSDoc 写着"合规滞留内容可以合法地达到其工具预算的两倍",配套设计说明 §3 也把合并通道列为"适用预算的 2 倍"。超限"是"分支不可达,是因为警报阈值镜像了该 2 倍+余量容差,而不是因为结果从不超过预算。故障场景:扩展本方案(如其延后的 phase-2 UI 扫描)或据其编写回归断言的工程师会把"收口在声明预算之内"当作流水线不变量,把合规滞留的约 45-60k shell 结果(位于 2 倍容差内)当作截断层违规,提交虚假回归报告,或在测试中断言 retention <= budget 导致合规行为使测试失败。建议改写为:"正常操作不可达(各层把每个结果收口在 2 倍预算 + 信封余量之内——即警报所校准的合并通道容差)"。

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

@wenshao

wenshao commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Maintainer verification — real local build & live session

I built this PR locally and exercised it against a real model session (not mocks) to check the claims in the description before merge.

Verdict: the feature works as specified — recommend merge. All four reviewer scenarios reproduce, the reported numbers are exactly reconstructible from the live history, and the oversized branch does fire end-to-end when a truncation layer is actually bypassed. Two description-only corrections are needed (no code change), plus one signal that is worth a follow-up.

Environment
Head 0c0e4fc5c3 (feat/doctor-tool-result-retention)
Base 8c90697ace (PR base, built as an independent "before" arm)
Runtime bundled dist/cli.js from each arm, driven in tmux (200x50)
Model real gpt-5.6-sol over an OpenAI-compatible endpoint, API-key auth
Isolation dedicated QWEN_HOME + throwaway fixture project, YOLO approvals, no sandbox
Platform macOS 26.6, Node v24.18.1

Local gates: vitest tool-result-retention.test.ts 19/19 pass, vitest doctorCommand.test.ts 49/49 pass, npm run lint clean, npm run typecheck clean. PR CI is green (0 failing checks).


1. Before / after (base vs head, same command, same fixture)

Base ends at recommendation; head appends the new section.

Base 8c90697ace Head 0c0e4fc5c3, fresh session

Scenario 1 reproduces exactly as described: all zeros, Oversized also in UI history ...: 0 item(s), Oversized also in compression input: no.

2. Reported numbers are exactly reconstructible ✅

This was the part I most wanted to falsify, so I compared the report against the raw session JSONL rather than trusting the display.

Scenario 2 — model runs yes demo | head -c 150000 (150,000 bytes), output spilled to disk by the existing gate:

Tool result retention
  Tool results in history: 1
  Total retained: 4576 chars
  Largest result: 4576 chars
  Oversized results (above tool budget): 0

Ground truth from the session record: the single retained functionResponse.output is 4,512 chars and begins with Tool output was too large and has been truncated. 4512 + 64 (the estimatePartChars wrapper floor for functionResponse parts) = 4,576 — an exact match, not an approximation.

Cross-checked again on an MCP session (two results: tool_search 252 chars + mcp__bigout__emit_big 2,410 chars): reported totalChars: 2790 = 252 + 2410 + 2×64, reported largestResultChars: 2474 = 2410 + 64. Exact.

Scenario 4--json carries all seven fields, and the same values as the readable report:

Also verified: /doctor memory --sample renders the section once (not duplicated by the second insertion point), and headless qwen -p "/doctor memory --json" emits toolResultRetention correctly.

3. No false positives on compliant high-budget tools ✅

I wrote a stdio MCP server returning a 120,000-char payload — large, but well inside MCP's declared 500k budget. The offload layer stubbed it to a <persisted-output> preview, the diagnostic recognized the sentinel, and Oversized results stayed 0. The per-tool budget resolution behaves as the code comments claim.

4. The oversized branch really fires ✅ (fault injection)

The description says the "yes" branch is unreachable in normal operation. I confirmed that claim is stronger than stated — and then forced the branch open to prove the alarm has teeth.

Bounding is at least three layers deep, plus tool-internal caps. Patching the built bundle to neuter truncateToolOutput and persistAndTruncateToolResult still did not produce an oversized result:

Injected bypass Tool Retained Bounded by
both layers off run_shell_command (seq 1 20000) 60,384 shell's own maxBufferedOutputBytes (~64 KB)
both layers off grep (3,000 matches) 14,419 grep's internal result cap
both layers off MCP, 1.1 M chars 200,064 toolOutputBatchBudget (200,000)

Only after lifting the batch budget as well did a genuinely unbounded result reach history — and the diagnostic caught it immediately, with all three signal lines:

Tool result retention
  Tool results in history: 2
  Total retained: 1100381 chars
  Largest result: 1100064 chars
  Oversized results (above tool budget): 1
  Oversized also rendered in UI history: 0 item(s)
  Oversized also in compression input: yes (shared by reference, no extra copy)
  Hint: oversized tool results stay in context and tax every later turn; /compress can reclaim space.

1,100,064 > 500,000 × 2 + 500 = 1,000,500 — the boundary arithmetic is exactly as documented.

(The fault injection patched the built bundle only; the PR's source is untouched by it.)


Findings

⚠️ A. Reviewer Test Plan step 3 does not reproduce as written — please fix the description

The PR body tells reviewers to set tools.truncateToolOutputThreshold: 100000, run seq 1 20000, and "Expect Oversized results (above tool budget): >= 1, Oversized also in compression input: yes ... plus the /compress hint line."

Ran exactly that, twice, deterministically — Oversized results: 0, compression input no, no hint line:

The reason is structural: ShellTool declares its own maxOutputChars = 30_000, so the scheduler never applies the global threshold to shell output — raising truncateToolOutputThreshold changes nothing for that path. oversizedThresholdChars does correctly reflect the raised value (100000), which is the only observable effect.

The shipped e2e note (.qwen/e2e-tests/..., scenario 3) already records this correctly as Oversized results: 0, so the code and the shipped doc are right and only the PR description is wrong. Reviewers following the PR body will report a false failure. Suggest replacing step 3's expectation with the actual behaviour (0, as a demonstration that the mitigation holds), and pointing at the unit tests for the "yes" branch.

⚠️ B. Oversized also rendered in UI history is structurally always 0 under default config

This is the one that I think deserves a follow-up. Interactive UI history hard-caps every string resultDisplay at MAX_RETAINED_TOOL_RESULT_DISPLAY_CHARS = 32_000 (toolResultDisplayCompaction.ts), while the new signal only counts a display above budget × 2:

Tool Budget Signal threshold Reachable under 32k cap?
grep / ripgrep 20,000 40,000 no
run_shell_command 30,000 60,000 no
agent 32,000 64,000 no
web_search / MCP 102k / 500k ≥204,000 no
tools declaring none 25,000 (global default) 50,000 no

The smallest reachable threshold is 40,000 > 32,000, so the counter cannot leave 0 unless a user sets tools.truncateToolOutputThreshold below 16,000.

Measured directly in the oversized session above: the same 1.1 M-char result was retained in UI history — at exactly 32,000 chars — while the report printed Oversized also rendered in UI history: 0 item(s). So the answer given to the linked issue's "is it also duplicated in the UI history?" criterion is a permanent "no" in a case where the honest answer is "yes, 32,000 chars are duplicated".

Not a crash and not a false positive, so I don't consider it merge-blocking, but as written the signal cannot do the job the issue asked of it. Cheapest fixes: compare against MAX_RETAINED_TOOL_RESULT_DISPLAY_CHARS instead of budget × 2, or just report the retained display chars (UI history retains N chars of tool displays) — a number that is always meaningful.

ℹ️ C. Test counts in the Chinese section of the description are stale

The 中文说明 block says "core 侧 9 个用例、CLI 侧 doctorCommand 42 个用例". Actual, verified locally: 19 and 49. The English section already has the right numbers.

ℹ️ D. Notes

  • .qwen/e2e-tests/ already exists on main, so shipping the e2e note there is consistent with repo convention.
  • The section only ever emits sizes and counts — I saw no content leakage in any of the runs, including the 1.1 M-char one. Safe to paste publicly, as claimed.

Recommendation

Merge after fixing the PR description (A and C) — no code change required for that. Item B is a real limitation of one of the three required signals; happy to see it handled either in this PR or as a tracked follow-up on #4184, at the maintainers' preference.

中文版本(点击展开)

维护者验证 —— 本地真实构建 + 真实模型会话

我在本地构建了这个 PR,并用真实模型会话(非 mock)跑通验证,以便在合并前核对描述中的各项声明。

结论:功能符合描述,建议合并。 四个评审场景全部复现,报告中的数字可以从活动历史中精确反推,超限分支在截断层真被绕过时确实会触发。需要修正的是两处纯描述问题(不涉及代码),外加一个建议后续处理的信号。

环境

Head 0c0e4fc5c3feat/doctor-tool-result-retention
Base 8c90697ace(PR base,独立构建作为"改动前"对照臂)
运行方式 各臂打包出的 dist/cli.js,在 tmux(200x50)中驱动
模型 真实 gpt-5.6-sol,OpenAI 兼容端点,API Key 认证
隔离 独立 QWEN_HOME + 一次性 fixture 工程,YOLO 审批,无沙箱
平台 macOS 26.6,Node v24.18.1

本地门禁:tool-result-retention.test.ts 19/19 通过doctorCommand.test.ts 49/49 通过npm run lint 干净,npm run typecheck 干净。PR 的 CI 全绿(0 失败)。

1. 改动前后对照

Base 的报告止于 recommendation;Head 追加了新段落。场景 1 完全复现:全 0、Oversized also in UI history ...: 0 item(s)Oversized also in compression input: no

2. 报告数字可精确反推 ✅

这是我最想证伪的部分,所以没有只看界面,而是拿会话 JSONL 原始记录对账。

场景 2(模型执行 yes demo | head -c 150000,150,000 字节,被现有截断门落盘)报告 Total retained: 4576 chars。原始记录中唯一滞留的 functionResponse.output4,512 字符,且以 Tool output was too large and has been truncated 开头。4512 + 64estimatePartCharsfunctionResponse 的包装下限)= 4,576,精确吻合,不是近似。

在 MCP 会话上再次对账(两条结果:tool_search 252 字符 + mcp__bigout__emit_big 2,410 字符):报告 totalChars: 2790 = 252 + 2410 + 2×64largestResultChars: 2474 = 2410 + 64,同样精确。

场景 4(--json)七个字段齐全,数值与可读报告一致。另外验证:/doctor memory --sample 段落只出现一次(第二处插入点没有造成重复),headless qwen -p "/doctor memory --json" 也正确输出 toolResultRetention

3. 高预算工具的合规结果没有误报 ✅

我写了一个 stdio MCP server 返回 120,000 字符载荷——很大,但远在 MCP 声明的 500k 预算内。offload 层把它变成 <persisted-output> 预览,诊断识别了该标记,Oversized results 保持 0。按工具解析预算的逻辑与代码注释一致。

4. 超限分支确实会触发 ✅(故障注入)

描述称"yes"分支在正常运行下不可达。我确认这个结论比描述的还要更强——然后强行打开该分支,证明这个告警不是摆设。

限界至少有三层,另加工具自身的上限。把打包产物中的 truncateToolOutput persistAndTruncateToolResult 双双废掉后,仍然没有产生超限结果:

注入的绕过 工具 滞留字符 实际限界者
两层都关 run_shell_commandseq 1 20000 60,384 shell 自身的 maxBufferedOutputBytes(约 64 KB)
两层都关 grep(3,000 条匹配) 14,419 grep 内部结果上限
两层都关 MCP,110 万字符 200,064 toolOutputBatchBudget(200,000)

只有把批量预算也抬高之后,真正无界的结果才进入历史——诊断立刻捕获,三条信号线齐发:Oversized results: 1compression input: yes (shared by reference, no extra copy)、以及 /compress 提示行。1,100,064 > 500,000 × 2 + 500 = 1,000,500,边界算术与文档完全一致。

(故障注入只改了打包产物,PR 源码未被触碰。)

发现

⚠️ A. 评审验证方案第 3 步按原文无法复现 —— 请修正描述

PR 正文让评审者设置 tools.truncateToolOutputThreshold: 100000、执行 seq 1 20000,并"预期 Oversized results >= 1compression input: yes、出现 /compress 提示行"。

我严格照做,跑了两遍,结果稳定:Oversized results: 0、compression input no、无提示行

原因是结构性的:ShellTool 自己声明了 maxOutputChars = 30_000,调度器对 shell 输出根本不会套用全局阈值——调高 truncateToolOutputThreshold 对这条路径毫无影响。唯一可观测的效果是 oversizedThresholdChars 正确变成了 100000

随 PR 交付的 e2e 记录(.qwen/e2e-tests/... 场景 3)已经正确记为 Oversized results: 0,所以代码和交付文档都是对的,错的只有 PR 描述。按 PR 正文操作的评审者会得到一个假的"验证失败"。建议把第 3 步的预期改成实际行为(0,用来证明缓解机制生效),"yes"分支指向单测。

⚠️ B. Oversized also rendered in UI history 在默认配置下结构性恒为 0

这一条我认为值得后续处理。交互式 UI 历史对每条字符串 resultDisplayMAX_RETAINED_TOOL_RESULT_DISPLAY_CHARS = 32_000 的硬上限(toolResultDisplayCompaction.ts),而新信号只统计超过 预算 × 2 的显示:

工具 预算 信号阈值 32k 上限下可达?
grep / ripgrep 20,000 40,000
run_shell_command 30,000 60,000
agent 32,000 64,000
web_search / MCP 102k / 500k ≥204,000
未声明预算的工具 25,000(全局默认) 50,000

最小可达阈值是 40,000 > 32,000,因此除非用户把 tools.truncateToolOutputThreshold 设到 16,000 以下,这个计数器不可能离开 0。

在上面的超限会话中我直接量过:那条 110 万字符的结果确实滞留在 UI 历史里——正好 32,000 字符——而报告打印的是 Oversized also rendered in UI history: 0 item(s)。也就是说,对关联 issue 中"是否也在 UI 历史中重复?"这条验收标准,给出的是一个恒定的"否",而诚实的答案是"是,重复了 32,000 字符"。

不崩溃、也没有误报,所以我不认为它阻塞合并;但按当前写法,这个信号无法完成 issue 交给它的任务。最省事的修法:改成与 MAX_RETAINED_TOOL_RESULT_DISPLAY_CHARS 比较,或者干脆直接报告 UI 历史中滞留的显示字符数(这个数字永远有意义)。

ℹ️ C. 描述中文段落的用例数字过期

中文说明 里写的是"core 侧 9 个用例、CLI 侧 doctorCommand 42 个用例",本地实测为 1949。英文段落的数字是对的。

ℹ️ D. 其他

  • .qwen/e2e-tests/main 上已存在,把 e2e 记录放这里符合仓库惯例。
  • 该段落只输出大小与计数,所有运行(包括 110 万字符那次)都没有看到内容泄漏,可以放心公开粘贴,与描述一致。

建议

修正 PR 描述(A 与 C)后合并 —— 这两项不需要改代码。B 是三个必需信号之一的真实局限,在本 PR 内处理或作为 #4184 的后续跟踪都可以,由维护者决定。

@wenshao
wenshao enabled auto-merge August 12, 2026 18:51
@wenshao

wenshao commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

@qwen-code /triage

@qwen-code-ci-bot

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

Copy link
Copy Markdown
Collaborator

Sandboxed verification: ❌ not passed — findings reported (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: 575 passed · 0 failed · 575 total

中文 — 判定:❌ 不通过 · 报告了发现(agent 判定)

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

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

Verification report

PR #8875 Deep Verification — /doctor memory tool-result retention diagnostics

Verdict: findings — scripted assertions 575 pass / 0 fail (see assertions.json).
Verified head: 0c0e4fc5c37a92905ad83a6f981911b9ee311db6 (git rev-parse HEAD^2), merged over base tip 33c330d0721796080d6d55513d3ec334fe9e3a7d.

The code's central claim is proven load-bearing by an A/B against a base build, and the calibration
matrix (29 hand-computed oracles) is fully green. The findings are about the PR's own Reviewer Test
Plan
(step 3 cannot produce the result it promises), one test that passes for the wrong reason,
and documentation residuals — not about the shipped behavior.

中文摘要

结论:findings(575 项脚本断言全部通过,0 失败)。

  • A/B 结论:head 构建的 /doctor memory 输出含完整 "Tool result retention" 段落且数字与手工推算完全一致(3 条结果 / 165342 chars / 最大 100114 / oversized 1 / UI 重复 1 / 压缩输入 yes),--json 各字段精确匹配;base 构建(33c330d0,独立 worktree 重新编译、runtime 解析纯度已验证)同一场景下段落与 JSON 键均缺失、基础报告完整——中心结论成立。调度器 *2 → COMBINED_PASS_TOLERANCE_FACTOR(=2) 重构两侧编译产物语义一致,356 项调度器测试全绿,行为保持。
  • findings
    1. Medium:Reviewer Test Plan 第 3 步不可达——把 tools.truncateToolOutputThreshold 调到 100000 再跑 seq 1 20000 并不能得到承诺的 Oversized results >= 1:shell 工具内部硬编码的 30k 截断门(shell.ts:2906,不受该设置影响)先把真实的 108,894 字符输出截成 4,430 字符的带哨兵预览(诊断会跳过带哨兵结果),实测 Oversized = 0;计划自己的注释也承认计数器只在截断层被绕过时才触发,而调高设置并不构成绕过。正向对照:真正绕过时(原始输出、无哨兵入史)计数器正确触发。
    2. Suggestion:CLI 测试 should resolve UI budgets by display name, not registry key 未被其夹具钉住——整体删除 displayName→预算映射后 49/49 仍全绿(28k 夹具同时低于 50k 回退边界与 60k 映射边界);改用 55k 夹具后该突变体被杀死,产品代码本身正确。
    3. Nit:E2E 文档开头仍写诊断跳过"三种标记"(prefix、in-body marker、persisted-output stub),与代码只查两个前缀标记不符——正是末次提交在 design doc §5 修掉却在本文档漏掉的同一处 R6-10 漂移。
    4. Nit:PR 描述"flags any result above a 30k-character threshold"不准确(生产回退阈值 = 配置的全局阈值,默认 25k;30k 仅是直接 API 调用的兜底常量);英文版 seq 1 20000 (~130k chars) 实测为 108,894(~109k),中文版写的是 seq 1 9000
  • 未覆盖:真机交互式 E2E(无模型凭据);仓库级全量测试/lint/typecheck(仅定向门禁);逐提交归因(depth-2 浅克隆仅 3 个提交可达,已验证聚合 diff);Windows/macOS 平台差异(纯字符串报告,无平台相关代码)。

1. Central claim and A/B

Central claim: /doctor memory (and --json) reports retained tool-result statistics with an
oversized counter calibrated to the truncation layers — per-tool budget × COMBINED_PASS_TOLERANCE_FACTOR
(2) + TRUNCATION_FALLBACK_ENVELOPE_SLACK (500), skipping sentinel-carrying results — with no false
positives on compliant history and correct flagging of genuine bypasses.

A/B harness harness/ab-cli-report.mjs drives the compiled doctorCommand memory subcommand
(non-interactive path) with an identical scripted scenario on both arms: 3 tool results
(100 chars; 65,000 chars un-sentineled; 100,050 chars sentinel-prefixed), one model text entry, and a
UI history with one 65k Shell display plus a 40k model-text item. Oracles are hand-computed from the
documented measurement model (raw chars + 64 wrapper floor per part; oversized iff rawChars > budget*2 + 500 with budget = resolver(name) ?? configured threshold).

Cell Environment Observable oracle Result
head report dist built at merge HEAD, scripted scenario retention section present; 3 / 165342 / 100114 / oversized 1; UI duplication 1 item(s); compression yes (shared by reference…); /compress hint 23/23 PASS
head --json same toolResultRetention keys exact, incl. oversizedThresholdChars: 25000, presentInCompressionInput: true included above
base report base worktree 33c330d0, rebuilt core+cli, same scenario base memory report produced (positive control, 696 chars) without any retention line 9/9 PASS
base --json same diagnostics present, toolResultRetention key absent included above
base export check base core dist analyzeToolResultRetention is undefined included above

Witnesses: 01-ab-head-retention-report.png, 02-ab-base-report-absent.png.

Control purity (the monorepo symlink trap): the base worktree got a mixed node_modules
(external deps → head entries, since the PR changes no lockfile; @qwen-code/* → base packages).
A probe module placed beside the base dist resolved @qwen-code/qwen-code-core to
tmp/base-tree/packages/core/dist/index.js (realpath asserted) — the base harness executed base code,
and that core has neither analyzeToolResultRetention nor COMBINED_PASS_TOLERANCE_FACTOR.

Secondary claim — scheduler refactor is behavior-preserving. coreToolScheduler.ts replaces the
combined-pass literal * 2 with * COMBINED_PASS_TOLERANCE_FACTOR. Base dist carries
content.length > baseThreshold * 2; head dist carries baseThreshold * COMBINED_PASS_TOLERANCE_FACTOR
with the constant asserted === 2 by the harness; the 356-test scheduler suite is green (see §4).

Secondary claim — no added memory pressure / compression sharing. getHistoryShallow() maps
copyContentContainer (shallow spread of content + parts array — geminiChat.ts:1228); the scan reads
output.length raw (no serialization), so payloads are never cloned. Compression input is assembled
from chat.getHistoryShallow(true) (chatCompressionService.ts:414/459) — same payload objects, so
presentInCompressionInput: yes (shared by reference, no extra copy) is accurate, and the derivation
is documented in a code comment with its revisit condition.

2. Corrections

None to prior review rounds. One correction to the PR description itself is recorded as Finding F4
(the "30k threshold" phrasing conflates the direct-API fallback constant with the production
fallback, which is the configured global threshold — 25k by default).

3. Findings

F1 — Medium: Reviewer Test Plan step 3 is structurally unreachable (and self-contradictory)

The plan says: set tools.truncateToolOutputThreshold to 100000, run seq 1 20000, expect
Oversized results (above tool budget): >= 1 plus the compression-input yes line and the
/compress hint. Reproduced against the real code (03-calibration-and-scenario3.png,
logs/calibration-head.log):

S0  real `seq 1 20000` output                       108,894 chars
S1  real shell in-tool gate (threshold: 30_000,     retained 4,430 chars,
    previewChars: 4000, keep both — shell.ts:2906)  sentinel-prefixed + full spill file
S2  diagnostic on that history entry                Oversized = 0   (plan promises >= 1)
S3  positive control: raw 108,894 chars sentinel-less in history → Oversized = 1
S4  same raw retention, tool without declared budget, threshold 100k → Oversized = 0

Why it cannot work:

  1. The shell tool truncates in-tool at a hardcoded 30k (shell.ts:2919) before any scheduler
    layer; tools.truncateToolOutputThreshold does not influence it. Every large shell output enters
    history sentinel-prefixed, and the diagnostic correctly skips sentinel-carrying results.
  2. Even if the layers were bypassed for shell, the shell budget resolves from the registry
    (ShellTool.maxOutputChars === 30_000) independently of the setting — so the plan's own math
    (2×30k + 500) applies, but only to outputs the gate never produced.
  3. For tools without a declared budget the raised threshold moves the boundary up (S4: a raw
    108.9k retention is masked at boundary 200.5k) — the setting change weakens the alarm for exactly
    the tools the fallback covers.

The plan's own note concedes "the counter fires only when a truncation layer is bypassed" — raising a
setting is not a bypass. The PR's E2E doc (scenario 3 there, expecting Oversized: 0) is correct;
the PR body step 3 (English: seq 1 20000, Chinese: seq 1 9000) is the artifact that needs fixing.
Suggested fix (text-only): rewrite step 3 to say the oversized branch is exercised deterministically
by the named unit tests because shipped mitigations make it unreachable in normal operation — which is
what S3 proves possible only via an actual bypass. The code itself needs no change (S2/S3 show the
shipped behavior is right).

F2 — Suggestion: the display-name UI-budget test passes for the wrong reason

Mutation M8 removed the entire displayNameBudgets lookup chain from doctorCommand.ts
(04-mutation-matrix.png, logs/mutant-M8-remove-displayname-map.log): 49/49 tests still pass.
The fixture of should resolve UI budgets by display name, not registry key is a 28,000-char Shell
display — below both the fallback boundary (2×25k = 50k) and the mapped boundary (2×30k = 60k), so it
is counted by neither arm. The test comment's arithmetic ("28k > 25k") ignores the * 2 tolerance of
the comparison it claims to test. The production code is correct: with a discriminating 55k fixture,
head stays green (map resolves Shell → 30k, 55k < 60k — logs/mutant-R1-head-55k.log) while M8 goes
red (falls back to 25k; 55k > 50k — logs/mutant-R2-m8-55k.log). The suite is green on both sides of
the fix axis, i.e. it pins nothing there; the 55k fixture is the one that would go red and should ship
with (or instead of) the 28k one.

F3 — Nit: E2E doc still describes a three-marker skip for the diagnostic

.qwen/e2e-tests/2026-08-10-doctor-memory-tool-result-retention.md (read from git show HEAD: — see
Methodology) says the oversized count skips results carrying "(prefix, in-body marker, or
<persisted-output> stub)". The diagnostic checks two prefix markers
(startsWith(TOOL_OUTPUT_TRUNCATED_PREFIX) || startsWith('<persisted-output>')); the in-body marker
belongs to the scheduler's separate isAlreadyTruncated check. This is the same R6-10 drift the final
commit (0c0e4fc5) corrected in design doc §5 — this instance was missed.

F4 — Nit: description numbers drift from the code

  • "flags any result above a 30k-character threshold": in production the fallback budget is the
    configured global truncation threshold (default 25,000, DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD);
    OVERSIZED_TOOL_RESULT_THRESHOLD_CHARS = 30_000 is only the direct-API default, and
    doctorCommand always passes the configured value. The A/B run shows
    oversizedThresholdChars: 25000 under defaults.
  • English step 3 says seq 1 20000 is "~130k chars"; measured 108,894. The Chinese section names a
    different command (seq 1 9000).

F5 — Completeness report (survivors classified; not merge conditions)

Mutation matrix on the new guards (positive control M0 landed one known mutant first — 2 sentinel
tests red — before any survivor was believed):

Mutant Guard removed/changed Suite result Classification
M0 sentinel skip (!alreadyTruncated) killed (2 red) pinned (positive control)
M1 Number.isFinite(budget) survived 19/19 dead coderawChars > Infinity*2+500 is always false; arithmetic already protects infinite budgets. Harmless defensive clause
M2 + 500 envelope slack survived 19/19 coverage gap — no suite fixture in the (2x, 2x+500] band; harness cells A2 (60,500 → not flagged) / A3 (60,501 → flagged) pin the behavior as correct
M3 error-key fallback (output ?? error) killed (1 red) pinned
M4 sentinel startsWith → includes survived 19/19 coverage gap — no mid-string-sentinel fixture; harness cell B3 (sentinel mid-string still flagged) pins the prefix-only semantics as correct
M5 oversizedThresholdChars Infinity→0 guard killed (1 red) pinned
M6 oversized never increments killed (4 red, expected-vs-actual) central assertion non-vacuous
M7 canonicalToolName (CLI) killed (1 red) pinned
M8 displayName→budget map (CLI) survived 49/49 unpinned test — see F2

The boundary/sentinel/budget behavior itself was verified correct by the 29-cell harness
(logs/calibration-head.log), so the survivors are reporting about test pinning, not defects.

4. Targeted gates (all on head)

Gate Result
packages/core retention + truncation + slimming suites 96/96 pass (19 + 40 + 37) — matches the PR's claimed 19 core tests
packages/cli doctorCommand.test.ts 49/49 pass — matches the PR's claimed 49
packages/core coreToolScheduler.test.ts (scheduler-refactor gate) 356/356 pass
eslint on all 7 changed files clean (exit 0); liveness proven — a planted unused-var probe was reported (1 error, exit 1), then removed
typecheck/build npm run build completed at HEAD before this round (CI contract); dist outputs verified present and executable

Witness: 05-gates-and-equivalence.png. Raw logs in logs/gate-*.log, logs/lint-changed-files.log.

5. Not covered

  • Real-session interactive E2E (plan steps 1–2 with a live model): no model credentials in this
    sandbox. The step-2 shape was reproduced at the wire level: real seq bytes through the real
    gate yield one retained result of a few thousand chars and Oversized: 0 (S1/S2), matching the
    author's reported observation (4,543 chars for their command variant). Interactive-path rendering
    is covered by the 49-test suite (which includes the interactive addItem case).
  • Per-commit attribution: the checkout is depth-2; git rev-list HEAD^1..HEAD^2 yields 1 commit
    while the metadata snapshot lists 9 — the shallow boundary makes intermediate commits unreachable.
    Verified the aggregate HEAD^1..HEAD diff only.
  • Repo-wide gates: only the affected suites above were run (per the targeted-gates rule); no
    repo-wide test, full lint, or independent typecheck pass.
  • Windows/macOS rendering: the report is platform-independent string output; nothing
    platform-specific exists in the changed code.
  • Design-doc §2 persistence-gate internals (maybePersistLargeToolResult) beyond constant
    spot-checks (gate headroom 3k, web-search 102k = 100k+2k, grep 20k, agent 32k, batch 200k — all
    match), and the mermaid diagram's layout.
  • Working-tree anomaly: .qwen/e2e-tests/2026-08-10-doctor-memory-tool-result-retention.md is
    deleted in the checkout's working tree while tracked at HEAD; the containing directory is
    root-owned and read-only here, so it could not be restored. Verified A/A-neutral: it is a markdown
    doc consumed by no build or test. Contents were read via git show HEAD:.

6. Methodology

Environment: CI verify container (node:22-bookworm), working tree at refs/pull/8875/merge
(depth 2); npm ci + npm run build pre-run at HEAD. Base arm: git worktree add tmp/base-tree HEAD^1, external deps symlinked from the (lockfile-unchanged) head node_modules, @&#8203;qwen-code/*
relinked to base packages, tsc --build per package (core clean; cli needed the repo's
generate-git-commit-info.js artifact, generated at the base commit). Runtime resolution purity
proven by a probe module beside each dist (realpath quoted in §1). Harnesses drive the compiled
dist/ directly — no mocks of code under test; oracles are hand-computed numbers and real-producer
bytes (seq 1 20000). Every assertion is scripted (harness/*.mjs, rerunnable); per-cell
stdout/stderr in logs/; mutant cycles applied via harness/apply-mutant.mjs +
harness/run-mutant.sh with git restore after each cycle and a clean-diff check. The two
harness-oracle fixes during the round (sentinel prefix length 48 not 49; barrel does not export
TOOL_OUTPUT_TRUNCATED_PREFIX, imported from the truncation dist module instead) were harness bugs,
not code behaviors — final logs reflect the corrected runs. Assertion accounting: A/B 23+9,
calibration 29, vitest gates 96+49+356, mutation predictions 11 (incl. R1/R2 reverse runs), lint 2
= 575; fail counts only unexpected outcomes (expected base-arm absence and predicted mutant
outcomes are encoded as passes).

Evidence images

01-ab-head-retention-report

02-ab-base-report-absent

03-calibration-and-scenario3

04-mutation-matrix

05-gates-and-equivalence

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

Qwen Code · sandboxed verification

@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.

LGTM, looks ready to ship. ✅

@wenshao
wenshao added this pull request to the merge queue Aug 12, 2026
Merged via the queue into main with commit 4a281f2 Aug 12, 2026
142 checks passed
@qwen-code-ci-bot

Copy link
Copy Markdown
Collaborator

Released in v0.21.11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autofix/takeover Summon the autofix loop to manage this PR (remove to release; needs triage+)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Diagnose and mitigate large tool-result retention in long sessions

5 participants