Skip to content

feat: add P4 improvement report — 16 new items from 4th round source comparison#75

Closed
wenshao wants to merge 1 commit into
mainfrom
feat/p4-improvement-report
Closed

feat: add P4 improvement report — 16 new items from 4th round source comparison#75
wenshao wants to merge 1 commit into
mainfrom
feat/p4-improvement-report

Conversation

@wenshao

@wenshao wenshao commented Apr 5, 2026

Copy link
Copy Markdown
Owner

概述

第四轮 Claude Code vs Qwen Code 源码深度比对,新增 16 个改进项(P1-P3),全部标注源码索引并经过反向审计。

变更文件

文件 变更
docs/comparison/qwen-code-improvement-report-p4.md 新建 P4 报告(693 行,16 个改进项)
docs/comparison/qwen-code-improvement-report.md 更新 总览报告,新增 16 行 P4 条目 + 修正 8 处准确性问题

P4 报告内容

P1 级别(2 项)

  • Graceful Shutdown 管理器 — Claude 529 行独立模块,含终端状态恢复、会话持久化、5s failsafe
  • API 客户端认证自动恢复 — 401 → OAuth token 刷新 → 重建 API 客户端 → 透明重试

P2 级别(10 项)

  • 上下文感知键绑定系统(18 个键绑定上下文 + chord 支持)
  • Chord 组合键支持(ctrl+x ctrl+k 序列)
  • 终端内文本选择与复制(应用内鼠标选择 + ANSI 剥离)
  • 文件编辑引号风格保留(preserveQuoteStyle()
  • Hook 事件扩展(12→27 种事件)
  • 统一错误分类体系(8→25 种 API 错误分类)
  • MCP 通道权限管理(频道插件注册白名单)
  • WeakRef/WeakMap 防内存泄漏(13 个文件 vs 4 个文件)
  • 文件编辑等价性判断(areFileEditsInputsEquivalent()
  • 终端渲染增量优化(screen buffer diff + patch)

P3 级别(4 项)

  • FuzzyPicker 通用选择器(模糊搜索 + 预览)
  • 消息类型丰富化(~11→30+ 种)
  • React.memo 精细优化(渲染 O(n)→O(1))
  • Shell 环境快照(一次性捕获 aliases/functions/PATH)

优势领域(Qwen 优于 Claude)

  • Shell 语义权限分析、Speculation/Followup、OTel 遥测、Settings Migration、文件编辑 Unicode 归一化、MCP 健康监控、多渠道支持、Git Co-author 注入

反向审计

对全部 16 个 Item 进行反向审计,发现并修正 8 处错误:

  1. selection.ts 行数 918→917
  2. Hook 事件 13→12 种
  3. errors.ts 行数 1208→1207,类型数 25+→精确 25
  4. gracefulShutdown.ts 行数 530→529
  5. channelAllowlist.ts 功能描述修正
  6. WeakRef 数量:Claude 6→13 个文件,Qwen 0→4 个文件
  7. Shell 环境快照文件名修正
  8. followup/ 行数 2000→3000

…comparison

4th round deep comparison of Claude Code vs Qwen Code source code, adding 16 new
improvement items (P1-P3) with full source code indexing and reverse audit.

New report: qwen-code-improvement-report-p4.md (693 lines)
- 2× P1 items: Graceful Shutdown manager, API auth recovery
- 10× P2 items: keybinding system, chord support, terminal text selection,
  quote style preservation, hook events, error taxonomy, MCP channel permissions,
  WeakRef adoption, file edit equivalence, render incremental optimization
- 4× P3 items: FuzzyPicker, message types, React.memo optimization, shell snapshot

Updated: qwen-code-improvement-report.md (overview)
- Added 16 P4 entries to the improvement matrix
- Fixed 8 accuracy issues from reverse audit (WeakRef counts, hook events,
  error types, file paths, line numbers)

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

wenshao commented Apr 5, 2026

Copy link
Copy Markdown
Owner Author

关闭此 PR。主要问题:

1. 创建了不存在的"P4"优先级(项目只有 P0-P3)
2. 又是独立文件而非追加到现有主题文件
3. 16 项中 10 项重复(63%)

重复项:

源码准确性值得肯定——所有引用经验证正确,自行修正 8 处错误。

已手动合入的新增项(4 项):

  • 文件编辑引号风格保留
  • 文件编辑等价性判断
  • MCP 通道权限管理
  • 消息类型丰富化

@wenshao wenshao closed this Apr 5, 2026
wenshao added a commit that referenced this pull request Apr 5, 2026
Closed PR #75 — 10 of 16 items duplicated existing 187. Source code
references all verified correct (glm-5.1 self-corrected 8 errors).

Extracted 4 new items to p2-tools:
- #35 preserveQuoteStyle (quote style preservation in edits)
- #36 areFileEditsInputsEquivalent (skip duplicate edits)
- #37 MCP channel plugin allowlist
- #38 SDK message type enrichment (11 → 30+ types)

Total: 191 items.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant