Repository navigation
Conversation
Report force-killed stops and MP4s without a complete moov box as failures instead of copying them as a successful recording. Process output and the source file are preserved.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a37c7c2. Configure here.
|
|
||
| const outcome = await Promise.race([closePromise, createTimeoutPromise(timeoutMs)]); | ||
| if (outcome === 'timed_out') { | ||
| session.forcedKill = true; |
There was a problem hiding this comment.
Force-kill omits process exit status
Low Severity
After the stop timeout, waitForChildToStop sends SIGKILL and returns without waiting for the child to exit, so stopSession reads exitCode and signal while the process is still running. Diagnostics then show none for both on the force-kill path, which is the case those fields were added to explain.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit a37c7c2. Configure here.


record_sim_videostop reported success for any path AXe printed, then copied the file. With current code, inert fake-process probes showedstopped: trueplus a parsed path for a child that was force-killed after the 5s stop timeout, one that exited 3, and one killed by SIGINT. Nothing checked the MP4.Changes:
stopSessionrecords whether it had to SIGKILL the child, plus exit code and signal, and returns them.checkMp4Finalizedwalks top-level MP4 boxes and requiresftyp,moov, and every declared box fully present. No new dependency.record_sim_videostop fails with "video file is incomplete" on a forced kill or a failed check. The AXe output, exit code and signal go into diagnostics, and the source file is left in place. A finalized file after a nonzero exit still succeeds.No timeout or retry changes. The cause of the original missing-
moovfile is not established here.Checked: unit tests with synthetic finalized and truncated boxes (moov before and after mdat, cut mdat, cut moov, empty), a real ffmpeg MP4 (accepted) and its 3000-byte truncation (rejected), and fake child processes for the kill and clean-exit paths. No simulator, AXe or real recording was used.
Not run: snapshot and smoke suites.
src/server/__tests__/start-mcp-server.test.tsfails here on the missing generatedversion.ts, unrelated to this change.