Skip to content

feat(checks): add required topic inventory - #136

Merged
kstonekuan merged 2 commits into
Hebbian-Robotics:mainfrom
k4its1t:feat/required-topics-check
Aug 23, 2026
Merged

feat(checks): add required topic inventory#136
kstonekuan merged 2 commits into
Hebbian-Robotics:mainfrom
k4its1t:feat/required-topics-check

Conversation

@k4its1t

@k4its1t k4its1t commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add an evidence-only required_topics built-in check that records each requested topic's presence and message count plus missing_topic_count.
  • Read the authoritative channel inventory and aggregate counts across duplicate channels, so legal multi-channel MCAP topics do not raise.
  • Document the sixteenth built-in check and its configured registration pattern.

Why

HFlow could measure timing, motion, camera integrity, and content, but had no built-in answer to whether a recording contained every topic its rig was expected to produce. This adds the missing inventory evidence while leaving pass/fail policy in curation SQL.

Closes #6

Validation

  • RED: uv run pytest tests/test_checks.py -q failed during collection because required_topics did not exist.
  • GREEN: uv run pytest tests/test_checks.py -q — 32 passed.
  • uv sync --locked --all-extras — passed.
  • uv run ruff check --fix — passed; final uv run ruff check passed after rebasing onto current main.
  • uv run ruff format — passed; final uv run ruff format --check reports 148 files formatted.
  • uv run ty check — passed.
  • uv run pytest -q — 756 passed, 6 skipped on current main.
  • 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 . — 286 links checked, 0 errors.

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; built-in check changes use their own content-hash versions and do not require a transform behavior bump.

AI assistance

OpenAI Codex assisted with implementation and PR preparation. I reviewed the final diff and ran every validation command listed above locally.

k4its1t and others added 2 commits August 24, 2026 00:04
required_topics makes sixteen; the cross-reference in PORTING.md still
said fifteen.

@kstonekuan kstonekuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Validated locally on current main: ruff, format, ty clean, 759 passed, 3 skipped.

Two details I checked because they are the ones that bite a new built-in: test_no_two_builtin_checks_claim_the_same_measurement_key now includes required_topics, so missing_topic_count is proven unique, and the docs table lists all sixteen rows. Aggregating over Episode.channels instead of Episode.channel(topic) is the right call, and the multi-channel test earns it.

I pushed one fixup to your branch (bb20ad8): PORTING.md:291 still said "the fifteen packaged checks".

One thing, and it is an invitation rather than a rule: the good first issue pool is best left for newcomers, and you are past that now. Higher-leverage work if you want it is running HFlow against a real corpus (Egocentric-10K or Egocentric-100K on Hugging Face are the ones we care about) and reporting what breaks, what is slow, or what is awkward. That kind of report is worth more to us than anything on the starter list.

@kstonekuan
kstonekuan merged commit c29425b into Hebbian-Robotics:main Aug 23, 2026
3 checks passed
kstonekuan added a commit that referenced this pull request Aug 24, 2026
The MediaPipe how-to and its pointer both said "fifteen", written while
required_topics (#136) was making it sixteen. Both merges were textually clean,
so nothing caught it. The count carries no meaning in either sentence, so
neither states one now; the one place that does say sixteen sits directly above
the table a reader can count.
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.

Add a required_topics built-in check (missing-topic QC)

2 participants