Repository navigation
[PR] fix(dsh): restore tools after registration owner teardown - #6706
ranxianglei merged 2 commits into
Conversation
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 查重: 不重复。本 PR 针对 #6702 的 dsh 工具注册生命周期问题;已核对 open [PR] 列表,无同主题并行 PR。 Review verdict: mergeable (high quality). Root cause (independently verified)
The PR's stated root cause matches my independent analysis. The fix (src/agent/dsh-native.ts)
This is a sound root-cause fix (疏, not 堵): it removes the mechanism that produces the stale latch (the latch outliving its registrations) rather than masking the symptom at a cheaper layer. Tests (verified)
CI status (head d1b02b3)
Minor concerns (non-blocking)
结构化八问
判定:可合并(mergeable)。 根因修复扎实,测试充分(含真实 Cordis 回归),既有行为全部保持。CI 红为继承性失败(pi-subagents win-22,非本 PR 触碰范围),建议查 #4599。 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) CI 更新(head d1b02b3 已全部跑完):
结论不变:可合并(mergeable)。本 PR 自身的全部测试车道通过,唯一红为继承性 pi-subagents win-22。 |
Minor style nit from review: the @deepseek-ai/cordis import was placed mid-file (line 162, after a test). ESM hoisting means no behavior change; moving it to the top follows the repo convention of imports-first.
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 小修已推到 PR 分支: 前面提到的 import 位置风格问题( |
|
Closes pair #6702 was auto-closed by the batch merge. Superseded by #6765 (merged to master as ad8600f). Your commit 2561732 is in master verbatim — same content, same authorship, only the object ID changed (the batch used a real Thanks for the fix — it is live in master from ad8600f onward. |
Fixes #6702. Follow-up to #2101; preserves the registration-adoption / proxy-respawn behavior from #3380 and #3393.
Root cause
register.toolsReadyoutlives effect-owned host tool registrations. A Cordis fiber restart can reuse the same Context after disposing those registrations, so the context-identity-only reset leaves the latch true and skips recovery. A newer activation can also adopt names whose registrations still belong to an older activation; disposing that owner removes the adopted tools.Changes
Validation
@deepseek-ai/cordis@4.1.0and a small Service-backed registry with real fiber effects; it does not silently skip when Cordis is unavailable.npm run typecheckandnpm run build: passed. A final directtsc --noEmit --project tsconfig.jsonalso passed after the test-only extension.The original local diagnosis used real Cordis, ToolsService, agent-scope SDK rendering and the shared tool-execution pipeline; a guarded local patch was additionally verified with successful native
acp_statusandcompresscalls after a managed restart. No live service changes are part of this upstream PR.No config, wire protocol, persistence format, package version, or runtime dependency changes.