Skip to content

fix(video): validate pass-through fixed GOP cadence - #380

Open
victorwon2001 wants to merge 1 commit into
Hebbian-Robotics:mainfrom
victorwon2001:fix/issue-376
Open

fix(video): validate pass-through fixed GOP cadence#380
victorwon2001 wants to merge 1 commit into
Hebbian-Robotics:mainfrom
victorwon2001:fix/issue-376

Conversation

@victorwon2001

Copy link
Copy Markdown
Contributor

Summary

  • Validate pass-through H.264 keyframes against the fixed-GOP message grid derived from configured gop_seconds and each channel's measured frame rate before provenance is written.
  • Report off-grid canonical video through the new video-keyframe-cadence doctor error while preserving existing malformed-payload and stream-start diagnostics.
  • Add regression coverage for the reported 100-message off-grid stream, exact-grid byte preservation, and independent channels sharing one topic, and document the pass-through requirement and finding code.

Fixes #376

Why

Pass-through episodes previously stamped gop_seconds as the interval actually used without verifying that their H.264 keyframes followed that cadence. Refusing off-grid pass-through streams and checking existing files in hflow doctor makes that provenance assertion verifiable without changing the provenance schema or re-encode behavior.

Validation

Focused and full test suites passed, and lint, formatting, type checking, documentation links, and diff whitespace checks are clean.

uv run pytest -q tests/test_processing_regressions.py tests/test_doctor.py tests/test_transform.py tests/test_video.py
uv run ruff check --fix
uv run ruff format
uv run ty check
lychee --no-progress --include-fragments --exclude '^https://github\.com/Hebbian-Robotics/hflow/(issues|security/advisories/new)$' --exclude-path references/mcap-spec.md --exclude-path references/foxglove-CompressedVideo.proto .
uv run pytest -q
git diff --cached --check

Checklist

  • I added or updated outcome-focused tests for changed business logic.
  • I updated documentation for changed behavior, flags, formats, or requirements.
  • I ran uv run ruff check --fix, uv run ruff format, and uv run ty check.
  • I ran the relevant pytest suite.
  • I did not add recordings, generated media, credentials, private URLs, or runtime artifacts.
  • I preserved stored-data compatibility or documented an explicit version change.

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.

The fixed-GOP promise is stamped into provenance as "actually used" but is never measured on pass-through video

1 participant