Skip to content

[business-logic] verify_windows' 13-line no-op configureVerifyCommand relies on Go's default Kill (TerminateProcess kills only the direct child), so grandchildren of a timed-out verify command survive holding the stdout pipe - unix uses SETPGID group-kill; the file also has zero CI compile coverage (no GOOS=windows in Makefile or workflows) #1526

Description

@topcheer

文件行号

internal/agent/verify_windows.go L11-12(仅 13 行——no-op configureVerifyCommand,注释自认依赖 Go 默认 "exec package handles process termination on Windows")对照 verify_unix.go L14-24(Setpgid + Kill(-pgid, SIGKILL) 组杀)+ verify.go L416-417(configureVerifyCommand(cmd) + cmd.WaitDelay = 5 * time.Second 兜底);Makefile 与 .github/workflows grep GOOS=windows|goos: windows 0 匹配——该文件零 CI 编译覆盖

问题

案(Low·平台分叉):Windows 超时只杀直接子进程——孙进程孤儿残留

  • Go 默认 Cancel=Process.Kill 即 TerminateProcess 仅杀直接子进程——被验证命令派生的孙进程(dev server/构建缓存守护)继承 stdout 管道并存活 → 超时后孤儿残留继续跑
  • 不挂起:verify.go:417 WaitDelay 5s 保证 CombinedOutput 有界返回;unix SETPGID 组杀无此问题
  • 零 CI 编译覆盖:Makefile/workflows 均无 windows 构建检查——13 行 shim 靠外部流水线兜底,静默腐化风险
    :Job Object 彻底修复;短期补 windows build CI 检查。

独立复核翻案记录(撤回初审案 1)

  • 初审称 wait_parallel maxWaitPreload=4s 整批丢弃退化为串行(Med)——复核证伪maxWaitPreload 全仓 0 匹配;wait_parallel.go L27-28 原文 "NO 30s timeout here: waits legitimately run for minutes"——无超时是有意设计;L119 wg.Wait() 无限期等全部;agent.go 实际消费 L3057-3061 命中即复用未命中正常执行,无重等分支——初审描述不存在的代码版本(幻觉行号),不立案

#1441 修复区验证(在位)

  • build_idempotency "SAME command"(distinctTargets L185-213 逐词比较+pin 测试)在位;cache_efficiency cached-subset 归一(DisplayInputTokens L121-146+pin 测试 warmSeen)在位;openai.go L709-713 usage==nil 兜底无双计。

干净项

build_idempotency:#1522 # 前缀模式不适用(normalizeToolCommand L428 显式剥注释);写集豁免/fire 上限/reset 接线全对。cache_efficiency:冷启动豁免(hadWarm 前置)/阈值双精度/usage!=nil 门控全对。verify_unix:setDeadline/SIGINT→KILL 升级全对——#1522 案 B(127 吞)/案 C(围栏)在两变体无对应面(isNonFailureExit 两变体一致无吞 127;围栏剥离在 verify.go 共享层)。wait_parallel:goroutine 泄漏(ctx.Done 双向)/取消传播/索引槽位无竞争/单工具 error 逐项回退全对。

排除

#1441 两案(在位);#1522 verify 族(变体无对应面);wait_parallel 预载退化(复核证伪);npm .cmd LookPath(与 unix 同等对待非分叉)。

严重程度

Low(+CI 覆盖缺口)


独立复核确认:案 2 行号修正(13 行)+WaitDelay 兜底+CI 零覆盖 grep 实证;案 1 证伪撤回(0 匹配+设计注释原文)。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions