| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
fix(cli): reject raw *exec.ExitError at the exit-code seam (t130) *exec.ExitError happens to satisfy the ExitCoder interface (ExitCode() int), so a %w-wrapped subprocess failure reaching cmd/moai made main adopt the subprocess's raw exit code (git's 128) and fang's moaiErrorHandler suppress the error box — the silent-failure pair from the t41 (moai worktree done) and t129 (moai hook worktree-create) recurrences, both previously patched at call sites only. Fix at the seam: internal/cli.ResolveExitCode refuses raw *exec.ExitError chain-wide, then matches intentional ExitCoder carriers (exitCodeError family, worktree.ExitCodeError). main.go and fang.go now resolve through it. Producer-side half: new internal/execerr.StatusDetail describes a subprocess failure (exit status + captured stderr) without chaining the raw type; 24 wrap sites across cli/spec/verify/github/worktree/hook/core switched from %w to it, matching the CommandError discipline in internal/core/git execGit. Guards (errors.As chain-based, not message-based): wrapped raw must map to exit 1 and render through moaiErrorHandler; intentional codes still resolve; raw-alongside-intentional is refused. Reproduction-first: both guards failed against the pre-fix seam. | 24 天前 |