Skip to content

fix PTY resource leaks in shell execution cleanup (Fixes #1401)#1403

Merged
acoliver merged 2 commits intomainfrom
issue1401
Feb 14, 2026
Merged

fix PTY resource leaks in shell execution cleanup (Fixes #1401)#1403
acoliver merged 2 commits intomainfrom
issue1401

Conversation

@acoliver
Copy link
Collaborator

@acoliver acoliver commented Feb 14, 2026

TLDR

Fixes PTY resource leaks by making PTY teardown deterministic in shell execution cleanup paths and in CLI exit cleanup, with regression tests around abort-race listener cleanup and global PTY teardown.

Dive Deeper

  • centralizes PTY entry cleanup in ShellExecutionService so both per-process cleanup and destroyAllPtys use the same teardown path
  • tracks and clears render timeout inside ActivePty cleanup to avoid retained timers and closures
  • prefers runtime destroy() for PTYs when available, with kill() fallback
  • ensures runExitCleanup invokes ShellExecutionService.destroyAllPtys before registered cleanup handlers
  • keeps exact-listener identity assertions for abort-race cleanup coverage while removing redundant duplicate test case

Reviewer Test Plan

Run:

  • npm run test
  • npm run lint
  • npm run typecheck
  • npm run format
  • npm run build
  • node scripts/start.js --profile-load synthetic --keyfile ~/.llxprt/keys/.synthetic2_key "write me a haiku and nothing else"

Testing Matrix

  • Unit/integration tests across core, cli, a2a-server, and vscode-ide-companion: passed
  • Lint: passed
  • Typecheck: passed
  • Format: passed
  • Build: passed
  • Synthetic smoke run: passed

Linked issues

Fixes #1401

@github-actions github-actions bot added the maintainer:e2e:ok Trusted contributor; maintainer-approved E2E run label Feb 14, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 14, 2026

LLxprt PR Review – PR #1403

Issue Alignment

Directly addresses all 5 root causes in #1401: (1) cleanupActivePty now calls safePtyDestroy to close PTY FDs via destroy()/kill(), (2) abort-race listener cleanup with exact-reference tracking prevents memory leaks, (3) renderTimeout moved to ActivePty entry and cleared in cleanupPtyEntryResources, (4) runExitCleanup invokes destroyAllPtys before other cleanup handlers, (5) destroyAllPtys provides global PTY teardown path. Centralized cleanupPtyEntryResources ensures consistency across normal cleanup, abort path, and destroyAllPtys.

Side Effects

Minimal. destroyAllPtys safely handles empty PTY map. CLI cleanup now calls PTY teardown before other handlers, but wrapped in try/catch to prevent cascading failures. safePtyDestroy has runtime check for destroy() method availability with kill() fallback for compatibility. No breaking API changes.

Code Quality

Strong. Centralized cleanup function eliminates duplication. Proper error handling with try/catch around all cleanup operations. Closure issue fixed by moving activePtyEntry definition before cleanupActivePty. Exact-reference listener tracking ensures proper cleanup. Unhandled rejection prevention added. Code follows existing patterns.

Tests and Coverage

Coverage impact: increase. Added 9 meaningful tests: 3 CLI cleanup tests (auto-invocation, duplicate tolerance, error safety), 5 destroyAllPtys tests (multi-PTY, empty map, destroy() preference, kill() fallback, normal cleanup), 2 abort-race listener cleanup tests (normal completion, rejection catch path). Tests verify exact listener identity removal, not just count. No mock theater—all assertions target observable behavior (kill/destroy calls, listener add/remove identity).

Verdict

Ready

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 14, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Improved shutdown cleanup to reliably terminate active terminal sessions, tolerate duplicate cleanup registrations, and ignore errors during pre-cleanup so overall shutdown remains stable.
    • Ensured per-session resources are consistently disposed and last-active tracking is reset during cleanup.
  • Tests

    • Added comprehensive tests covering cleanup order, multiple-session scenarios, error resilience, listener disposal, and related edge cases.

Walkthrough

Adds a static ShellExecutionService.destroyAllPtys() and invokes it from the CLI exit cleanup flow (errors ignored). Core ShellExecutionService now tracks per-PTY resources, centralizes cleanup, and expands tests for PTY destruction, listener disposal, and abort/exit race handling.

Changes

Cohort / File(s) Summary
CLI Cleanup Integration
packages/cli/src/utils/cleanup.ts, packages/cli/src/utils/cleanup.test.ts
Import ShellExecutionService and call destroyAllPtys() as a pre-cleanup step (wrapped in try/catch). Tests added to verify duplicate/manual registration interactions and error-tolerant behavior.
Core PTY Service
packages/core/src/services/shellExecutionService.ts
Introduce per-PTY resource tracking (renderTimeout), cleanupPtyEntryResources, safePtyDestroy, and a public static destroyAllPtys() that disposes listeners, headless terminals, and destroys PTYs. Refactor onExit to race processing vs. abort with proper listener removal and suppressed unhandled rejections.
Core PTY Tests
packages/core/src/services/shellExecutionService.test.ts
Large test additions covering PTY cleanup on exit, destroy vs kill preference, multiple PTY handling, abort-race listener cleanup, disposal of event listeners/disposables, and robustness when PTY operations throw.
Manifest
package.json
Small manifest change (lines changed +50/-1) accompanying the package updates.

Sequence Diagram(s)

sequenceDiagram
    participant CLI as CLI Process
    participant Cleanup as runExitCleanup
    participant SES as ShellExecutionService
    participant PTY as Active PTYs

    CLI->>Cleanup: process exit
    Cleanup->>SES: destroyAllPtys()
    activate SES
    SES->>PTY: iterate activePtys
    loop per PTY
        SES->>PTY: safePtyDestroy (prefer destroy(), fallback kill())
        PTY-->>SES: destroyed
        SES->>SES: dispose listeners & headless terminal
    end
    SES->>SES: reset lastActivePtyId
    SES-->>Cleanup: complete (errors ignored)
    deactivate SES
    Cleanup->>Cleanup: continue sync cleanup
    Cleanup-->>CLI: exit cleanup finished
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

Possibly related PRs

Poem

🐇 I nudge the PTYs, hush their frantic cry,
I snip the listeners, let timeouts fly,
Destroy or kill — whichever wins the race,
I tidy up each terminal's small space,
Exit calm, I hop away with grace. 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix PTY resource leaks in shell execution cleanup (Fixes #1401)' clearly and specifically describes the main change: fixing PTY resource leaks in cleanup paths.
Description check ✅ Passed The PR description includes all required template sections: TLDR, Dive Deeper, Reviewer Test Plan, Testing Matrix with results, and Linked issues with proper 'Fixes' keyword.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch issue1401

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 14, 2026

Code Coverage Summary

Package Lines Statements Functions Branches
CLI 52.21% 52.21% 60.26% 77.64%
Core 73.3% 73.3% 74.72% 79.46%
CLI Package - Full Text Report
-------------------|---------|----------|---------|---------|-------------------
File               | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
-------------------|---------|----------|---------|---------|-------------------
All files          |   52.21 |    77.64 |   60.26 |   52.21 |                   
 src               |   51.18 |    54.97 |   58.33 |   51.18 |                   
  gemini.tsx       |   42.24 |    53.27 |      50 |   42.24 | ...1161,1166-1188 
  ...ractiveCli.ts |   60.23 |    53.65 |      50 |   60.23 | ...11-518,520-528 
  ...liCommands.ts |   97.22 |       60 |     100 |   97.22 | 39-40             
  ...ActiveAuth.ts |   59.42 |    70.58 |     100 |   59.42 | ...8,76-91,95-104 
 src/auth          |   56.28 |    69.82 |   68.18 |   56.28 |                   
  ...andlerImpl.ts |    90.9 |    84.61 |   71.42 |    90.9 | ...50-151,157-161 
  ...henticator.ts |     100 |    95.65 |   83.33 |     100 | 170               
  ...ketManager.ts |     100 |      100 |     100 |     100 |                   
  ...h-provider.ts |   67.18 |    71.05 |      75 |   67.18 | ...63-686,736-743 
  ...h-provider.ts |   55.27 |    71.42 |   76.92 |   55.27 | ...94-507,511-553 
  ...h-provider.ts |   19.22 |     92.3 |      35 |   19.22 | ...46-577,595-614 
  ...l-oauth-ui.ts |   54.16 |      100 |      40 |   54.16 | 26-32,38-39,57-61 
  ...h-callback.ts |   82.94 |    75.67 |    90.9 |   82.94 | ...74-775,788-790 
  migration.ts     |       0 |        0 |       0 |       0 | 1-69              
  oauth-manager.ts |   57.69 |     65.6 |   72.72 |   57.69 | ...2282,2291-2308 
  ...h-provider.ts |    37.5 |    30.43 |      40 |    37.5 | ...62-500,508-544 
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/commands      |      75 |      100 |      40 |      75 |                   
  extensions.tsx   |   56.66 |      100 |       0 |   56.66 | 23-34,38          
  mcp.ts           |   94.11 |      100 |      50 |   94.11 | 26                
  utils.ts         |     100 |      100 |     100 |     100 |                   
 ...nds/extensions |   72.36 |    91.66 |   65.62 |   72.36 |                   
  disable.ts       |     100 |      100 |     100 |     100 |                   
  enable.ts        |     100 |      100 |     100 |     100 |                   
  install.ts       |   77.61 |    71.42 |   66.66 |   77.61 | ...10,156,159-166 
  link.ts          |   74.41 |      100 |   33.33 |   74.41 | 49-54,56-60       
  list.ts          |      90 |      100 |   33.33 |      90 | 35-37             
  new.ts           |     100 |      100 |     100 |     100 |                   
  uninstall.ts     |   78.43 |      100 |   66.66 |   78.43 | 54-59,62-66       
  update.ts        |   11.42 |      100 |       0 |   11.42 | ...44-159,161-166 
  validate.ts      |   89.36 |     87.5 |      75 |   89.36 | 50-53,60,112-116  
 ...les/mcp-server |       0 |        0 |       0 |       0 |                   
  example.ts       |       0 |        0 |       0 |       0 | 1-60              
 src/commands/mcp  |   96.63 |       85 |    90.9 |   96.63 |                   
  add.ts           |    99.5 |    92.59 |     100 |    99.5 | 49                
  list.ts          |    89.9 |    80.76 |      80 |    89.9 | ...12-114,139-141 
  remove.ts        |     100 |    71.42 |     100 |     100 | 20-24             
 src/config        |   85.77 |    79.68 |   75.73 |   85.77 |                   
  auth.ts          |   84.61 |    82.35 |     100 |   84.61 | 18-19,22-23,53-54 
  ...alSettings.ts |   86.66 |    88.88 |     100 |   86.66 | 40-41,44-47       
  config.ts        |   80.12 |    82.08 |   77.27 |   80.12 | ...1925,1928-1932 
  extension.ts     |   79.53 |    87.65 |   78.78 |   79.53 | ...37-838,841-842 
  keyBindings.ts   |     100 |      100 |     100 |     100 |                   
  paths.ts         |     100 |      100 |     100 |     100 |                   
  policy.ts        |   80.76 |      100 |      50 |   80.76 | 45-49             
  ...eBootstrap.ts |   87.12 |    83.73 |      90 |   87.12 | ...71-773,782-783 
  sandboxConfig.ts |    66.9 |    47.77 |   89.47 |    66.9 | ...93-500,518-519 
  ...oxProfiles.ts |    8.53 |      100 |       0 |    8.53 | 47-48,51-129      
  settingPaths.ts  |     100 |      100 |     100 |     100 |                   
  settings.ts      |   86.69 |    75.59 |      72 |   86.69 | ...75-776,830-831 
  ...ingsSchema.ts |   99.88 |       75 |     100 |   99.88 | 57-58             
  ...tedFolders.ts |   94.73 |    95.45 |     100 |   94.73 | 86,112-118        
  welcomeConfig.ts |   21.05 |      100 |       0 |   21.05 | ...70,73-78,81-82 
 ...fig/extensions |    72.9 |    83.33 |   92.98 |    72.9 |                   
  ...Enablement.ts |   93.87 |       96 |     100 |   93.87 | ...98-204,265-267 
  ...onSettings.ts |     100 |      100 |     100 |     100 |                   
  github.ts        |   55.86 |     82.5 |   83.33 |   55.86 | ...85-490,496-527 
  ...ntegration.ts |   90.29 |    77.77 |     100 |   90.29 | ...62-163,167-168 
  ...ingsPrompt.ts |   72.72 |    94.73 |      80 |   72.72 | 92-121            
  ...ngsStorage.ts |   81.36 |    71.73 |     100 |   81.36 | ...39-240,258-261 
  update.ts        |   62.34 |    46.66 |   66.66 |   62.34 | ...22-150,167-175 
  ...ableSchema.ts |     100 |      100 |     100 |     100 |                   
  variables.ts     |   95.34 |       90 |     100 |   95.34 | 30-31             
 src/constants     |     100 |      100 |     100 |     100 |                   
  historyLimits.ts |     100 |      100 |     100 |     100 |                   
 src/extensions    |   65.75 |    57.89 |      75 |   65.75 |                   
  ...utoUpdater.ts |   65.75 |    57.89 |      75 |   65.75 | ...49-450,459,461 
 src/generated     |     100 |      100 |     100 |     100 |                   
  git-commit.ts    |     100 |      100 |     100 |     100 |                   
 ...egration-tests |   90.72 |    84.61 |     100 |   90.72 |                   
  test-utils.ts    |   90.72 |    84.61 |     100 |   90.72 | ...01,219-220,230 
 src/patches       |       0 |        0 |       0 |       0 |                   
  is-in-ci.ts      |       0 |        0 |       0 |       0 | 1-17              
 src/providers     |   83.72 |    74.11 |   78.84 |   83.72 |                   
  IFileSystem.ts   |    86.2 |    85.71 |   85.71 |    86.2 | 51-52,67-68       
  ...Precedence.ts |   94.59 |    86.66 |     100 |   94.59 | 40-41             
  index.ts         |       0 |        0 |       0 |       0 | 1-19              
  ...gistration.ts |   77.94 |    68.75 |   33.33 |   77.94 | ...,93-97,103-104 
  ...derAliases.ts |   82.14 |    81.39 |     100 |   82.14 | ...13-219,224-225 
  ...onfigUtils.ts |   92.45 |       75 |     100 |   92.45 | 25-29             
  ...erInstance.ts |   83.93 |    71.79 |   79.31 |   83.93 | ...75-779,897-898 
  types.ts         |       0 |        0 |       0 |       0 | 1-8               
 ...viders/logging |   87.59 |    88.63 |   63.63 |   87.59 |                   
  ...rvice-impl.ts |   44.44 |        0 |       0 |   44.44 | 21-22,25-30,36-37 
  git-stats.ts     |   94.59 |    90.69 |     100 |   94.59 | ...48-149,180-181 
 src/runtime       |   70.23 |     77.3 |    74.6 |   70.23 |                   
  ...imeAdapter.ts |   97.65 |    92.15 |     100 |   97.65 | ...18-219,308-309 
  ...etFailover.ts |   97.05 |    91.66 |     100 |   97.05 | 31-32,215         
  messages.ts      |   63.07 |    66.66 |      75 |   63.07 | 51,74-102         
  ...pplication.ts |   88.27 |     79.5 |   76.92 |   88.27 | ...34-637,710-711 
  ...extFactory.ts |   90.86 |    70.96 |     100 |   90.86 | ...95-298,383-390 
  ...meSettings.ts |    57.7 |    73.85 |   59.42 |    57.7 | ...2411,2431-2439 
 src/services      |   86.43 |    84.48 |      90 |   86.43 |                   
  ...mandLoader.ts |     100 |      100 |     100 |     100 |                   
  ...ardService.ts |    91.3 |    33.33 |     100 |    91.3 | 35-36             
  ...andService.ts |     100 |      100 |     100 |     100 |                   
  ...mandLoader.ts |   89.47 |    88.88 |     100 |   89.47 | ...82-187,261-268 
  ...omptLoader.ts |   70.89 |    76.19 |   83.33 |   70.89 | ...40,207,259-260 
  types.ts         |       0 |        0 |       0 |       0 | 1                 
 ...mpt-processors |   97.57 |    94.11 |     100 |   97.57 |                   
  ...tProcessor.ts |     100 |      100 |     100 |     100 |                   
  ...lProcessor.ts |   97.38 |    93.61 |     100 |   97.38 | 77-78,203-204     
  types.ts         |     100 |      100 |     100 |     100 |                   
 ...o-continuation |   85.62 |    82.14 |   94.11 |   85.62 |                   
  ...ionService.ts |   85.62 |    82.14 |   94.11 |   85.62 | ...94,553,579-580 
 src/settings      |   85.96 |     64.7 |     100 |   85.96 |                   
  ...alSettings.ts |   94.44 |       70 |     100 |   94.44 | 74-75             
  ...aramParser.ts |   71.42 |    57.14 |     100 |   71.42 | 21-22,24-25,30-31 
 src/test-utils    |   77.89 |    92.85 |   25.92 |   77.89 |                   
  ...eExtension.ts |     100 |      100 |     100 |     100 |                   
  ...omMatchers.ts |   18.75 |      100 |       0 |   18.75 | 16-44             
  ...andContext.ts |     100 |      100 |     100 |     100 |                   
  render.tsx       |   89.11 |    96.55 |   22.91 |   89.11 | ...50-155,258-259 
  ...e-testing.tsx |       0 |        0 |       0 |       0 | 1-56              
  ...iderConfig.ts |       0 |        0 |       0 |       0 | 1-19              
 src/ui            |   15.41 |    98.36 |   29.87 |   15.41 |                   
  App.tsx          |   34.54 |      100 |       0 |   34.54 | 49-82,88-95       
  AppContainer.tsx |    4.87 |      100 |       0 |    4.87 | 160-169,198-2643  
  ...tionNudge.tsx |       8 |      100 |       0 |       8 | 27-102            
  colors.ts        |   37.14 |      100 |   20.33 |   37.14 | ...03-304,306-307 
  constants.ts     |     100 |      100 |     100 |     100 |                   
  debug.ts         |     100 |      100 |     100 |     100 |                   
  ...derOptions.ts |     100 |      100 |     100 |     100 |                   
  keyMatchers.ts   |   95.65 |    96.29 |     100 |   95.65 | 29-30             
  ...ntsEnabled.ts |     100 |      100 |     100 |     100 |                   
  ...submission.ts |     100 |      100 |     100 |     100 |                   
  ...tic-colors.ts |   78.94 |      100 |      60 |   78.94 | 15-16,24-25       
  textConstants.ts |     100 |      100 |     100 |     100 |                   
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/ui/commands   |   67.67 |    76.63 |   69.68 |   67.67 |                   
  aboutCommand.ts  |   74.43 |       25 |     100 |   74.43 | ...05,112-113,139 
  authCommand.ts   |   74.95 |     84.4 |   83.33 |   74.95 | ...39-642,652-676 
  ...urlCommand.ts |      30 |      100 |       0 |      30 | 20-40             
  bugCommand.ts    |   79.16 |     37.5 |     100 |   79.16 | 32-35,42,79-88    
  chatCommand.ts   |   63.38 |    77.27 |      50 |   63.38 | ...87-509,526-536 
  clearCommand.ts  |     100 |      100 |     100 |     100 |                   
  ...essCommand.ts |    12.5 |      100 |       0 |    12.5 | 17-95             
  copyCommand.ts   |   98.27 |    94.44 |     100 |   98.27 | 37                
  debugCommands.ts |   13.29 |      100 |       0 |   13.29 | ...48,455,462,469 
  ...icsCommand.ts |   60.05 |    58.82 |   33.33 |   60.05 | ...14,346,459-464 
  ...ryCommand.tsx |   88.63 |    84.84 |     100 |   88.63 | ...,46-54,175-183 
  docsCommand.ts   |     100 |      100 |     100 |     100 |                   
  ...extCommand.ts |   93.18 |    77.77 |     100 |   93.18 | 108-113           
  editorCommand.ts |     100 |      100 |     100 |     100 |                   
  ...onsCommand.ts |   52.72 |    88.88 |      75 |   52.72 | ...29,160,174-304 
  helpCommand.ts   |     100 |      100 |     100 |     100 |                   
  ideCommand.ts    |   66.35 |    68.96 |   55.55 |   66.35 | ...22-225,233-240 
  initCommand.ts   |   83.33 |    71.42 |   66.66 |   83.33 | 35-39,41-85       
  keyCommand.ts    |   89.76 |    79.74 |     100 |   89.76 | ...81,403-404,503 
  ...ileCommand.ts |   11.11 |      100 |       0 |   11.11 | 23-134            
  ...ingCommand.ts |   10.96 |      100 |       0 |   10.96 | ...59-528,545-556 
  logoutCommand.ts |   15.62 |      100 |       0 |   15.62 | 21-85             
  mcpCommand.ts    |   82.16 |    82.22 |   83.33 |   82.16 | ...10-411,429-430 
  memoryCommand.ts |   85.43 |    77.08 |     100 |   85.43 | ...67-172,223,251 
  modelCommand.ts  |     100 |     97.5 |     100 |     100 | 122               
  mouseCommand.ts  |     100 |      100 |     100 |     100 |                   
  ...onsCommand.ts |    93.9 |    88.88 |     100 |    93.9 | 58-62             
  ...iesCommand.ts |   97.02 |    82.85 |     100 |   97.02 | 27,40-41          
  ...acyCommand.ts |   61.53 |      100 |       0 |   61.53 | 22-26             
  ...ileCommand.ts |   60.98 |    73.04 |   69.23 |   60.98 | ...1034,1055-1071 
  ...derCommand.ts |   53.12 |    30.55 |      80 |   53.12 | ...58-262,270-275 
  quitCommand.ts   |   34.48 |      100 |       0 |   34.48 | 16-35             
  ...oreCommand.ts |   92.53 |     87.5 |     100 |   92.53 | ...,90-91,120-125 
  setCommand.ts    |   74.07 |    73.52 |   72.72 |   74.07 | ...42-547,589-602 
  ...ngsCommand.ts |     100 |      100 |     100 |     100 |                   
  setupCommand.ts  |     100 |      100 |     100 |     100 |                   
  ...hubCommand.ts |   91.26 |    79.31 |     100 |   91.26 | ...12-215,222-226 
  statsCommand.ts  |   82.44 |    77.77 |   83.33 |   82.44 | ...07-308,344-353 
  ...entCommand.ts |   84.04 |    78.68 |   81.81 |   84.04 | ...36-542,553-559 
  tasksCommand.ts  |   78.75 |    78.78 |     100 |   78.75 | ...78-186,247-254 
  ...tupCommand.ts |     100 |      100 |     100 |     100 |                   
  themeCommand.ts  |     100 |      100 |     100 |     100 |                   
  todoCommand.ts   |   65.52 |    69.53 |    92.3 |   65.52 | ...1256,1268-1275 
  ...matCommand.ts |   26.66 |      100 |       0 |   26.66 | 33-92             
  ...keyCommand.ts |    98.9 |     92.3 |     100 |    98.9 | 34                
  ...ileCommand.ts |   99.11 |    94.11 |     100 |   99.11 | 36                
  toolsCommand.ts  |   86.27 |    77.61 |     100 |   86.27 | ...87-296,309-310 
  types.ts         |     100 |      100 |     100 |     100 |                   
  ...ileCommand.ts |   61.11 |      100 |       0 |   61.11 | 16-22             
  vimCommand.ts    |   44.44 |      100 |       0 |   44.44 | 14-24             
 ...ommands/schema |   96.22 |    91.13 |    92.3 |   96.22 |                   
  index.ts         |   96.45 |    91.71 |     100 |   96.45 | ...08-412,423-424 
  types.ts         |       0 |        0 |       0 |       0 | 1                 
 src/ui/components |   11.11 |    31.25 |    2.19 |   11.11 |                   
  AboutBox.tsx     |    4.46 |      100 |       0 |    4.46 | 26-147            
  AnsiOutput.tsx   |    8.33 |      100 |       0 |    8.33 | 25-90             
  AppHeader.tsx    |   22.58 |      100 |       0 |   22.58 | 26-54             
  AsciiArt.ts      |     100 |      100 |     100 |     100 |                   
  AuthDialog.tsx   |    6.29 |      100 |       0 |    6.29 | 22-189            
  ...nProgress.tsx |       0 |        0 |       0 |       0 | 1-62              
  ...Indicator.tsx |   15.15 |      100 |       0 |   15.15 | 17-47             
  ...firmation.tsx |    7.31 |      100 |       0 |    7.31 | 45-179            
  ...tsDisplay.tsx |    7.69 |      100 |       0 |    7.69 | 23-34,38-156      
  CliSpinner.tsx   |       0 |        0 |       0 |       0 | 1-22              
  Composer.tsx     |    9.43 |      100 |       0 |    9.43 | 24-75             
  ...entPrompt.tsx |   18.75 |      100 |       0 |   18.75 | 21-51             
  ...ryDisplay.tsx |   21.05 |      100 |       0 |   21.05 | 17-35             
  ...ryDisplay.tsx |    4.93 |      100 |       0 |    4.93 | 26-112            
  ...geDisplay.tsx |       0 |        0 |       0 |       0 | 1-37              
  ...gProfiler.tsx |   17.88 |      100 |       0 |   17.88 | ...71-116,120-199 
  ...esDisplay.tsx |   10.52 |      100 |       0 |   10.52 | 24-82             
  ...ogManager.tsx |    9.09 |      100 |       0 |    9.09 | 56-467            
  ...ngsDialog.tsx |    6.53 |      100 |       0 |    6.53 | 27-189            
  ...rBoundary.tsx |   10.16 |        0 |       0 |   10.16 | ...16-161,179-191 
  ...ustDialog.tsx |   15.73 |      100 |       0 |   15.73 | 31-123            
  Footer.tsx       |    8.94 |      100 |     100 |    8.94 | ...30-508,512-525 
  ...ngSpinner.tsx |    40.9 |      100 |       0 |    40.9 | 31-47             
  Header.tsx       |    17.5 |      100 |       0 |    17.5 | 22-62             
  Help.tsx         |    3.17 |      100 |       0 |    3.17 | 17-179            
  ...emDisplay.tsx |   18.84 |      100 |       0 |   18.84 | 52-188            
  InputPrompt.tsx  |   43.84 |    33.05 |   66.66 |   43.84 | ...1141,1148-1159 
  ...tsDisplay.tsx |    4.41 |      100 |       0 |    4.41 | 26-37,41-249      
  ...utManager.tsx |       0 |        0 |       0 |       0 | 1-97              
  ...ileDialog.tsx |    6.89 |      100 |       0 |    6.89 | 20-119            
  ...Indicator.tsx |      15 |      100 |       0 |      15 | 25-86             
  ...ingDialog.tsx |    4.52 |      100 |       0 |    4.52 | ...9,84-90,93-354 
  ...geDisplay.tsx |       0 |        0 |       0 |       0 | 1-40              
  ModelDialog.tsx  |    1.79 |      100 |       0 |    1.79 | 53-76,79-628      
  ...tsDisplay.tsx |    6.28 |      100 |       0 |    6.28 | 33-52,56-214      
  ...fications.tsx |   15.65 |      100 |       0 |   15.65 | 36-149            
  ...odeDialog.tsx |    7.31 |      100 |       0 |    7.31 | 30-140            
  ...ustDialog.tsx |    6.21 |      100 |       0 |    6.21 | 30-237            
  PrepareLabel.tsx |   13.33 |      100 |       0 |   13.33 | 20-48             
  ...ailDialog.tsx |   11.58 |      100 |       0 |   11.58 | 57-68,71-343      
  ...ineEditor.tsx |    2.59 |      100 |       0 |    2.59 | 25-65,69-357      
  ...istDialog.tsx |    2.99 |      100 |       0 |    2.99 | 35-369            
  ...derDialog.tsx |    3.84 |      100 |       0 |    3.84 | 22-272            
  ...Indicator.tsx |       0 |        0 |       0 |       0 | 1-21              
  ...eKeyInput.tsx |       0 |        0 |       0 |       0 | 1-138             
  ...ryDisplay.tsx |      50 |      100 |       0 |      50 | 15-17             
  ...ngsDialog.tsx |    1.95 |      100 |       0 |    1.95 | ...0-109,112-1272 
  ...ionDialog.tsx |    12.5 |      100 |       0 |    12.5 | 32-114            
  ...putPrompt.tsx |   16.21 |      100 |       0 |   16.21 | 19-53             
  ...Indicator.tsx |   44.44 |      100 |       0 |   44.44 | 12-17             
  ...MoreLines.tsx |      28 |      100 |       0 |      28 | 18-40             
  StatsDisplay.tsx |    6.82 |      100 |       0 |    6.82 | ...85-160,168-339 
  StickyHeader.tsx |    7.14 |      100 |       0 |    7.14 | 20-78             
  ...nsDisplay.tsx |    7.76 |      100 |       0 |    7.76 | 49-164            
  ThemeDialog.tsx  |    4.85 |      100 |       0 |    4.85 | 34-338            
  ...dGradient.tsx |      25 |      100 |       0 |      25 | 27-46             
  Tips.tsx         |      16 |      100 |       0 |      16 | 17-45             
  TodoPanel.tsx    |    5.55 |      100 |       0 |    5.55 | 26-74,77-245      
  ...tsDisplay.tsx |    7.42 |      100 |       0 |    7.42 | 30-53,56-228      
  ToolsDialog.tsx  |    7.86 |      100 |       0 |    7.86 | 23-119            
  ...ification.tsx |   36.36 |      100 |       0 |   36.36 | 15-22             
  ...ionDialog.tsx |    7.52 |      100 |       0 |    7.52 | 18-122            
  todo-utils.ts    |       0 |        0 |       0 |       0 | 1-7               
 ...leCreateWizard |   19.24 |       50 |       0 |   19.24 |                   
  ...aramsStep.tsx |    5.82 |      100 |       0 |    5.82 | 27-244            
  ...ationStep.tsx |    4.82 |      100 |       0 |    4.82 | 27-294            
  ...onfigStep.tsx |   11.23 |      100 |       0 |   11.23 | 25-119            
  ...electStep.tsx |    6.11 |      100 |       0 |    6.11 | 28-235            
  ...ationMenu.tsx |       0 |        0 |       0 |       0 | 1-101             
  ...eSaveStep.tsx |    6.28 |      100 |       0 |    6.28 | 33-255            
  ...ssSummary.tsx |   12.12 |      100 |       0 |   12.12 | 22-87             
  ...electStep.tsx |   16.92 |      100 |       0 |   16.92 | 27-94             
  TextInput.tsx    |     5.6 |      100 |       0 |     5.6 | 27-168            
  constants.ts     |     100 |      100 |     100 |     100 |                   
  index.tsx        |    6.27 |      100 |       0 |    6.27 | 28-296            
  types.ts         |     100 |      100 |     100 |     100 |                   
  utils.ts         |    5.22 |      100 |       0 |    5.22 | ...46-350,355-372 
  validation.ts    |   11.23 |      100 |       0 |   11.23 | ...97-104,107-111 
 ...gentManagement |    6.23 |      100 |       0 |    6.23 |                   
  ...entWizard.tsx |    4.06 |      100 |       0 |    4.06 | 33-238            
  ...ionWizard.tsx |    2.26 |      100 |       0 |    2.26 | 30-441            
  ...eteDialog.tsx |    6.59 |      100 |       0 |    6.59 | 21-126            
  ...tEditForm.tsx |    3.37 |      100 |       0 |    3.37 | 31-348            
  ...tListMenu.tsx |    3.97 |      100 |       0 |    3.97 | 25-236            
  ...tMainMenu.tsx |   16.66 |      100 |       0 |   16.66 | 21-61             
  ...gerDialog.tsx |    3.66 |      100 |       0 |    3.66 | 26-471            
  ...tShowView.tsx |    4.96 |      100 |       0 |    4.96 | 27-211            
  index.ts         |     100 |      100 |     100 |     100 |                   
  types.ts         |     100 |      100 |     100 |     100 |                   
 ...comeOnboarding |   13.04 |        0 |       0 |   13.04 |                   
  ...ethodStep.tsx |   22.47 |      100 |       0 |   22.47 | 43-128            
  ...ationStep.tsx |    5.42 |      100 |       0 |    5.42 | 28-182            
  ...etionStep.tsx |    5.08 |      100 |       0 |    5.08 | 22-164            
  ...electStep.tsx |    7.95 |      100 |       0 |    7.95 | 30-131            
  ...electStep.tsx |   34.48 |      100 |       0 |   34.48 | 50-119            
  SkipExitStep.tsx |    12.5 |      100 |       0 |    12.5 | 18-59             
  ...omeDialog.tsx |   12.38 |      100 |       0 |   12.38 | 37-146            
  WelcomeStep.tsx  |    10.2 |      100 |       0 |    10.2 | 23-74             
  index.ts         |       0 |        0 |       0 |       0 | 1-13              
 ...nents/messages |   21.22 |    88.63 |   13.33 |   21.22 |                   
  ...onMessage.tsx |   13.72 |      100 |       0 |   13.72 | 24-80             
  DiffRenderer.tsx |    3.33 |      100 |       0 |    3.33 | ...79-360,363-381 
  ErrorMessage.tsx |   22.22 |      100 |       0 |   22.22 | 16-31             
  ...niMessage.tsx |   15.78 |      100 |       0 |   15.78 | 27-88             
  ...geContent.tsx |   20.83 |      100 |       0 |   20.83 | 26-46             
  InfoMessage.tsx  |   19.23 |      100 |       0 |   19.23 | 19-41             
  ...rlMessage.tsx |   11.36 |      100 |       0 |   11.36 | 18-65             
  ...geMessage.tsx |     100 |      100 |     100 |     100 |                   
  ...ckDisplay.tsx |      20 |      100 |       0 |      20 | 43-64             
  ...onMessage.tsx |    4.45 |      100 |       0 |    4.45 | 41-374            
  ...upMessage.tsx |   10.55 |      100 |       0 |   10.55 | ...5,68-83,87-260 
  ToolMessage.tsx  |    7.06 |      100 |       0 |    7.06 | 44-235            
  ...ltDisplay.tsx |   87.94 |    85.71 |     100 |   87.94 | 61-63,125-141     
  ToolShared.tsx   |   64.61 |       90 |   33.33 |   64.61 | 78-99,102-105     
  UserMessage.tsx  |     100 |      100 |     100 |     100 |                   
  ...llMessage.tsx |   36.36 |      100 |       0 |   36.36 | 17-25             
  ...ngMessage.tsx |   26.31 |      100 |       0 |   26.31 | 17-32             
 ...ponents/shared |   37.05 |    56.12 |   73.91 |   37.05 |                   
  ...ctionList.tsx |    5.55 |      100 |       0 |    5.55 | 53-184            
  MaxSizedBox.tsx  |   48.93 |    56.16 |   88.88 |   48.93 | ...68-572,615-616 
  ...tonSelect.tsx |   13.63 |      100 |       0 |   13.63 | 57-100            
  ...lableList.tsx |    6.21 |      100 |       0 |    6.21 | 44-221            
  ...lizedList.tsx |    2.29 |      100 |       0 |    2.29 | 56-486            
  text-buffer.ts   |    50.8 |    61.66 |   83.33 |    50.8 | ...1931,1936-1980 
  ...er-actions.ts |   30.78 |    38.59 |      50 |   30.78 | ...98-806,810-812 
 ...mponents/views |    11.7 |      100 |       0 |    11.7 |                   
  ChatList.tsx     |    14.7 |      100 |       0 |    14.7 | 18-51             
  ...sionsList.tsx |      10 |      100 |       0 |      10 | 19-80             
 src/ui/constants  |     100 |      100 |     100 |     100 |                   
  ...ollections.ts |     100 |      100 |     100 |     100 |                   
 src/ui/containers |       0 |        0 |       0 |       0 |                   
  ...ontroller.tsx |       0 |        0 |       0 |       0 | 1-350             
  UIStateShell.tsx |       0 |        0 |       0 |       0 | 1-15              
 src/ui/contexts   |   51.56 |    72.89 |    42.1 |   51.56 |                   
  ...chContext.tsx |    64.7 |      100 |      50 |    64.7 | 24-29             
  FocusContext.tsx |       0 |        0 |       0 |       0 | 1-11              
  ...ssContext.tsx |   75.18 |    79.06 |    90.9 |   75.18 | ...92-699,703-720 
  MouseContext.tsx |      70 |    68.75 |      80 |      70 | ...23-136,143-144 
  ...erContext.tsx |       0 |        0 |       0 |       0 | 1-120             
  ...owContext.tsx |   21.42 |      100 |   33.33 |   21.42 | 33,39-87          
  ...meContext.tsx |   46.92 |       25 |   28.57 |   46.92 | ...91,195-196,201 
  ...lProvider.tsx |   89.16 |    69.81 |     100 |   89.16 | ...79-380,387-388 
  ...onContext.tsx |    6.73 |      100 |       0 |    6.73 | ...88-282,287-294 
  ...teContext.tsx |       0 |        0 |       0 |       0 | 1-61              
  ...gsContext.tsx |      50 |      100 |       0 |      50 | 15-20             
  ...ngContext.tsx |   42.85 |      100 |       0 |   42.85 | 15-22             
  TodoContext.tsx  |   55.55 |      100 |       0 |   55.55 | 19-22,24-27       
  TodoProvider.tsx |    6.94 |      100 |       0 |    6.94 | 24-105            
  ...llContext.tsx |     100 |      100 |       0 |     100 |                   
  ...lProvider.tsx |    6.75 |      100 |       0 |    6.75 | 28-122            
  ...nsContext.tsx |      25 |      100 |       0 |      25 | 195-206,209-214   
  ...teContext.tsx |      50 |       50 |      50 |      50 | 238-247,252-253   
  ...deContext.tsx |   11.11 |      100 |       0 |   11.11 | 29-81,84-89       
 src/ui/editors    |   98.11 |     87.5 |     100 |   98.11 |                   
  ...ngsManager.ts |   98.11 |     87.5 |     100 |   98.11 | 57                
 src/ui/hooks      |   59.44 |    80.61 |   69.34 |   59.44 |                   
  ...dProcessor.ts |   78.19 |    77.27 |     100 |   78.19 | ...15-518,530-549 
  index.ts         |       0 |        0 |       0 |       0 | 1-9               
  keyToAnsi.ts     |    3.92 |      100 |       0 |    3.92 | 19-77             
  ...dProcessor.ts |   94.81 |       75 |     100 |   94.81 | ...04-305,310-311 
  ...dProcessor.ts |   29.51 |    52.38 |      50 |   29.51 | ...91-392,397-791 
  ...dScrollbar.ts |   96.77 |      100 |     100 |   96.77 | 112-114           
  ...Completion.ts |   91.66 |    87.71 |     100 |   91.66 | ...16-217,225-228 
  ...uthCommand.ts |      16 |      100 |       0 |      16 | 13-36             
  ...tIndicator.ts |   80.95 |     87.5 |     100 |   80.95 | 37,39-49          
  useBanner.ts     |     100 |    81.81 |     100 |     100 | 22,45             
  ...chedScroll.ts |   16.66 |      100 |       0 |   16.66 | 14-32             
  ...ketedPaste.ts |      20 |      100 |       0 |      20 | 20-38             
  ...ompletion.tsx |   92.76 |    83.33 |     100 |   92.76 | ...22-223,227-234 
  useCompletion.ts |    92.4 |     87.5 |     100 |    92.4 | ...,95-96,100-101 
  ...leMessages.ts |   96.25 |       90 |     100 |   96.25 | 56-57,63          
  ...fileDialog.ts |   16.12 |      100 |       0 |   16.12 | 17-47             
  ...orSettings.ts |   11.86 |      100 |       0 |   11.86 | 31-87             
  ...AutoUpdate.ts |    9.52 |      100 |       0 |    9.52 | 18-58             
  ...ionUpdates.ts |   67.47 |    76.92 |   66.66 |   67.47 | ...79-185,200-217 
  ...erDetector.ts |     100 |      100 |     100 |     100 |                   
  useFocus.ts      |     100 |      100 |     100 |     100 |                   
  ...olderTrust.ts |   86.27 |    93.75 |     100 |   86.27 | 91-104            
  ...miniStream.ts |   54.11 |    60.23 |    37.5 |   54.11 | ...1642,1673-1775 
  ...BranchName.ts |     100 |    88.88 |     100 |     100 | 58,61             
  ...oryManager.ts |   96.26 |     92.1 |     100 |   96.26 | ...67-168,211-212 
  ...stListener.ts |   12.12 |      100 |       0 |   12.12 | 17-50             
  ...ivityTimer.ts |   76.19 |    66.66 |     100 |   76.19 | 30-35             
  ...putHistory.ts |    92.5 |    85.71 |     100 |    92.5 | 62-63,71,93-95    
  ...storyStore.ts |     100 |    94.11 |     100 |     100 | 66                
  useKeypress.ts   |   22.22 |      100 |       0 |   22.22 | 24-39             
  ...rdProtocol.ts |       0 |        0 |       0 |       0 | 1-26              
  ...fileDialog.ts |    5.71 |      100 |       0 |    5.71 | 27-135            
  ...gIndicator.ts |     100 |      100 |     100 |     100 |                   
  useLogger.ts     |   93.75 |      100 |     100 |   93.75 | 26                
  ...oryMonitor.ts |     100 |      100 |     100 |     100 |                   
  useMouse.ts      |   77.77 |    66.66 |     100 |   77.77 | 31-34             
  useMouseClick.ts |     100 |      100 |     100 |     100 |                   
  ...eSelection.ts |    3.04 |      100 |       0 |    3.04 | 36-103,106-322    
  ...oviderInfo.ts |       0 |        0 |       0 |       0 | 1-80              
  ...odifyTrust.ts |    9.09 |      100 |       0 |    9.09 | 46-137            
  ...raseCycler.ts |   79.16 |    71.42 |     100 |   79.16 | ...69,72-73,89-91 
  ...cySettings.ts |   87.28 |     82.6 |     100 |   87.28 | ...21-122,133-144 
  ...Management.ts |    2.48 |      100 |       0 |    2.48 | 21-62,74-423      
  ...Completion.ts |   29.41 |       40 |     100 |   29.41 | ...14-227,236-242 
  ...iderDialog.ts |    7.89 |      100 |       0 |    7.89 | 27-110            
  ...lScheduler.ts |   67.48 |    81.25 |   77.77 |   67.48 | ...94-496,597-607 
  ...oryCommand.ts |       0 |        0 |       0 |       0 | 1-7               
  useResponsive.ts |     100 |      100 |     100 |     100 |                   
  ...ompletion.tsx |   69.56 |      100 |     100 |   69.56 | 45-47,51-66,78-81 
  ...ectionList.ts |   87.29 |    87.91 |     100 |   87.29 | ...10-411,420-423 
  useSession.ts    |       0 |        0 |       0 |       0 | 1-23              
  ...ngsCommand.ts |   18.75 |      100 |       0 |   18.75 | 10-25             
  ...ellHistory.ts |   91.66 |    79.41 |     100 |   91.66 | ...69,117-118,128 
  ...Completion.ts |   96.29 |    87.09 |     100 |   96.29 | 90-92,119-120     
  ...oryCommand.ts |       0 |        0 |       0 |       0 | 1-62              
  ...ompletion.tsx |   80.42 |    83.81 |      75 |   80.42 | ...54-855,857-858 
  ...leCallback.ts |     100 |      100 |     100 |     100 |                   
  ...tateAndRef.ts |   59.09 |      100 |     100 |   59.09 | 23-31             
  ...oryRefresh.ts |     100 |      100 |     100 |     100 |                   
  ...rminalSize.ts |   11.42 |      100 |       0 |   11.42 | 13-55             
  ...emeCommand.ts |    6.03 |      100 |       0 |    6.03 | 26-151            
  useTimer.ts      |   88.09 |    85.71 |     100 |   88.09 | 44-45,51-53       
  ...ntinuation.ts |    89.5 |    94.28 |     100 |    89.5 | ...81-190,267-269 
  ...ePreserver.ts |   57.14 |      100 |      80 |   57.14 | 57-75             
  ...oolsDialog.ts |    4.67 |      100 |       0 |    4.67 | 24-145            
  ...Onboarding.ts |    2.47 |      100 |       0 |    2.47 | 78-407            
  ...eMigration.ts |   10.34 |      100 |       0 |   10.34 | 14-72             
  vim.ts           |   83.57 |     79.5 |     100 |   83.57 | ...38,742-750,759 
 src/ui/layouts    |    5.13 |      100 |       0 |    5.13 |                   
  ...AppLayout.tsx |    5.13 |      100 |       0 |    5.13 | 56-73,76-638      
 ...noninteractive |      75 |      100 |    6.66 |      75 |                   
  ...eractiveUi.ts |      75 |      100 |    6.66 |      75 | 17-19,23-24,27-28 
 src/ui/privacy    |   21.98 |        0 |       0 |   21.98 |                   
  ...acyNotice.tsx |       0 |        0 |       0 |       0 | 1-123             
  ...acyNotice.tsx |       0 |        0 |       0 |       0 | 1-59              
  ...acyNotice.tsx |   12.19 |      100 |       0 |   12.19 | 16-62             
  ...acyNotice.tsx |   41.33 |      100 |       0 |   41.33 | 78-91,99-193      
  ...acyNotice.tsx |      25 |      100 |       0 |      25 | 21-43,46-48       
 src/ui/reducers   |   78.44 |     90.9 |      50 |   78.44 |                   
  appReducer.ts    |     100 |      100 |     100 |     100 |                   
  ...ionReducer.ts |       0 |        0 |       0 |       0 | 1-52              
 src/ui/state      |   54.34 |    30.76 |     100 |   54.34 |                   
  extensions.ts    |   54.34 |    30.76 |     100 |   54.34 | ...28,130-142,144 
 src/ui/themes     |   99.17 |     82.1 |   96.15 |   99.17 |                   
  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   |     100 |      100 |     100 |     100 |                   
  default-light.ts |     100 |      100 |     100 |     100 |                   
  default.ts       |     100 |      100 |     100 |     100 |                   
  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 |                   
  green-screen.ts  |     100 |      100 |     100 |     100 |                   
  no-color.ts      |     100 |      100 |     100 |     100 |                   
  ...c-resolver.ts |     100 |      100 |     100 |     100 |                   
  ...tic-tokens.ts |     100 |      100 |     100 |     100 |                   
  ...-of-purple.ts |     100 |      100 |     100 |     100 |                   
  theme-compat.ts  |     100 |       50 |     100 |     100 | 79                
  theme-manager.ts |   89.74 |    82.53 |     100 |   89.74 | ...04-310,315-316 
  theme.ts         |   99.51 |    76.84 |   85.71 |   99.51 | 269-270           
  xcode.ts         |     100 |      100 |     100 |     100 |                   
 src/ui/utils      |   45.05 |    85.01 |   63.28 |   45.05 |                   
  ...Colorizer.tsx |    5.76 |      100 |       0 |    5.76 | ...16-128,140-232 
  ...olePatcher.ts |   82.22 |    77.77 |     100 |   82.22 | 55-62             
  ...nRenderer.tsx |    9.15 |      100 |       0 |    9.15 | 26-170,179-188    
  ...wnDisplay.tsx |    5.63 |      100 |       0 |    5.63 | ...00-425,436-440 
  ...eRenderer.tsx |   10.63 |      100 |       0 |   10.63 | ...32-247,260-395 
  ...tGenerator.ts |   72.72 |    61.53 |      60 |   72.72 | ...66,69-72,84-85 
  ...ketedPaste.ts |      60 |      100 |       0 |      60 | 13-14,17-18       
  clipboard.ts     |   97.29 |    84.61 |     100 |   97.29 | 40                
  ...boardUtils.ts |   32.25 |     37.5 |     100 |   32.25 | ...55-114,129-145 
  commandUtils.ts  |   93.44 |    89.79 |     100 |   93.44 | ...31,135,137-138 
  computeStats.ts  |     100 |      100 |     100 |     100 |                   
  displayUtils.ts  |     100 |      100 |     100 |     100 |                   
  formatters.ts    |   90.47 |    95.23 |     100 |   90.47 | 57-60             
  fuzzyFilter.ts   |     100 |    96.55 |     100 |     100 | 75                
  highlight.ts     |   65.43 |      100 |   66.66 |   65.43 | 77-110            
  input.ts         |   64.51 |    85.71 |   33.33 |   64.51 | 18-25,51-58       
  ...olDetector.ts |    8.73 |      100 |       0 |    8.73 | ...21-137,144-156 
  ...nUtilities.ts |   69.84 |    85.71 |     100 |   69.84 | 75-91,100-101     
  mouse.ts         |   83.69 |    71.42 |     100 |   83.69 | ...03,210,223-224 
  ...mConstants.ts |     100 |      100 |     100 |     100 |                   
  ...opDetector.ts |       0 |        0 |       0 |       0 | 1-209             
  responsive.ts    |    69.9 |    73.33 |      80 |    69.9 | ...95-103,106-121 
  ...putHandler.ts |   84.13 |    86.53 |     100 |   84.13 | ...24-133,227-228 
  ...alContract.ts |     100 |      100 |     100 |     100 |                   
  terminalLinks.ts |     100 |      100 |     100 |     100 |                   
  ...lSequences.ts |     100 |      100 |     100 |     100 |                   
  terminalSetup.ts |    4.03 |      100 |       0 |    4.03 | 40-340            
  textUtils.ts     |   86.48 |    87.23 |   81.81 |   86.48 | ...15-116,136-138 
  ...Formatters.ts |   17.39 |      100 |       0 |   17.39 | 14-21,29-36,50-52 
  ...icsTracker.ts |     100 |    66.66 |     100 |     100 | 32-34             
  ui-sizing.ts     |      16 |      100 |       0 |      16 | 11-23,26-36       
  updateCheck.ts   |     100 |    93.75 |     100 |     100 | 33,44             
 src/utils         |    60.2 |    88.48 |   80.13 |    60.2 |                   
  ...ionContext.ts |   79.59 |       75 |     100 |   79.59 | 37-40,62-63,78-81 
  bootstrap.ts     |   97.22 |    95.65 |     100 |   97.22 | 71-72             
  checks.ts        |   33.33 |      100 |       0 |   33.33 | 23-28             
  cleanup.ts       |   67.34 |    92.85 |      60 |   67.34 | 20-21,37-42,66-75 
  commands.ts      |    50.9 |    63.63 |     100 |    50.9 | 25-26,45,57-84    
  commentJson.ts   |    92.3 |     92.5 |     100 |    92.3 | 94-102            
  ...ScopeUtils.ts |   27.58 |      100 |       0 |   27.58 | 23-40,57-85       
  ...icSettings.ts |   88.61 |    89.18 |     100 |   88.61 | ...37,40-43,61-64 
  ...arResolver.ts |   96.42 |       96 |     100 |   96.42 | 111-112           
  errors.ts        |   94.36 |       88 |     100 |   94.36 | 49-50,85-86       
  events.ts        |     100 |      100 |     100 |     100 |                   
  gitUtils.ts      |    92.5 |    82.35 |     100 |    92.5 | 61-62,77-80       
  ...AutoUpdate.ts |   67.05 |    77.08 |   71.42 |   67.05 | ...13-214,261-326 
  ...lationInfo.ts |   99.36 |    97.82 |     100 |   99.36 | 93                
  math.ts          |   66.66 |      100 |       0 |   66.66 | 15                
  ...stentState.ts |   95.38 |       85 |     100 |   95.38 | 43,64-65          
  readStdin.ts     |   79.24 |       90 |      80 |   79.24 | 31-38,50-52       
  relaunch.ts      |     100 |      100 |     100 |     100 |                   
  resolvePath.ts   |   66.66 |       25 |     100 |   66.66 | 12-13,16,18-19    
  sandbox.ts       |   25.39 |     88.7 |      55 |   25.39 | ...4,484,508-1596 
  ...ionCleanup.ts |   94.58 |    88.05 |     100 |   94.58 | ...74-175,256-257 
  sessionUtils.ts  |    8.64 |      100 |       0 |    8.64 | ...27-256,262-284 
  settingsUtils.ts |   84.14 |    90.52 |   93.33 |   84.14 | ...12-439,478-479 
  ...ttingSaver.ts |    1.92 |      100 |       0 |    1.92 | 7-28,36-81        
  spawnWrapper.ts  |     100 |      100 |     100 |     100 |                   
  ...upWarnings.ts |     100 |      100 |     100 |     100 |                   
  stdinSafety.ts   |   93.24 |    86.84 |     100 |   93.24 | ...62-163,167,242 
  ...entEmitter.ts |     100 |      100 |     100 |     100 |                   
  ...upWarnings.ts |     100 |      100 |     100 |     100 |                   
  version.ts       |     100 |       50 |     100 |     100 | 16                
  windowTitle.ts   |     100 |      100 |     100 |     100 |                   
 src/utils/privacy |    46.3 |    68.57 |   52.63 |    46.3 |                   
  ...taRedactor.ts |   60.66 |    70.58 |   55.55 |   60.66 | ...77-479,485-506 
  ...acyManager.ts |       0 |        0 |       0 |       0 | 1-178             
 ...ed-integration |    24.3 |      100 |    9.61 |    24.3 |                   
  acp.ts           |   14.63 |      100 |       0 |   14.63 | ...31-332,335-342 
  ...temService.ts |     100 |      100 |     100 |     100 |                   
  schema.ts        |     100 |      100 |     100 |     100 |                   
  ...ntegration.ts |    5.11 |      100 |    4.16 |    5.11 | ...1435,1450-1500 
-------------------|---------|----------|---------|---------|-------------------
Core Package - Full Text Report
-------------------|---------|----------|---------|---------|-------------------
File               | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
-------------------|---------|----------|---------|---------|-------------------
All files          |    73.3 |    79.46 |   74.72 |    73.3 |                   
 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/adapters      |     100 |      100 |     100 |     100 |                   
  ...eamAdapter.ts |     100 |      100 |     100 |     100 |                   
 src/agents        |   77.61 |     68.1 |      90 |   77.61 |                   
  ...vestigator.ts |       0 |        0 |       0 |       0 | 1-152             
  executor.ts      |   88.25 |    67.03 |     100 |   88.25 | ...04-705,741-747 
  invocation.ts    |   96.51 |    76.47 |     100 |   96.51 | 61,65-66          
  registry.ts      |       0 |        0 |       0 |       0 | 1-83              
  types.ts         |     100 |      100 |     100 |     100 |                   
  utils.ts         |   78.94 |       80 |     100 |   78.94 | 32-35             
 src/auth          |   65.75 |    80.12 |   76.76 |   65.75 |                   
  ...evice-flow.ts |    7.21 |      100 |       0 |    7.21 | ...49-268,274-282 
  ...evice-flow.ts |   46.65 |    57.14 |   63.63 |   46.65 | ...95-484,494-580 
  oauth-errors.ts  |   94.15 |    83.33 |     100 |   94.15 | ...68,609,635-636 
  precedence.ts    |   76.75 |    78.24 |   94.44 |   76.75 | ...1028,1034-1037 
  ...evice-flow.ts |    8.33 |        0 |       0 |    8.33 | ...69-206,214-220 
  token-store.ts   |   78.49 |    87.34 |   93.75 |   78.49 | ...76-477,488-496 
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/code_assist   |   68.61 |    79.31 |      78 |   68.61 |                   
  codeAssist.ts    |    16.9 |       50 |   33.33 |    16.9 | 16-62,71-78,86-99 
  converter.ts     |   94.96 |    93.02 |     100 |   94.96 | ...88,202,219-220 
  ...al-storage.ts |   98.21 |       75 |     100 |   98.21 | 76,125            
  oauth2.ts        |   62.75 |    76.47 |   78.57 |   62.75 | ...06-707,712-713 
  server.ts        |   51.89 |    72.72 |   53.84 |   51.89 | ...99-240,243-246 
  setup.ts         |   82.92 |    73.91 |     100 |   82.92 | ...27-129,153-159 
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/commands      |     100 |      100 |     100 |     100 |                   
  extensions.ts    |     100 |      100 |     100 |     100 |                   
 src/config        |   72.73 |    79.05 |   57.37 |   72.73 |                   
  config.ts        |   70.37 |    79.69 |   45.97 |   70.37 | ...2221,2235-2236 
  constants.ts     |     100 |      100 |     100 |     100 |                   
  endpoints.ts     |     100 |      100 |     100 |     100 |                   
  index.ts         |       0 |        0 |       0 |       0 | 1-38              
  models.ts        |     100 |      100 |     100 |     100 |                   
  ...ileManager.ts |   83.61 |    77.02 |     100 |   83.61 | ...09-413,415-419 
  ...rSingleton.ts |   77.66 |    83.78 |   41.66 |   77.66 | ...51,254-257,265 
  storage.ts       |   90.65 |     86.2 |   92.59 |   90.65 | ...67,69,71,96-97 
  ...entManager.ts |   57.91 |    65.57 |     100 |   57.91 | ...57-458,476-500 
  types.ts         |       0 |        0 |       0 |       0 |                   
 ...nfirmation-bus |   68.39 |    88.46 |   66.66 |   68.39 |                   
  index.ts         |       0 |        0 |       0 |       0 | 1-2               
  message-bus.ts   |   67.48 |    91.66 |   72.72 |   67.48 | ...04-238,247-255 
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/core          |   66.55 |    73.89 |   69.97 |   66.55 |                   
  baseLlmClient.ts |   95.23 |    90.74 |     100 |   95.23 | ...85-286,369-370 
  ...ntegration.ts |    96.5 |    95.65 |     100 |    96.5 | ...28-129,209-210 
  client.ts        |   59.33 |     73.4 |   68.42 |   59.33 | ...2054,2059-2070 
  ...ion-config.ts |     100 |      100 |     100 |     100 |                   
  ...tGenerator.ts |   97.22 |    90.47 |     100 |   97.22 | 100-101           
  ...lScheduler.ts |   75.94 |    75.83 |   86.95 |   75.94 | ...1953,1973-1974 
  geminiChat.ts    |   59.18 |    66.44 |   58.02 |   59.18 | ...2931,2954-2955 
  geminiRequest.ts |     100 |      100 |     100 |     100 |                   
  ...nAIWrapper.ts |   88.88 |      100 |   83.33 |   88.88 | 56-59             
  logger.ts        |   81.26 |    81.81 |     100 |   81.26 | ...64-378,419-430 
  ...tGenerator.ts |   11.03 |      100 |       0 |   11.03 | ...91-192,195-198 
  ...olExecutor.ts |   70.07 |    80.76 |   55.55 |   70.07 | ...52-153,198-227 
  prompts.ts       |   72.05 |    66.66 |   72.72 |   72.05 | ...02-405,415,437 
  subagent.ts      |   52.84 |    66.96 |   57.14 |   52.84 | ...2000,2012-2013 
  ...chestrator.ts |   89.07 |    73.41 |   95.23 |   89.07 | ...96,599-600,605 
  ...tScheduler.ts |       0 |        0 |       0 |       0 | 1                 
  tokenLimits.ts   |   89.18 |    71.69 |     100 |   89.18 | ...77,79,81,85,95 
  ...Governance.ts |    94.2 |     90.9 |     100 |    94.2 | 34-35,51-52       
  turn.ts          |    92.2 |    73.68 |     100 |    92.2 | ...29-430,460-461 
 ...re/compression |   89.47 |    85.89 |   93.61 |   89.47 |                   
  ...tyStrategy.ts |   92.12 |    88.88 |   93.75 |   92.12 | ...43,902-903,940 
  ...utStrategy.ts |   85.78 |    78.78 |     100 |   85.78 | ...73-284,287-296 
  ...otStrategy.ts |   83.51 |    70.37 |     100 |   83.51 | ...46-257,260-269 
  ...onStrategy.ts |     100 |      100 |     100 |     100 |                   
  ...egyFactory.ts |   90.62 |    88.88 |     100 |   90.62 | 52-54             
  index.ts         |       0 |        0 |       0 |       0 | 1-14              
  types.ts         |      88 |      100 |      80 |      88 | 186-191           
  utils.ts         |   90.98 |    84.09 |     100 |   90.98 | ...04-108,196-197 
 src/debug         |   78.88 |     87.5 |      90 |   78.88 |                   
  ...ionManager.ts |   77.38 |     75.6 |      85 |   77.38 | ...33-234,251-255 
  DebugLogger.ts   |   91.59 |    90.47 |   88.46 |   91.59 | ...74,218-222,265 
  FileOutput.ts    |    92.3 |    93.47 |     100 |    92.3 | ...04-108,128-129 
  ...ionManager.ts |       0 |      100 |     100 |       0 | 18-64             
  ...FileOutput.ts |       0 |      100 |     100 |       0 | 17-39             
  index.ts         |     100 |      100 |     100 |     100 |                   
  types.ts         |       0 |        0 |       0 |       0 |                   
 src/filters       |   99.19 |    98.79 |     100 |   99.19 |                   
  EmojiFilter.ts   |   99.19 |    98.79 |     100 |   99.19 | 208-209           
 src/hooks         |   80.77 |    83.89 |   78.12 |   80.77 |                   
  ...Aggregator.ts |   92.55 |    89.09 |    87.5 |   92.55 | ...46,298-305,322 
  hookPlanner.ts   |   98.82 |     93.1 |     100 |   98.82 | 97                
  hookRegistry.ts  |    90.1 |    82.14 |     100 |    90.1 | ...66,268,270,272 
  hookRunner.ts    |   84.49 |       90 |     100 |   84.49 | ...30-232,309-320 
  ...Translator.ts |   94.62 |    67.44 |     100 |   94.62 | ...87-288,299,348 
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...ssion-hook.ts |   88.88 |    33.33 |     100 |   88.88 | 24,30             
  types.ts         |   35.23 |      100 |   18.75 |   35.23 | ...11-328,339-368 
 src/ide           |   72.65 |    85.47 |   73.07 |   72.65 |                   
  constants.ts     |     100 |      100 |     100 |     100 |                   
  detect-ide.ts    |     100 |      100 |     100 |     100 |                   
  ide-client.ts    |   53.68 |       76 |   54.83 |   53.68 | ...89-497,525-533 
  ide-installer.ts |   90.55 |    85.18 |     100 |   90.55 | ...35,142-146,159 
  ideContext.ts    |   84.82 |      100 |     100 |   84.82 | 89-105            
  process-utils.ts |   89.13 |    83.05 |     100 |   89.13 | ...69-170,211-212 
 src/interfaces    |       0 |        0 |       0 |       0 |                   
  index.ts         |       0 |        0 |       0 |       0 |                   
  ....interface.ts |       0 |        0 |       0 |       0 |                   
 src/mcp           |   79.34 |    78.18 |   71.95 |   79.34 |                   
  ...oken-store.ts |   87.38 |    90.47 |   81.25 |   87.38 | ...33-334,337-338 
  ...h-provider.ts |   87.14 |      100 |      25 |   87.14 | ...96,100,104-105 
  ...h-provider.ts |   75.07 |    55.88 |     100 |   75.07 | ...21-928,935-937 
  ...en-storage.ts |    81.5 |    88.88 |   68.18 |    81.5 | ...97-198,203-204 
  oauth-utils.ts   |   72.19 |    85.29 |   91.66 |   72.19 | ...64-285,310-333 
  ...n-provider.ts |      88 |    94.73 |   33.33 |      88 | ...38,142,146-147 
  token-store.ts   |     100 |      100 |     100 |     100 |                   
 .../token-storage |   84.32 |    84.78 |   84.21 |   84.32 |                   
  ...en-storage.ts |     100 |      100 |     100 |     100 |                   
  ...en-storage.ts |   83.69 |    83.11 |   84.61 |   83.69 | ...56,258,310-311 
  types.ts         |       0 |        0 |       0 |       0 | 1-43              
 src/models        |   83.44 |    91.15 |    87.5 |   83.44 |                   
  hydration.ts     |    4.76 |      100 |       0 |    4.76 | 65-129,151-231    
  index.ts         |     100 |      100 |     100 |     100 |                   
  profiles.ts      |     100 |      100 |     100 |     100 |                   
  ...ntegration.ts |   95.31 |    85.36 |     100 |   95.31 | ...35-136,199-200 
  registry.ts      |   90.45 |    88.88 |      92 |   90.45 | ...69-270,389-402 
  schema.ts        |     100 |      100 |     100 |     100 |                   
  transformer.ts   |     100 |      100 |     100 |     100 |                   
 src/parsers       |    70.7 |       75 |    86.2 |    70.7 |                   
  ...CallParser.ts |    70.7 |       75 |    86.2 |    70.7 | ...1,983,989-1004 
 src/policy        |   81.37 |    79.71 |   82.14 |   81.37 |                   
  config.ts        |   64.06 |    62.79 |   71.42 |   64.06 | ...10-417,427-445 
  index.ts         |     100 |      100 |     100 |     100 |                   
  policy-engine.ts |   96.42 |    97.61 |   88.88 |   96.42 | 171-174           
  ...-stringify.ts |   82.55 |     64.1 |      50 |   82.55 | ...22-126,139-140 
  toml-loader.ts   |   90.22 |    86.04 |     100 |   90.22 | ...60,462,469,471 
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/prompt-config |   74.94 |     83.9 |   85.22 |   74.94 |                   
  ...lateEngine.ts |   91.75 |    85.91 |     100 |   91.75 | ...48-249,264-267 
  index.ts         |       0 |      100 |     100 |       0 | 5-41              
  prompt-cache.ts  |   99.06 |     97.4 |     100 |   99.06 | 211-212           
  ...-installer.ts |   83.11 |    82.47 |     100 |   83.11 | ...1173,1253-1254 
  prompt-loader.ts |   87.27 |    90.52 |   76.92 |   87.27 | ...22-423,429-430 
  ...t-resolver.ts |   34.85 |    64.17 |   53.84 |   34.85 | ...20-771,774-802 
  ...pt-service.ts |   85.39 |     83.8 |      80 |   85.39 | ...35,552-559,590 
  ...delegation.ts |   58.33 |       50 |     100 |   58.33 | 24-34             
  types.ts         |     100 |      100 |     100 |     100 |                   
 ...onfig/defaults |   50.17 |    44.59 |     100 |   50.17 |                   
  core-defaults.ts |   37.54 |    35.89 |     100 |   37.54 | ...72,283,289-297 
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...est-loader.ts |   81.81 |    79.31 |     100 |   81.81 | ...02-108,116-120 
  ...t-warnings.ts |      92 |    33.33 |     100 |      92 | 17-18             
  ...r-defaults.ts |    41.7 |    35.89 |     100 |    41.7 | ...40,251,257-262 
  ...e-defaults.ts |     100 |      100 |     100 |     100 |                   
  tool-defaults.ts |      50 |    36.84 |     100 |      50 | ...11-216,229-234 
 src/prompts       |   26.41 |      100 |      25 |   26.41 |                   
  mcp-prompts.ts   |   18.18 |      100 |       0 |   18.18 | 11-19             
  ...t-registry.ts |   28.57 |      100 |   28.57 |   28.57 | ...42,48-55,68-73 
 src/providers     |   69.02 |    78.84 |   65.13 |   69.02 |                   
  BaseProvider.ts  |   80.15 |    78.76 |   78.84 |   80.15 | ...1195,1198-1199 
  ...eratorRole.ts |     100 |      100 |     100 |     100 |                   
  IModel.ts        |       0 |        0 |       0 |       0 |                   
  IProvider.ts     |       0 |        0 |       0 |       0 |                   
  ...derManager.ts |     100 |      100 |     100 |     100 |                   
  ITool.ts         |       0 |        0 |       0 |       0 |                   
  ...ngProvider.ts |   87.91 |    89.75 |   90.62 |   87.91 | ...1106,1137-1139 
  ...derWrapper.ts |   55.62 |    61.01 |   51.28 |   55.62 | ...1355,1362-1369 
  ...tGenerator.ts |    17.3 |      100 |       0 |    17.3 | ...59,62-79,82-85 
  ...derManager.ts |   57.39 |     73.3 |   60.46 |   57.39 | ...1549-1550,1553 
  ...chestrator.ts |   80.81 |    88.97 |   68.18 |   80.81 | ...58-459,536-539 
  ...taResolver.ts |   96.66 |    91.89 |     100 |   96.66 | 135-137           
  errors.ts        |      72 |       45 |      40 |      72 | ...82-283,292-293 
  ...ConfigKeys.ts |     100 |      100 |     100 |     100 |                   
  types.ts         |       0 |        0 |       0 |       0 | 1                 
 ...ders/anthropic |   82.91 |     83.3 |   78.78 |   82.91 |                   
  ...icProvider.ts |   84.54 |     84.9 |   78.18 |   84.54 | ...3042,3050-3051 
  ...aConverter.ts |   52.53 |    44.11 |   71.42 |   52.53 | ...57,263,280-288 
  usageInfo.ts     |   92.24 |    96.96 |     100 |   92.24 | ...02-107,117-119 
 ...pic/test-utils |       0 |        0 |       0 |       0 |                   
  ...cTestUtils.ts |       0 |        0 |       0 |       0 |                   
 ...oviders/chutes |   78.57 |       80 |     100 |   78.57 |                   
  usageInfo.ts     |   78.57 |       80 |     100 |   78.57 | ...68-170,185-199 
 ...providers/fake |   91.89 |    95.23 |      80 |   91.89 |                   
  FakeProvider.ts  |   91.89 |    95.23 |      80 |   91.89 | ...07-108,134-135 
 ...oviders/gemini |   61.51 |    67.04 |   53.65 |   61.51 |                   
  ...niProvider.ts |   57.62 |    57.42 |   51.28 |   57.62 | ...1923,1932-1933 
  ...Signatures.ts |     100 |    98.38 |     100 |     100 | 182               
 ...providers/kimi |   86.34 |     84.9 |     100 |   86.34 |                   
  usageInfo.ts     |   86.34 |     84.9 |     100 |   86.34 | ...16-319,331-332 
 ...viders/logging |      39 |    76.47 |      75 |      39 |                   
  ...tExtractor.ts |       0 |        0 |       0 |       0 | 1-228             
  ...nceTracker.ts |   88.63 |    81.25 |   81.81 |   88.63 | ...63-164,173-174 
 ...oviders/openai |   54.99 |     73.7 |   62.42 |   54.99 |                   
  ...ationCache.ts |   65.57 |    83.33 |   82.35 |   65.57 | ...79-187,216-217 
  ...rateParams.ts |       0 |        0 |       0 |       0 |                   
  ...AIProvider.ts |   39.54 |    61.85 |    44.3 |   39.54 | ...4586,4594-4603 
  ...API_MODELS.ts |     100 |      100 |     100 |     100 |                   
  ...lCollector.ts |   93.33 |    89.28 |     100 |   93.33 | ...51-153,173-174 
  ...Normalizer.ts |   92.75 |       96 |     100 |   92.75 | 74-78             
  ...llPipeline.ts |   64.54 |    53.33 |      75 |   64.54 | ...34-143,174-184 
  ...eValidator.ts |   94.02 |    93.75 |     100 |   94.02 | 106-109           
  ...sesRequest.ts |   83.85 |    93.24 |     100 |   83.85 | ...64,297,302-307 
  ...xUsageInfo.ts |   91.57 |    90.24 |     100 |   91.57 | ...86,190,197-199 
  ...moteTokens.ts |   89.55 |     92.3 |     100 |   89.55 | 101-107           
  ...oviderInfo.ts |    86.2 |    73.52 |     100 |    86.2 | ...31-133,144-145 
  ...uestParams.ts |   87.27 |    57.69 |     100 |   87.27 | ...20-121,123-124 
  ...nsesStream.ts |   86.31 |     82.1 |     100 |   86.31 | ...75,498-505,529 
  ...aConverter.ts |    24.2 |    42.85 |   28.57 |    24.2 | ...59-260,277-285 
  ...lResponses.ts |   71.98 |    73.33 |      75 |   71.98 | ...97-301,321-335 
  test-types.ts    |       0 |        0 |       0 |       0 |                   
  toolNameUtils.ts |   96.79 |    95.45 |      50 |   96.79 | 102,127,239-241   
 ...enai-responses |   69.34 |     76.5 |   46.87 |   69.34 |                   
  CODEX_MODELS.ts  |     100 |      100 |     100 |     100 |                   
  ...esProvider.ts |   79.97 |    79.54 |   56.52 |   79.97 | ...1069,1099,1106 
  ...romContent.ts |   84.93 |    66.66 |     100 |   84.93 | 45-49,71-75,94    
  index.ts         |       0 |        0 |       0 |       0 | 1                 
  ...aConverter.ts |    8.12 |       20 |   14.28 |    8.12 | ...53-277,280-289 
 .../openai-vercel |   70.67 |    66.26 |    62.9 |   70.67 |                   
  ...elProvider.ts |   70.33 |    64.77 |   48.71 |   70.33 | ...1644,1654-1655 
  errors.ts        |   93.23 |    82.05 |     100 |   93.23 | ...50-151,165-169 
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...Conversion.ts |   71.63 |    73.17 |   83.33 |   71.63 | ...45,548-549,553 
  ...aConverter.ts |   50.95 |       40 |   71.42 |   50.95 | ...58-259,276-284 
  toolIdUtils.ts   |     100 |      100 |     100 |     100 |                   
 ...ders/reasoning |   47.13 |    89.65 |    87.5 |   47.13 |                   
  ...oningUtils.ts |   47.13 |    89.65 |    87.5 |   47.13 | ...47-205,241-280 
 ...ders/synthetic |    93.7 |    91.66 |     100 |    93.7 |                   
  usageInfo.ts     |    93.7 |    91.66 |     100 |    93.7 | ...19-121,155-156 
 ...ers/test-utils |     100 |      100 |     100 |     100 |                   
  ...TestConfig.ts |     100 |      100 |     100 |     100 |                   
 ...ers/tokenizers |   69.49 |    77.77 |      75 |   69.49 |                   
  ...cTokenizer.ts |   68.42 |       75 |     100 |   68.42 | 34-39             
  ITokenizer.ts    |       0 |        0 |       0 |       0 |                   
  ...ITokenizer.ts |      70 |       80 |   66.66 |      70 | 52-55,62-71       
 ...roviders/types |       0 |        0 |       0 |       0 |                   
  ...iderConfig.ts |       0 |        0 |       0 |       0 |                   
  ...derRuntime.ts |       0 |        0 |       0 |       0 |                   
 ...roviders/utils |   91.31 |    90.16 |   88.88 |   91.31 |                   
  authToken.ts     |   33.33 |       50 |      50 |   33.33 | 14-22,30-35       
  ...sExtractor.ts |   95.45 |     91.3 |     100 |   95.45 | 15-16             
  ...entPreview.ts |   88.88 |    77.77 |     100 |   88.88 | 51-52,58-59,66    
  dumpContext.ts   |    96.1 |    95.65 |     100 |    96.1 | 110-112           
  ...SDKContext.ts |   94.59 |       75 |     100 |   94.59 | 27,49             
  localEndpoint.ts |   89.28 |    91.42 |     100 |   89.28 | ...18-119,138-139 
  qwenEndpoint.ts  |     100 |      100 |     100 |     100 |                   
  retryStrategy.ts |   96.29 |    95.34 |      50 |   96.29 | 73,84             
  textSanitizer.ts |     100 |    91.66 |      50 |     100 | 54                
  ...Extraction.ts |     100 |    94.44 |      50 |     100 | 78                
  ...tDetection.ts |     100 |    94.11 |     100 |     100 | 32                
  ...malization.ts |     100 |      100 |     100 |     100 |                   
  ...malization.ts |     100 |      100 |     100 |     100 |                   
  ...nsePayload.ts |   92.63 |    84.74 |     100 |   92.63 | ...42-147,200-204 
  userMemory.ts    |   51.51 |       60 |     100 |   51.51 | 16-18,31-43       
 src/providers/zai |   89.93 |       80 |     100 |   89.93 |                   
  usageInfo.ts     |   89.93 |       80 |     100 |   89.93 | ...58-160,171-172 
 src/runtime       |   84.74 |    85.32 |   81.01 |   84.74 |                   
  ...imeContext.ts |     100 |      100 |     100 |     100 |                   
  ...timeLoader.ts |      85 |       70 |      80 |      85 | ...87-190,228-231 
  ...ntimeState.ts |   95.47 |    91.89 |     100 |   95.47 | ...82-483,524-525 
  ...ionContext.ts |   85.89 |    94.11 |   85.71 |   85.89 | 80-82,149-156     
  ...imeContext.ts |   91.08 |       95 |   86.36 |   91.08 | ...09-214,216-223 
  index.ts         |       0 |        0 |       0 |       0 | 1-15              
  ...imeContext.ts |    64.7 |    83.33 |     100 |    64.7 | 67-78,83-94       
  ...meAdapters.ts |   55.04 |    70.58 |      50 |   55.04 | ...97-106,123-150 
  ...ateFactory.ts |   96.05 |    81.48 |     100 |   96.05 | 72,87,107         
 src/services      |   82.04 |    84.21 |   83.75 |   82.04 |                   
  ...ardService.ts |   93.33 |    92.85 |     100 |   93.33 | 63,67-68          
  ...utoTrigger.ts |   96.96 |    95.83 |     100 |   96.96 | 118-119           
  ...askManager.ts |   95.81 |    93.93 |     100 |   95.81 | 151-157,365-366   
  ...derService.ts |   98.98 |    94.28 |     100 |   98.98 | 173               
  ...y-analyzer.ts |   76.32 |    81.17 |   77.77 |   76.32 | ...79-507,513-514 
  ...eryService.ts |   97.03 |     90.9 |     100 |   97.03 | 47,56,140-141     
  ...temService.ts |    61.9 |      100 |   66.66 |    61.9 | 54-61             
  ...ts-service.ts |      50 |      100 |       0 |      50 | 41-42,48-49       
  gitService.ts    |   85.57 |       90 |      80 |   85.57 | ...24-127,131-135 
  index.ts         |       0 |        0 |       0 |       0 | 1-23              
  ...ionService.ts |   94.87 |    91.04 |     100 |   94.87 | ...90-291,301-302 
  ...ionService.ts |   77.38 |    78.72 |   78.12 |   77.38 | ...1067,1076-1098 
  ...xt-tracker.ts |   94.87 |       90 |    87.5 |   94.87 | 54-55             
  ...er-service.ts |    60.6 |    82.35 |      50 |    60.6 | ...36-139,142-160 
  ...er-service.ts |   69.45 |    55.88 |      80 |   69.45 | ...85-289,311-314 
 ...rvices/history |    83.3 |    84.69 |   90.27 |    83.3 |                   
  ...Converters.ts |   87.19 |     82.5 |   85.71 |   87.19 | ...44,351,357-363 
  HistoryEvents.ts |       0 |        0 |       0 |       0 |                   
  ...oryService.ts |      81 |    85.04 |   89.47 |      81 | ...1547,1583-1584 
  IContent.ts      |   88.05 |    80.76 |     100 |   88.05 | ...33-234,251-254 
  ...calToolIds.ts |   96.82 |     93.1 |     100 |   96.82 | 36-37             
 src/settings      |   81.92 |    87.06 |    58.2 |   81.92 |                   
  ...ngsService.ts |   91.69 |    75.38 |   95.23 |   91.69 | ...58-359,389-393 
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...gsRegistry.ts |   79.55 |     92.8 |   38.09 |   79.55 | ...1416,1419-1436 
  ...ceInstance.ts |     100 |      100 |     100 |     100 |                   
  types.ts         |       0 |        0 |       0 |       0 | 1                 
 src/storage       |    89.6 |    81.22 |   92.98 |    89.6 |                   
  ...FileWriter.ts |   83.54 |       80 |    87.5 |   83.54 | 40-41,71-81       
  ...nceService.ts |   98.67 |    96.96 |     100 |   98.67 | 293-294           
  ...ey-storage.ts |   92.64 |    90.47 |     100 |   92.64 | 35-37,83-84       
  secure-store.ts  |   87.63 |    76.51 |   89.28 |   87.63 | ...61-664,680-681 
  sessionTypes.ts  |     100 |      100 |     100 |     100 |                   
 src/telemetry     |   65.25 |       80 |   60.33 |   65.25 |                   
  constants.ts     |     100 |      100 |     100 |     100 |                   
  ...-exporters.ts |   28.08 |      100 |       0 |   28.08 | ...14-115,118-119 
  index.ts         |     100 |      100 |     100 |     100 |                   
  ...t.circular.ts |       0 |        0 |       0 |       0 | 1-17              
  ...t.circular.ts |       0 |        0 |       0 |       0 | 1-132             
  loggers.ts       |   63.35 |    69.76 |   59.25 |   63.35 | ...71-584,592-608 
  metrics.ts       |   62.35 |    96.15 |   66.66 |   62.35 | ...41-163,166-189 
  sdk.ts           |   72.54 |    23.07 |     100 |   72.54 | ...35,140-141,143 
  ...l-decision.ts |   33.33 |      100 |       0 |   33.33 | 17-32             
  types.ts         |   73.21 |    85.22 |   64.91 |   73.21 | ...16-618,621-625 
  uiTelemetry.ts   |   95.26 |    96.15 |   91.66 |   95.26 | 152,189-195       
 src/test-utils    |   87.09 |    84.55 |   57.47 |   87.09 |                   
  config.ts        |     100 |      100 |     100 |     100 |                   
  index.ts         |       0 |        0 |       0 |       0 | 1-9               
  mock-tool.ts     |   96.25 |    93.33 |   81.81 |   96.25 | 62-63,118         
  ...aceContext.ts |     100 |      100 |     100 |     100 |                   
  ...allOptions.ts |   93.92 |    91.83 |   63.63 |   93.92 | ...19,187,216-219 
  runtime.ts       |   80.55 |       75 |   39.53 |   80.55 | ...98-300,309-310 
  tools.ts         |      82 |    76.92 |   78.94 |      82 | ...31,153,157-158 
 src/todo          |   51.55 |    83.33 |      75 |   51.55 |                   
  todoFormatter.ts |   51.55 |    83.33 |      75 |   51.55 | ...56-160,198-199 
 src/tools         |   73.88 |    76.12 |   78.74 |   73.88 |                   
  ...lFormatter.ts |     100 |      100 |     100 |     100 |                   
  ToolFormatter.ts |   20.89 |    76.19 |   33.33 |   20.89 | ...07,514-612,627 
  ...IdStrategy.ts |   94.63 |    91.66 |     100 |   94.63 | ...18-219,255-258 
  ast-edit.ts      |   45.49 |    56.52 |   56.96 |   45.49 | ...2334,2337-2462 
  ast-grep.ts      |   88.92 |    85.52 |   88.88 |   88.92 | ...56-258,279-280 
  ...sync-tasks.ts |   96.41 |    91.52 |    92.3 |   96.41 | 45-49,95,112,232  
  codesearch.ts    |    98.1 |    89.47 |    87.5 |    98.1 | 110-111,188       
  ...line_range.ts |   84.68 |    67.56 |      70 |   84.68 | ...81-282,290-291 
  diffOptions.ts   |     100 |      100 |     100 |     100 |                   
  ...-web-fetch.ts |   93.18 |    72.41 |   77.77 |   93.18 | ...56,166-167,187 
  ...scapeUtils.ts |   61.65 |    72.97 |      50 |   61.65 | ...93,309,311-321 
  edit.ts          |   75.16 |    77.08 |   77.77 |   75.16 | ...94-795,813-855 
  ...web-search.ts |   98.02 |    88.23 |   85.71 |   98.02 | 126-127,206       
  ...y-replacer.ts |   85.71 |    84.35 |     100 |   85.71 | ...47-448,493-494 
  glob.ts          |   90.65 |    81.96 |      90 |   90.65 | ...62-263,368-369 
  ...-web-fetch.ts |   92.87 |    88.23 |    92.3 |   92.87 | ...82-383,393-394 
  ...invocation.ts |   54.74 |    38.88 |      75 |   54.74 | ...29-133,165-210 
  ...web-search.ts |     100 |      100 |     100 |     100 |                   
  grep.ts          |   63.47 |       80 |   73.68 |   63.47 | ...97,915,926-933 
  ...rt_at_line.ts |   81.55 |    76.08 |      70 |   81.55 | ...05-306,314-315 
  ...-subagents.ts |   87.28 |    69.56 |   88.88 |   87.28 | ...1,81-89,98,153 
  ls.ts            |    97.5 |    89.23 |     100 |    97.5 | 154-159           
  ...nt-manager.ts |   48.51 |    41.17 |   35.71 |   48.51 | ...13-314,320-325 
  mcp-client.ts    |   54.57 |     60.6 |   62.16 |   54.57 | ...1457,1461-1464 
  mcp-tool.ts      |   94.35 |    93.75 |   86.95 |   94.35 | ...50-260,322-323 
  memoryTool.ts    |   78.72 |     84.5 |   88.88 |   78.72 | ...94-395,451-504 
  ...iable-tool.ts |   93.46 |    54.54 |     100 |   93.46 | ...90,194,208-209 
  read-file.ts     |   91.51 |    80.26 |    90.9 |   91.51 | ...34-235,403-404 
  ...many-files.ts |      73 |    77.92 |   88.88 |      73 | ...31-532,539-540 
  ...line_range.ts |    74.9 |     65.9 |      80 |    74.9 | ...50-351,355-356 
  ripGrep.ts       |   80.41 |    86.58 |   84.61 |   80.41 | ...86,389,417-442 
  shell.ts         |   84.17 |    78.35 |   90.47 |   84.17 | ...69-870,875-876 
  ...l-analysis.ts |   81.74 |    62.28 |      92 |   81.74 | ...1184,1237,1248 
  task.ts          |    80.8 |    70.13 |   88.23 |    80.8 | ...1100,1103-1112 
  todo-events.ts   |    62.5 |      100 |       0 |    62.5 | 23-24,27-28,31-32 
  todo-pause.ts    |   87.09 |       80 |     100 |   87.09 | 64-69,73-78,93-98 
  todo-read.ts     |   89.24 |    94.73 |     100 |   89.24 | 113-124           
  todo-schemas.ts  |     100 |      100 |     100 |     100 |                   
  todo-store.ts    |   86.66 |       80 |     100 |   86.66 | 48-49,55-56,63-64 
  todo-write.ts    |   88.23 |    80.48 |   88.88 |   88.23 | ...75,210-212,290 
  ...tion-types.ts |     100 |      100 |     100 |     100 |                   
  tool-context.ts  |     100 |      100 |     100 |     100 |                   
  tool-error.ts    |      88 |      100 |       0 |      88 | 106-113           
  ...ey-storage.ts |   85.97 |    80.51 |     100 |   85.97 | ...49-354,363-368 
  tool-names.ts    |     100 |      100 |     100 |     100 |                   
  tool-registry.ts |   82.39 |    72.89 |   81.08 |   82.39 | ...05-613,621-622 
  toolNameUtils.ts |      80 |     92.1 |     100 |      80 | 59-60,64-65,69-82 
  tools.ts         |   80.95 |    83.09 |   72.22 |   80.95 | ...39-840,843-850 
  write-file.ts    |   76.51 |    68.88 |   73.33 |   76.51 | ...93-594,616-655 
 src/types         |     100 |      100 |     100 |     100 |                   
  modelParams.ts   |     100 |      100 |     100 |     100 |                   
 src/utils         |   81.91 |    85.01 |   83.48 |   81.91 |                   
  LruCache.ts      |       0 |        0 |       0 |       0 | 1-41              
  ...grep-utils.ts |      98 |     87.5 |     100 |      98 | 135-136           
  bfsFileSearch.ts |   89.77 |     90.9 |     100 |   89.77 | 87-95             
  browser.ts       |    8.69 |      100 |       0 |    8.69 | 17-53             
  channel.ts       |     100 |      100 |     100 |     100 |                   
  delay.ts         |     100 |      100 |     100 |     100 |                   
  editor.ts        |   97.75 |    94.44 |     100 |   97.75 | 167,237,240-241   
  ...entContext.ts |     100 |      100 |     100 |     100 |                   
  errorParsing.ts  |   90.76 |    78.33 |     100 |   90.76 | ...15,169,212,215 
  ...rReporting.ts |   83.72 |    84.61 |     100 |   83.72 | 82-86,107-115     
  errors.ts        |   75.53 |    68.75 |   46.15 |   75.53 | ...-80,97,104,121 
  events.ts        |   64.28 |      100 |   64.28 |   64.28 | ...33-238,244-247 
  ...sionLoader.ts |   84.93 |    66.66 |    92.3 |   84.93 | ...56-157,205-213 
  fetch.ts         |    31.5 |    66.66 |      25 |    31.5 | ...37,40-84,87-88 
  fileUtils.ts     |   95.41 |    90.29 |     100 |   95.41 | ...35-239,451-457 
  formatters.ts    |   54.54 |       50 |     100 |   54.54 | 12-16             
  ...eUtilities.ts |   96.11 |       96 |     100 |   96.11 | 36-37,67-68       
  ...rStructure.ts |   95.96 |    94.93 |     100 |   95.96 | ...14-117,345-347 
  getPty.ts        |    12.5 |      100 |       0 |    12.5 | 21-34             
  ...noreParser.ts |   94.01 |    89.74 |     100 |   94.01 | ...06-307,319-320 
  ...ineChanges.ts |   58.56 |    79.41 |      80 |   58.56 | ...18-256,264-270 
  gitUtils.ts      |   90.24 |    90.47 |     100 |   90.24 | 40-41,71-72       
  googleErrors.ts  |   36.02 |     12.5 |     100 |   36.02 | ...07-308,311-314 
  ...uotaErrors.ts |   98.15 |       80 |     100 |   98.15 | 62-63,211         
  ide-trust.ts     |      60 |      100 |       0 |      60 | 14-15             
  ...rePatterns.ts |     100 |    96.55 |     100 |     100 | 248               
  ...ionManager.ts |     100 |       90 |     100 |     100 | 23                
  ...edit-fixer.ts |       0 |        0 |       0 |       0 | 1-156             
  ...yDiscovery.ts |   85.94 |     78.5 |   84.61 |   85.94 | ...08-609,612-613 
  ...tProcessor.ts |    93.4 |    86.51 |    92.3 |    93.4 | ...87-388,397-398 
  ...Inspectors.ts |   61.53 |      100 |      50 |   61.53 | 18-23             
  output-format.ts |   36.36 |      100 |       0 |   36.36 | ...52-153,163-184 
  package.ts       |   18.18 |      100 |       0 |   18.18 | 32-41             
  ...erCoercion.ts |   83.78 |    81.15 |     100 |   83.78 | ...79-180,242-243 
  partUtils.ts     |     100 |      100 |     100 |     100 |                   
  pathReader.ts    |       0 |        0 |       0 |       0 | 1-60              
  paths.ts         |    87.5 |     87.5 |     100 |    87.5 | ...35-236,250-251 
  ...rDetection.ts |    64.4 |       75 |     100 |    64.4 | ...4,88-89,99-100 
  ...archTarget.ts |   88.88 |    73.33 |     100 |   88.88 | 42-44,62-63       
  retry.ts         |   70.67 |    81.11 |   84.61 |   70.67 | ...10-613,618-619 
  ...thResolver.ts |   84.87 |    83.87 |     100 |   84.87 | ...06,129,178-181 
  ...nStringify.ts |     100 |      100 |     100 |     100 |                   
  sanitization.ts  |     100 |      100 |     100 |     100 |                   
  ...aValidator.ts |   83.52 |    82.75 |     100 |   83.52 | 70-81,125-126     
  ...r-launcher.ts |   88.88 |    79.48 |     100 |   88.88 | ...79-184,189-190 
  session.ts       |     100 |      100 |     100 |     100 |                   
  shell-markers.ts |     100 |      100 |     100 |     100 |                   
  shell-parser.ts  |   25.57 |    58.33 |   46.15 |   25.57 | ...23-337,344-374 
  shell-utils.ts   |   86.19 |     87.5 |     100 |   86.19 | ...28-430,433-438 
  ...Completion.ts |   94.16 |     92.3 |     100 |   94.16 | 68-74             
  stdio.ts         |   81.81 |    52.94 |     100 |   81.81 | ...,91-95,104-108 
  summarizer.ts    |     100 |    88.88 |     100 |     100 | 92                
  ...emEncoding.ts |   97.14 |    91.42 |     100 |   97.14 | 108-109,161       
  terminal.ts      |   34.37 |      100 |       0 |   34.37 | ...39,42-43,46-50 
  ...Serializer.ts |   98.16 |    92.18 |     100 |   98.16 | ...,98-99,151-153 
  testUtils.ts     |      50 |      100 |   33.33 |      50 | ...47,53-58,64-66 
  textUtils.ts     |    12.5 |      100 |       0 |    12.5 | 15-34             
  thoughtUtils.ts  |     100 |      100 |     100 |     100 |                   
  tool-utils.ts    |   82.47 |     77.5 |     100 |   82.47 | ...25-126,136-137 
  ...putLimiter.ts |   87.85 |    79.06 |     100 |   87.85 | ...19-224,268-275 
  unicodeUtils.ts  |     100 |      100 |     100 |     100 |                   
  ...untManager.ts |   91.96 |    88.23 |     100 |   91.96 | 37-39,76-78,94-96 
  ...aceContext.ts |   96.82 |    95.34 |    92.3 |   96.82 | 94-95,109-110     
 ...ils/filesearch |   96.18 |    91.26 |     100 |   96.18 |                   
  crawlCache.ts    |     100 |      100 |     100 |     100 |                   
  crawler.ts       |   96.22 |     92.3 |     100 |   96.22 | 66-67             
  fileSearch.ts    |   93.22 |    86.95 |     100 |   93.22 | ...26-227,229-230 
  ignore.ts        |     100 |      100 |     100 |     100 |                   
  result-cache.ts  |     100 |    91.66 |     100 |     100 | 46                
-------------------|---------|----------|---------|---------|-------------------

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

@acoliver
Copy link
Collaborator Author

Addressed both requested CodeRabbit nitpicks in commit c31d52e:

  1. Extracted duplicated PTY teardown logic into cleanupPtyEntryResources and wired renderTimeout into ActivePty so both cleanupActivePty and destroyAllPtys share the same cleanup path.
  2. Removed the redundant abort-listener cleanup happy-path test and kept the stronger identity-based coverage in the dedicated abort-race listener cleanup block.

Re-ran full verification after these updates:

  • npm run test
  • npm run lint
  • npm run typecheck
  • npm run format
  • npm run build
  • node scripts/start.js --profile-load synthetic --keyfile ~/.llxprt/keys/.synthetic2_key "write me a haiku and nothing else"

Also noting CI bot feedback: PR remains linked via title (Fixes #1401), and PR body will be updated to include an explicit linked-issue section as well.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@packages/core/src/services/shellExecutionService.ts`:
- Around line 1099-1110: finalizeResult can access a disposed `@xterm/headless`
terminal (calling render(true) and getFullBufferText(headlessTerminal)) after
destroyAllPtys/cleanupPtyEntryResources disposes headlessTerminal; add a guard
at the start of finalizeResult to skip buffer access when the PTY was removed or
disposed (e.g., check this.activePtys.has(pid) or an entry.disposed boolean on
the PtyEntry) and only call render(true)/getFullBufferText when the entry and
its headlessTerminal are still valid, or set and check entry.disposed when
cleanupPtyEntryResources disposes the terminal to short-circuit finalizeResult.
🧹 Nitpick comments (2)
packages/core/src/services/shellExecutionService.ts (1)

828-830: processingChain.catch(() => {}) is re-attached on every data chunk.

This works but creates a new no-op .catch handler on every handleOutput call. Since processingChain is reassigned each time (line 779), the previous .catch is already attached to the old tail. This is functionally correct — just slightly wasteful. Not blocking, but you could attach the catch once outside handleOutput and keep re-pointing a single variable.

packages/core/src/services/shellExecutionService.test.ts (1)

596-708: Thorough destroyAllPtys test suite.

Covers multi-PTY cleanup, no-op on empty map, destroy() preference, and kill() fallback. The tests properly resolve pending promises by firing onExit after destroyAllPtys, which mirrors the real-world sequence.

One minor hardening suggestion: consider calling ShellExecutionService.destroyAllPtys() in the top-level beforeEach (line 74) to guard against state leakage from a prior test that might fail mid-execution before its own cleanup runs.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2a42433 and c31d52e.

📒 Files selected for processing (2)
  • packages/core/src/services/shellExecutionService.test.ts
  • packages/core/src/services/shellExecutionService.ts
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 0
File: :0-0
Timestamp: 2026-01-03T00:20:08.053Z
Learning: ShellExecutionService applies a hard cap only in the child_process path (appendAndTruncate, “16MB” message) and currently has no truncation in the PTY path, which can lead to unbounded memory before tool-level token limiting runs.
📚 Learning: 2026-01-03T00:20:08.053Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 0
File: :0-0
Timestamp: 2026-01-03T00:20:08.053Z
Learning: ShellExecutionService applies a hard cap only in the child_process path (appendAndTruncate, “16MB” message) and currently has no truncation in the PTY path, which can lead to unbounded memory before tool-level token limiting runs.

Applied to files:

  • packages/core/src/services/shellExecutionService.test.ts
  • packages/core/src/services/shellExecutionService.ts
📚 Learning: 2026-02-06T15:52:42.315Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1305
File: scripts/generate-keybindings-doc.ts:1-5
Timestamp: 2026-02-06T15:52:42.315Z
Learning: In reviews of vybestack/llxprt-code, do not suggest changing existing copyright headers from 'Google LLC' to 'Vybestack LLC' for files that originated from upstream. Preserve upstream copyrights in files that came from upstream, and only apply 'Vybestack LLC' copyright on newly created, original LLxprt files. If a file is clearly LLxprt-original, it may carry the Vybestack header; if it is upstream-originated, keep the original sponsor header.

Applied to files:

  • packages/core/src/services/shellExecutionService.test.ts
  • packages/core/src/services/shellExecutionService.ts
📚 Learning: 2026-01-03T00:20:08.053Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 0
File: :0-0
Timestamp: 2026-01-03T00:20:08.053Z
Learning: Shell tool (packages/core/src/tools/shell.ts) always applies tool-output-max-tokens via limitOutputTokens to the model-facing llmContent at the end of execute(), formatting a warning when truncated.

Applied to files:

  • packages/core/src/services/shellExecutionService.ts
📚 Learning: 2026-02-11T15:12:42.133Z
Learnt from: acoliver
Repo: vybestack/llxprt-code PR: 1260
File: packages/core/src/tools/task.ts:645-894
Timestamp: 2026-02-11T15:12:42.133Z
Learning: In packages/core/src/tools/task.ts, async tasks intentionally pass `undefined` (not the foreground signal) to orchestrator.launch() so background tasks run independently of foreground agent lifecycle (Ctrl+C, turn completion). They use their own asyncAbortController for manual cancellation via /task end and setTimeout for timeout handling. This is documented at lines 748-754 and was fixed in commit c00f12740.

Applied to files:

  • packages/core/src/services/shellExecutionService.ts
⏰ Context from checks skipped due to timeout of 270000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: E2E Test (Linux) - sandbox:docker
🔇 Additional comments (6)
packages/core/src/services/shellExecutionService.ts (4)

141-156: Clean helper for safe PTY teardown.

Good pattern — preferring destroy() over kill() with a blanket catch for already-exited PTYs.


158-190: Centralized resource cleanup looks solid.

Each disposal is individually wrapped in try/catch, which is the right approach for teardown code where any single step can fail independently. Timeouts are cleared and nulled correctly.


849-877: Race-listener cleanup pattern looks correct.

Storing raceAbortListener by reference and removing it in both .then and .catch paths ensures no leaked listeners. The cleanupRaceListener idempotency (null-check + null-assign) is a nice touch.


575-581: Early registration of activePtyEntry before disposables are assigned is fine.

cleanupPtyEntryResources uses optional chaining (?.dispose()) so partially-initialized entries are handled safely.

packages/core/src/services/shellExecutionService.test.ts (2)

567-593: Good regression tests for PTY kill-on-cleanup and resilience.

These two tests validate that safePtyDestroy is invoked during normal exit cleanup and that a throwing kill() doesn't propagate. Solid coverage for the new cleanup path.


710-798: Excellent listener-identity and catch-path coverage.

Verifying that every addEventListener('abort', cb) has a matching removeEventListener('abort', cb) with the exact same reference is a strong way to prove no listener leaks. The catch-path test (poisoning isBinary) is a creative way to exercise the .catch branch in the Promise.race.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

@acoliver acoliver merged commit 6b4a3b1 into main Feb 14, 2026
25 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer:e2e:ok Trusted contributor; maintainer-approved E2E run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PTY resource leaks in ShellExecutionService cause FD/memory growth and eventual shell failures

1 participant