Skip to content

test: cover joint sine parameter contract - #38

Merged
kstonekuan merged 1 commit into
Hebbian-Robotics:mainfrom
bryanwhl:test/34-joint-sine-contract
Aug 20, 2026
Merged

kstonekuan merged 1 commit into
Hebbian-Robotics:mainfrom
bryanwhl:test/34-joint-sine-contract

Conversation

@bryanwhl

Copy link
Copy Markdown
Contributor

Summary

Add focused behavioral tests for hflow.testing.joint_sine_parameters that verify:

  • specs sharing the same seed and joint count produce identical parameters;
  • frequencies include the configured minimum and maximum and are evenly spaced;
  • a single joint uses the minimum frequency;
  • every phase lies in [0, 2*pi).

Why

Synthetic episode reproducibility depends on this public helper, but its determinism and boundary behavior previously had no direct coverage. This change pins the observable contract without changing the implementation.

Closes #34

Validation

  • uv run pytest tests/test_testing.py -q -k joint_sine_parameters — 2 passed, 6 deselected on Python 3.11
  • uv run --python 3.14 --locked --all-extras pytest tests/test_testing.py -q -k joint_sine_parameters — 2 passed, 6 deselected
  • uv run pytest tests/test_testing.py -q — 8 passed
  • uv run ruff check --fix — passed
  • uv run ruff format — passed
  • uv run ty check — passed
  • uv run pytest -q — 287 passed, 6 skipped, 5 environment-specific failures:
    • one existing test assumes /usr/bin/ffmpeg, which is absent on macOS;
    • four existing contact-sheet/media tests require the drawtext filter, which is absent from the installed Homebrew FFmpeg 9.0.1.
  • Full suite with those five environment-specific cases deselected — 287 passed, 6 skipped, 5 deselected

Checklist

  • I added or updated outcome-focused tests for changed business logic.
  • Documentation is unchanged because this PR adds test coverage without changing 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.
  • Stored-data compatibility is unchanged.

@bryanwhl

Copy link
Copy Markdown
Contributor Author

@codex review

@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.

Thanks @bryanwhl! Validated locally: full quality gate and suite pass (295 tests). These go beyond the issue's definition of done in the best way: varying duration_s and cameras between the two determinism calls proves the parameters derive only from the seed and joint count, which is the docstring's actual contract. Clean behavioral assertions, extended the existing test module rather than adding a parallel one. Merging.

On the five macOS failures you keep hitting: since you have the reproducing environment, a bug report with the exact assertion output for the /usr/bin/ffmpeg case and your ffmpeg -version/-filters output for the drawtext cases would be a valuable next contribution. We cannot reproduce them on Linux.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 71976e6945

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@kstonekuan
kstonekuan marked this pull request as ready for review August 20, 2026 04:01
@kstonekuan
kstonekuan merged commit 6357b64 into Hebbian-Robotics:main Aug 20, 2026
5 checks passed
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.

Test the determinism contract of hflow.testing.joint_sine_parameters

2 participants