feat(diag-phase3): 落地 IDM 交互诊断链路并增强网关/诊断稳定性#559
feat(diag-phase3): 落地 IDM 交互诊断链路并增强网关/诊断稳定性#559phantom5099 merged 6 commits into1024XEngineer:mainfrom
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
| _ = listener.Close() | ||
| _ = os.Remove(socketPath) | ||
| }() | ||
| idmListener, idmSocketPath, err := listenIDMSocket() |
There was a problem hiding this comment.
medium neocode shell --socket no longer round-trips cleanly with the new IDM entry path. RunManualShell honors ManualShellOptions.SocketPath for the regular diagnose socket, but IDM is always bound via ResolveDefaultIDMDiagSocketPath() instead of deriving from the configured override. As a result, a shell started with a custom socket will accept neocode diag on the override while neocode diag -i --socket <same path> will miss the listener entirely. Either derive the IDM socket from the configured override or introduce a separate explicit IDM socket option so the routing stays predictable.
| if timeout <= 0 { | ||
| timeout = diagnoseSubAgentTimeout | ||
| } | ||
| runCtx, cancel := context.WithTimeout(parent, timeout+diagnoseSubAgentGrace) |
There was a problem hiding this comment.
medium The new grace window is effectively bypassed on the real runtime path. runDiagnoseSubAgent creates timeout + diagnoseSubAgentGrace, but runtimeSubAgentInvoker.Run now wraps the same request in context.WithTimeout(ctx, input.Timeout) before calling RunSubAgentTask, so diagnose still fails at the inner 25s deadline. That means this change does not actually provide the extra cleanup/degrade buffer it claims to add. If the grace period is intentional, the inner timeout needs to stop re-applying the shorter deadline.
|
@xgopilot 将增量覆盖率提升至百分之九十五 |
结果已将一轮覆盖增强推到当前 PR 分支,提交为 本次新增测试主要覆盖:
本地验证已执行:
按 主要缺口仍在:
结论这轮改动显著补上了
|
Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: pionxe <148670367+pionxe@users.noreply.github.com>
变更背景
本 PR 目标是严格对齐 Phase 3 落地方案,完成
neocode diag -i的 IDM 交互式排查能力,并修复 shell 场景下自动诊断/手动诊断稳定性不足的问题。同时补齐网关会话协议与权限决策链路,避免“假进入”“卡死”“错误信息不可定位”等问题。
Closes #530
主要改动
1) Gateway / Runtime Bridge 能力补齐
gateway.createSession相关协议、分发与桥接实现。resolve_permission路由与校验链路,确保权限事件可闭环处理。2)
neocode shell+diag -i(IDM)主链路落地@ai、\@ai、exit、原生命令透传等输入语义。diag -i可正确路由。diag -i的实际交互说明。3) 诊断子代理稳定性修复(工具禁用 + 契约回退)
TaskTypeReview,并强制ToolUseModeDisabled。report/findings)。summary为空时回退report,减少格式偏差导致失败。测试与验证
gateway、ptyproxy、runtime、subagent、tools/diagnose。兼容性与风险
diag/diag auto入口语义不变,Phase 3 作为增量增强。提交拆分
bb433196feat(gateway): 打通createSession与权限决策桥接并增强RPC健壮性2630c919feat(ptyproxy): 实现diag -i交互沙盒与shell诊断链路切换98895801fix(diagnose): 子代理禁用工具并修复输出契约降级回退现阶段实现效果