Skip to content

fix(core): re-land malformed stream retry with narrower nameless detection - #6794

Merged
ytahdn merged 28 commits into
mainfrom
fix/core-retry-malformed-streams-v2
Jul 14, 2026
Merged

fix(core): re-land malformed stream retry with narrower nameless detection#6794
ytahdn merged 28 commits into
mainfrom
fix/core-retry-malformed-streams-v2

Conversation

@yiliang114

@yiliang114 yiliang114 commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

What this PR does

Re-lands malformed streamed-response retry handling after #6783 reverted #6754, while keeping the fix bounded to observed or contract-valid stream shapes.

The final implementation:

  • ignores metadata-free phantom tool-call slots beside valid calls;
  • rejects real streamed tool calls that have an ID or arguments but never receive a function name;
  • accepts the legal arguments-first, name-later ordering;
  • rejects the recorded reasoning-first cross-channel thinking-tag leak while preserving literal inline tag references;
  • rejects a tool_calls finish with no completed named call;
  • preserves InvalidStreamError identity through the OpenAI pipeline and verifies the converter → pipeline → GeminiChat retry path.

This PR intentionally does not parse <think> tags from content-only responses. That behavior is related to #6666 but requires a separate model/provider policy decision, so this PR does not claim to resolve it.

It also does not attempt to recover arbitrary channel reordering, tag-name fragmentation across interleaved channels, or multiple tool-call IDs taking ownership of the same in-flight wire index. No observed trace or provider contract requires those sequences; supporting them previously added a second routing protocol and character-level scanners without improving the original fix.

Why it is needed

The original retry fix correctly rejected malformed streamed responses, but metadata-free phantom slots could suppress finish_reason on otherwise valid tool calls. That broke tool-call emission across the E2E suite.

This version preserves valid named calls and trailing phantom slots, while real nameless calls and the recorded protocol-tag leak still enter the existing invalid-stream retry path.

Reviewer Test Plan

How to verify

  1. A valid named call followed by an empty phantom slot emits exactly one function call and preserves STOP.
  2. A real nameless call is rejected whether its evidence is an ID or streamed arguments; a late name makes the call valid.
  3. The recorded reasoning-first cross-channel thinking-tag leak is rejected, while literal inline <think> / </think> references remain visible.
  4. A tool_calls finish with no completed named call is malformed instead of accepting fallback text.
  5. MALFORMED_TOOL_CALL travels through converter and pipeline into GeminiChat, uses the existing transient retry budget, and records the correct telemetry type.

Evidence on 6f4ffd5ff7

  • Current-head converter/parser suites: 222/222 passed.
  • Changed-file ESLint, core typecheck, core build, git diff --check, and pre-commit formatting/lint: passed.
  • The broader focused suites passed 447/447 on edb7bc23da; this follow-up did not change GeminiChat.
  • Mock + tmux on the preceding behavior-equivalent head edb7bc23da: the first response streamed content plus a real nameless tool call and ended with tool_calls; debug logged MALFORMED_TOOL_CALL (retry 1/4), the mock received exactly two requests, retry history contained neither the failed text nor call ID, no tool ran, and the TUI displayed only RECOVERED_ONLY_6794.
  • Known limitation: headless JSON aggregation still includes failed-attempt text before the recovered text because that output path does not consume RETRY as a rollback signal. This was observed before this scope reset and was not baseline-compared here, so it is not claimed as a regression fixed by this PR.

Tested on

OS Status
macOS Pass — focused automation and current-head mock/tmux
Linux GitHub Actions running on the current head
Windows N/A

Linked Issues

Related to #6666
Re-lands #6754 after #6783

中文说明

本 PR 重新落地 malformed stream 重试,并把范围收回到真实 trace 或协议允许的形状:忽略合法调用旁的 phantom slot;拒绝有 ID/arguments 但始终没有 name 的真实调用;接受 arguments-first、name-later;拒绝已记录的 reasoning-first 跨 channel 标签泄漏;确保错误类型穿过 pipeline 后进入 GeminiChat 重试。

本 PR 不处理纯 content<think> 标签的通用解析,也不再支持没有真实 producer 的 channel 逆序/交错拆标签,以及同一 in-flight index 被多个 ID 反复抢占的路由恢复。这些场景此前导致两个字符 scanner、额外路由表和组合测试膨胀,现已删除。

最新 head 6f4ffd5ff7 的 converter/parser 222/222、ESLint、core typecheck/build 均通过;此前 edb7bc23da 的 focused tests 447/447,mock + tmux 真实 nameless tool-call 场景发生一次 MALFORMED_TOOL_CALL 重试并只显示恢复结果。headless JSON 的失败文本聚合限制仍如实记录,但不在本 PR 范围内。

… drops

hasNamelessToolCall() flagged any buffer slot lacking a name, including
phantom slots (no id, no argument content) created by trailing
structural deltas. That tripped shouldDropMalformedAttempt on legitimate
tool-call responses, clearing parts and suppressing finish_reason to
undefined, which surfaced as 'Model stream ended without a finish reason'
and broke E2E suites depending on tool-call emission.

Only treat a nameless tool call as malformed when the provider actually
started a real call (assigned id or streamed argument content). Genuine
#6666 nameless attempts (id or args but no name) still drop and retry;
phantom slots are skipped by getCompletedToolCalls as before.
@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Summary

Package Lines Statements Functions Branches
CLI 81.21% 81.21% 86.99% 81.85%
Core 86.14% 86.14% 87.59% 85.42%
CLI Package - Full Text Report
-------------------|---------|----------|---------|---------|-------------------
File               | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
-------------------|---------|----------|---------|---------|-------------------
All files          |   81.21 |    81.85 |   86.99 |   81.21 |                   
 src               |   80.35 |    78.39 |   84.41 |   80.35 |                   
  cli.ts           |   94.31 |    82.35 |     100 |   94.31 | ...67-468,478-479 
  gemini.tsx       |   71.24 |    75.95 |      80 |   71.24 | ...1047-1051,1172 
  ...ractiveCli.ts |    77.4 |    75.54 |      75 |    77.4 | ...2054-2056,2093 
  ...liCommands.ts |   88.34 |    83.87 |      90 |   88.34 | ...63,480,514,635 
  ...ActiveAuth.ts |     100 |     87.5 |     100 |     100 | 66-80             
 ...cp-integration |   62.85 |    67.98 |   85.36 |   62.85 |                   
  acpAgent.ts      |    62.6 |    67.79 |   85.27 |    62.6 | ...8847-8849,8865 
  authMethods.ts   |      92 |       60 |     100 |      92 | 33-34             
  errorCodes.ts    |       0 |        0 |       0 |       0 | 1-22              
  ...ion-skills.ts |     100 |    88.23 |     100 |     100 | 17,32             
  ...DirContext.ts |     100 |      100 |     100 |     100 |                   
 ...ration/service |   97.04 |    95.71 |   93.33 |   97.04 |                   
  filesystem.ts    |   97.04 |    95.71 |   93.33 |   97.04 | ...21-122,238-239 
 ...ration/session |   88.62 |    81.47 |   92.93 |   88.62 |                   
  Session.ts       |   88.71 |    80.49 |   92.59 |   88.71 | ...6199,6226-6230 
  ...entTracker.ts |   91.53 |    89.47 |   88.88 |   91.53 | ...32,196,270-279 
  ...eplay-page.ts |   98.31 |    88.33 |     100 |   98.31 | 68,89,164         
  ...y-replayer.ts |   82.33 |    86.25 |   93.33 |   82.33 | ...24-425,448-449 
  index.ts         |       0 |        0 |       0 |       0 | 1-40              
  ...ssionUtils.ts |      85 |    84.84 |     100 |      85 | ...49-165,221-223 
  tasksSnapshot.ts |   94.21 |     87.5 |     100 |   94.21 | 65-71             
  types.ts         |     100 |      100 |     100 |     100 |                   
 ...ssion/emitters |   96.89 |    95.47 |   96.96 |   96.89 |                   
  ...ageEmitter.ts |   95.91 |    98.14 |     100 |   95.91 | 49-56             
  PlanEmitter.ts   |     100 |      100 |     100 |     100 |                   
  base-emitter.ts  |     100 |    83.33 |     100 |     100 | 23,27             
  index.ts         |       0 |        0 |       0 |       0 | 1-10              
  ...ll-emitter.ts |   98.53 |    95.28 |     100 |   98.53 | 333-334,435,443   
 ...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/commands      |   88.68 |    73.52 |   64.51 |   88.68 |                   
  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        |   97.56 |      100 |      50 |   97.56 | 52                
  serve.ts         |   86.42 |    67.64 |     100 |   86.42 | ...00-603,617-621 
  sessions.ts      |     100 |      100 |      50 |     100 |                   
  update.ts        |   98.11 |    94.44 |   66.66 |   98.11 | 81-82             
 ...mmands/channel |   82.29 |    86.84 |    83.2 |   82.29 |                   
  channel-cwd.ts   |     100 |      100 |     100 |     100 |                   
  ...l-registry.ts |    6.52 |      100 |       0 |    6.52 | 6-33,36-54        
  ...entry-path.ts |      75 |       50 |     100 |      75 | 8-9               
  config-utils.ts  |   95.85 |    96.29 |     100 |   95.85 | ...08-213,271-274 
  configure.ts     |    14.7 |      100 |       0 |    14.7 | 18-21,23-84       
  daemon-worker.ts |   95.89 |    87.95 |   96.87 |   95.89 | ...06-807,811-812 
  ...classifier.ts |   97.59 |    92.85 |     100 |   97.59 | 47-48             
  pairing.ts       |   26.31 |      100 |       0 |   26.31 | ...30,40-50,52-65 
  pidfile.ts       |   95.55 |       90 |     100 |   95.55 | ...50-251,315-316 
  proxy.ts         |     100 |      100 |     100 |     100 |                   
  reload.ts        |   72.97 |    80.95 |      75 |   72.97 | 64-76,85-91       
  runtime.ts       |   78.24 |    86.95 |     100 |   78.24 | ...55-159,189-191 
  set.ts           |   69.56 |    83.33 |      50 |   69.56 | 57-75,103-110,123 
  start.ts         |   75.21 |    75.28 |   66.66 |   75.21 | ...38,544-547,559 
  status.ts        |   77.68 |    57.14 |   66.66 |   77.68 | ...26-127,140-151 
  stop.ts          |   57.83 |    82.35 |      50 |   57.83 | ...3,74-76,85-111 
 ...nds/extensions |   87.25 |     89.3 |   85.24 |   87.25 |                   
  consent.ts       |   72.53 |       90 |   42.85 |   72.53 | ...86-142,157-163 
  disable.ts       |     100 |      100 |     100 |     100 |                   
  enable.ts        |     100 |      100 |     100 |     100 |                   
  install.ts       |   85.05 |    83.33 |      75 |   85.05 | ...05-208,211-220 
  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     |    37.5 |      100 |   33.33 |    37.5 | 23-45,57-64,67-70 
  update.ts        |   96.29 |      100 |     100 |   96.29 | 101-105           
  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.15 |    84.39 |   83.33 |   90.15 |                   
  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          |   92.59 |    83.87 |      80 |   92.59 | ...62-164,180-181 
  reconnect.ts     |   78.73 |    66.66 |   85.71 |   78.73 | 42-55,168-190     
  remove.ts        |     100 |       80 |     100 |     100 | 21-25             
 ...ommands/review |   74.43 |       86 |   74.75 |   74.43 |                   
  capture-local.ts |   72.16 |     90.9 |      75 |   72.16 | 101-105,152-174   
  ...k-coverage.ts |   76.77 |    88.05 |    87.5 |   76.77 | ...19-324,348-377 
  cleanup.ts       |   18.91 |      100 |       0 |   18.91 | ...03-108,110-111 
  ...ose-review.ts |   96.87 |    97.63 |   88.88 |   96.87 | 502-510           
  fetch-pr.ts      |   25.44 |      100 |    12.5 |   25.44 | ...15-304,345-347 
  load-rules.ts    |   26.41 |      100 |   16.66 |   26.41 | ...41-153,155-156 
  parse-args.ts    |   99.25 |       96 |     100 |   99.25 | 341,413           
  plan-diff.ts     |   73.43 |      100 |   66.66 |   73.43 | 95-111            
  pr-context.ts    |   84.02 |    76.37 |   91.66 |   84.02 | ...22-903,932-934 
  presubmit.ts     |    73.2 |    78.57 |   83.33 |    73.2 | ...12-313,365-395 
  ...ve-anchors.ts |   77.02 |    88.46 |      75 |   77.02 | ...70-175,187-204 
  submit.ts        |   72.97 |    82.81 |      75 |   72.97 | ...21-457,459-460 
  test-efficacy.ts |   81.84 |    70.37 |   91.66 |   81.84 | ...30-531,539-559 
 ...nds/review/lib |   91.63 |    92.78 |   85.07 |   91.63 |                   
  anchors.ts       |     100 |    94.79 |     100 |     100 | ...33,169,178,225 
  diff-flags.ts    |     100 |        0 |     100 |     100 | 63                
  diff-plan.ts     |    98.7 |    92.65 |     100 |    98.7 | ...21,244,270-271 
  gh.ts            |   52.87 |      100 |      30 |   52.87 | ...81-182,190-197 
  git.ts           |     100 |      100 |     100 |     100 |                   
  heavy.ts         |     100 |      100 |     100 |     100 |                   
  local-diff.ts    |    84.4 |    88.46 |     100 |    84.4 | ...63-473,475-483 
  merge-base.ts    |     100 |      100 |     100 |     100 |                   
  paths.ts         |   73.91 |    66.66 |      40 |   73.91 | 20-21,25-26,59-60 
  report.ts        |   92.13 |    86.66 |     100 |   92.13 | 170-171,173-177   
 ...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.2 |    87.87 |   95.27 |    94.2 |                   
  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 
  config.ts        |   87.63 |    86.32 |   84.37 |   87.63 | ...2304,2306-2314 
  ...heme-names.ts |     100 |      100 |     100 |     100 |                   
  environment.ts   |   94.18 |    89.54 |   94.73 |   94.18 | ...22-626,642-643 
  ...le-watcher.ts |   90.42 |    85.36 |      95 |   90.42 | ...92,295-297,342 
  ...resh-state.ts |   90.57 |    97.29 |   93.75 |   90.57 | 133-138,142-148   
  ...ime-reload.ts |     100 |    69.69 |     100 |     100 | ...12-113,122-123 
  hot-reload.ts    |     100 |    89.74 |     100 |     100 | 47,160,220        
  keyBindings.ts   |    97.1 |       50 |     100 |    97.1 | 214-217           
  ...ngsAdapter.ts |     100 |    94.11 |     100 |     100 | 64                
  ...ig-watcher.ts |   95.17 |    83.05 |     100 |   95.17 | ...78,200,292-293 
  mcpApprovals.ts  |   96.55 |    95.65 |     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 |   61.64 |    71.87 |   66.66 |   61.64 | ...54-68,73,77-89 
  ...ings-cache.ts |   96.52 |    93.93 |     100 |   96.52 | 90-91,201-202     
  settings.ts      |   89.93 |     91.3 |   89.65 |   89.93 | ...61,963,965-966 
  ...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 |                   
  ...paths-lite.ts |   89.47 |       88 |     100 |   89.47 | 43-44,53-54,56-57 
  ...tedFolders.ts |   93.78 |    94.78 |     100 |   93.78 | ...43-344,380-391 
 ...nfig/migration |   95.23 |    77.77 |   83.33 |   95.23 |                   
  index.ts         |   95.65 |     87.5 |     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.61 |    70.31 |   66.66 |   71.61 |                   
  ...tputBridge.ts |   71.76 |    70.96 |   68.42 |   71.76 | ...05-406,414-417 
  ...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/i18n          |    86.9 |    80.45 |    93.1 |    86.9 |                   
  index.ts         |   73.45 |    77.77 |      90 |   73.45 | ...70-271,294-299 
  languages.ts     |   96.92 |    86.66 |     100 |   96.92 | 134-135,167,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 |   79.44 |    75.82 |   81.35 |   79.44 |                   
  session.ts       |   83.56 |    74.71 |   93.61 |   83.56 | ...4-985,994-1004 
  types.ts         |    42.5 |      100 |   33.33 |    42.5 | ...23-624,627-628 
 ...active/control |   76.11 |    89.09 |      80 |   76.11 |                   
  ...rolContext.ts |    6.45 |        0 |       0 |    6.45 | 56-95             
  ...Dispatcher.ts |   91.79 |    92.45 |   88.88 |   91.79 | ...49-367,387,390 
  ...rolService.ts |     7.4 |        0 |       0 |     7.4 | 46-185            
 ...ol/controllers |   39.26 |     58.4 |   47.22 |   39.26 |                   
  ...Controller.ts |   39.49 |      100 |      80 |   39.49 | 88-92,127-210     
  ...Controller.ts |       0 |        0 |       0 |       0 | 1-56              
  ...Controller.ts |   46.62 |    52.94 |   54.54 |   46.62 | ...24-633,648-653 
  ...Controller.ts |   14.06 |      100 |       0 |   14.06 | ...82-117,130-133 
  ...Controller.ts |    37.8 |       60 |   46.66 |    37.8 | ...40-652,661-690 
 .../control/types |       0 |        0 |       0 |       0 |                   
  serviceAPIs.ts   |       0 |        0 |       0 |       0 | 1                 
 ...Interactive/io |   97.49 |    93.84 |   95.23 |   97.49 |                   
  ...putAdapter.ts |   97.13 |    92.89 |   98.07 |   97.13 | ...1314,1409-1410 
  ...putAdapter.ts |      96 |    91.66 |   85.71 |      96 | 51-52             
  ...nputReader.ts |     100 |    94.73 |     100 |     100 | 67                
  ...putAdapter.ts |   98.38 |      100 |   90.47 |   98.38 | 83-84,124-125     
  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/serve         |   88.51 |    84.98 |   90.17 |   88.51 |                   
  ...tp-enabled.ts |     100 |      100 |     100 |     100 |                   
  ...ion-bridge.ts |     100 |      100 |     100 |     100 |                   
  auth.ts          |    93.4 |    92.95 |     100 |    93.4 | ...16-317,320-322 
  ...em-adapter.ts |     100 |      100 |     100 |     100 |                   
  capabilities.ts  |     100 |    97.43 |     100 |     100 | 531               
  ...cp-command.ts |     100 |      100 |     100 |     100 |                   
  ...-selection.ts |     100 |      100 |     100 |     100 |                   
  ...ebhook-ipc.ts |    98.5 |    86.66 |     100 |    98.5 | 47                
  ...worker-env.ts |     100 |      100 |     100 |     100 |                   
  ...rker-group.ts |   91.56 |    85.79 |     100 |   91.56 | ...44-648,654-658 
  ...er-manager.ts |   92.85 |    86.66 |   94.11 |   92.85 | ...28,447,458-460 
  ...supervisor.ts |   96.99 |    88.23 |   96.42 |   96.99 | ...-945,1053-1057 
  ...e-grouping.ts |     100 |    94.11 |     100 |     100 | 69,132            
  ...ub-session.ts |   92.04 |    77.77 |     100 |   92.04 | ...36-445,470,508 
  daemon-logger.ts |   98.31 |    88.73 |   96.55 |   98.31 | 119-120,205       
  ...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.19 |       89 |     100 |   98.19 | ...-998,1000-1001 
  debug-mode.ts    |     100 |      100 |     100 |     100 |                   
  demo.ts          |     100 |      100 |     100 |     100 |                   
  env-snapshot.ts  |    91.3 |       80 |     100 |    91.3 | ...24-127,205-212 
  ...-path-argv.ts |     100 |      100 |     100 |     100 |                   
  ...h-settings.ts |   94.39 |    88.75 |     100 |   94.39 | ...22,700,716,726 
  fast-path.ts     |   91.28 |    81.98 |   95.45 |   91.28 | ...64-473,539-540 
  index.ts         |       0 |        0 |       0 |       0 | 1-143             
  ...e-observer.ts |   89.89 |    83.24 |      96 |   89.89 | ...11-512,541-543 
  ...back-binds.ts |     100 |    88.88 |     100 |     100 | 32                
  ...iders-edit.ts |     100 |    82.14 |     100 |     100 | 58-60,65,81       
  ...sion-audit.ts |     100 |      100 |   93.33 |     100 |                   
  rate-limit.ts    |   92.77 |    88.42 |     100 |   92.77 | ...93-295,307-309 
  ...qwen-serve.ts |   84.62 |    80.74 |   71.02 |   84.62 | ...5191,5196-5197 
  ...tup-errors.ts |     100 |      100 |     100 |     100 |                   
  ...-keepalive.ts |   95.91 |    90.62 |     100 |   95.91 | ...26,486-488,524 
  ...-lifecycle.ts |     100 |      100 |     100 |     100 |                   
  server.ts        |    95.6 |       92 |    85.1 |    95.6 | ...1533,1637-1641 
  ...on-helpers.ts |     100 |      100 |     100 |     100 |                   
  ...t-event-id.ts |     100 |    91.66 |     100 |     100 | 12                
  ...-admission.ts |   98.71 |    89.65 |     100 |   98.71 | 68                
  types.ts         |     100 |      100 |     100 |     100 |                   
  ...erver-name.ts |     100 |      100 |     100 |     100 |                   
  ...ion-limits.ts |     100 |      100 |     100 |     100 |                   
  ...l-resolver.ts |   90.32 |    66.66 |     100 |   90.32 | 16,45-46          
  ...ell-static.ts |   91.07 |     86.2 |     100 |   91.07 | ...79-182,216-219 
  ...ace-agents.ts |   57.15 |    67.61 |   86.66 |   57.15 | ...1821,1831-1841 
  ...-git-state.ts |     100 |    95.65 |    87.5 |     100 | 77                
  ...ace-inputs.ts |     100 |      100 |     100 |     100 |                   
  ...-constants.ts |     100 |      100 |     100 |     100 |                   
  ...-summaries.ts |   86.66 |       50 |     100 |   86.66 | 11,19             
  ...ace-memory.ts |   82.19 |    75.28 |     100 |   82.19 | ...82-489,549-556 
  ...ers-status.ts |   97.32 |    81.19 |     100 |   97.32 | ...61,164,297-303 
  ...tion-store.ts |    85.6 |    85.98 |   90.47 |    85.6 | ...82-291,302-305 
  ...e-registry.ts |   91.26 |    90.69 |     100 |   91.26 | ...91-292,298-299 
  ...ber-errors.ts |     100 |    95.32 |     100 |     100 | 53,93-94,172,192  
  ...e-remember.ts |   97.94 |    94.33 |     100 |   97.94 | ...00,304-309,350 
  ...te-runtime.ts |   93.14 |    87.93 |     100 |   93.14 | ...-88,92,145-150 
  ...ls-mapping.ts |     100 |      100 |     100 |     100 |                   
  ...lls-status.ts |     100 |    94.44 |     100 |     100 | 102               
 ...serve/acp-http |   75.41 |    78.31 |   93.14 |   75.41 |                   
  ...r-registry.ts |     100 |    95.45 |     100 |     100 | 191               
  client-mcp-ws.ts |   54.85 |    58.62 |   72.72 |   54.85 | ...99-300,304-305 
  ...n-registry.ts |   97.59 |    88.95 |   97.56 |   97.59 | 1015,1035-1049    
  dispatch.ts      |    68.8 |    74.89 |     100 |    68.8 | ...4404,4452-4458 
  index.ts         |   81.69 |    78.31 |   89.36 |   81.69 | ...2094,2125-2127 
  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.57 |   84.61 |   93.96 | ...57-159,161-163 
  ...ort-stream.ts |       0 |        0 |       0 |       0 | 1                 
  ws-stream.ts     |   91.86 |    78.78 |     100 |   91.86 | 45,50,96,100-103  
 src/serve/auth    |   86.86 |    80.29 |   93.87 |   86.86 |                   
  device-flow.ts   |   96.35 |    81.25 |   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 |   85.73 |    73.17 |    97.5 |   85.73 |                   
  ...r-emulator.ts |   88.57 |    63.63 |     100 |   88.57 | ...72-175,194-195 
  ...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 |       0 |        0 |       0 |       0 |                   
  ...mcp-smoke.mjs |       0 |        0 |       0 |       0 | 1-119             
  ...cceptance.mjs |       0 |        0 |       0 |       0 | 1-473             
  real-tab.mjs     |       0 |        0 |       0 |       0 | 1-218             
 src/serve/fs      |   85.68 |    80.09 |     100 |   85.68 |                   
  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 |     73.8 |     100 |   77.64 | ...65,594-598,611 
  policy.ts        |   90.32 |    89.18 |     100 |   90.32 | 142-150           
  ...ile-system.ts |   85.19 |     78.6 |     100 |   85.19 | ...2094,2104-2105 
 src/serve/routes  |   85.43 |    79.72 |   94.19 |   85.43 |                   
  a2ui-action.ts   |   99.49 |    94.52 |    87.5 |   99.49 | 250               
  capabilities.ts  |     100 |      100 |     100 |     100 |                   
  ...l-webhooks.ts |   93.56 |    84.09 |     100 |   93.56 | ...42,292,332,334 
  daemon-status.ts |   85.45 |    83.33 |     100 |   85.45 | 98-105            
  health-demo.ts   |    92.3 |    83.33 |     100 |    92.3 | 55-59             
  permission.ts    |     100 |     92.3 |     100 |     100 | 50,98             
  ...uled-tasks.ts |   84.12 |    83.18 |     100 |   84.12 | ...50-858,975-976 
  ...on-runtime.ts |     100 |    86.66 |     100 |     100 | 39,75             
  session.ts       |   88.72 |    83.58 |   94.11 |   88.72 | ...2947,2949-2950 
  sse-events.ts    |   86.25 |     88.6 |   77.77 |   86.25 | ...81,387,404-407 
  usage-stats.ts   |     100 |    95.65 |     100 |     100 | 116               
  ...space-auth.ts |    83.7 |       75 |     100 |    83.7 | ...23,328,340-344 
  ...el-control.ts |    82.9 |    81.92 |     100 |    82.9 | ...01-202,223-231 
  ...extensions.ts |   84.51 |    72.96 |   86.36 |   84.51 | ...68-970,989-992 
  ...-file-read.ts |   92.32 |       80 |     100 |   92.32 | ...94-595,598-599 
  ...file-write.ts |   84.44 |    64.13 |     100 |   84.44 | ...73-275,355-357 
  workspace-git.ts |     100 |      100 |     100 |     100 |                   
  ...-lifecycle.ts |   96.85 |       75 |     100 |   96.85 | 130-131,161-162   
  ...management.ts |   86.59 |    83.87 |     100 |   86.59 | ...01,905,925-930 
  ...cp-control.ts |   69.87 |     61.9 |     100 |   69.87 | ...46-452,461-462 
  ...ace-models.ts |   95.87 |    92.42 |     100 |   95.87 | 38-39,136-141     
  ...ermissions.ts |   74.66 |    69.23 |     100 |   74.66 | ...25-233,254-271 
  ...e-settings.ts |   66.08 |    60.93 |     100 |   66.08 | ...21-426,435-445 
  ...tup-github.ts |   77.52 |    70.27 |   84.21 |   77.52 | ...87,309,352-353 
  ...ace-status.ts |   75.33 |    61.97 |     100 |   75.33 | ...34-335,359-360 
  ...pace-tools.ts |   74.82 |    69.23 |     100 |   74.82 | ...41-146,175-176 
  ...pace-trust.ts |   76.08 |       50 |   66.66 |   76.08 | ...01-206,214-215 
  ...pace-voice.ts |   87.09 |     82.6 |    90.9 |   87.09 | ...96,322-323,452 
 src/serve/server  |   88.74 |    88.41 |   94.33 |   88.74 |                   
  access-log.ts    |   97.72 |    95.45 |     100 |   97.72 | 51                
  ...er-helpers.ts |   63.82 |    77.96 |   81.81 |   63.82 | ...16,330,332-347 
  ...w-registry.ts |    98.8 |    86.95 |     100 |    98.8 | 107               
  ...r-handlers.ts |   97.14 |    71.42 |     100 |   97.14 | 16                
  ...r-response.ts |   83.01 |    74.66 |     100 |   83.01 | ...97,619,682-691 
  fs-factory.ts    |     100 |    92.59 |     100 |     100 | 33,41,100,156     
  ...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 |   94.77 |    94.79 |     100 |   94.77 | ...31-133,387-392 
  self-origin.ts   |   76.19 |       80 |     100 |   76.19 | 45-54             
  ...e-features.ts |   93.45 |       92 |     100 |   93.45 | 139-145           
  ...on-archive.ts |   89.13 |    89.47 |    87.5 |   89.13 | ...17-422,494-504 
  ...ion-export.ts |     100 |    84.61 |     100 |     100 | 60,84             
  session-list.ts  |   94.44 |     91.3 |     100 |   94.44 | ...48-563,565-571 
  telemetry.ts     |   97.19 |    96.65 |     100 |   97.19 | ...81-283,385-387 
 src/serve/voice   |   79.61 |    89.42 |    82.6 |   79.61 |                   
  ...ice-config.ts |   96.77 |       30 |     100 |   96.77 | 85-86             
  voice-ws.ts      |   76.61 |    95.74 |      80 |   76.61 | ...94,409,447-449 
 ...kspace-service |   93.05 |    80.64 |   96.77 |   93.05 |                   
  index.ts         |   92.83 |    80.32 |   96.42 |   92.83 | ...02,925-929,932 
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/services      |   92.04 |    88.49 |   97.63 |   92.04 |                   
  ...mandLoader.ts |     100 |    88.88 |     100 |     100 | 103-116           
  ...killLoader.ts |   97.14 |    87.87 |     100 |   97.14 | 140,151-152       
  ...andService.ts |   98.73 |      100 |     100 |   98.73 | 107               
  ...mandLoader.ts |   86.83 |    83.87 |     100 |   86.83 | ...30-335,340-345 
  ...omptLoader.ts |   77.17 |    83.82 |   83.33 |   77.17 | ...43,168,210-211 
  ...mandLoader.ts |   97.36 |    92.68 |     100 |   97.36 | 153,160-161       
  ...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 |    93.75 |     100 |   96.66 | 34-35             
  ...low-loader.ts |     100 |    96.15 |     100 |     100 | 88                
  setup-github.ts  |    90.5 |    81.81 |     100 |    90.5 | ...35-436,443-444 
  ...-args-file.ts |   93.54 |    90.47 |    87.5 |   93.54 | 201-203,217-223   
  types.ts         |     100 |      100 |     100 |     100 |                   
  ...e-keyterms.ts |   98.64 |    95.71 |     100 |   98.64 | 116,142-143       
  voice-model.ts   |     100 |      100 |     100 |     100 |                   
  voice-service.ts |   85.99 |    87.09 |     100 |   85.99 | ...68,275,329-343 
  ...e-settings.ts |     100 |    95.45 |     100 |     100 | 19                
  ...ranscriber.ts |   90.56 |    82.35 |   95.83 |   90.56 | ...40-642,645-647 
 ...ght/generators |   88.86 |    85.78 |   96.29 |   88.86 |                   
  DataProcessor.ts |   88.23 |    85.71 |      95 |   88.23 | ...1348,1352-1359 
  ...tGenerator.ts |   98.21 |    85.71 |     100 |   98.21 | 46                
  ...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 | 95-98             
  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.08 |    82.52 |      90 |   88.08 |                   
  ...p-prefetch.ts |   98.75 |       95 |   85.71 |   98.75 | 44,168            
  ...reeStartup.ts |   80.53 |     74.6 |     100 |   80.53 | ...94,403,409-412 
 src/test-utils    |   94.04 |    83.33 |      80 |   94.04 |                   
  ...omMatchers.ts |   69.69 |       50 |      50 |   69.69 | 32-35,37-39,45-47 
  ...andContext.ts |     100 |      100 |     100 |     100 |                   
  render.tsx       |     100 |      100 |     100 |     100 |                   
 src/ui            |   70.43 |     72.6 |   65.38 |   70.43 |                   
  App.tsx          |   33.33 |       75 |   33.33 |   33.33 | 32-86             
  AppContainer.tsx |   71.46 |       69 |   61.53 |   71.46 | ...3954,3958-3962 
  ...tionNudge.tsx |    9.58 |      100 |       0 |    9.58 | 24-94             
  ...ackDialog.tsx |   29.23 |      100 |       0 |   29.23 | 25-75             
  ...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 |   64.39 |    48.38 |      80 |   64.39 | ...29,244,268-273 
  ...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.45 |    66.18 |   51.06 |   58.45 |                   
  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.03 |    70.73 |   57.69 |   60.03 | ...87,791,800,803 
  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   |   80.44 |    82.85 |   88.77 |   80.44 |                   
  aboutCommand.ts  |     100 |      100 |     100 |     100 |                   
  agentsCommand.ts |   83.78 |      100 |      60 |   83.78 | 30-32,42-44       
  ...odeCommand.ts |   89.47 |    81.25 |     100 |   89.47 | 92-93,95-100      
  arenaCommand.ts  |   62.81 |    58.73 |   65.21 |   62.81 | ...90-595,680-688 
  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.1 |     84.9 |     100 |    92.1 | ...4-69,94-99,178 
  clearCommand.ts  |    80.9 |    70.83 |     100 |    80.9 | ...24-125,133-142 
  ...essCommand.ts |   67.95 |    55.88 |      75 |   67.95 | ...86-187,201-204 
  ...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 |   67.46 |    69.69 |   84.61 |   67.46 | ...53-586,597-598 
  copyCommand.ts   |   98.49 |    95.78 |     100 |   98.49 | ...80,280,321,327 
  deleteCommand.ts |     100 |      100 |     100 |     100 |                   
  diffCommand.ts   |     100 |     87.5 |     100 |     100 | ...61,224-225,238 
  ...ryCommand.tsx |   81.43 |     88.4 |    90.9 |   81.43 | ...59-264,311-318 
  docsCommand.ts   |     100 |     90.9 |     100 |     100 | 25                
  doctorCommand.ts |   65.37 |    81.88 |   94.11 |   65.37 | ...85-535,538-672 
  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 |    50.3 |    48.14 |   69.23 |    50.3 | ...08,262-314,375 
  forgetCommand.ts |     100 |       90 |     100 |     100 | 59                
  forkCommand.ts   |     100 |    94.11 |     100 |     100 | 96,147            
  goalCommand.ts   |   91.13 |    83.72 |      90 |   91.13 | ...78-181,193-196 
  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   |   84.33 |    72.72 |     100 |   84.33 | 68,82-87,89-94    
  ...ghtCommand.ts |   77.87 |    71.42 |     100 |   77.87 | ...44-245,250-272 
  ...ageCommand.ts |   93.18 |    85.48 |     100 |   93.18 | ...69,189,198-208 
  lspCommand.ts    |     100 |    86.95 |     100 |     100 | 31,101-102        
  mcpCommand.ts    |     100 |      100 |     100 |     100 |                   
  memoryCommand.ts |     100 |      100 |     100 |     100 |                   
  modelCommand.ts  |    81.1 |     89.5 |   88.23 |    81.1 | ...80-793,827-832 
  ...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.9 |    86.04 |     100 |    90.9 | ...41-146,176-177 
  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.6 |    77.95 |     100 |    90.6 | ...91-694,785-792 
  ...ineCommand.ts |     100 |      100 |     100 |     100 |                   
  ...aryCommand.ts |    6.43 |      100 |      50 |    6.43 | 31-330            
  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 |    92.59 |     100 |     100 | 69,118            
  vimCommand.ts    |   54.54 |      100 |      50 |   54.54 | 19-29             
  voice-command.ts |   93.57 |       88 |     100 |   93.57 | 35,97-102         
  ...owsCommand.ts |   91.82 |    78.87 |   66.66 |   91.82 | ...59-160,169-174 
 src/ui/components |   68.57 |     78.5 |   74.71 |   68.57 |                   
  AboutBox.tsx     |     100 |      100 |     100 |     100 |                   
  ...ateScreen.tsx |   97.29 |     87.5 |   66.66 |   97.29 | 49                
  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 |   86.72 |    86.66 |     100 |   86.72 | ...00-302,355-359 
  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 | 18                
  ...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-596             
  DiffDialog.tsx   |   31.17 |    19.51 |   30.76 |   31.17 | ...07-712,722-735 
  ...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       |    77.6 |    61.11 |     100 |    77.6 | ...17-222,240-244 
  ...ngSpinner.tsx |   68.42 |    85.71 |      50 |   68.42 | 35-52,73,80-81    
  GoalPill.tsx     |   83.33 |    76.92 |     100 |   83.33 | 24-30             
  Header.tsx       |   98.65 |    94.73 |     100 |   98.65 | 173,175           
  Help.tsx         |   98.32 |       90 |     100 |   98.32 | ...24,381,447-448 
  ...emDisplay.tsx |   74.35 |    62.19 |      75 |   74.35 | ...72,475,478-484 
  ...ngeDialog.tsx |     100 |      100 |     100 |     100 |                   
  InputPrompt.tsx  |   82.17 |    79.92 |      80 |   82.17 | ...2141,2167,2227 
  ...Shortcuts.tsx |   20.87 |      100 |       0 |   20.87 | ...6,49-51,67-125 
  ...Indicator.tsx |   98.18 |    97.82 |     100 |   98.18 | 161-162           
  ...firmation.tsx |   91.42 |      100 |      50 |   91.42 | 26-31             
  MainContent.tsx  |   98.18 |    94.64 |   66.66 |   98.18 | 90,168-172,474    
  MemoryDialog.tsx |   86.59 |    80.15 |     100 |   86.59 | ...34-435,485,553 
  ...geDisplay.tsx |       0 |        0 |       0 |       0 | 1-41              
  ModelDialog.tsx  |   86.41 |       73 |     100 |   86.41 | ...74,876,881-897 
  ...tsDisplay.tsx |     100 |    97.22 |     100 |     100 | 270               
  ...fications.tsx |       0 |        0 |       0 |       0 | 1-58              
  ...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 |    84.21 |     100 |   93.58 | ...,70-71,195-197 
  ...ryDisplay.tsx |     100 |      100 |     100 |     100 |                   
  ...putPrompt.tsx |   72.56 |       80 |      40 |   72.56 | ...06-109,114-117 
  ...tedDialog.tsx |     100 |      100 |     100 |     100 |                   
  ...ngsDialog.tsx |   71.27 |    73.89 |   69.23 |   71.27 | ...1240,1246-1247 
  ...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.78 |    87.67 |     100 |   97.78 | ...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 |    5.46 |      100 |       0 |    5.46 | 24-215            
  ...ineDialog.tsx |    93.5 |    85.18 |     100 |    93.5 | ...05,267,287-289 
  ...yTodoList.tsx |   96.33 |    88.23 |     100 |   96.33 | 137-140           
  ...nsDisplay.tsx |    92.9 |       85 |     100 |    92.9 | ...04,207,234-236 
  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             
  ...criptView.tsx |   98.27 |    84.21 |     100 |   98.27 | 45,53             
  TrustDialog.tsx  |     100 |    81.81 |     100 |     100 | 71-86             
  ...ification.tsx |       0 |        0 |       0 |       0 | 1-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 |   53.72 |    70.87 |   42.85 |   53.72 |                   
  ...atContent.tsx |    9.09 |      100 |       0 |    9.09 | 54-275,281-283    
  ...tChatView.tsx |   21.05 |      100 |       0 |   21.05 | 21-39             
  ...tComposer.tsx |   64.78 |    29.41 |   33.33 |   64.78 | ...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.38 |    68.69 |   73.68 |   42.38 |                   
  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-164             
  ...tusDialog.tsx |       0 |        0 |       0 |       0 | 1-288             
  ...topDialog.tsx |       0 |        0 |       0 |       0 | 1-213             
 ...ackground-view |   82.06 |    81.23 |   90.74 |   82.06 |                   
  ...sksDialog.tsx |   77.53 |     76.9 |   80.76 |   77.53 | ...1781,1803-1809 
  ...TasksPill.tsx |   67.03 |     86.2 |     100 |   67.03 | ...02-122,130-138 
  ...gentPanel.tsx |   97.08 |    86.31 |     100 |   97.08 | 132,442-446,520   
  agent-forest.ts  |    99.2 |    93.93 |     100 |    99.2 | 256               
  ...Visibility.ts |     100 |      100 |     100 |     100 |                   
  ...e-overlay.tsx |    88.2 |    76.47 |     100 |    88.2 | ...36-138,140-142 
 ...nts/extensions |   84.58 |    78.18 |   83.33 |   84.58 |                   
  ...gerDialog.tsx |   82.46 |    77.77 |     100 |   82.46 | ...89,191-198,258 
  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.15 |    84.74 |   58.82 |   46.15 |                   
  ...ctionStep.tsx |   95.12 |    92.85 |   85.71 |   95.12 | 84-86,89          
  ...etailStep.tsx |       0 |        0 |       0 |       0 | 1-145             
  ...nListStep.tsx |   75.13 |    88.09 |   66.66 |   75.13 | ...52,173,202-208 
  ...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 |   66.18 |    67.65 |   66.66 |   66.18 |                   
  DiscoverTab.tsx  |   57.21 |     63.2 |   55.55 |   57.21 | ...98,661-665,669 
  InstalledTab.tsx |   71.62 |    68.65 |   83.33 |   71.62 | ...68,773-774,811 
  SourcesTab.tsx   |   69.25 |     70.4 |   66.66 |   69.25 | ...16,535,607-619 
 ...tensions/views |   23.73 |    44.82 |       5 |   23.73 |                   
  ...tionsView.tsx |    6.02 |      100 |       0 |    6.02 | 52-65,68-368      
  ...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 |   86.99 |    81.37 |   91.89 |   86.99 |                   
  ...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.04 |    61.53 |   70.58 |   40.04 |                   
  ...ealthPill.tsx |   68.42 |    85.71 |     100 |   68.42 | 40-46             
  ...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.9 |    73.51 |   57.14 |    53.9 |                   
  ...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.46 |    81.25 |     100 |   88.46 | ...63,169,174-179 
  ...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 |   87.87 |    84.51 |   81.31 |   87.87 |                   
  ...ionDialog.tsx |   86.88 |    81.25 |      80 |   86.88 | ...21,539,557-559 
  BtwMessage.tsx   |     100 |      100 |     100 |     100 |                   
  ...upDisplay.tsx |     100 |     88.7 |     100 |     100 | ...36,246,294,300 
  ...onMessage.tsx |   91.93 |    82.35 |     100 |   91.93 | 57-59,61,63       
  ...nMessages.tsx |   92.16 |    92.68 |   91.66 |   92.16 | ...82-286,304-310 
  DiffRenderer.tsx |   93.19 |    86.17 |     100 |   93.19 | ...09,237-238,304 
  ...tsDisplay.tsx |   97.82 |    77.27 |     100 |   97.82 | 87,89             
  ...usMessage.tsx |   76.31 |     42.1 |   66.66 |   76.31 | ...99,101,124,155 
  ...tsDisplay.tsx |    95.5 |    88.31 |     100 |    95.5 | ...39,141,174-179 
  ...ssMessage.tsx |    12.5 |      100 |       0 |    12.5 | 18-59             
  ...edMessage.tsx |   16.66 |      100 |       0 |   16.66 | 22-38             
  ...sMessages.tsx |   58.65 |       50 |    37.5 |   58.65 | ...20-125,146-158 
  ...ryMessage.tsx |   14.28 |      100 |       0 |   14.28 | 23-62             
  ...onMessage.tsx |   82.31 |    74.02 |   33.33 |   82.31 | ...69-471,478-480 
  ...upMessage.tsx |    98.3 |    95.23 |     100 |    98.3 | 182-185,412       
  ToolMessage.tsx  |   92.09 |    84.57 |   93.33 |   92.09 | ...16-921,948-950 
 ...ponents/shared |   85.62 |    81.93 |   94.89 |   85.62 |                   
  ...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  |   83.01 |    86.25 |   88.88 |   83.01 | ...12-513,618-619 
  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 |    82.7 |    84.84 |     100 |    82.7 | 46-64,71-74       
  StaticRender.tsx |   72.72 |      100 |     100 |   72.72 | 31-33             
  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 |   88.57 |    85.11 |      90 |   88.57 | ...15,745-773,875 
  text-buffer.ts   |   85.94 |    81.73 |   97.91 |   85.94 | ...2651,2749-2750 
  ...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-678             
 ...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.04 |    53.19 |    37.5 |   14.04 |                   
  ...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.42 |    59.52 |     100 |   35.42 | ...20-432,437-439 
  ...iewerStep.tsx |       0 |        0 |       0 |       0 | 1-73              
  ...gerDialog.tsx |       0 |        0 |       0 |       0 | 1-341             
 ...mponents/views |   69.77 |    72.38 |   61.11 |   69.77 |                   
  ContextUsage.tsx |   70.88 |    63.88 |      80 |   70.88 | ...20-426,463-557 
  DoctorReport.tsx |     9.8 |      100 |       0 |     9.8 | 25-54,57-131      
  ...sionsList.tsx |   87.87 |    73.68 |     100 |   87.87 | 69-76             
  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   |   82.17 |    79.32 |   84.37 |   82.17 |                   
  ...ewContext.tsx |   64.83 |    88.88 |      50 |   64.83 | ...16-219,225-235 
  AppContext.tsx   |      80 |       50 |     100 |      80 | 19-20             
  ...ewContext.tsx |   92.45 |    62.79 |      50 |   92.45 | ...69-270,272-276 
  ...igContext.tsx |   81.81 |       50 |     100 |   81.81 | 15-16             
  ...ssContext.tsx |   83.18 |     83.4 |     100 |   83.18 | ...1289,1297-1299 
  ...owContext.tsx |   91.07 |    81.81 |     100 |   91.07 | 47-48,60-62       
  ...deContext.tsx |     100 |      100 |      50 |     100 |                   
  ...onContext.tsx |   78.68 |    73.77 |   91.66 |   78.68 | ...86-389,398-401 
  ...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 | 147-148           
  ...teContext.tsx |   86.66 |       50 |     100 |   86.66 | 233-234           
  ...deContext.tsx |      80 |     87.5 |      75 |      80 | ...11-112,118-120 
 src/ui/daemon     |   88.27 |    73.27 |   95.45 |   88.27 |                   
  ...ui-adapter.ts |   88.27 |    73.27 |   95.45 |   88.27 | ...66,784-785,871 
 src/ui/editors    |       0 |        0 |       0 |       0 |                   
  ...ngsManager.ts |       0 |        0 |       0 |       0 | 1-67              
 src/ui/hooks      |   83.76 |    81.76 |   88.38 |   83.76 |                   
  ...dProcessor.ts |   81.49 |    80.95 |     100 |   81.49 | ...33-734,740-745 
  ...ention-ref.ts |   97.67 |       84 |     100 |   97.67 | 63                
  keyToAnsi.ts     |    3.92 |      100 |       0 |    3.92 | 19-77             
  ...esourceRef.ts |     100 |      100 |     100 |     100 |                   
  ...dProcessor.ts |   94.62 |    73.58 |     100 |   94.62 | ...86-287,292-293 
  ...dProcessor.ts |   85.14 |    66.27 |   81.81 |   85.14 | ...1400,1421-1425 
  ...rt-command.ts |     100 |      100 |     100 |     100 |                   
  ...sced-flush.ts |     100 |      100 |     100 |     100 |                   
  ...oice-input.ts |   92.36 |    81.95 |   66.66 |   92.36 | ...00,502-503,658 
  ...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 |   89.83 |    88.97 |     100 |   89.83 | ...49-456,496-505 
  ...ifications.ts |   86.91 |    96.29 |     100 |   86.91 | 116-130           
  ...tIndicator.ts |   88.28 |    81.08 |     100 |   88.28 | ...66,175,179-187 
  ...waySummary.ts |   96.22 |    69.69 |     100 |   96.22 | 125-127,169       
  ...ndTaskView.ts |   94.73 |    76.59 |     100 |   94.73 | 162-166,255,261   
  ...chedScroll.ts |     100 |      100 |     100 |     100 |                   
  ...ketedPaste.ts |    23.8 |      100 |       0 |    23.8 | 19-37             
  ...nchCommand.ts |    94.4 |       80 |     100 |    94.4 | ...36,210,273-276 
  ...ompletion.tsx |   96.75 |    81.81 |     100 |   96.75 | ...78-279,289-290 
  ...dMigration.ts |   89.47 |       75 |     100 |   89.47 | 39,42-44          
  useCompletion.ts |   94.11 |    89.65 |     100 |   94.11 | ...32-133,137-138 
  ...nitMessage.ts |     100 |      100 |     100 |     100 |                   
  ...extualTips.ts |   78.26 |       50 |     100 |   78.26 | ...2,75-79,96-104 
  ...eteCommand.ts |   78.53 |    88.57 |     100 |   78.53 | ...96-104,112-113 
  ...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.7 |     100 |   99.12 | 182-183           
  ...ionUpdates.ts |    93.5 |     92.3 |     100 |    93.5 | ...87-291,304-310 
  ...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 |      100 |     100 |     100 |                   
  ...ggestions.tsx |   96.47 |    78.94 |     100 |   96.47 | 121,155-156       
  ...miniStream.ts |    83.4 |    80.26 |   95.65 |    83.4 | ...3603,3688-3696 
  ...BranchName.ts |     100 |    91.66 |     100 |     100 | 30                
  ...oryManager.ts |   98.01 |    98.36 |     100 |   98.01 | 139-142           
  ...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 |       0 |        0 |       0 |       0 | 1-90              
  ...gIndicator.ts |     100 |    96.66 |     100 |     100 | 109               
  useLogger.ts     |      16 |      100 |       0 |      16 | 15-45             
  useMCPHealth.ts  |   63.15 |       80 |      50 |   63.15 | 42-52,64-67       
  ...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 |      100 |     100 |     100 |                   
  ...delCommand.ts |     100 |    92.85 |     100 |     100 | 48                
  ...ouseEvents.ts |   94.31 |     97.5 |   83.33 |   94.31 | 76-80             
  ...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 |   86.95 |    77.41 |   91.66 |   86.95 | ...70,311-323,371 
  useQwenAuth.ts   |     100 |      100 |     100 |     100 |                   
  ...lScheduler.ts |   89.47 |    92.45 |     100 |   89.47 | ...77-280,395-405 
  ...oryCommand.ts |       0 |        0 |       0 |       0 | 1-7               
  ...tleRepaint.ts |     100 |      100 |     100 |     100 |                   
  ...umeCommand.ts |   94.33 |    72.72 |     100 |   94.33 | ...18,173,214-219 
  ...ompletion.tsx |   90.67 |    83.33 |     100 |   90.67 | ...02,105,138-141 
  ...ectionList.ts |   97.12 |    96.22 |     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 |       0 |        0 |       0 |       0 | 1-73              
  ...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 |   53.06 |       50 |   66.66 |   53.06 | ...53,61-68,79-85 
  ...rminalSize.ts |   76.19 |      100 |      50 |   76.19 | 21-25             
  ...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 |      100 |     100 |     100 |                   
  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    |    90.9 |    90.62 |     100 |    90.9 |                   
  ...AppLayout.tsx |   90.72 |       90 |     100 |   90.72 | 57-59,101-106     
  ...AppLayout.tsx |   91.17 |    91.66 |     100 |   91.17 | 70-75             
 src/ui/models     |   80.24 |    79.16 |   71.42 |   80.24 |                   
  ...ableModels.ts |   80.24 |    79.16 |   71.42 |   80.24 | ...,61-71,123-125 
 ...noninteractive |     100 |      100 |    6.66 |     100 |                   
  ...eractiveUi.ts |     100 |      100 |    6.66 |     100 |                   
 src/ui/state      |   94.91 |    81.81 |     100 |   94.91 |                   
  extensions.ts    |   94.91 |    81.81 |     100 |   94.91 | 68-69,88          
 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      |    84.9 |    84.09 |   93.71 |    84.9 |                   
  ...Colorizer.tsx |   80.42 |    85.41 |     100 |   80.42 | ...00-201,298-324 
  ...nRenderer.tsx |   68.83 |    70.14 |      50 |   68.83 | ...52-254,274-293 
  ...wnDisplay.tsx |   92.55 |    93.33 |     100 |   92.55 | ...56,896,943-961 
  ...idDiagram.tsx |   87.79 |    95.34 |     100 |   87.79 | 156-179           
  ...eRenderer.tsx |   92.68 |    82.35 |   95.23 |   92.68 | ...34-737,790-795 
  ...odeDisplay.ts |   94.28 |    85.71 |     100 |   94.28 | 23,40             
  asciiCharts.ts   |   96.77 |    87.62 |     100 |   96.77 | 173-180,281       
  ...dWorkUtils.ts |     100 |      100 |     100 |     100 |                   
  ...boardUtils.ts |   52.52 |    73.25 |   91.66 |   52.52 | ...23,626-635,638 
  commandUtils.ts  |    96.1 |    88.77 |     100 |    96.1 | ...73,175-176,320 
  computeStats.ts  |     100 |      100 |     100 |     100 |                   
  customBanner.ts  |   90.68 |    91.22 |     100 |   90.68 | ...13,324-327,334 
  displayUtils.ts  |   90.38 |    73.91 |     100 |   90.38 | 23,25,29,31,33    
  formatters.ts    |    95.4 |    98.43 |     100 |    95.4 | 123-126           
  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  |    95.4 |    95.08 |     100 |    95.4 | 96-99             
  input-mouse.ts   |     100 |    85.71 |     100 |     100 | 48,93             
  isNarrowWidth.ts |     100 |      100 |     100 |     100 |                   
  ...olDetector.ts |    8.23 |      100 |       0 |    8.23 | ...31-132,135-136 
  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 |   95.72 |    94.23 |     100 |   95.72 | 90-92,137-138     
  ...t-position.ts |     100 |     87.5 |     100 |     100 | 85                
  ...geRenderer.ts |   86.23 |    69.06 |   95.12 |   86.23 | ...1284,1324-1330 
  ...alRenderer.ts |   86.69 |     71.9 |     100 |   86.69 | ...1476,1513-1519 
  ...lsBySource.ts |     100 |    95.23 |     100 |     100 | 84                
  mouse.ts         |   92.85 |    73.77 |     100 |   92.85 | ...38,145,149-152 
  osc8.ts          |   94.84 |    88.74 |     100 |   94.84 | ...57,442,446-447 
  ...red-height.ts |   96.85 |    95.31 |     100 |   96.85 | 71-73,201-203     
  ...mConstants.ts |     100 |      100 |     100 |     100 |                   
  restoreGoal.ts   |   99.02 |    97.56 |     100 |   99.02 | 106               
  ...storyUtils.ts |   71.02 |    78.86 |   93.75 |   71.02 | ...03-525,655-656 
  ...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 
  ...izedOutput.ts |   94.94 |      100 |   88.88 |   94.94 | 112-117           
  ...wOptimizer.ts |     100 |    96.77 |     100 |     100 | 69                
  terminalSetup.ts |    4.37 |      100 |       0 |    4.37 | 44-393            
  textUtils.ts     |   94.27 |    90.82 |   94.11 |   94.27 | ...89-290,450-451 
  ...background.ts |     100 |      100 |     100 |     100 |                   
  todoSnapshot.ts  |   89.33 |    93.47 |     100 |   89.33 | ...,66-78,180-181 
  ...isplay-map.ts |     100 |      100 |     100 |     100 |                   
  updateCheck.ts   |     100 |       80 |     100 |     100 | 37-49,120         
  ...ow-keyword.ts |     100 |      100 |     100 |     100 |                   
 ...i/utils/export |   74.23 |    56.04 |   94.59 |   74.23 |                   
  collect.ts       |   71.21 |    63.06 |      96 |   71.21 | ...88-631,653-654 
  index.ts         |     100 |      100 |     100 |     100 |                   
  normalize.ts     |   78.57 |    44.92 |     100 |   78.57 | ...40-345,357-359 
  types.ts         |       0 |        0 |       0 |       0 | 1                 
  utils.ts         |     100 |      100 |     100 |     100 |                   
 ...ort/formatters |   52.92 |    42.42 |   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 |    28.57 |     100 |   82.45 | ...48,50-51,65-66 
  markdown.ts      |   36.32 |       40 |      50 |   36.32 | ...16-219,233-295 
 src/ui/voice      |   81.12 |    73.04 |    79.1 |   81.12 |                   
  ...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.14 |     64.7 |   92.85 |   91.14 | ...76,282,292-295 
  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 |     100 |    88.88 |     100 |     100 | 18                
  ...am-session.ts |   87.45 |    63.33 |   81.81 |   87.45 | ...03,320-322,339 
  ...ranscriber.ts |     100 |      100 |     100 |     100 |                   
 src/utils         |    76.1 |    88.24 |   89.69 |    76.1 |                   
  acpModelUtils.ts |   95.49 |    94.23 |     100 |   95.49 | 44,68-69,73-74    
  apiPreconnect.ts |   96.72 |    97.05 |     100 |   96.72 | 165-168           
  ...ol-call-id.ts |    92.3 |    83.33 |     100 |    92.3 | 26-27             
  ...ng-failure.ts |     100 |       95 |     100 |     100 | 72                
  checks.ts        |   33.33 |      100 |       0 |   33.33 | 23-28             
  cleanup.ts       |   82.53 |    93.33 |      80 |   82.53 | 74,105-115        
  commands.ts      |   96.96 |    97.95 |     100 |   96.96 | 123-125           
  commentJson.ts   |   90.51 |     92.1 |     100 |   90.51 | 67-76,116         
  ...Calculator.ts |     100 |      100 |     100 |     100 |                   
  cpuProfiler.ts   |   70.73 |    73.23 |   88.88 |   70.73 | ...27,430-431,438 
  deepMerge.ts     |     100 |       90 |     100 |     100 | 41-43,49          
  ...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 | ...72,370,372-373 
  ...arResolver.ts |   97.14 |    96.55 |     100 |   97.14 | 125-126           
  errors.ts        |   90.85 |    96.36 |    92.3 |   90.85 | 69-70,298-310     
  events.ts        |     100 |      100 |     100 |     100 |                   
  ...on-mention.ts |   88.48 |     82.6 |     100 |   88.48 | ...56-160,164-168 
  gitUtils.ts      |    92.7 |    84.09 |     100 |    92.7 | ...07-110,158-161 
  ...AutoUpdate.ts |   92.89 |    94.59 |   88.88 |   92.89 | 148-159           
  ...tyWarnings.ts |     100 |      100 |     100 |     100 |                   
  ...lationInfo.ts |   97.45 |       94 |     100 |   97.45 | ...17,334-335,380 
  languageUtils.ts |   98.47 |    97.72 |     100 |   98.47 | 153-154           
  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.19 |    90.97 |     100 |   94.19 | ...28,434,437-441 
  ...iveHelpers.ts |   95.33 |    92.08 |     100 |   95.33 | ...51-452,550,563 
  osc.ts           |    97.5 |      100 |   88.88 |    97.5 | 195-196           
  package.ts       |   88.88 |    85.71 |     100 |   88.88 | 31-32             
  processUtils.ts  |     100 |      100 |     100 |     100 |                   
  readStdin.ts     |   93.67 |    94.11 |   85.71 |   93.67 | 79-83             
  relaunch.ts      |   93.22 |    81.25 |     100 |   93.22 | 65-67,80          
  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       |   11.46 |    23.52 |   16.66 |   11.46 | ...5-763,770-1047 
  ...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.37 |    88.75 |      90 |   82.37 | ...20-738,745-753 
  spawnWrapper.ts  |     100 |      100 |     100 |     100 |                   
  ...ate-verify.ts |     100 |      100 |     100 |     100 |                   
  ...one-update.ts |   40.22 |    77.44 |   62.16 |   40.22 | ...1181,1184-1203 
  ...upProfiler.ts |   98.47 |    94.66 |     100 |   98.47 | 132-133,308       
  ...upWarnings.ts |     100 |      100 |     100 |     100 |                   
  stdioHelpers.ts  |     100 |       60 |     100 |     100 | 23,32             
  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 |   94.11 |    83.33 |     100 |   94.11 | 13                
  ...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 |   91.63 |    91.02 |      95 |   91.63 |                   
  cleanup.ts       |   95.77 |    95.83 |     100 |   95.77 | 70-72             
  ...eractionAt.ts |     100 |      100 |     100 |     100 |                   
  scheduler.ts     |   91.91 |    90.47 |    87.5 |   91.91 | 58-62,73,131-135  
  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          |   86.14 |    85.42 |   87.59 |   86.14 |                   
 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.37 |    83.44 |   95.36 |   90.37 |                   
  ...transcript.ts |    92.6 |     87.5 |     100 |    92.6 | ...46,365-366,497 
  ...ent-resume.ts |   83.52 |    72.79 |   79.41 |   83.52 | ...1284-1288,1291 
  ...ound-tasks.ts |   96.53 |     90.4 |     100 |   96.53 | ...1359,1379-1382 
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...ent-result.ts |    96.8 |    92.68 |     100 |    96.8 | 106,129-131       
  ...n-registry.ts |   95.65 |    89.28 |     100 |   95.65 | ...12-413,485-489 
  ...w-snapshot.ts |   91.86 |       75 |     100 |   91.86 | ...54,178,185-187 
 src/agents/arena  |   76.25 |     67.5 |   78.94 |   76.25 |                   
  ...gentClient.ts |   79.47 |    88.88 |   81.81 |   79.47 | ...68-183,189-204 
  ArenaManager.ts  |   75.01 |    64.22 |   78.57 |   75.01 | ...1874,1880-1881 
  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 |   77.89 |    84.85 |   76.28 |   77.89 |                   
  ITermBackend.ts  |   97.97 |    93.93 |     100 |   97.97 | ...78-180,255,307 
  ...essBackend.ts |   90.17 |    84.12 |   93.33 |   90.17 | ...71,673,675-676 
  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 |   88.49 |    85.84 |   83.54 |   88.49 |                   
  agent-context.ts |     100 |      100 |     100 |     100 |                   
  agent-core.ts    |   79.97 |    76.22 |      68 |   79.97 | ...2030,2057-2104 
  agent-events.ts  |     100 |      100 |     100 |     100 |                   
  ...t-headless.ts |   87.93 |    79.06 |   63.63 |   87.93 | ...00-401,404-405 
  ...nteractive.ts |   81.01 |    82.35 |   76.66 |   81.01 | ...33,535-538,541 
  ...statistics.ts |   98.19 |    82.35 |     100 |   98.19 | 127,151,192,225   
  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 |                   
  ...ow-journal.ts |   91.76 |    75.86 |     100 |   91.76 | ...38-139,179-181 
  ...chestrator.ts |   91.79 |    87.79 |   82.35 |   91.79 | ...1774,1823-1826 
  ...ow-prompts.ts |     100 |      100 |     100 |     100 |                   
  ...ow-sandbox.ts |   96.87 |    94.51 |     100 |   96.87 | ...24-325,330-331 
  ...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   |   81.86 |    84.09 |    87.4 |   81.86 |                   
  TeamManager.ts   |    72.1 |     79.6 |   78.84 |    72.1 | ...1628,1651-1652 
  identity.ts      |     100 |      100 |     100 |     100 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...sionBridge.ts |     100 |      100 |     100 |     100 |                   
  mailbox.ts       |   94.76 |    86.36 |   92.85 |   94.76 | 86-87,348-354     
  ...ptAddendum.ts |     100 |      100 |     100 |     100 |                   
  tasks.ts         |   88.85 |    82.56 |   96.29 |   88.85 | ...-990,1034-1035 
  team-events.ts   |   60.52 |      100 |      50 |   60.52 | ...37-141,148-152 
  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        |   83.49 |    86.33 |    71.9 |   83.49 |                   
  approval-mode.ts |     100 |      100 |     100 |     100 |                   
  ...xtDefaults.ts |     100 |      100 |     100 |     100 |                   
  config.ts        |   82.51 |    85.89 |   69.41 |   82.51 | ...6737,6741-6742 
  constants.ts     |     100 |      100 |     100 |     100 |                   
  models.ts        |     100 |      100 |     100 |     100 |                   
  storage.ts       |   94.63 |    91.86 |   89.58 |   94.63 | ...15-416,419-420 
 ...nfirmation-bus |   98.29 |    97.14 |     100 |   98.29 |                   
  message-bus.ts   |   98.14 |    97.05 |     100 |   98.14 | 42-43             
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/core          |   90.83 |    85.97 |   92.89 |   90.83 |                   
  baseLlmClient.ts |   87.19 |    79.68 |      80 |   87.19 | ...18,631,685-687 
  client.ts        |   89.97 |    84.15 |   91.04 |   89.97 | ...2919,3015-3016 
  ...tGenerator.ts |   88.07 |       75 |     100 |   88.07 | ...89-393,401-405 
  ...lScheduler.ts |   89.72 |    84.34 |   95.65 |   89.72 | ...4845,4873-4884 
  geminiChat.ts    |   91.13 |    87.51 |   95.55 |   91.13 | ...3895,3937-3938 
  geminiRequest.ts |     100 |      100 |     100 |     100 |                   
  ...MediaLimit.ts |     100 |    95.83 |     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 |   92.59 |       75 |      50 |   92.59 | 41-42             
  ...on-helpers.ts |   87.61 |    76.92 |     100 |   87.61 | ...00-201,215-224 
  ...issionFlow.ts |   98.79 |       96 |     100 |   98.79 | 97                
  prompts.ts       |   88.93 |    87.87 |   72.72 |   88.93 | ...-918,1121-1122 
  ...ing-effort.ts |     100 |      100 |     100 |     100 |                   
  ...n-recovery.ts |   95.13 |       80 |     100 |   95.13 | ...06-107,142-144 
  ...t-profiler.ts |   96.82 |     80.3 |   88.23 |   96.82 | ...08,115-116,121 
  ...port-retry.ts |     100 |      100 |     100 |     100 |                   
  tokenLimits.ts   |     100 |     92.1 |     100 |     100 | 87,122-123        
  ...allIdUtils.ts |   98.23 |     92.1 |     100 |   98.23 | 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.49 |    91.17 |     100 |   98.49 | ...93,621-622,668 
 ...ntentGenerator |   95.75 |       85 |      95 |   95.75 |                   
  ...tGenerator.ts |   97.04 |    85.21 |   94.11 |   97.04 | ...1223,1251-1253 
  converter.ts     |   95.37 |    84.82 |     100 |   95.37 | ...7,843,998-1000 
  index.ts         |       0 |        0 |       0 |       0 | 1-21              
  usage.ts         |     100 |      100 |     100 |     100 |                   
 ...ntentGenerator |   89.93 |    71.83 |   93.33 |   89.93 |                   
  ...tGenerator.ts |    88.3 |    71.21 |   92.85 |    88.3 | ...19-325,343-344 
  index.ts         |     100 |       80 |     100 |     100 | 50                
 ...ntentGenerator |   94.61 |    84.69 |    92.1 |   94.61 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...tGenerator.ts |   94.51 |    83.39 |   91.66 |   94.51 | ...1113-1114,1142 
  ...tDetection.ts |     100 |      100 |     100 |     100 |                   
 ...ntentGenerator |   90.37 |    87.54 |   94.62 |   90.37 |                   
  constants.ts     |     100 |      100 |     100 |     100 |                   
  converter.ts     |   89.32 |    85.36 |   96.29 |   89.32 | ...1646,1815-1830 
  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      |   96.34 |    88.83 |     100 |   96.34 | ...20-921,929,997 
  ...ureContext.ts |     100 |      100 |     100 |     100 |                   
  ...ingOptions.ts |       0 |        0 |       0 |       0 | 1                 
  ...CallParser.ts |   92.22 |    90.67 |     100 |   92.22 | ...05-406,443-444 
  ...kingParser.ts |     100 |    96.87 |     100 |     100 | 42                
  types.ts         |       0 |        0 |       0 |       0 | 1                 
 ...rator/provider |   96.47 |    89.51 |   96.49 |   96.47 |                   
  dashscope.ts     |   97.43 |    91.72 |   94.73 |   97.43 | ...70-371,513-514 
  deepseek.ts      |   94.91 |    89.36 |     100 |   94.91 | ...31-132,145-146 
  default.ts       |    97.5 |    96.55 |   88.88 |    97.5 | 123-124,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     |   80.33 |    79.52 |   88.15 |   80.33 |                   
  ...-converter.ts |   78.29 |    70.87 |     100 |   78.29 | ...1108,1153-1154 
  corruptFile.ts   |     100 |       50 |     100 |     100 | 40-45             
  ...-converter.ts |    73.8 |       75 |     100 |    73.8 | 44-54             
  ...me-refresh.ts |     100 |      100 |     100 |     100 |                   
  ...ionManager.ts |   69.44 |    68.27 |   68.33 |   69.44 | ...1667,1689-1690 
  ...references.ts |     100 |     90.9 |     100 |     100 | ...05,129,197,200 
  ...onSettings.ts |   92.65 |    91.89 |     100 |   92.65 | ...28-232,312-313 
  ...-converter.ts |    75.9 |    83.33 |   85.71 |    75.9 | ...98,202,214-248 
  github.ts        |   84.71 |    85.24 |     100 |   84.71 | ...64-665,673-674 
  http-client.ts   |   84.61 |       80 |     100 |   84.61 | 20-21             
  i18n.ts          |   78.26 |    95.83 |      50 |   78.26 | 104-110,116-123   
  index.ts         |     100 |      100 |     100 |     100 |                   
  marketplace.ts   |   87.11 |    84.28 |     100 |   87.11 | ...44,348-354,429 
  npm.ts           |   74.67 |    71.64 |     100 |   74.67 | ...19-421,428-432 
  override.ts      |   94.11 |    88.88 |     100 |   94.11 | 63-64,81-82       
  redaction.ts     |     100 |      100 |     100 |     100 |                   
  settings.ts      |   66.26 |      100 |      50 |   66.26 | 81-107,141-146    
  ...ceRegistry.ts |   93.96 |    83.14 |     100 |   93.96 | ...35-341,362-363 
  storage.ts       |     100 |      100 |     100 |     100 |                   
  ...ableSchema.ts |     100 |      100 |     100 |     100 |                   
  variables.ts     |   88.75 |    83.33 |     100 |   88.75 | ...28-231,234-237 
 src/followup      |   77.83 |    78.48 |    90.9 |   77.83 |                   
  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   |   65.48 |    55.69 |   71.42 |   65.48 | ...75-576,583-584 
  ...onToolGate.ts |     100 |    96.55 |     100 |     100 | 96                
  ...nGenerator.ts |   72.03 |    81.15 |   83.33 |   72.03 | ...68-219,331-333 
 src/generated     |       0 |        0 |       0 |       0 |                   
  git-commit.ts    |       0 |        0 |       0 |       0 | 1-10              
 src/goals         |   92.14 |    86.66 |   95.12 |   92.14 |                   
  ...eGoalStore.ts |   87.61 |    89.28 |   86.66 |   87.61 | ...85-188,196-204 
  goalHook.ts      |   96.59 |    92.72 |     100 |   96.59 | 99-104,205-206    
  goalJudge.ts     |   90.07 |     81.7 |     100 |   90.07 | ...35-336,379-380 
  index.ts         |     100 |      100 |     100 |     100 |                   
 src/hooks         |   87.49 |    86.14 |   88.69 |   87.49 |                   
  ...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.43 |     83.5 |   94.59 |   95.43 | ...1010-1011,1021 
  hookPlanner.ts   |    87.5 |    85.36 |   86.66 |    87.5 | ...21-225,232-243 
  hookRegistry.ts  |   92.53 |    85.43 |     100 |   92.53 | ...39,458,462,466 
  hookRunner.ts    |   62.42 |    72.04 |   66.66 |   62.42 | ...64-765,774-775 
  hookSystem.ts    |    87.5 |      100 |   70.21 |    87.5 | ...43-744,750-751 
  ...HookRunner.ts |   75.51 |     61.9 |      80 |   75.51 | ...05-406,424-425 
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...edCallback.ts |     100 |      100 |     100 |     100 |                   
  ...HookRunner.ts |   96.37 |     90.9 |      90 |   96.37 | 342-350,424-425   
  ...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     |   77.22 |    86.74 |     100 |   77.22 | ...57,261-267,273 
  stopHookCap.ts   |     100 |      100 |     100 |     100 |                   
  trustedHooks.ts  |      90 |    52.63 |     100 |      90 | ...53,66-67,97-98 
  types.ts         |   94.24 |    96.09 |   88.88 |   94.24 | ...42-543,628-632 
  urlValidator.ts  |     100 |      100 |     100 |     100 |                   
 src/ide           |   76.87 |    84.98 |   79.03 |   76.87 |                   
  constants.ts     |     100 |      100 |     100 |     100 |                   
  detect-ide.ts    |     100 |      100 |     100 |     100 |                   
  ide-client.ts    |   68.92 |    84.57 |   68.29 |   68.92 | ...1057,1086-1094 
  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.39 |    77.81 |   78.33 |   82.39 |                   
  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.52 |    58.06 |     100 |   79.52 | ...33-940,947-949 
  ...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.27 |   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        |   85.79 |    80.96 |    88.5 |   85.79 |                   
  ...nel-memory.ts |    88.7 |    80.95 |      90 |    88.7 | ...00-204,209-212 
  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 |    81.81 |     100 |     100 | 126,136           
  entries.ts       |   75.59 |    84.84 |   83.33 |   75.59 | ...56-157,172-180 
  extract.ts       |   91.48 |    75.75 |     100 |   91.48 | ...99,118-121,189 
  ...entPlanner.ts |   91.51 |    76.19 |     100 |   91.51 | ...04,113-116,290 
  ...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 
  manager.ts       |   78.44 |    82.29 |   77.77 |   78.44 | ...1482,1495-1497 
  ...ent-config.ts |   81.98 |    79.72 |   82.35 |   81.98 | ...25,244,251-257 
  memoryAge.ts     |   90.47 |       80 |     100 |   90.47 | 50-51             
  paths.ts         |   94.61 |    95.77 |     100 |   94.61 | ...16-317,338-339 
  ...ing-skills.ts |     100 |       72 |     100 |     100 | 31-35,73-78,97    
  prompt.ts        |   96.96 |    85.96 |     100 |   96.96 | ...22,225,560-561 
  recall.ts        |   82.06 |       75 |    90.9 |   82.06 | ...59-364,395-406 
  refresh.ts       |   89.85 |    82.92 |     100 |   89.85 | ...54-155,162-163 
  ...ceSelector.ts |    93.1 |    81.81 |     100 |    93.1 | ...25,127-128,136 
  remember.ts      |   98.89 |    89.79 |     100 |   98.89 | 50,70             
  scan.ts          |   93.12 |    77.41 |     100 |   93.12 | ...08-109,154,157 
  ...et-scanner.ts |     100 |      100 |     100 |     100 |                   
  ...entPlanner.ts |   71.68 |    65.51 |   68.75 |   71.68 | ...90-394,397,403 
  status.ts        |   10.52 |      100 |       0 |   10.52 | 41-98             
  store.ts         |   93.33 |    81.25 |     100 |   93.33 | ...,94-95,119-120 
  ...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 |   79.38 |    78.33 |   81.81 |   79.38 | ...58-272,286-291 
 src/mocks         |       0 |        0 |       0 |       0 |                   
  msw.ts           |       0 |        0 |       0 |       0 | 1-9               
 src/models        |   91.25 |    88.35 |   89.74 |   91.25 |                   
  constants.ts     |     100 |      100 |     100 |     100 |                   
  ...tor-config.ts |   90.55 |    91.42 |     100 |   90.55 | 146,152,155-164   
  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.91 |     100 |     100 | 177               
  modelsConfig.ts  |   88.07 |    86.78 |   85.36 |   88.07 | ...1358,1387-1388 
  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.03 |    91.25 |   69.95 |   83.03 |                   
  autoMode.ts      |   97.78 |    94.08 |     100 |   97.78 | ...42,570-577,686 
  ...transcript.ts |      98 |       84 |     100 |      98 | 200-201           
  classifier.ts    |      94 |    94.44 |     100 |      94 | 158-165,385-389   
  ...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 |   85.13 |    89.24 |      80 |   85.13 | ...1035,1141-1145 
  rule-parser.ts   |   94.36 |    92.63 |     100 |   94.36 | ...1211,1245-1247 
  ...-semantics.ts |   70.36 |    91.07 |   46.66 |   70.36 | ...2237,2300-2303 
  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/plan-gate     |   76.16 |    91.42 |      80 |   76.16 |                   
  ...viewAgents.ts |   52.28 |    88.46 |   66.66 |   52.28 | ...24-220,242-243 
  ...provalGate.ts |   92.47 |    92.85 |   85.71 |   92.47 | ...86-187,268-274 
  state.ts         |     100 |      100 |     100 |     100 |                   
  types.ts         |     100 |      100 |     100 |     100 |                   
 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     |   79.38 |       75 |   68.75 |   79.38 |                   
  all-providers.ts |   69.23 |      100 |       0 |   69.23 | 71-72,76-82,86-92 
  index.ts         |     100 |      100 |     100 |     100 |                   
  install.ts       |   93.11 |     84.5 |     100 |   93.11 | ...56-257,330-331 
  ...der-config.ts |    72.6 |    69.49 |   73.91 |    72.6 | ...94-495,502-511 
  types.ts         |       0 |        0 |       0 |       0 | 1                 
 ...viders/presets |   97.56 |    89.28 |   55.55 |   97.56 |                   
  ...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 |                   
  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.3 |     78.8 |   95.89 |    85.3 |                   
  ...tGenerator.ts |   98.64 |    98.18 |     100 |   98.64 | 105-106           
  qwenOAuth2.ts    |   82.55 |    73.71 |   90.62 |   82.55 | ...1183-1199,1229 
  ...kenManager.ts |   85.36 |    76.61 |     100 |   85.36 | ...52-757,778-783 
 src/resources     |     100 |      100 |     100 |     100 |                   
  ...e-registry.ts |     100 |      100 |     100 |     100 |                   
 src/services      |   90.46 |    85.25 |   96.62 |   90.46 |                   
  ...ionTrailer.ts |     100 |      100 |     100 |     100 |                   
  ...llRegistry.ts |   97.35 |    85.21 |     100 |   97.35 | ...94,117,417-418 
  ...ionService.ts |   96.71 |    95.79 |     100 |   96.71 | ...83,699,832-840 
  ...ingService.ts |   91.63 |    85.77 |      90 |   91.63 | ...1633,1648-1649 
  ...ttribution.ts |   91.73 |    87.71 |      90 |   91.73 | ...80-685,826-827 
  ...utSlimming.ts |   99.54 |    96.42 |     100 |   99.54 | 98                
  cronScheduler.ts |    96.2 |     91.8 |     100 |    96.2 | ...1228,1627-1628 
  cronTasksFile.ts |   94.76 |    89.77 |     100 |   94.76 | ...19,328-329,437 
  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 |     100 |      100 |     100 |     100 |                   
  ...temService.ts |   92.07 |    85.93 |    90.9 |   92.07 | ...09,211,323-330 
  ...ratedFiles.ts |      96 |    88.23 |     100 |      96 | 119-120,146-147   
  gitInit.ts       |     100 |      100 |     100 |     100 |                   
  ...reeService.ts |   74.05 |       69 |   95.74 |   74.05 | ...2170,2198-2199 
  ...references.ts |   98.39 |    88.76 |     100 |   98.39 | 154-155,215-216   
  ...ionService.ts |   98.09 |    97.17 |     100 |   98.09 | ...00-601,648-649 
  ...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.27 |    91.22 |     100 |   97.27 | ...50-451,606-607 
  ...ttachments.ts |   97.74 |     90.8 |     100 |   97.74 | 298-308,646       
  ...ersistence.ts |   91.01 |    78.68 |     100 |   91.01 | ...6,971-972,1000 
  ...on-service.ts |   94.49 |    92.26 |   97.14 |   94.49 | ...98-600,656-664 
  ...ipt-reader.ts |   92.81 |    83.61 |   97.95 |   92.81 | ...74-876,979-984 
  sessionRecap.ts  |   67.56 |    43.47 |     100 |   67.56 | ...60,178,180-183 
  ...ionService.ts |   87.75 |    80.98 |   95.31 |   87.75 | ...2246,2316-2336 
  sessionTitle.ts  |   94.19 |    73.21 |     100 |   94.19 | ...43-246,277-278 
  ...ionService.ts |   84.03 |    78.09 |   96.96 |   84.03 | ...2406,2412-2417 
  ...pInhibitor.ts |   97.42 |    92.77 |     100 |   97.42 | ...30,169,369-370 
  ...Estimation.ts |     100 |    86.66 |     100 |     100 | 96-97             
  ...ageService.ts |   97.76 |    91.59 |   93.75 |   97.76 | ...61-262,366,567 
  ...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 |   92.07 |    84.69 |     100 |   92.07 | ...47-450,502-503 
  ...reeCleanup.ts |   14.56 |      100 |   33.33 |   14.56 | 58-185            
  ...ionService.ts |   87.98 |    86.95 |     100 |   87.98 | ...38-439,455-456 
 ...icrocompaction |   99.41 |    96.06 |     100 |   99.41 |                   
  microcompact.ts  |   99.41 |    96.06 |     100 |   99.41 | 242-243,675       
 ...s/visionBridge |   96.64 |    94.17 |   94.11 |   96.64 |                   
  ...capability.ts |     100 |      100 |     100 |     100 |                   
  ...part-utils.ts |     100 |      100 |     100 |     100 |                   
  ...-constants.ts |     100 |      100 |     100 |     100 |                   
  ...ge-service.ts |   95.49 |     91.3 |      90 |   95.49 | ...12,430,443-444 
 src/skills        |   88.22 |    87.05 |   90.16 |   88.22 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...activation.ts |     100 |    93.33 |     100 |     100 | 93,112            
  skill-load.ts    |   94.84 |     87.5 |     100 |   94.84 | ...03,223,235-237 
  skill-manager.ts |   83.44 |    82.16 |   82.35 |   83.44 | ...1202,1209-1213 
  skill-paths.ts   |   89.65 |    86.95 |     100 |   89.65 | ...11-112,117-118 
  symlinkScope.ts  |     100 |      100 |     100 |     100 |                   
  types.ts         |   97.91 |       98 |     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.28 |    87.17 |   96.42 |   87.28 |                   
  ...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 |   83.48 |    82.81 |   94.59 |   83.48 | ...1480,1557-1558 
  types.ts         |     100 |      100 |     100 |     100 |                   
  validation.ts    |   92.46 |    95.18 |     100 |   92.46 | 47-52,63-68,71-76 
 src/telemetry     |   79.56 |    87.34 |   81.88 |   79.56 |                   
  ...ty-tracker.ts |     100 |      100 |     100 |     100 |                   
  config.ts        |     100 |      100 |     100 |     100 |                   
  constants.ts     |     100 |      100 |     100 |     100 |                   
  ...on-metrics.ts |   99.06 |    80.48 |     100 |   99.06 | 183,197           
  ...on-tracing.ts |   74.55 |    73.21 |   70.58 |   74.55 | ...95,354-356,372 
  ...attributes.ts |   97.47 |    93.15 |     100 |   97.47 | 39-44             
  ...ag-metrics.ts |     100 |    77.77 |     100 |     100 | 21,40             
  ...t-loop-lag.ts |     100 |    90.47 |     100 |     100 | 49,76             
  ...-exporters.ts |   65.78 |    83.33 |   55.55 |   65.78 | ...04-105,108-109 
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...t.circular.ts |       0 |        0 |       0 |       0 | 1-111             
  ...-processor.ts |   99.09 |    95.61 |      95 |   99.09 | 141,365-366       
  ...t.circular.ts |       0 |        0 |       0 |       0 | 1-128             
  loggers.ts       |   53.44 |    71.57 |      62 |   53.44 | ...1326,1343-1363 
  metrics.ts       |   76.07 |    78.57 |   78.94 |   76.07 | ...1021,1024-1035 
  ...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       
  sdk.ts           |   86.75 |     88.4 |   66.66 |   86.75 | ...17-621,659-681 
  ...on-context.ts |     100 |      100 |     100 |     100 |                   
  ...on-tracing.ts |   90.06 |    88.25 |   96.55 |   90.06 | ...1541,1572-1575 
  ...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         |   78.83 |    85.27 |   83.54 |   78.83 | ...1301,1305-1312 
  uiTelemetry.ts   |   93.07 |    92.85 |   83.33 |   93.07 | ...62,290,410-411 
 ...ry/qwen-logger |   73.22 |    82.24 |   68.96 |   73.22 |                   
  event-types.ts   |       0 |        0 |       0 |       0 |                   
  qwen-logger.ts   |   73.22 |    82.07 |   68.42 |   73.22 | ...1079,1117-1118 
 src/test-utils    |   93.85 |    98.14 |   77.77 |   93.85 |                   
  config.ts        |     100 |      100 |     100 |     100 |                   
  ...st-helpers.ts |   94.11 |       90 |     100 |   94.11 | 69-70             
  index.ts         |     100 |      100 |     100 |     100 |                   
  mock-tool.ts     |    92.3 |      100 |   74.19 |    92.3 | ...54,218-219,232 
  ...aceContext.ts |     100 |      100 |     100 |     100 |                   
 src/tools         |   84.25 |    83.54 |    87.7 |   84.25 |                   
  ...erQuestion.ts |   90.74 |    82.43 |    92.3 |   90.74 | ...23-424,431-432 
  ...-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 |                   
  edit.ts          |    82.7 |    86.77 |   81.25 |    82.7 | ...43-744,863-913 
  ...r-worktree.ts |   83.14 |    67.56 |    87.5 |   83.14 | ...84-187,278-279 
  enterPlanMode.ts |   84.89 |    81.81 |   85.71 |   84.89 | ...27-132,165-179 
  exit-worktree.ts |   83.29 |    83.65 |   94.44 |   83.29 | ...14-515,537-538 
  exitPlanMode.ts  |    81.7 |    73.41 |     100 |    81.7 | ...28-531,561-564 
  glob.ts          |   94.42 |    88.23 |   93.33 |   94.42 | ...19-220,368,371 
  grep.ts          |   83.09 |    86.66 |   80.95 |   83.09 | ...60-661,711-712 
  ...adTracking.ts |     100 |      100 |     100 |     100 |                   
  loop-wakeup.ts   |   99.24 |    92.85 |     100 |   99.24 | 44                
  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 |   81.54 |    78.86 |    85.1 |   81.54 | ...3182,3184-3185 
  mcp-client.ts    |   78.48 |    83.66 |   88.46 |   78.48 | ...2140,2144-2147 
  ...ry-timeout.ts |     100 |      100 |     100 |     100 |                   
  mcp-errors.ts    |     100 |      100 |     100 |     100 |                   
  ...pool-entry.ts |   77.56 |    84.11 |   77.14 |   77.56 | ...1291,1299-1300 
  ...ool-events.ts |       8 |      100 |       0 |       8 | 132-158           
  mcp-pool-key.ts  |   97.46 |    93.93 |     100 |   97.46 | 175-176           
  ...ce-content.ts |   96.55 |    91.17 |     100 |   96.55 | 80-82             
  mcp-retry.ts     |   97.67 |    95.65 |     100 |   97.67 | 131-132           
  mcp-status.ts    |     100 |      100 |     100 |     100 |                   
  mcp-tool.ts      |   91.66 |    89.74 |   96.77 |   91.66 | ...20-721,771-772 
  ...sport-pool.ts |   83.49 |    80.15 |   84.61 |   83.49 | ...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.72 |    84.28 |   88.46 |   91.72 | ...92,605,803-808 
  notebook-edit.ts |   85.55 |    77.39 |   81.25 |   85.55 | ...86-902,948-949 
  ...escendants.ts |   36.17 |    64.51 |   55.55 |   36.17 | ...46-310,385-390 
  ...nforcement.ts |   82.57 |    89.74 |     100 |   82.57 | 174-185,234-247   
  read-file.ts     |   94.86 |    90.62 |   81.81 |   94.86 | ...06,309,392-393 
  ...p-resource.ts |   96.85 |      100 |   91.66 |   96.85 | 92-96             
  ...d-artifact.ts |    90.9 |    86.71 |    87.5 |    90.9 | ...13-414,428-440 
  ripGrep.ts       |   95.87 |     88.4 |   94.73 |   95.87 | ...56-657,663-664 
  ...-transport.ts |   71.42 |    55.55 |   71.42 |   71.42 | ...36-137,143-144 
  send-message.ts  |    82.3 |    89.65 |    62.5 |    82.3 | ...37-243,326-334 
  ...n-mcp-view.ts |   93.57 |     92.3 |      90 |   93.57 | 122-130           
  shell.ts         |   77.46 |    82.06 |   91.48 |   77.46 | ...4833,4896-4897 
  skill-utils.ts   |     100 |      100 |     100 |     100 |                   
  skill.ts         |   91.06 |    93.33 |   89.47 |   91.06 | ...71,475,520-542 
  ...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     |   89.27 |    82.05 |   92.85 |   89.27 | ...50-555,577-578 
  tool-error.ts    |     100 |      100 |     100 |     100 |                   
  tool-names.ts    |     100 |      100 |     100 |     100 |                   
  tool-registry.ts |   76.78 |    74.59 |   82.22 |   76.78 | ...96-897,905-906 
  tool-search.ts   |   96.19 |    89.72 |   93.33 |   96.19 | ...09,259-264,426 
  tools.ts         |   93.97 |     90.9 |   95.23 |   93.97 | ...36-537,553-559 
  web-fetch.ts     |   90.12 |    85.71 |   92.85 |   90.12 | ...11-312,326-327 
  write-file.ts    |   84.28 |    82.79 |   84.61 |   84.28 | ...87-690,727-762 
 src/tools/agent   |   84.44 |    84.79 |   86.31 |   84.44 |                   
  agent.ts         |   84.49 |    84.88 |    86.2 |   84.49 | ...3695,3717-3727 
  fork-subagent.ts |   83.14 |       80 |    87.5 |   83.14 | 83-101,133-134    
 ...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 |   87.46 |    79.41 |   85.71 |   87.46 |                   
  workflow.ts      |   87.46 |    79.41 |   85.71 |   87.46 | ...51-652,664-667 
 src/utils         |   91.47 |    89.21 |    95.8 |   91.47 |                   
  LruCache.ts      |     100 |      100 |     100 |     100 |                   
  ...Controller.ts |     100 |      100 |     100 |     100 |                   
  ...ssageQueue.ts |     100 |      100 |     100 |     100 |                   
  ...cFileWrite.ts |   94.76 |    93.26 |     100 |   94.76 | ...30-531,634-638 
  bareMode.ts      |   81.81 |      100 |      50 |   81.81 | 18-19             
  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 |                   
  ...ncyLimiter.ts |   94.64 |    95.23 |     100 |   94.64 | 64-66             
  ...igResolver.ts |     100 |      100 |     100 |     100 |                   
  ...engthError.ts |   91.11 |    89.47 |     100 |   91.11 | ...46-147,154-155 
  ...tion-chain.ts |     100 |    96.15 |     100 |     100 | 91                
  cronDisplay.ts   |     100 |    91.66 |     100 |     100 | 15,43,57          
  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 | ...28-429,463-464 
  editor.ts        |   97.65 |    95.45 |     100 |   97.65 | ...35-336,338-339 
  env.ts           |     100 |      100 |     100 |     100 |                   
  ...arResolver.ts |   94.28 |    88.88 |     100 |   94.28 | 28-29,125-126     
  ...entContext.ts |   96.55 |       88 |   96.77 |   96.55 | ...74,476-477,544 
  errorParsing.ts  |    97.7 |    97.05 |     100 |    97.7 | 72-73             
  ...rReporting.ts |   95.65 |    93.33 |     100 |   95.65 | 37-38             
  errors.ts        |   81.73 |    90.55 |   57.89 |   81.73 | ...08-324,328-334 
  fetch.ts         |   72.45 |    81.81 |   71.42 |   72.45 | ...31,142-143,162 
  fileUtils.ts     |   94.44 |    90.65 |   96.15 |   94.44 | ...1596,1621-1622 
  forkedAgent.ts   |   92.45 |    82.35 |   93.75 |   92.45 | ...34,642,647-654 
  formatters.ts    |   81.81 |       75 |     100 |   81.81 | 15-16             
  ...eUtilities.ts |    92.4 |    86.95 |     100 |    92.4 | ...52-158,168-169 
  ...rStructure.ts |   94.36 |    94.28 |     100 |   94.36 | ...17-120,330-335 
  getPty.ts        |   31.57 |       50 |     100 |   31.57 | 26-38             
  gitDiff.ts       |   92.36 |    80.09 |     100 |   92.36 | ...55-856,928-929 
  gitDirect.ts     |   98.46 |    90.17 |     100 |   98.46 | 148,268,352       
  ...noreParser.ts |   94.59 |    92.59 |     100 |   94.59 | ...05-106,140-141 
  gitUtils.ts      |   72.91 |    90.32 |   83.33 |   72.91 | ...,77-78,102-153 
  iconvHelper.ts   |     100 |      100 |     100 |     100 |                   
  ...rePatterns.ts |     100 |      100 |     100 |     100 |                   
  ...ionManager.ts |     100 |     90.9 |     100 |     100 | 27                
  ...lPromptIds.ts |     100 |      100 |     100 |     100 |                   
  jsonl-utils.ts   |   95.27 |    92.85 |     100 |   95.27 | ...16-317,356-359 
  ...-detection.ts |     100 |      100 |     100 |     100 |                   
  ...iagnostics.ts |    96.4 |     94.2 |     100 |    96.4 | ...66,293-294,376 
  ...yDiscovery.ts |    92.4 |    89.01 |     100 |    92.4 | ...28,331,522-525 
  ...tProcessor.ts |   93.77 |    89.15 |     100 |   93.77 | ...13-319,406-407 
  ...Inspectors.ts |     100 |      100 |     100 |     100 |                   
  modelId.ts       |   98.96 |    98.14 |     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 
  partUtils.ts     |     100 |    98.61 |     100 |     100 | 206               
  pathReader.ts    |   97.77 |       90 |     100 |   97.77 | 93,121            
  paths.ts         |   93.72 |    92.59 |     100 |   93.72 | ...47-448,450-452 
  pdf.ts           |   92.59 |    86.76 |     100 |   92.59 | ...54-555,596-601 
  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 |   59.15 |    76.92 |     100 |   59.15 | ...5,89-90,96-101 
  ...noreParser.ts |   92.63 |    91.37 |     100 |   92.63 | ...72-173,192-193 
  rateLimit.ts     |   93.75 |    89.42 |     100 |   93.75 | ...13,218-219,262 
  ...text-range.ts |   97.73 |    93.24 |     100 |   97.73 | 85-86,107,262-263 
  readManyFiles.ts |   96.29 |     87.5 |     100 |   96.29 | 225,275,286-290   
  retry.ts         |   95.93 |    91.83 |     100 |   95.93 | ...33,524-525,543 
  retryContext.ts  |     100 |      100 |     100 |     100 |                   
  ...sification.ts |   97.65 |    96.96 |     100 |   97.65 | ...00,250-251,277 
  retryPolicy.ts   |   97.72 |    90.56 |     100 |   97.72 | 130-131           
  ripgrepUtils.ts  |   50.94 |    85.71 |      70 |   50.94 | ...54-255,268-346 
  ...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 |   83.09 |    86.77 |   95.45 |   83.09 | ...70,595,624-633 
  ...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 |   74.07 |    83.33 |     100 |   74.07 | 40-46             
  ...nStringify.ts |     100 |      100 |     100 |     100 |                   
  ...aConverter.ts |   91.13 |    89.47 |     100 |   91.13 | ...41-42,96,98-99 
  ...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.72 |    92.12 |     100 |   91.72 | ...36-539,615-616 
  ...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 |                   
  shell-utils.ts   |   85.76 |     88.2 |     100 |   85.76 | ...2179,2186-2190 
  ...lAstParser.ts |   96.39 |    88.06 |     100 |   96.39 | ...1071-1073,1083 
  ...ContextEnv.ts |     100 |      100 |     100 |     100 |                   
  ...nlyChecker.ts |   95.08 |    91.75 |     100 |   95.08 | ...15-316,324-325 
  sideQuery.ts     |   86.82 |     86.2 |     100 |   86.82 | ...81-187,189-195 
  ...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          
  ...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             
  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 |   95.68 |    95.32 |     100 |   95.68 | ...29-334,533-534 
  truncation.ts    |   75.55 |    86.17 |   71.42 |   75.55 | ...44-449,453-477 
  windowsPath.ts   |   89.47 |    79.31 |     100 |   89.47 | ...57-58,62,90-91 
  ...aceContext.ts |   95.81 |    89.39 |     100 |   95.81 | ...74-275,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.68 |    80.38 |   94.69 |   83.68 |                   
  crawlCache.ts    |     100 |      100 |     100 |     100 |                   
  crawler.ts       |   82.47 |    76.22 |      95 |   82.47 | ...1525,1559-1560 
  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.01 |     74.5 |   84.37 |   69.01 |                   
  ...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.

@qwen-code-ci-bot

qwen-code-ci-bot commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the re-land! This is a well-scoped follow-up to the #6783 revert.

Template looks good ✓ — all required sections present. The "Risk & Scope" section from the template is missing but that's a minor omission, not a blocker.

Problem: observed regression. The original fix (#6754) was reverted (#6783) because metadata-free phantom tool-call slots suppressed finish_reason on valid tool calls, breaking the E2E suite. This PR re-lands the fix with narrower detection that distinguishes real nameless calls from phantom slots. Clear evidence trail with linked PRs and specific test scenarios.

Direction: aligned. Model stream parsing and retry behavior are squarely within core's responsibilities. The narrower approach — rejecting only real nameless calls and the recorded thinking-tag leak, while ignoring phantom slots — is the right call. The explicit non-goals (no generic <think> parsing from content-only responses, no arbitrary channel reordering recovery) show good scope discipline.

Size: 275 production lines, 370 test lines, 0 generated/schema lines. All changes within packages/core — no cross-package scope. Below the 500-line advisory threshold.

Approach: The scope feels right. The deferred-parts mechanism (pendingUntrustedResponseParts) is a clean way to handle the uncertainty window where a nameless call or thinking-tag leak might still resolve. The hasNamelessToolCall() tracking in the parser and the phantom-chunk early-return are minimal additions. The extracted InvalidStreamError module with the new MALFORMED_TOOL_CALL type is a clean refactor. Test coverage looks thorough — parameterized retry tests, phantom-slot acceptance, nameless-call rejection, thinking-tag leak scenarios.

One question: the thinking-tag leak detection adds several regex patterns (THINKING_TAG_PATTERN, CLOSING_THINKING_TAG_PATTERN, etc.) and state tracking (hasThinkingTagInReasoning, atVisibleLineStart). This is more complex than the previous inline approach. Is there a risk that the atVisibleLineStart tracking could get confused by very long content with many line breaks, or is this well-covered by existing traces? Not blocking — just curious about edge cases.

Moving on to code review. 🔍

中文说明

感谢重新提交!这是 #6783 revert 后范围控制良好的后续修复。

模板完整 ✓ — 所有必需章节都在。模板中的 "Risk & Scope" 部分缺失,但不阻塞。

问题:已观测到的回归。原始修复(#6754)被 revert(#6783),因为无元数据的 phantom tool-call slot 会抑制合法 tool call 的 finish_reason,导致 E2E 测试套件失败。本 PR 用更窄的检测逻辑重新落地——只拒绝真正无 name 的调用和已记录的 thinking-tag 泄漏,忽略 phantom slot。有完整的证据链和关联 PR。

方向:对齐。模型流解析和重试行为完全属于核心模块的职责范围。更窄的方案——拒绝真正无 name 的调用和已记录的 thinking-tag 泄漏,同时忽略 phantom slot——是正确的选择。明确的非目标(不处理纯 content 中的通用 <think> 标签解析,不尝试任意 channel 逆序恢复)显示了良好的范围控制。

规模:275 行生产代码,370 行测试代码,0 行生成/schema 代码。所有变更都在 packages/core 内——无跨包影响。低于 500 行建议阈值。

方案:范围合理。延迟 parts 机制(pendingUntrustedResponseParts)是处理无 name 调用或 thinking-tag 泄漏可能仍然会解析的不确定性窗口的干净方式。解析器中的 hasNamelessToolCall() 跟踪和 phantom-chunk 提前返回是最小化的新增。提取的 InvalidStreamError 模块和新的 MALFORMED_TOOL_CALL 类型是干净的重构。测试覆盖充分——参数化重试测试、phantom-slot 接受、无 name 调用拒绝、thinking-tag 泄漏场景。

一个问题:thinking-tag 泄漏检测添加了多个正则表达式模式(THINKING_TAG_PATTERNCLOSING_THINKING_TAG_PATTERN 等)和状态跟踪(hasThinkingTagInReasoningatVisibleLineStart)。这比之前的内联方式更复杂。atVisibleLineStart 跟踪是否可能在包含很多换行符的超长内容中出错,还是已经被现有 trace 充分覆盖?不阻塞——只是对边界情况好奇。

进入代码审查 🔍

Qwen Code · qwen3.7-max

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

@yiliang114

yiliang114 commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator Author

E2E and verification report for the current branch.

Current head

Commit: 294c37bf9a

Latest review follow-up

  • Holds completed visible thinking-tag evidence until the stream reaches a clean finish, so later matching reasoning evidence cannot invalidate content that was already emitted.
  • Preserves the provider wire-index → relocated tool-call index route, so ID-less argument continuations cannot be appended to the displaced earlier call.
  • Strengthened the interleaved cross-channel regression to assert that every pre-finish chunk remains empty.

Verification on the current head

  • Converter suite: 188/188 passed.
  • Streaming tool-call parser suite: 75/75 passed.
  • Core package typecheck: passed.
  • Prettier and git diff --check: passed.
  • Pre-commit staged-file Prettier and ESLint: passed.

Prior independent stream verification

The previous stable head independently passed these exact-stream cases:

  • interleaved reasoning tag prefix → visible gap → reasoning suffix → visible closing tag: no pre-finish output; PROTOCOL_TAG_LEAK at finish
  • reasoning-first complete tag with complete or split visible tag: no pre-finish output; PROTOCOL_TAG_LEAK at finish
  • bare reasoning < followed by 130,001 visible characters: exact order preserved, no loss, no hang, no RangeError, and STOP

tmux E2E evidence

The deterministic tmux replay was run from runtime head 016a3430f. Later changes are narrow scanner/parser review follow-ups covered by the focused suites above.

Case Provider requests Retry classification Result
Thinking tags in reasoning_content, followed by a valid named tool call 2 PROTOCOL_TAG_LEAK Pass
Nameless/empty tool-call finish 2 MALFORMED_TOOL_CALL Pass

Thought-tag leak before a named tool call

Thought-tag retry

Malformed tool-call retry classification

Malformed tool-call retry

Strict assertions: 12/12 passed. Malformed attempts produced no visible or persisted output; clean responses appeared exactly once; retry classifications were present in debug logs.

Full workflow matrix

The full E2E workflow was manually dispatched on pre-review head a1cbe8f40 because E2E does not auto-run on PR branches:

https://github.com/QwenLM/qwen-code/actions/runs/29222640370

All four jobs passed:

  • ✓ E2E Test - macOS
  • ✓ E2E Test (Linux) - sandbox:none
  • ✓ E2E Test (Linux) - sandbox:docker
  • ✓ web-shell Browser Regression

The full workflow was not re-dispatched after the narrow review follow-ups. @wenshao

@qwen-code-ci-bot

qwen-code-ci-bot commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Code Review

Clean implementation. The PR does exactly what it says — re-lands the malformed stream retry with narrower detection that distinguishes real nameless calls from phantom slots.

Independent proposal vs. PR approach: I would have added nameless-call tracking in the parser, a deferred-parts mechanism for the uncertainty window, and thinking-tag leak detection. The PR's approach matches this closely. The phantom-chunk early-return (skip chunks with no id, no name, empty content at depth 0) is a nice minimal addition that the previous version lacked.

No critical issues found. A few observations:

  • The namelessToolCallIndices tracking in StreamingToolCallParser is well-implemented — it correctly adds/removes indices as names arrive, and the hasNamelessToolCall() method provides a clean API for the converter to query.
  • The deferred-parts mechanism (pendingUntrustedResponseParts) correctly holds parts when a nameless call or thinking-tag leak might still resolve, and releases them when the situation is clear. This prevents premature emission of content that should be discarded on retry.
  • The InvalidStreamError extraction to its own module is a clean refactor. The new MALFORMED_TOOL_CALL type integrates naturally with the existing error types.
  • The pipeline change (re-throw InvalidStreamError before other error handling) correctly preserves error identity through the converter → pipeline → GeminiChat retry path.
  • The geminiChat retry loop cleanup — removing attempt-- hacks and the ContentRetryOptions interface — simplifies the code without changing behavior. The retry budgets are now solely governed by INVALID_STREAM_RETRY_CONFIG.

Reuse check: No new utilities or abstractions that duplicate existing code. The regex patterns for thinking-tag detection are specific to this use case.

Unit Tests

All 449 tests pass across the three changed test files:

Test File Tests Status
streamingToolCallParser.test.ts 73 ✅ All pass
converter.test.ts 150 ✅ All pass
geminiChat.test.ts 226 ✅ All pass

New tests cover the key scenarios: phantom slot acceptance, nameless call rejection, thinking-tag leak detection (including cross-channel and split-tag variants), late-name deduplication, and the retry path through the OpenAI pipeline.

Real-Scenario Testing

This PR fixes internal stream parsing behavior (malformed tool calls, thinking-tag leaks) that requires specific model responses or a mock server to trigger. A simple CLI prompt cannot produce these edge cases.

Smoke test — verified the CLI starts and responds correctly with the PR's code:

$ DEV=true node scripts/dev.js -p 'Say hello in one word'
Hello

Typechecktsc --noEmit on packages/core passes cleanly.

The specific malformed-stream scenarios are thoroughly covered by the unit tests above, which simulate the exact failure modes described in the PR (phantom slots, nameless calls, cross-channel thinking-tag leaks).

中文说明

代码审查

实现干净。PR 完全按照描述执行——用更窄的检测逻辑重新落地 malformed stream 重试,区分真正无 name 的调用和 phantom slot。

独立方案 vs. PR 方案: 我会在解析器中添加无 name 调用跟踪、不确定性窗口的延迟 parts 机制、以及 thinking-tag 泄漏检测。PR 的方案与此接近。phantom-chunk 提前返回(跳过无 id、无 name、空内容且 depth 为 0 的 chunk)是之前版本缺少的精简新增。

未发现关键问题。 几点观察:

  • StreamingToolCallParser 中的 namelessToolCallIndices 跟踪实现良好——随着 name 的到来正确添加/移除索引,hasNamelessToolCall() 方法为转换器提供了干净的查询 API。
  • 延迟 parts 机制(pendingUntrustedResponseParts)在无 name 调用或 thinking-tag 泄漏可能仍然会解析时正确持有 parts,在情况明确时释放。这防止了重试时应丢弃的内容被过早发送。
  • InvalidStreamError 提取到独立模块是干净的重构。新的 MALFORMED_TOOL_CALL 类型与现有错误类型自然集成。
  • pipeline 的变更(在其他错误处理之前重新抛出 InvalidStreamError)正确保留了错误类型在 converter → pipeline → GeminiChat 重试路径中的身份。
  • geminiChat 重试循环清理——移除 attempt-- hack 和 ContentRetryOptions 接口——在不改变行为的情况下简化了代码。重试预算现在完全由 INVALID_STREAM_RETRY_CONFIG 管理。

复用检查: 没有新增与现有代码重复的工具或抽象。thinking-tag 检测的正则表达式模式是特定于此用例的。

单元测试

三个变更测试文件共 449 个测试全部通过:

测试文件 测试数 状态
streamingToolCallParser.test.ts 73 ✅ 全部通过
converter.test.ts 150 ✅ 全部通过
geminiChat.test.ts 226 ✅ 全部通过

新测试覆盖了关键场景:phantom slot 接受、无 name 调用拒绝、thinking-tag 泄漏检测(包括跨 channel 和分割标签变体)、延迟 name 去重,以及通过 OpenAI pipeline 的重试路径。

真实场景测试

本 PR 修复的是内部流解析行为(malformed tool call、thinking-tag 泄漏),需要特定的模型响应或 mock 服务器才能触发。简单的 CLI 提示无法产生这些边界情况。

冒烟测试 — 验证 CLI 在 PR 代码下能正常启动和响应:

$ DEV=true node scripts/dev.js -p 'Say hello in one word'
Hello

类型检查packages/coretsc --noEmit 干净通过。

上述单元测试充分覆盖了 PR 描述的具体失败模式(phantom slot、无 name 调用、跨 channel thinking-tag 泄漏)。

Qwen Code · qwen3.7-max

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

@qwen-code-ci-bot

qwen-code-ci-bot commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Confidence: 5/5 — clean across every stage; the implementation is focused, well-tested, and solves a real regression.

This is a solid re-land. The author has iterated across three PRs (#6754#6783 revert → this) to get the scope right, and the result is tighter than the original fix. The phantom-slot detection is a minimal early-return, the nameless-call tracking is a clean set-based approach, and the retry loop is genuinely simpler without the attempt-- hacks.

The 449 unit tests cover the exact failure modes — phantom slots beside valid calls, real nameless calls, cross-channel thinking-tag leaks, and the retry path through the pipeline. The typecheck and CLI smoke test both pass.

No scope creep, no unnecessary abstractions, no drive-by refactors. Every change in the diff serves the stated goal. This is ready to ship. ✅

中文说明

信心度: 5/5 — 各阶段均通过;实现聚焦、测试充分、解决了真实回归。

这是一次扎实的重新提交。作者在三个 PR(#6754#6783 revert → 本次)中反复调整范围,最终结果比原始修复更精简。phantom-slot 检测是最小化的提前返回,无 name 调用跟踪是干净的基于集合的方案,重试循环在移除 attempt-- hack 后确实更简洁了。

449 个单元测试覆盖了具体的失败模式——合法调用旁的 phantom slot、真正无 name 的调用、跨 channel thinking-tag 泄漏,以及通过 pipeline 的重试路径。类型检查和 CLI 冒烟测试均通过。

无范围蔓延、无不必要的抽象、无顺手重构。diff 中的每个变更都服务于声明的目标。可以合并。✅

Qwen Code · qwen3.7-max

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

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

Comment thread packages/core/src/core/openaiContentGenerator/converter.ts Outdated
Comment thread packages/core/src/core/openaiContentGenerator/converter.ts Outdated
Comment thread packages/core/src/core/openaiContentGenerator/converter.ts Outdated
Comment thread packages/core/src/core/openaiContentGenerator/streamingToolCallParser.ts Outdated
Comment thread packages/core/src/core/openaiContentGenerator/converter.test.ts Outdated
Comment thread packages/core/src/core/openaiContentGenerator/streamingToolCallParser.ts Outdated
Comment thread packages/core/src/core/openaiContentGenerator/converter.test.ts Outdated
Comment thread packages/core/src/core/openaiContentGenerator/streamingToolCallParser.ts Outdated
Comment thread packages/core/src/core/openaiContentGenerator/converter.ts Outdated

@wenshao wenshao left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed — no blockers. Suggestions are inline.

— qwen3.7-max via Qwen Code /review

Comment thread packages/core/src/core/openaiContentGenerator/converter.ts Outdated
Comment thread packages/core/src/core/openaiContentGenerator/converter.ts Outdated
Comment thread packages/core/src/core/openaiContentGenerator/converter.ts Outdated
@wenshao

wenshao commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Code Review — reviewed at b64cc65c7

Overview

This PR re-lands the malformed-stream retry from #6754 (reverted in #6783) in three logical parts: the revert-of-revert, the narrowed nameless tool-call detection, and a stateful visible-thinking-tag scanner. The head commit (b64cc65c7) additionally addresses all eight findings from the earlier review round. I re-reviewed the full diff at that exact commit, ran the affected suites locally, and probed the edge cases below with throwaway tests against the real converter/parser.

Verification performed (local, at b64cc65c7)

  • converter 175/175, streamingToolCallParser 72/72, pipeline 94/94, geminiChat 225/225, turn 35/35 — 601/601 pass; tsc --noEmit clean.
  • Adversarial probes (all behaved correctly):
    • Misrouted empty continuation after a completed call → phantom slot, turn not dropped, edit call emitted with finish_reason intact (the exact revert(core): revert malformed streamed response retry logic #6783 breakage shape).
    • Name arriving in a later delta → text parts held while nameless, then released in order once the name lands; call emitted.
    • Two named calls + trailing structural phantom ({index: 2, function: {}}) → both calls emitted.
    • reasoning + visible text ending in a bare < → held, then released verbatim at finish; no false PROTOCOL_TAG_LEAK.
    • Use </think> to close the tag. after ordinary text with structured reasoning → streams through immediately, not even held.
    • finish_reason: 'tool_calls' with zero completed calls → finish withheld (retry path), fallback text not silently accepted.
    • ID collision (call_first nameless with args, call_second named reuses index 0) → relocated; call_second keeps only its own args and the stream is still flagged malformed.
  • Perf probes: 32k whitespace inside a spaced tag prefix and 16k distinct phantom tool-call deltas both complete in single-digit-to-low-double-digit ms, with no parser state allocated for phantoms. The quadratic behaviors from the earlier review round are gone.

Prior review threads — status at this commit

All eight threads from the earlier review are genuinely fixed (or properly descoped), each with a regression test I located and ran:

Thread Status
Content-only #6666 shape not handled Descoped honestly: body now says "Related to #6666" with an explicit non-resolution note
Unmatched closing tag after ordinary text retried as leak Fixed — leak now needs visible-start or matching thought-tag evidence; probe confirms no hold, no retry
Quadratic pendingTag growth + buffered-part rescans Fixed — whitespace no longer grows the pending tag; thought-tag evidence persisted monotonically (hasUntrustedThoughtTag)
Unbounded phantom slots + full-map scan per chunk Fixed — pure phantoms return before state allocation; nameless indices tracked incrementally in a Set
No converter→pipeline→GeminiChat integration coverage Fixed — leak-retry test now drives a real OpenAIContentGenerator with raw SSE chunks; pipeline rethrows InvalidStreamError before generic handling and a test asserts object identity
Nameless-with-arguments-no-id untested Fixed — discards a nameless tool call with arguments but no id
Drop test ignored first conversion result Fixed — renamed to drops parts after a later tool call has no name, first result asserted
Index reuse merged arguments across calls Fixed — differing ID always relocates via findNextUnusedIndex(); occupied call preserved

Findings

1. [Should-fix] The PROTOCOL_TAG_LEAK retry budget silently doubles (2 → 4), reverting a deliberate decision from #6712.
INVALID_STREAM_RETRY_CONFIG goes from {transientMaxRetries: 4, protocolTagLeakMaxRetries: 2} back to a unified maxRetries: 4. The split budget landed in #6712 one day before #6754, with a comment explaining that tag leaks are model-output validation failures rather than the transient provider anomalies of #6670. This PR removes that comment and cap as part of the re-land, and the tests were knowingly renamed (should keep protocol tag leak retries at the existing budgetshould retry protocol tag leaks four times) — but the PR body never mentions the change. For a model that deterministically leaks, failure now costs 5 full generation attempts plus 20s of backoff (2+4+6+8s) instead of 3 attempts plus 6s. Please either restore the split budget or state in the PR body why unifying at 4 is now correct; as written, a future reader will find #6712's rationale erased with no counter-rationale.

2. [Nit] Stale doc comment in packages/core/src/telemetry/types.ts (~line 675).
The ApiRetryEvent docs still describe ContentRetryEvent as "emitted by geminiChat's for-loop … (INVALID_CONTENT_RETRY_OPTIONS, NOT retryWithBackoff)". This PR deletes both that constant and the bounded for-loop (now for (;;) with per-class budgets), so the comment references code that no longer exists. Worth updating in the same PR since it deletes the referent. (For the record, I audited the new for (;;) loop: every continue is guarded by a bounded counter or a one-shot flag, so removing the outer attempt bound is safe — the branch it fed was already documented as unreachable.)

3. [Nit] PR body test-plan numbers are stale relative to the head commit.
"155/155" converter tests and "this PR is draft until E2E is green" predate b64cc65c7 (175 converter tests now; the PR is no longer draft). Minor, but the Reviewer Test Plan should match what a reviewer will actually see.

Risk notes (accepted tradeoffs, no action required)

  • Held-parts latency: while a nameless call is pending (ID seen, name not yet) or after thought-tag evidence appears, text parts buffer until disambiguation or finish. Ordering is preserved (probe-verified); worst case is batch-at-finish delivery for that turn.
  • Residual false-positive window: reasoning that legitimately quotes a thinking tag combined with an unmatched closing tag in visible text is indistinguishable from the qwen 3.7 max 模型在 content 字段中返回 <think> 标签而非 reasoning_content #6666 leak signature and will retry. Balanced inline tags survive (open/close counting), so this is narrow.
  • The real merge gate remains the manually dispatched real-model E2E run — the failure mode that killed fix(core): retry malformed streamed responses #6754 (phantom-slot false positives) is now unit- and probe-covered, but E2E green should stay the final word, per the PR's own plan.

Verdict

The re-land is well executed at this head: the narrowing is surgical (!name && (id || args) semantics, incrementally tracked), the leak scanner is bounded and evidence-gated, prior review feedback is fully and verifiably addressed, and the integration seam (converter throw → pipeline rethrow → GeminiChat instanceof retry) is now covered by a real-stream fixture. Finding 1 (document or restore the leak-retry budget) is the only thing I'd ask to resolve before merge, alongside the already-planned E2E dispatch.

中文摘要

b64cc65c7 上复审。本地跑通全部相关套件(601/601)+ typecheck,并用一次性探针验证了:phantom 槽不再误杀(#6783 的确切场景)、迟到的 name 会按序释放暂扣文本、Use </think>… 普通文本不再触发重试、tool_calls 空完成会被扣留重试、ID 冲突改为迁移不再串参、两个二次方性能问题已消除。上一轮 8 条评审意见在该提交全部真实修复且各有回归测试。

遗留两点:(1) 应修: PROTOCOL_TAG_LEAK 重试预算从 2 静默翻倍到 4,抹掉了 #6712 的有意拆分及其注释——确定性泄漏模型的失败成本从 3 次尝试 + 6s 变为 5 次 + 20s,请在 PR 描述中说明理由或恢复拆分;(2) 小问题: telemetry/types.tsApiRetryEvent 注释仍引用本 PR 已删除的 INVALID_CONTENT_RETRY_OPTIONS 与 for 循环;另 PR 描述中的测试数字(155/155、draft 状态)已过期。真实模型 E2E 仍应为合并门槛。整体质量很高,倾向通过。

@yiliang114
yiliang114 requested a review from wenshao July 13, 2026 07:19
@yiliang114

Copy link
Copy Markdown
Collaborator Author

Review closeout on 58ba47b98:

  • Fixed held thought-tag leaks at stream finish: raw <think> tags in reasoning_content now throw PROTOCOL_TAG_LEAK before pending parts/tool calls are released.
  • Fixed malformed tool-call telemetry: nameless / no completed named tool-call finishes now throw InvalidStreamError with NAMELESS_TOOL_CALL instead of surfacing later as NO_FINISH_REASON.
  • Left the content-only qwen 3.7 max 模型在 content 字段中返回 <think> 标签而非 reasoning_content #6666 provider fallback out of this PR. The PR body already says Related to #6666 and explicitly does not claim to resolve content-only <think> parsing; enabling taggedThinkingTags in the default provider is a separate provider/model policy change.

Verification run locally:

  • vitest run src/core/openaiContentGenerator/converter.test.ts — 176 passed
  • vitest run src/core/geminiChat.test.ts — 225 passed
  • prettier --check on touched files
  • git diff --check
  • npm -w packages/core run typecheck

All review threads are resolved; CI is still running on the new head.

…-v2' into cx/pr-6794-review-fixes

# Conflicts:
#	packages/core/src/core/invalid-stream-error.ts
#	packages/core/src/core/openaiContentGenerator/converter.test.ts
#	packages/core/src/core/openaiContentGenerator/converter.ts
@wenshao

wenshao commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

🧪 @qwen-code /triage 格式试跑 · tmux 真机验证 · informational.

Summary

Re-lands malformed streamed-response retry (after #6783 reverted #6754), with narrower nameless tool-call detection so legitimate tool calls are not misclassified as malformed and wrongly retried. Core paths: packages/core/src/core/openaiContentGenerator/** + geminiChat.ts.

Confidence: 3/5 — defer to a maintainer. This re-lands a change that was reverted for breaking tool-call emission across the E2E suite, so it deserves a human sign-off — but it is well-defended: the PR's own suite (472 tests) passes and a real tmux run confirms the malformed-stream retry recovers.

sequenceDiagram
    participant User as User
    participant Chat as GeminiChat
    participant Prov as Model Provider
    User->>Chat: prompt
    Chat->>Prov: stream request (attempt 1)
    Prov-->>Chat: content but no finish_reason
    Chat->>Chat: InvalidStreamError NO_FINISH_REASON
    Chat->>Prov: retry (attempt 2)
    Prov-->>Chat: content plus finish_reason stop
    Chat->>User: recovered answer
Loading

Real-scenario testing (tmux)

Drove the installed build (before) and this PR's build (after — npm run dev in a worktree at 016a343) against a mock OpenAI endpoint that returns a malformed first stream (content, no finish_reasonNO_FINISH_REASON) then a valid stream on retry:

# BEFORE — installed qwen
$ qwen -p 'Reply with the answer to life.'
PARTIAL: this attempt is incompleteRETRY_OK: the answer is 42
  mock: attempt=1 MALFORMED_no_finish_reason | attempt=2 VALID | attempt=3 VALID

# AFTER — this PR (worktree dev build)
$ npm run dev -- -p 'Reply with the answer to life.'
PARTIAL: this attempt is incompleteRETRY_OK: the answer is 42
  mock: attempt=1 MALFORMED_no_finish_reason | attempt=2 VALID | attempt=3 VALID

Both retry the malformed stream and recover the valid answer (RETRY_OK: the answer is 42).

Scope note (honest): this simple NO_FINISH_REASON scenario does not isolate the PR's actual change — the narrower nameless tool-call detection — because the installed build already retries and the narrowing only surfaces on a tool-call stream. That path is instead verified by the unit suite, run against the PR build in the worktree:

$ vitest run geminiChat.test.ts converter.test.ts streamingToolCallParser.test.ts
 Test Files  3 passed (3)
      Tests  472 passed (472)

Refreshed for head 9dab333 (was 016a343 when first tested): the only delta since is added stream-review edge-case tests + JSDoc — no logic change — so the behavioral evidence and the green suite stand.

One thing worth checking (from the run logs)

In headless -p mode the failed attempt's partial text leaks into the final output in both builds — the answer prints as PARTIAL: this attempt is incomplete + RETRY_OK: the answer is 42, not just the clean retried result. The PR's RETRY signal is documented as "the UI should discard any partial content from the attempt that just failed," which suggests the discard is UI-scoped and doesn't cover the non-interactive -p aggregation path. Not a regression from this PR (identical in the installed build) — but worth confirming the discard also covers headless output.

Verdict

Defer to the maintainer for the core re-land call. The regression that got #6754 reverted (tool-call emission) is exactly what the narrower detection targets, and the PR's suite covers it (472 pass) — but re-landing a reverted core change deserves a human sign-off. Recommend also confirming the partial-content discard on the -p / non-UI path.

Qwen Code · qwen3.7-max

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

中文说明

摘要:重新落地"流式响应损坏时重试"(#6783 曾 revert 掉 #6754),并收窄 nameless tool-call 检测,避免合法 tool call 被误判为损坏而错误重试。触及 core:openaiContentGenerator/** + geminiChat.ts

置信度:3/5 —— 转交维护者。 这是重新落地一个曾因"破坏 tool-call 输出"而被 revert 的改动,需人把关;但防护到位:PR 自己的 472 个测试全过,tmux 真机也确认损坏流重试能恢复。

tmux 真机测试:用 mock 的 OpenAI 端点(首个流只发 content、无 finish_reason → 触发 NO_FINISH_REASON,重试时发合法流),分别驱动装机版(before)与本 PR 构建(after,worktree npm run dev)。两者都重试并恢复出 RETRY_OK: the answer is 42

诚实说明:这个简单的 NO_FINISH_REASON 场景无法隔离 PR 的真正改动(nameless 检测收窄)——因为装机版本就会重试,且收窄只在 tool-call 流上体现。该路径改由单测验证:worktree 里跑 geminiChat/converter/streamingToolCallParser 三个测试文件,472 全过(已按新 head 9dab333 刷新:与首测的 016a343 差异仅为新增流审查边界测试 + JSDoc、无逻辑改动,故结论不变。)

一个可分析的改进点:headless -p 模式下,失败attempt的残缺文本泄漏进了最终输出(两个构建都是),打印成 PARTIAL… + RETRY_OK… 而非干净的重试结果。PR 里 RETRY 信号注释说"UI 应丢弃失败attempt的残缺内容",说明该丢弃是 UI 层的、没覆盖非交互 -p 聚合路径。这不是本 PR 的回归(装机版一样),但值得确认丢弃是否也覆盖 headless 输出。

结论:core 重新落地的合并决定转交维护者。让 #6754 被 revert 的回归(tool-call 输出)正是本次收窄检测所针对的,且 PR 单测已覆盖(472 过)——但重新落地被 revert 的 core 改动应由人签字。另建议确认 -p/非 UI 路径上的残缺内容丢弃。

Comment thread packages/core/src/core/openaiContentGenerator/converter.ts Outdated
Comment thread packages/core/src/core/openaiContentGenerator/converter.test.ts Outdated
Comment thread packages/core/src/core/openaiContentGenerator/converter.test.ts Outdated
Comment thread packages/core/src/core/openaiContentGenerator/types.ts
Comment thread packages/core/src/core/openaiContentGenerator/pipeline.ts
@yiliang114 yiliang114 added this to the v1.0.0 milestone Jul 13, 2026

@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 — no blockers. Suggestions are inline.

Comment thread packages/core/src/core/openaiContentGenerator/streamingToolCallParser.ts Outdated
Comment thread packages/core/src/core/geminiChat.ts
@wenshao

wenshao commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Code Review — fix(core): re-land malformed stream retry with narrower nameless detection

Reviewed the full diff (10 files, +1144/−157) and traced the runtime paths against the post-change sources of converter.ts, streamingToolCallParser.ts, geminiChat.ts, and pipeline.ts at head 9dab333. This is a static trace + targeted read, not a local test run — the PR's own evidence (565/565 core, E2E matrix) stands on its own.

Overview

Re-lands the malformed-stream retry from #6754 (reverted in #6783) but narrows the detection so legitimate tool-call responses are no longer dropped. Concretely:

  • invalid-stream-error.ts (new): extracts InvalidStreamError out of geminiChat.ts into a leaf module and adds a MALFORMED_TOOL_CALL variant. Re-exported from geminiChat.ts for back-compat.
  • streamingToolCallParser.ts: tracks "nameless" slots (namelessToolCallIndices) — a slot with an id/args but no function name — via hasNamelessToolCall(); ignores empty phantom slots; isolates a different tool-call id that reuses an occupied index into a fresh index instead of splicing arguments.
  • converter.ts: a rolling, request-scoped scanner for raw <think>/</think> leaks in visible text (gated on structured reasoning), plus malformed-tool-call detection; buffers "untrusted" parts until disambiguated, and throws InvalidStreamError at finish for genuine leaks / nameless calls / empty tool_calls finishes.
  • geminiChat.ts / pipeline.ts: unifies the invalid-stream budget to maxRetries: 4 (protocol-tag leaks were 2), converts the content-retry for-loop to for(;;) driven by per-class counters, drops the dead INVALID_CONTENT_RETRY_OPTIONS branch, and rethrows InvalidStreamError unwrapped so the retry loop owns it.

Correctness — looks sound; verified the tricky paths

  • for(;;) conversion is safe. Every path terminates: success → lastError = null; break (geminiChat.ts:2258); each error class is bounded by its own counter (rateLimitRetryCount, transportStreamRetryCount, transientInvalidStreamRetryCount, protocolTagLeakRetryCount) and falls to the terminal break at geminiChat.ts:2518 when exhausted. The counters are never reset inside the loop, and the continuation-recovery generator (geminiChat.ts:2583) mirrors the same shape. No unbounded-loop risk. The old attempt-- juggling is genuinely gone, not just relocated — this is cleaner.
  • Phantom-slot suppression is correctly avoided. A trailing {index:1, function:{}} slot early-returns in addChunk (streamingToolCallParser.ts:75) and never enters namelessToolCallIndices, so a valid named call + phantom slot keeps its finish_reason — the exact regression that sank fix(core): retry malformed streamed responses #6754.
  • Nameless tracking clears on name arrival. meta.name persists across chunks and the set is deleted whenever a name is present (streamingToolCallParser.ts:182), so multi-delta calls where the name leads (standard OpenAI shape) never false-trip. Only a slot that is still nameless at finish_reason throws — a reasonable definition of malformed.
  • MALFORMED_TOOL_CALL can't fire on a named-but-truncated call. getCompletedToolCalls() returns any slot with meta.name (repairing/falling back the buffer), so completedToolCalls.length is ≥1 and the truncation path (toolCallsTruncated → 'length') still owns it. Confirmed no collision.
  • Thinking-tag scanner is bounded and reasoning-gated. Whitespace runs in a spaced prefix are skipped rather than accumulated (the 80-space test), and all leak logic is gated on hasStructuredReasoningContent, so non-reasoning providers and legitimately-quoted `<think>` references are untouched. The retroactive-reasoning cases (tag emitted before reasoning arrives) are explicitly handled and tested.
  • Pipeline rethrow ordering is right: InvalidStreamError is checked first (pipeline.ts:561), before StreamContentError, so it reaches the retry loop unwrapped.
  • Module extraction breaks a real cycle. converter.ts/pipeline.ts need InvalidStreamError; importing it from geminiChat.ts would be circular. The leaf module is the right call, and the re-export keeps any geminiChat.js importers working (none exist outside tests today, so it's belt-and-suspenders — fine). Telemetry ContentRetryEvent.error_type is a plain string, so MALFORMED_TOOL_CALL flows through with no telemetry change needed. ✔

Points worth a second look

  1. Index-reuse orphan now forces a retry instead of being overwritten (behavior change). When a different id reuses an occupied index, the new call is moved to a fresh index (streamingToolCallParser.ts:93-98) and the superseded slot is left in namelessToolCallIndices. If that orphan never gets a name, hasNamelessToolCall() stays true and the finish chunk throws MALFORMED_TOOL_CALL — even though the surviving call is valid (see the new test should isolate a new id from an earlier nameless call at the same index, which leaves index 0 nameless). This is strictly safer than the old code's silent argument-splicing, but for a non-conformant provider that deterministically reuses one streamed index across two ids, all 4 retries would reproduce and the request would hard-fail. Worth considering: when you supersede a slot by relocating a new id, should the abandoned slot be dropped from namelessToolCallIndices (the provider clearly abandoned it), reserving MALFORMED_TOOL_CALL for genuinely-truncated first calls? Index reuse across distinct ids is unusual, so this is an edge-case note, not a blocker.

  2. Invalid-stream retry latency is now higher on hard failures. Transient and protocol-tag leaks keep separate budgets of 4 each, and delays escalate 2s·n (2+4+6+8 = 20s per class). A stream that trips both classes can spend ~40s across up to 8 invalid-stream retries — on top of rate-limit/transport budgets — before surfacing the error. This is the documented intent (protocol-tag leaks deliberately regained the full budget), just flagging the worst-case UX.

  3. Nit — isPossibleThinkingTagPrefix('') returns true. Empty string is a prefix of every tag, so this is a latent footgun; it's currently defused by the downstream startsWith('</thi')/startsWith('<think') checks in isTerminalThinkingTagLeak, but an early-return if (!value) return false; would make the helper safe in isolation.

Style / conventions

  • Consistent with the surrounding file: descriptive comments on non-obvious state, RequestContext fields documented in types.ts, no any leakage (test casts are explicitly as unknown as OpenAI.…).
  • Dead-code removal (the documented-unreachable isContentError branch and its NOTE test) is clean and well-justified.
  • findNextUnusedIndex() vs the existing findNextAvailableIndex(): the names are close enough to invite confusion — a one-line comment on findNextUnusedIndex clarifying "purely buffer-occupancy, no completeness check" (versus the completeness-aware sibling) would help future readers.

Test coverage

Excellent — ~30 new converter cases covering split tags across deltas, mixed-case/whitespace variants, literal-reference preservation, phantom slots, nameless-with/without-id, empty tool_calls finish, and the real converter→pipeline→GeminiChat path (not just mocked). The parser gains isolation + nameless-tracking tests. The retry-count assertions (create 5×, total_attempts: 5) correctly encode the new budget.

Security / performance

  • No injection or data-exposure surface; the scanner only classifies model output. Fabricated functionCall ids still use Date.now()+Math.random() (pre-existing, out of scope).
  • Scanner is O(visible chars) with bounded pendingTag; hasNamelessToolCall() is O(1). No new hot-path cost.

Verdict

Solid re-land. The core regression from #6754 is convincingly fixed and well-tested, termination is sound, and the blast radius is contained by the reasoning gate. I'd merge after the author weighs in on point #1 (orphaned-index → forced-retry semantics) — the rest are nits.

中文小结

整体是一次可靠的 re-land:#6754 的核心回归(phantom slot 抑制 finish_reason)已被 hasNamelessToolCall() + addChunk 早返回真正修复;for(;;) 循环各错误类各有独立计数器、均可终止;thinking-tag 扫描受 hasStructuredReasoningContent 门控且有界,字面 <think> 引用不受影响;InvalidStreamError 抽到叶子模块正确打破了循环依赖。

需作者确认的一点:不同 id 复用同一 streamed index 时,新调用被移到新 index,而被顶替的空名 slot 仍留在 namelessToolCallIndices,finish 时会抛 MALFORMED_TOOL_CALL 并触发重试——比旧的参数拼接安全,但对确定性复用 index 的非规范 provider 可能 4 次重试后硬失败。其余为小问题(isPossibleThinkingTagPrefix('') 返回 true、findNextUnusedIndex 命名易混)。

🤖 Static review via Claude Code — traced the code paths but did not run the suite locally; relied on the PR's stated test evidence.

@yiliang114

Copy link
Copy Markdown
Collaborator Author

Final scope audit and current-head verification

I re-audited the review history against the original malformed-stream fix, the #6783 phantom regression, observed traces, and provider-valid stream shapes. The final head deliberately removes review-driven recovery for synthetic states instead of continuing to expand the parser.

Scope Before final audit Current head
PR diff +1,696 / -203 +384 / -156
converter.test.ts additions +1,055 +137
streamingToolCallParser.test.ts additions +123 +27
flowchart LR
    A["Observed trace / valid provider shape"] --> B["Small validation boundary"]
    B --> C["Retry with typed InvalidStreamError"]
    D["Reverse order, interleaved tag names, same-index ID takeover"] -. "no producer; removed" .-> E["Scanners, relocation map, Cartesian tests"]
Loading

Kept

  • valid named call plus a metadata-free phantom slot;
  • real nameless calls signaled by ID or streamed arguments;
  • legal arguments-first, name-later ordering, including an ignored argument replay;
  • tool_calls finish with no completed named call;
  • the recorded reasoning-first cross-channel thinking-tag leak;
  • one real converter → pipeline → GeminiChat retry integration path.

Removed or declined

  • partial-tag prefixes such as </t> / bare <;
  • arbitrary visible-before-reasoning and channel-interleaving permutations;
  • same in-flight wire index changing ownership across multiple IDs, followed by older-ID replay and ID-less continuation routing;
  • tests for every internal branch, reset path, prefix spelling, finish-reason combination, and future hypothetical.

These cases were technically constructible in unit tests, but no trace, specification, or checked-in producer required them. The exact threads that led to scanner/routing growth now have technical scope-reset replies.

Verification on edb7bc23da

  • converter.test.ts + streamingToolCallParser.test.ts + geminiChat.test.ts: 447/447 passed
  • post-merge focused reruns: 221/221 converter/parser and 226/226 GeminiChat
  • changed-file ESLint: passed
  • core typecheck: passed
  • core build: passed
  • git diff --check: passed

Current-head mock + tmux E2E

Attempt 1 streamed visible text plus a real tool call with id and arguments but no function.name, ending with finish_reason=tool_calls. Attempt 2 returned a valid STOP response.

Observed:

Invalid stream [MALFORMED_TOOL_CALL] (retry 1/4). Waiting 2s before retrying...
mock requests = 2
retryContainsFailedText = false
retryContainsFailedCall = false
tool executions = 0
TUI output = RECOVERED_ONLY_6794

The TUI correctly discarded the failed attempt and showed only the recovered response.

Known limitation: headless --output-format json still concatenates failed-attempt text with the recovered text because that aggregator does not consume RETRY as a rollback signal. This was observed before this scope reset and was not baseline-compared here, so it is documented rather than claimed as a regression from this PR.

@wenshao wenshao left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[Critical] streamingToolCallParser.ts:94-127 again splices arguments when a different tool-call ID reuses an incomplete index. With call_first at index 0 holding {"fromFirst": and call_second at the same index supplying "fromSecond"}, the metadata is overwritten and the converter emits only call_second({fromFirst: "fromSecond"}); call_first disappears. This directly contradicts Reviewer Test Plan item 4 and the earlier reply that marked the case fixed. Treat every different ID as an identity boundary and isolate or reject it before appending arguments.

— Codex $qreview via Qwen Code /review

Comment thread packages/core/src/core/openaiContentGenerator/converter.ts Outdated
Comment thread packages/core/src/core/openaiContentGenerator/streamingToolCallParser.test.ts Outdated
Comment thread packages/core/src/core/openaiContentGenerator/streamingToolCallParser.ts Outdated
Comment thread packages/core/src/core/geminiChat.test.ts
Comment thread packages/core/src/core/openaiContentGenerator/converter.test.ts
Comment thread packages/core/src/core/openaiContentGenerator/converter.test.ts Outdated
Comment thread packages/core/src/core/openaiContentGenerator/streamingToolCallParser.ts Outdated
Comment thread packages/core/src/core/openaiContentGenerator/converter.test.ts
Comment thread packages/core/src/core/openaiContentGenerator/streamingToolCallParser.test.ts Outdated

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed — no blockers. Suggestions are inline.

Comment thread packages/core/src/core/openaiContentGenerator/converter.ts
Comment thread packages/core/src/core/openaiContentGenerator/converter.ts
Comment thread packages/core/src/core/openaiContentGenerator/converter.ts
Comment thread packages/core/src/core/openaiContentGenerator/converter.ts
@yiliang114

yiliang114 commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

Review follow-up — head 11ab8a1123

This review round contained two reachable defects; both were fixed without restoring the deleted scanners or routing protocol.

Accepted

  • Normal visible text may split Use and </think>... across deltas. One request-scoped boolean now distinguishes a truly response-leading tag from a literal tag after visible text. The existing literal test was replaced with this split shape.
  • An ID-less name-only delta at nonzero index is contract-valid. It now stays on its occupied wire index after arguments complete. The previous synthetic repeated-ID/repeated-arguments test was replaced with the legal index-1 shape.

Declined by the producer gate

  • A different ID taking ownership of the same incomplete index contradicts stable tool-call index ownership. The OpenAI accumulator also treats the index as one logical slot; no trace or checked-in producer creates this sequence. The current Reviewer Test Plan item 4 is the empty tool_calls finish case, not multi-ID routing, and the PR body explicitly excludes this recovery protocol.
  • Replacing already-complete arguments with a different full JSON value for the same ID contradicts append-only argument deltas and has no observed producer.
  • Split tag names and visible-before-reasoning channel order still have no trace or provider contract, so the character scanners remain deleted.
  • The continuation exhaustion and two converter tool-call combinations duplicate already-covered branches. They add a type × path × finish Cartesian matrix without an observed defect.

Current-head verification

  • Converter and parser suites: 221/221 passed
  • Changed-file ESLint: passed
  • Core typecheck: passed
  • Core build: passed
  • git diff --check and pre-commit Prettier/ESLint: passed
  • Current PR size: +404 / -156 across 10 files, versus +1696 / -203 before the scope reset

The earlier 447-test focused report and current-head tmux evidence remain documented in the scope-reset report; this follow-up changed only the converter/parser boundary handling. Current GitHub CI is running on 11ab8a1123.


Second follow-up — head 6f4ffd5ff7

One reachable duplicate-execution defect was found after the first follow-up. Replaying an ID-less name-only delta could enter the legacy incomplete-call fallback and create a second empty-argument call. The parser now has one idempotent metadata-only update-and-return path for both ID-less and known-ID deltas; the two older metadata replay special cases were deleted. Metadata-only detection uses an exact empty string, so whitespace-only argument fragments inside JSON strings remain intact.

The protocol closing evidence was also narrowed to the recorded new-line-leading </think> shape. Inline literal references remain visible even when reasoning mentions <think>; cross-delta tag-name scanning, diagnostic logging, and new error subtypes remain intentionally out of scope.

Current-head verification:

  • Converter and parser suites: 222/222 passed
  • Changed-file ESLint: passed
  • Core typecheck and build: passed
  • git diff --check and pre-commit Prettier/ESLint: passed
  • Current PR size: +427 / -174 across 10 files, still far below +1696 / -203 before the scope reset

GitHub CI and the next automatic review are running on 6f4ffd5ff7.

@wenshao

wenshao commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

@qwen-code /triage

@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 commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

🔁 Re-verification report at head 6f4ffd5f (merge reference)

This is round 3, and it re-verifies a materially changed head — not a carry-over of the earlier green verdicts. My prior local reports were at 9dab333d and 2b879a0f, and my last code review was at 6267c436e.

What changed since my last verified head

Since 6267c436e the branch advanced by a merge + two fixes — 11ab8a11 preserve valid streamed metadata boundaries and 6f4ffd5f deduplicate streamed tool metadata — which simplified the implementation substantially (net +303 / −1614 vs 6267c436e):

  • the parser dropped the relocatedIndexByWireIndex scheme I reviewed earlier and now uses a leaner namelessToolCallIndices set + hasNamelessToolCall() + the pre-existing findNextAvailableIndex();
  • ~1000 lines of now-obsolete tests were removed, so the focused count moved 593 → 541.

Because the code path changed, I rebuilt and re-ran everything from scratch in an isolated worktree (npm ci build) rather than trusting the earlier verdict. Net PR vs base (71c7e448) is a compact +427 / −174 across 10 files.

before/after + gates

independent probe + full suite

What I ran

  1. Focused suites @ headstreamingToolCallParser 73, pipeline 93, converter 149, geminiChat 226 → 541 / 541 passed.
  2. Real before/after — overlaid the 6 changed source files with their merge-base (main) versions, kept the PR test files, re-ran. 9 discriminating tests fail on main, pass on the PR head (532/541 on main). They map exactly to the feature surface:
    • geminiChat: end-to-end retry of protocol tag leaks (budget 2) and malformed tool calls (budget 4) through the real OpenAIContentGenerator → pipeline → retry path;
    • converter: rejects a tool_calls finish with no completed named call, rejects a call that never gets a name, rejects a cross-channel </think> leak, releases held inline-tag parts on clean finish;
    • parser: tracks real nameless calls while ignoring phantom chunks, and keeps a late name attached at index 1 and index 2 (the earlier review's nonzero-index misrouting Critical).
  3. Independent probe (my own spec, not the PR's tests) — drives the real converter + parser through the happy path, MALFORMED_TOOL_CALL, the narrowing (phantom slot must not drop a real call), PROTOCOL_TAG_LEAK, a no-false-positive legit split </think>, and both earlier-review Criticals → 7 / 7 passed.
  4. Full core package suite15254 passed, 8 skipped. The only 4 failures are all in src/memory/refresh.test.ts, which the PR does not touch (base..head diff empty), whose files are byte-identical to main, and which fail 4/7 in isolation too (deterministic, QWEN_CODE_MEMORY_LOCAL filesystem-env, disjoint import graph). Not a PR regression.
  5. Quality gates (10 changed files)tsc --noEmit exit 0, eslint exit 0, prettier --check clean.

Carry-over findings status (from the 6267c436e review)

  • Resolvedinvalid-stream-error.ts now carries the @license … Apache-2.0 header (was missing before).
  • ⚠️ Still open (minor, non-blocking)pipeline.ts:616 still says the parser "was already reset after the first finish chunk". No such reset exists; the new MALFORMED_TOOL_CALL check relies on the parser persisting for the whole stream, so this comment is now load-bearing-by-absence and worth rewording in a follow-up.

Verdict

The leaner re-land holds up: on a persistently misbehaving model the malformed cases (leaked protocol tags, nameless / named-call-less tool finishes) funnel into the bounded independent retry budget, while phantom slots and legitimately-mentioned </think> no longer cause false drops or false retries. Everything the PR touches is green (541 focused + 7 probe), the diff is smaller and simpler than the version I last reviewed, and typecheck/lint/format all pass. LGTM — safe to merge, with the one cosmetic pipeline.ts comment reword as an optional follow-up.

Built & run locally from an isolated worktree detached at 6f4ffd5ff7269; base = merge-base 71c7e448; vitest v3.2.4.

中文版(Chinese version)

🔁 在 head 6f4ffd5f 的复验报告(合并参考)

这是第 3 轮复验,且针对的是一个实质性变化的 head —— 并非沿用此前的绿灯结论。我此前的本地报告在 9dab333d2b879a0f,最近一次代码审查在 6267c436e

自上次已验证 head 以来的变化

6267c436e 起,分支新增了一个 merge 加两个修复提交 —— 11ab8a11 preserve valid streamed metadata boundaries6f4ffd5f deduplicate streamed tool metadata —— 使实现大幅简化(相对 6267c436e+303 / −1614):

  • parser 去掉了我上轮审查的 relocatedIndexByWireIndex 方案,改用更精简的 namelessToolCallIndices 集合 + hasNamelessToolCall() + 既有的 findNextAvailableIndex()
  • 删除了约 1000 行已过时的测试,聚焦测试数从 593 → 541

由于代码路径已变,我在隔离 worktree 中(npm ci 构建)从零重新构建并重跑全部验证,而非沿用旧结论。相对 base(71c7e448)的净改动为紧凑的 +427 / −174,涉及 10 个文件。

我实际运行了什么

  1. 本 head 聚焦套件 —— streamingToolCallParser 73、pipeline 93、converter 149、geminiChat 226 → 541 / 541 通过
  2. 真实的 before/after —— 将 6 个改动源文件覆盖为其 merge-base(main)版本、保留 PR 的测试文件后重跑:9 个判别性测试在 main 上失败、在 PR head 上通过main 上 532/541)。它们与功能面精确对应:
    • geminiChat:经真实 OpenAIContentGenerator → pipeline → retry 路径端到端重试 protocol tag leaks(预算 2)与 malformed tool calls(预算 4);
    • converter:拒绝没有完整命名调用的 tool_calls finish、拒绝始终没有名字的调用、拒绝跨通道 </think> 泄漏、在干净 finish 时释放被暂存的内联标签 parts;
    • parser:追踪真实 nameless 调用同时忽略 phantom chunk,并把迟到的名字正确保留在 index 1index 2(即上轮审查的非零下标错路由 Critical)。
  3. 独立探针(我自己写的 spec,非 PR 自带测试)—— 驱动真实 converter + parser 走一遍:happy path、MALFORMED_TOOL_CALL、收窄(phantom 槽位不得丢弃真实调用)、PROTOCOL_TAG_LEAK、合法的拆分 </think> 不误报,以及两个 Critical → 7 / 7 通过
  4. 完整 core 包套件 —— 15254 通过,8 跳过。仅有的 4 个失败全部位于 src/memory/refresh.test.ts:该 PR 未触及(base..head diff 为空)、其文件与 main 逐字节一致、单独运行也稳定失败 4/7(确定性、QWEN_CODE_MEMORY_LOCAL 文件系统环境、导入图与本 PR 不相交)。不是本 PR 的回归。
  5. 质量门禁(10 个改动文件) —— tsc --noEmit 退出 0、eslint 退出 0、prettier --check 全部合规。

上轮(6267c436e)发现的处理状态

  • 已解决 —— invalid-stream-error.ts 现已带上 @license … Apache-2.0 头(此前缺失)。
  • ⚠️ 仍存在(轻微、不阻塞) —— pipeline.ts:616 仍写着 parser "was already reset after the first finish chunk"。当前并不存在该 reset;新的 MALFORMED_TOOL_CALL 检查依赖 parser 在整条流生命周期内持续存在,因此这条注释如今“因缺失而变得关键”,建议在后续 PR 中改写措辞。

结论

这次更精简的 re-land 站得住:面对持续异常的模型,malformed 情形(协议标签泄漏、nameless / 无命名调用的 tool finish)都会汇入有界的独立重试预算;而 phantom 槽位与合法提及的 </think> 不再导致误丢或误重试。PR 触及的一切均为绿灯(541 聚焦 + 7 探针),diff 比我上次审查的版本更小更简单,且 typecheck/lint/format 全部通过。LGTM —— 可以合并pipeline.ts 那条注释的措辞改写作为可选的后续项即可。

在隔离 worktree(detached 于 6f4ffd5ff7269)本地构建并运行;base = merge-base 71c7e448;vitest v3.2.4。

Comment thread packages/core/src/core/openaiContentGenerator/converter.ts Outdated
@yiliang114

Copy link
Copy Markdown
Collaborator Author

Scope retrospective

A short note on why this PR temporarily grew far beyond its original contract, and why the current smaller implementation is intentional.

The expansion came from two implementation decisions:

  1. We treated a second tool-call ID reusing an occupied wire index as a recoverable routing problem. The original review correctly identified possible argument splicing and allowed either relocation or rejection. Choosing relocation was the mistake: it introduced a second routing protocol with replay, takeover, fallback, and cleanup states. Later findings were locally valid within that new state machine, but the sequence had no observed or checked-in producer. The final implementation uses the smaller fail-closed boundary instead.

  2. We generalized one recorded complete cross-channel thinking-tag leak into character-level scanners supporting truncated tag names, arbitrary channel order, and interleaving. That introduced request-scoped scanner state, buffering, and tests for internal parser permutations without a trace or provider contract requiring those inputs. The final implementation validates the recorded malformed shape and preserves normal literal tags without restoring the general scanner.

At the largest point, the PR was approximately +1,696/-203, with more than 1,000 additions in converter.test.ts. The scope reset removed the scanners, relocation protocol, and Cartesian test matrix. The current implementation is +427/-174.

The rule used for the final audit was: an edge case needs an observed trace, a specification-permitted input, or a reachable checked-in producer. Nonconforming streams receive one fail-closed boundary rather than recovery state.

This does not dismiss the review feedback. Reachable findings—including literal-tag false positives, arguments-first/name-later ordering, real nameless calls, retry propagation, normal cross-delta text boundaries, and metadata replay causing duplicate execution—remain fixed and covered.

Detailed scope and verification evidence: #6794 (comment)

Latest follow-up audit: #6794 (comment)

@yiliang114 yiliang114 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Independent re-review against current head. Pre-checks all green (tsc, eslint, 449/449 tests). The malformed stream retry re-land is well-scoped and the nameless-tool-call / thinking-tag-leak detection paths are correct. The pendingUntrustedResponseParts hold-and-release mechanism properly prevents visible content from being emitted before the stream is classified. for(;;) retry loop with per-type budgets replaces the old ContentRetryOptions path cleanly. No blockers found. Two P2 observations (atVisibleLineStart update scope and per-chunk tag fragment limitation) are intentional or inert.

@wenshao

wenshao commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

CI failure investigation: infra flake, not this PR — green after re-run ✅

The red ❌ on 3cf6835 came from web-shell E2E Smoke (ubuntu-latest, Node 22.x), and it died during environment setup, before a single test ran:

Run npx playwright install --with-deps chromium
E: Could not get lock /var/lib/apt/lists/lock. It is held by process 2571257 (apt-get)
E: Unable to lock directory /var/lib/apt/lists/
Failed to install browsers
Error: Installation process exited with code: 100

playwright install --with-deps needs apt-get, and another apt-get process on the runner was holding the lock (typical unattended-upgrades / concurrent-provisioning race). The job failed 2m58s in, at the browser-install step — a well-known runner-level flake (failed attempt-1 log).

Why it can't be this PR:

  • The diff touches only packages/core (geminiChat / openaiContentGenerator stream-retry code) — zero web-shell, Playwright, or CI-config files.
  • The substantive Test (ubuntu-latest, Node 22.x) job passed at the same head (11m22s).
  • The failure happened in apt before any project code was built or executed.

Resolution: re-run (attempt 2) passed in 3m04s → green job. All checks on the PR are now passing.

Unrelated side note for anyone auditing CI health: main itself was red on the same job at 0c4f816 for a different, real reason — a TS compile error from a conflict resolution (run-qwen-serve.ts(3896): TS2353 'credentialProvider' does not exist). That is not connected to this PR, and this PR's merge-commit build (which merges current main) now compiles cleanly, so it appears to have been fixed by subsequent main commits.

中文版本 (Chinese Version)

CI 失败调查:基础设施抖动,与本 PR 无关 — 重跑后已全绿 ✅

3cf6835 上的红叉来自 web-shell E2E Smoke (ubuntu-latest, Node 22.x),且失败发生在环境准备阶段,任何测试都尚未运行:

Run npx playwright install --with-deps chromium
E: Could not get lock /var/lib/apt/lists/lock. It is held by process 2571257 (apt-get)

playwright install --with-deps 需要调用 apt-get,而 runner 上另一个 apt-get 进程正持有锁(典型的 unattended-upgrades / 并发初始化竞争)。任务在 2 分 58 秒时死于浏览器安装步骤——这是常见的 runner 级抖动(attempt-1 失败日志)。

为什么不可能是本 PR 导致:

  • 改动只涉及 packages/core(geminiChat / openaiContentGenerator 流重试代码)——没有任何 web-shell、Playwright 或 CI 配置文件。
  • 实质性的 Test (ubuntu-latest, Node 22.x) 任务在同一 head 上通过(11m22s)。
  • 失败发生在 apt 阶段,项目代码尚未构建或执行。

处理结果: 重跑(attempt 2)3 分 04 秒通过 → 绿色任务。PR 上所有检查现已全部通过。

附带说明(供关注 CI 健康的人参考):main 分支自身在 0c4f816 上同一任务也是红的,但原因不同且真实——冲突解决引入的 TS 编译错误(run-qwen-serve.ts(3896): TS2353 'credentialProvider' does not exist)。这与本 PR 无关,且本 PR 的 merge-commit 构建(合并了当前 main)现已正常编译,说明该问题已被后续 main 提交修复。

@wenshao

wenshao commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

@qwen-code /triage

@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 commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

🔁 Re-verification report at head 3cf68351a (round-4, merge reference)

Follow-up to the round-3 report at 6f4ffd5f. The branch moved again after that report, so this is a fresh local build + test verification of the exact current head, in an isolated worktree with a clean npm ci and full core build (Node v22.23.1 / macOS).

What changed since the last verified head

Unlike previous rounds this was not a rebase6f4ffd5f is still in the ancestry. Two commits on top:

  • 8be58e51 — merge of origin/main (no PR-scope file changes beyond the merge itself);
  • 3cf68351afix(core): preserve streamed protocol line boundaries: the closing-tag leak check previously required the \n and the </think> tag to arrive in the same chunk (CLOSING_THINKING_TAG_PATTERN needs a literal \n in visibleText). The new RequestContext.atVisibleLineStart flag carries line-boundary state across chunk splits, so a closing tag streamed in its own chunk right after a newline is now caught, while any visible text after the newline clears the flag and keeps mid-line literal </think> references intact. It also fixes the stale pipeline.ts duplicate-finish comment flagged as a minor in the round-3 review — no open findings remain.

Net PR diff vs merge-base d1cda898 is unchanged in shape: 10 files, +467/−178, all in packages/core.

Results

  • Focused suites (all 4 PR-touched): parser 73 + pipeline 93 + converter 150 + geminiChat 226 = 542/542 passed.
  • 8 independent maintainer probes (written from the PR's claimed behavior, not its tests): split-tag rejection (P1), same-chunk regression guard (P2), mid-line literal preserved when split into its own chunk (P3, P5), horizontal-whitespace line starts (P4, P7), gating on a thinking tag having appeared in reasoning (P6), and the round-3 critical (late-name call at nonzero index) staying fixed (P8) — 8/8 passed.
  • Full packages/core suite: 15291 passed, 8 skipped, 4 failed — the 4 failures are the same pre-existing src/memory/refresh.test.ts environment artifact documented in round-3: packages/core/src/memory/ is byte-identical to origin/main (0 files differ) and the test references no PR-touched module. Not PR-related.
  • Gates: tsc --noEmit, ESLint and Prettier over all 10 changed files, and git diff --check — all clean.

suites and gates

Load-bearing proof (before/after with sources swapped under the same tests)

Experiment A — is the new commit real behavior? Overlaying converter.ts / pipeline.ts / types.ts from the previously verified head 6f4ffd5f while keeping the current tests fails exactly 4 tests — the commit's own new test plus probes P1/P4/P7 — and nothing else (154 others still pass). Restoring the PR sources returns to 550/550.

Experiment B — whole PR vs base. Overlaying all 6 base source files from merge-base d1cda898 while keeping the PR's tests yields 16 discriminating tests (fail on main's sources, pass on the PR's; round-3 had 9): nameless-call detection and late-name dedup at nonzero indices, tool-call-finish-without-named-call rejection, both protocol-tag-leak rules, inline-literal release, and the PROTOCOL_TAG_LEAK / MALFORMED_TOOL_CALL retry paths through GeminiChat.

discriminating experiments

The new fix, located

fix cards

Verdict

GREEN — LGTM from the local-verification standpoint. Head 3cf68351a builds clean, the full core suite is green modulo the documented pre-existing environment noise, the new split-chunk detection is demonstrably load-bearing and correctly bounded (literal mid-line tags still stream through), both round-3 review criticals remain fixed, and the last minor (stale comment) is resolved.

中文版本(Chinese version)

🔁 head 3cf68351a 复验报告(第 4 轮,合并参考)

接续 round-3 报告(6f4ffd5f。该报告发出后分支再次更新,因此本轮在隔离 worktree 中对当前确切 head 重新做了干净 npm ci、完整 core 构建和全量测试(Node v22.23.1 / macOS)。

相对上次已验证 head 的变化

与之前几轮不同,这次不是 rebase —— 6f4ffd5f 仍在祖先链中,其上仅有两个提交:

  • 8be58e51 —— merge origin/main(除合并本身外无 PR 范围内文件改动);
  • 3cf68351a —— fix(core): preserve streamed protocol line boundaries:此前关闭标签泄漏检测要求 \n</think> 出现在同一个 chunk(CLOSING_THINKING_TAG_PATTERN 需要 visibleText 内有字面 \n)。新增的 RequestContext.atVisibleLineStart 把行边界状态跨 chunk 传递:换行后单独成 chunk 的关闭标签现在能被捕获,而换行后一旦出现可见文本即清除该标志,行中间的字面 </think> 引用仍原样保留。同时修复了 round-3 评审指出的 pipeline.ts 重复 finish 过期注释(minor)—— 已无未决 findings。

PR 相对 merge-base d1cda898 的净 diff 形态不变:10 个文件,+467/−178,全部在 packages/core

结果

  • 聚焦套件(PR 触及的全部 4 个):parser 73 + pipeline 93 + converter 150 + geminiChat 226 = 542/542 通过
  • 8 个独立维护者探针(按 PR 声称的行为编写,不复用其测试):拆分标签拒绝(P1)、同 chunk 回归守卫(P2)、拆成独立 chunk 的行中字面标签保留(P3、P5)、水平空白行首(P4、P7)、以 reasoning 中出现过 thinking 标签为前提的门控(P6)、round-3 critical(非零 index 迟到 name)保持已修复(P8)—— 8/8 通过
  • 全量 packages/core 套件:15291 通过、8 跳过、4 失败 —— 4 个失败与 round-3 记录的完全相同,是 src/memory/refresh.test.ts 的预存环境噪音:packages/core/src/memory/origin/main 字节相同(0 个文件差异),且该测试不引用任何 PR 触及模块。与本 PR 无关。
  • 门禁tsc --noEmit、对全部 10 个改动文件的 ESLint 与 Prettier、git diff --check —— 全部干净。

有效性证明(同一批测试下替换源码做 before/after)

实验 A —— 新提交是否是真实行为变化? 保留当前测试,把 converter.ts / pipeline.ts / types.ts 回退到上一轮已验证 head 6f4ffd5f恰好 4 个测试失败 —— 该提交自带的新测试 + 探针 P1/P4/P7,其余 154 个不受影响;恢复 PR 源码后回到 550/550 全绿。

实验 B —— 整个 PR vs base。 保留 PR 测试,把全部 6 个 base 源文件回退到 merge-base d1cda898:得到 16 个判别性测试(在 main 源码上失败、在 PR 源码上通过;round-3 为 9 个):非零 index 的 nameless 检测与迟到 name 去重、无已完成命名调用的 tool-call finish 拒绝、两条协议标签泄漏规则、行内字面引用放行,以及经 GeminiChat 的 PROTOCOL_TAG_LEAK / MALFORMED_TOOL_CALL 重试路径。

结论

GREEN —— 从本地验证角度 LGTM。 head 3cf68351a 构建干净,全量 core 套件除已记录的预存环境噪音外全绿;新的跨 chunk 检测经证明确有实效且边界收敛(行中字面标签仍正常流出);round-3 两个评审 critical 保持已修复,最后一个 minor(过期注释)也已解决。

@ytahdn
ytahdn added this pull request to the merge queue Jul 14, 2026
Merged via the queue into main with commit 3aa4731 Jul 14, 2026
58 of 60 checks passed

@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. 1 Suggestion-level finding(s) could not be anchored to the diff; see the terminal output.

— qwen3.7-max via Qwen Code /review

Comment on lines +505 to +507
it('releases inline thinking-tag references in both channels', () => {
const stream = withStreamParser();
const reasoning = converter.convertOpenAIChunkToGemini(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[Suggestion] The releases inline thinking-tag references in both channels test covers the hasThinkingTagInReasoning trigger's hold→release path, but no converter-level test covers the nameless-tool-call trigger's hold→release path. A provider that sends a tool-call opener with ID + arguments but no name (parts held), then a later name-only chunk (hold cleared, parts released), exercises pendingUntrustedResponseParts.concat(parts) through a different shouldHoldParts branch than the thinking-tag test. The parser-level accepts and deduplicates a name after complete arguments test confirms hasNamelessToolCall() transitions to false but does not exercise the converter's concat path.

Concrete cost: a bug in the release branch that silently drops held parts for the nameless trigger (e.g. assigning instead of concatenating) would ship undetected.

it('releases held parts when a late name completes a nameless tool call', () => {
  const stream = withStreamParser();
  const held = converter.convertOpenAIChunkToGemini(
    streamChunk('open', {
      content: 'visible text',
      tool_calls: [{ index: 0, id: 'call_1', function: { arguments: '{"path":"a.ts"}' } }],
    }),
    stream,
  );
  expect(held.candidates?.[0]?.content?.parts).toEqual([]);

  const released = converter.convertOpenAIChunkToGemini(
    streamChunk('name', { tool_calls: [{ index: 0, function: { name: 'read_file' } }] }),
    stream,
  );
  expect(released.candidates?.[0]?.content?.parts).toEqual([{ text: 'visible text' }]);
});

— qwen3.7-max via Qwen Code /review

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants