Skip to content

fix: apply post-merge audit fixes to input-queue-deep-dive.md#31

Merged
wenshao merged 1 commit into
mainfrom
fix/input-queue-deep-dive-updates
Apr 3, 2026
Merged

fix: apply post-merge audit fixes to input-queue-deep-dive.md#31
wenshao merged 1 commit into
mainfrom
fix/input-queue-deep-dive-updates

Conversation

@wenshao

@wenshao wenshao commented Apr 3, 2026

Copy link
Copy Markdown
Owner

Summary

PR #29 was squash-merged with only the initial commit. 5 subsequent commits (audit fixes, terminology, mid-turn drain core thesis, Qwen Code v0.15.0 update) were left on the old branch. This PR applies all those changes.

Changes (34 insertions, 10 deletions)

  1. drain() semantics fix: "清空队列" → prevents new enqueues + loop exits (items abandoned, not cleared)
  2. Qwen Code 3-layer cancel: added shutdown() as 3rd layer
  3. Terminology: 排水 → drain / Mid-Turn Queue Drain / Between-Round Queue Drain
  4. Mid-Turn Queue Drain as core thesis: query.ts#L1550-L1643 — user input injected between tool steps within same turn
  5. Qwen Code v0.15.0: follow-up suggestions (default ON) + speculation (opt-in), architecture comparison table
  6. Agent comparison table: added Mid-Turn Drain column
  7. Practical impact scenarios: fixed "第2个文件后" → "工具批次完成后"

Test plan

🤖 Generated with Claude Code

Includes 5 rounds of fixes that were pushed to feat/input-queue-deep-dive
after PR #29 squash-merged (only initial commit was included):

1. Audit fixes: drain() semantics, Qwen Code 3-layer cancel, line counts,
   Escape→cancelCurrentRound (queue preserved), other-agent table precision
2. Replace 排水→drain/queue drain terminology
3. Add Mid-Turn Queue Drain as core architectural difference (query.ts#L1550)
4. Align document with mid-turn drain thesis (architecture diagram, priority
   table, practical impact scenarios, agent comparison table, design insights)
5. Update for Qwen Code v0.15.0: follow-up suggestions + speculation (PR #2525)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@wenshao wenshao force-pushed the fix/input-queue-deep-dive-updates branch from 433433b to e23418c Compare April 3, 2026 13:47
@wenshao wenshao requested a review from Copilot April 3, 2026 13:47
@wenshao wenshao merged commit 0ec9731 into main Apr 3, 2026
2 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the input-queue-deep-dive.md comparison doc to incorporate post-merge audit fixes and newer Qwen Code (v0.15.0) behavior, especially around follow-up suggestions/speculation and clarified abort/drain semantics.

Changes:

  • Update the intro and comparison sections to reflect Qwen Code v0.15.0 (follow-up suggestions + speculation).
  • Expand the “预测与预执行 / Speculation” sections with new capability/behavior tables and source references.
  • Refresh agent comparison + key source file lists and adjust user-facing impact notes (abort/drain semantics).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

| Tab 接受 | ✅ 预执行结果直接注入 | — |
| Prompt Suggestion | ✅ 默认开启 | ✅ 默认开启(`followupSuggestionsEnabled`) |
| Speculation | ✅(ant-only,`USER_TYPE === 'ant'`) | ✅ opt-in(`enableSpeculation: false` 默认关闭) |
| Overlay FS 隔离 | ✅ Copy-on-Write | ✅ Copy-on-Write(`/tmp/qwen-speculation/{pid}/`) |

Copilot AI Apr 3, 2026

Copy link

Choose a reason for hiding this comment

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

The Qwen Code Overlay FS path here uses /tmp/qwen-speculation/{pid}/, but later in the doc the path is /tmp/qwen-speculation/{pid}/{uuid}/. Please make these consistent (or explain the directory structure) to avoid confusing readers.

Suggested change
| Overlay FS 隔离 | ✅ Copy-on-Write | ✅ Copy-on-Write(`/tmp/qwen-speculation/{pid}/`|
| Overlay FS 隔离 | ✅ Copy-on-Write | ✅ Copy-on-Write(基目录:`/tmp/qwen-speculation/{pid}/`;每次 speculation 实例目录:`/tmp/qwen-speculation/{pid}/{uuid}/`|

Copilot uses AI. Check for mistakes.
| Pipelined Suggestion | ✅ speculation 完成后预生成下一个 | ✅ `generatePipelinedSuggestion()` |
| Early Input | ✅ 启动阶段 stdin 捕获 | ❌ |

> **重要变化**:Qwen Code v0.15.0(2026-04-03 合入 `#2525`)新增了完整的 follow-up suggestions + speculation 系统,架构与 Claude Code 高度相似。但 speculation 默认关闭,需手动启用。

Copilot AI Apr 3, 2026

Copy link

Choose a reason for hiding this comment

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

#2525 is wrapped in inline code, so GitHub won’t auto-link it, and it’s also ambiguous which repository it refers to (this repo vs qwen-code). Consider using a normal #2525/full link and explicitly naming the repo (e.g., qwen-code PR #2525).

Suggested change
> **重要变化**:Qwen Code v0.15.0(2026-04-03 合入 `#2525`)新增了完整的 follow-up suggestions + speculation 系统,架构与 Claude Code 高度相似。但 speculation 默认关闭,需手动启用。
> **重要变化**:Qwen Code v0.15.0(2026-04-03 合入 qwen-code PR #2525)新增了完整的 follow-up suggestions + speculation 系统,架构与 Claude Code 高度相似。但 speculation 默认关闭,需手动启用。

Copilot uses AI. Check for mistakes.
| Tab 接受路径 | 注入对话历史 | `acceptSpeculation()` → `addHistory()` 绕过队列 |
| Cache 共享 | prompt cache breakpoint 机制 | `saveCacheSafeParams()` 捕获 cache 参数 |

> Qwen Code 的 speculation 实现于 2026-04-03 合入(PR #2525),与 Claude Code 架构高度相似。

Copilot AI Apr 3, 2026

Copy link

Choose a reason for hiding this comment

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

This references “PR #2525” without specifying which repository. Since this doc lives in a different repo, please disambiguate (e.g., “qwen-code PR #2525”) and/or link to the PR for traceability.

Suggested change
> Qwen Code 的 speculation 实现于 2026-04-03 合入(PR #2525),与 Claude Code 架构高度相似。
> Qwen Code 的 speculation 实现于 2026-04-03 合入(qwen-code PR #2525),与 Claude Code 架构高度相似。

Copilot uses AI. Check for mistakes.
wenshao added a commit that referenced this pull request Apr 5, 2026
Closed PR #72 (qwen3.6-plus) — 22 of 26 items duplicated existing 183.
Extracted 4 new items to p2-tools:
- #31 /plan (plan mode)
- #32 /rename (session rename)
- #33 /upgrade (version upgrade + changelog)
- #34 Plugin system (aggregated container for commands+skills+hooks+MCP)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
wenshao added a commit that referenced this pull request Apr 5, 2026
All 5 genuinely new (source verified): useRemoteSession, useDiffInIDE,
useCancelRequest, AgentSummary, useBackgroundTaskNavigation.
Renumbered as P3 #27-#31 (PR had #26-#30, conflicting with existing #26).

Best qwen3.6-plus content PR: 5/5 new items (100% hit rate).
Total: 214 items.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
wenshao added a commit that referenced this pull request Apr 5, 2026
New items from second round of source code comparison:

P0 (2 items):
- #19: Environment variable sanitization (25+ patterns)
- #20: Dangerous command blacklist (rm -rf, find -exec, git -c, etc.)

P1 (4 items):
- #21: Edit fuzzy matching with Levenshtein distance (10% tolerance)
- #22: Omission placeholder detection (prevent "// ... rest")
- #23: JIT context discovery for read/write/edit tools
- #24: OS-level sandbox (Linux bwrap, macOS Seatbelt, Windows)

P2 (6 items):
- #25: Folder trust discovery (pre-execution scanning)
- #26: Web fetch rate limiting + SSRF hardening
- #27: Grep advanced parameters (include/exclude/names_only)
- #28: Advanced vim operations (big words, find, replace, toggle)
- #29: Footer customization dialog
- #30: Write file LLM content correction

P3 (2 items):
- #31: OAuth flow refactoring (shared utils + RFC 9728)
- #32: Conseca safety framework (context-aware policy)

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.

2 participants