Problem
IndexWatchRunner.InvokeSubRunAndEmit calls IndexCommandRunner.Run(args.ToArray(), jsonOptions) while stdout is redirected, but the returned exit code is not stored or checked. RunCore can continue emitting normal watch summaries even when a full or partial rescan failed, which makes watch-mode failures easy to miss in automation.
Suggested fix
Capture the sub-run exit code, include it in watch events and human summaries, and make watch mode mark the batch as failed or degraded when the sub-run fails.
Evidence
src/CodeIndex/Cli/IndexWatchRunner.cs: InvokeSubRunAndEmit
IndexCommandRunner.Run(args.ToArray(), jsonOptions)
- no stored
exitCode in the watch sub-run path
Problem
IndexWatchRunner.InvokeSubRunAndEmitcallsIndexCommandRunner.Run(args.ToArray(), jsonOptions)while stdout is redirected, but the returned exit code is not stored or checked.RunCorecan continue emitting normal watch summaries even when a full or partial rescan failed, which makes watch-mode failures easy to miss in automation.Suggested fix
Capture the sub-run exit code, include it in watch events and human summaries, and make watch mode mark the batch as failed or degraded when the sub-run fails.
Evidence
src/CodeIndex/Cli/IndexWatchRunner.cs:InvokeSubRunAndEmitIndexCommandRunner.Run(args.ToArray(), jsonOptions)exitCodein the watch sub-run path