Skip to content

refactor(ai/runner): CCRunner 多路复用架构升级与优雅关闭#272

Merged
hrygo merged 7 commits into
mainfrom
refactor/issue-271-ccrunner-multiplexing
Feb 20, 2026
Merged

refactor(ai/runner): CCRunner 多路复用架构升级与优雅关闭#272
hrygo merged 7 commits into
mainfrom
refactor/issue-271-ccrunner-multiplexing

Conversation

@hrygo

@hrygo hrygo commented Feb 20, 2026

Copy link
Copy Markdown
Owner

Summary

CCRunner 架构升级至 v2.0,实现 Hot-Multiplexing 热多路复用和优雅关闭机制:

  • Hot-Multiplexing: 单个 Claude Code 进程服务多个并发会话,使用 UUID v5 实现会话隔离
  • 优雅关闭: 确保所有 CC 进程组在服务器退出时正确关闭
  • 安全修复: 修复会话多路复用崩溃和路径遍历漏洞
  • 文档升级: 完整重写 CCRunner 架构文档

Resolves #271

Changes

  • 5b8e809c fix(ai/runner): resolve session multiplexing crash and path traversal vulnerability
  • 94f6cea4 fix(ai/runner): ensure graceful shutdown of all CC process groups on server exit
  • 41899819 docs(architecture): completely rewrite cc-runner architecture documentation
  • 07aa7509 fix(ai/runner): fix unhandled errcheck in CCRunner.Close
  • a8969936 chore(ai): optimize CCRunner comments and logs
  • 6238d7d2 docs(ai): heavily upgrade AI package docs
  • a4a510a7 docs(ai/core): format mermaid and table in README

Test plan

  • 验证多会话并发不会崩溃
  • 验证服务器退出时 CC 进程正确关闭
  • 验证 git hooks 颜色输出正常

… vulnerability

- Fix path traversal vulnerability in CheckFileAccess via filepath verification
- Ensure doneChan is closed upon readStdout abrupt exit to prevent deadlocks
- Refactor CCRunner lifecycle into ParrotHandler singletons (geekRunner, evoRunner) to fix "Session ID already in use" crashes during multiplexing
- Implement strictly isolated sessionID namespace generation for Geek and Evolution modes using UUID v5 MD5 derivation
- Remove unused and deprecated CCRunner aliases and event buffer structs
…tation with multiplexing and graceful shutdown concepts
…cture v2.0 (Hot-Multiplexing, Graceful Shutdown, UUID v5)
- Add quotes to mermaid node labels with special characters
- Align table columns for better readability
@hrygo hrygo force-pushed the refactor/issue-271-ccrunner-multiplexing branch from a4a510a to 70b0510 Compare February 20, 2026 10:10
@hrygo hrygo merged commit c0933a0 into main Feb 20, 2026
9 checks passed
@hrygo hrygo deleted the refactor/issue-271-ccrunner-multiplexing branch February 20, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor CCRunner to support full-duplex stream-json multiplexing

2 participants