Skip to content

Conversation

@flyingrobots
Copy link
Owner

@flyingrobots flyingrobots commented Oct 30, 2025

Adds JSON golden fixtures for motion rule and a minimal test harness:

  • crates/rmg-core/tests/fixtures/motion-fixtures.json
  • crates/rmg-core/tests/motion_golden_fixtures.rs

Scope: tests only; no changes to runtime code or Cargo.toml.

Refs #91.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 30, 2025

Warning

Rate limit exceeded

@flyingrobots has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 0 minutes and 59 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 51af5f3 and a377020.

📒 Files selected for processing (2)
  • crates/rmg-core/tests/fixtures/motion-fixtures.json (1 hunks)
  • crates/rmg-core/tests/motion_golden_fixtures.rs (1 hunks)

Summary by CodeRabbit

  • Tests

    • Added golden fixture tests to validate motion processing pipeline with deterministic test cases.
  • Documentation

    • Updated decision log and execution plan with testing infrastructure details.

Walkthrough

This PR establishes deterministic golden motion fixtures and a test harness for validating motion rule processing. It adds a JSON fixture file with three motion test cases, a Rust test file with deserialization structures, and documentation entries tracking these test-only additions.

Changes

Cohort / File(s) Summary
Test fixtures
crates/rmg-core/tests/fixtures/motion-fixtures.json
New JSON fixture file defining three motion test cases, each with initial position, velocity, and expected position after motion
Golden fixture test harness
crates/rmg-core/tests/motion_golden_fixtures.rs
New test file introducing MotionCase and MotionFixtures structures for deserializing JSON fixtures, lazy-loading fixtures at runtime, and a motion_golden_fixtures_apply_as_expected test that validates motion processing via GraphStore/Engine with bitwise equality checks
Documentation
docs/decision-log.md, docs/execution-plan.md
Updated decision log with 2025-10-30 entry documenting golden motion fixtures decision; added execution plan entry for PR-01 clarifying test-only scope

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Motion test harness logic: Verify the test correctly constructs GraphStore/Engine, applies the motion rule, and validates component-wise equality checks
  • Fixture deserialization: Ensure serde_json parsing handles all three cases correctly and lazy initialization works as intended

Possibly related issues

Poem

🌍 Motion caught in golden light,
Three fixtures dance, their paths precise,
Bytes collide with truths held tight—
No randomness, just rules exact and nice! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "PR-01: tests(core): golden motion fixtures (JSON) + harness" is directly related to the changeset and clearly communicates the primary change. The title accurately references the two main additions: the JSON fixture file and the test harness, and specifies that these are test-related changes for the core module. The title is concise, specific, and provides sufficient context for scanning commit history.
Description Check ✅ Passed The pull request description is clearly related to the changeset and provides appropriate context. It explicitly lists the two new files being added, clarifies the scope as tests-only with no runtime or manifest changes, and references the related issue. The description is sufficiently detailed to explain what is being added and why, without being excessive.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8ccbec9 and 51af5f3.

📒 Files selected for processing (4)
  • crates/rmg-core/tests/fixtures/motion-fixtures.json (1 hunks)
  • crates/rmg-core/tests/motion_golden_fixtures.rs (1 hunks)
  • docs/decision-log.md (1 hunks)
  • docs/execution-plan.md (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
crates/rmg-core/tests/motion_golden_fixtures.rs (3)
crates/rmg-core/src/payload.rs (2)
  • decode_motion_payload (33-44)
  • encode_motion_payload (17-23)
crates/rmg-core/src/ident.rs (2)
  • make_node_id (35-40)
  • make_type_id (27-32)
crates/rmg-core/src/demo/motion.rs (1)
  • motion_rule (66-78)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Security Audit

coderabbitai[bot]
coderabbitai bot previously approved these changes Oct 30, 2025
@flyingrobots flyingrobots merged commit 4ad0534 into main Oct 30, 2025
9 checks passed
@flyingrobots flyingrobots deleted the echo/pr-01-golden-fixtures branch October 30, 2025 12:31
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.

2 participants