Skip to content

Validate complete recording duration and drain FFmpeg source output - #923

Merged
matteius merged 4 commits into
mainfrom
ai-findings-autofix/tests-performance-active-recording.mjs
Nov 7, 2026
Merged

matteius merged 4 commits into
mainfrom
ai-findings-autofix/tests-performance-active-recording.mjs

Conversation

@matteius

@matteius matteius commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Keep the source HTTP response open until FFmpeg stdout drains, and reject truncated recordings using the total recorded duration for each camera.

Duration validation sums each stream's segments with a five-second startup/stop allowance, so normal 60-second segments and a short final segment remain valid. Missing cameras and missing, zero, negative or non-finite durations fail. Source spawn failures and unexpected exits fail the run, including failures reported during cleanup; intentional client disconnects remain normal shutdown. Every recorded file still receives strict FFmpeg decoding.

Validation: six Node regression tests pass. A 65-second, one-camera loopback recording against the local recording-integrity binary passed full decoding and duration validation with 60.066667-second and 4.4-second segments (64.466667 seconds total). Syntax and whitespace checks pass.

matteius and others added 3 commits November 7, 2026 16:41
…pilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
…pilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
@codecov

codecov Bot commented Nov 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@matteius
matteius marked this pull request as ready for review November 7, 2026 21:53
@matteius
matteius merged commit 804a567 into main Nov 7, 2026
4 of 7 checks passed
@matteius matteius changed the title Potential fixes for 2 code quality findings Validate complete recording duration and drain FFmpeg source output Nov 7, 2026
@matteius
matteius deleted the ai-findings-autofix/tests-performance-active-recording.mjs branch November 7, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant