fix: remaining audit findings not yet fixed on main (release 0.8.13)#56
Merged
Conversation
The child-exit handler recorded any death as a clean "stopped", making a mid-recording crash (disk full, encoder failure) indistinguishable from success. Non-zero exits now set status "failed" with the last stderr lines; the "failed" status existed but was never assigned. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ffmpeg resolves relative list entries against the list file's directory (the OS temp dir), not the server cwd the inputs were validated against, so relative inputs passed validation and then failed downstream. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The hardcoded string said 0.8.0 while the package was at 0.8.12; createRequire resolves package.json from src/ in dev and dist/ in the published tarball alike, so it cannot drift again. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A corrupt sessions.json was silently reset to empty, discarding any live-recording entries whose ffmpeg would then never be reaped. The unreadable file is now copied to sessions.json.bak with a stderr note. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Probe immediately once the child's exit was awaited; for the kill-by-pid paths poll process liveness (up to 2s) instead of a blind 400ms sleep. A deliberate stop also clears the transient error set by the crash detector when the process had to be force-killed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Supersedes #54, which was based on 0.2.2 — most of its findings were independently fixed on main between 0.2.2 and 0.8.12 (#25, #27, #28, #32, #43). This PR carries over only the fixes that are still missing on current main:
failed, notstopped. The child-exit handler now checks the exit code and stores the stderr tail; thefailedstatus existed in the type but was never assigned. A deliberatestop_recordingstill ends asstopped(it clears the transient failure marker set when a stop has to force-kill).concatworks with relative input paths. The demuxer resolves list entries against the list file's directory (the OS temp dir since fix: write temp working files to the OS temp dir, not the edits dir (#24) #30), not the cwd the inputs were validated against; inputs are now resolved to absolute first.index.tshardcoded0.8.0while the package is at0.8.12; the version is now read frompackage.jsonat runtime.sessions.jsonis backed up to.bak(with a stderr note) instead of silently discarded along with any live-recording entries it held.stop_recording's blind 400 ms flush sleep is replaced with pid-exit polling (kill paths) or an immediate probe (graceful path).src/providers/layer that doesn't exist in this codebase.Version bumped to 0.8.13 with a CHANGELOG entry.
Testing
npm run build,npm run typecheck,npm run lint,npm test— 148 passed / 6 skipped (ffmpeg-gated suite), including a new regression test for the corrupt-registry backup.failedwith error tail; graceful stop →stoppedwith duration probed in ~184 ms (previously a fixed 400 ms floor); concat with relative input paths; advertised server version matchespackage.json(0.8.13).🤖 Generated with Claude Code