Skip to content

Improve pipeline unit test coverage#555

Open
EffortlessSteven wants to merge 1 commit into
mainfrom
codex/improve-unit-testing-f6jltz
Open

Improve pipeline unit test coverage#555
EffortlessSteven wants to merge 1 commit into
mainfrom
codex/improve-unit-testing-f6jltz

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Motivation

  • Increase confidence in pipeline executor and deterministic hashing by adding targeted unit tests that exercise RT validation and config-hash sensitivity.
  • Replace brittle unwrap()/expect() usage in the affected test modules with explicit assertions or safe test helpers to follow workspace testing rules.

Description

  • Added reusable test fixtures and synthetic filter node functions in crates/openracing-pipeline/src/executor.rs to exercise RT validation paths without external setup.
  • Added executor unit tests that assert RTError::PipelineFault is returned when a node produces NaN or out-of-bounds torque, and tests for process_with_curve override behavior and fault-before-curve mapping.
  • Introduced a safe test helper must() and an assertion helper assert_config_hash_changes in crates/openracing-pipeline/src/hash.rs and expanded hash tests to cover scalar fields, curve/notch collections, and safety envelope (bumpstop / hands-off) fields.
  • Removed #[allow(clippy::unwrap_used)] usage in the modified test modules by replacing direct unwrap()s with ?-returning tests or explicit assert_eq!/assert! checks.

Testing

  • Ran python scripts/cargo_fmt_workspace.py to format the workspace; formatting completed successfully.
  • Ran cargo test -p openracing-pipeline --lib --no-default-features and cargo test -p openracing-pipeline; all unit and integration tests in the openracing-pipeline crate passed (42 unit tests and additional integration/deep/hardening/proptest suites reported as passing in the test output).
  • Ran lints with cargo clippy -p openracing-pipeline --all-targets -- -D warnings; the target crate passed clippy without warnings.

Codex Task

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented May 17, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@EffortlessSteven has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 45 minutes before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

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

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: b286b6d2-74d0-4943-b7d7-ad795b3d9308

📥 Commits

Reviewing files that changed from the base of the PR and between d836f5b and d0f462c.

📒 Files selected for processing (2)
  • crates/openracing-pipeline/src/executor.rs
  • crates/openracing-pipeline/src/hash.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/improve-unit-testing-f6jltz

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.

@factory-droid

factory-droid Bot commented May 17, 2026

Copy link
Copy Markdown

Droid finished @EffortlessSteven's task —— View job


LGTM — no high-confidence, actionable issues found; the changes add focused coverage for RT validation behavior and config-hash sensitivity.

@github-actions

Copy link
Copy Markdown

Compatibility Layer Usage Report

Current usage count: 193
Baseline usage count: 193
ℹ️ Usage unchanged

📈 Usage Trend (Last 30 Days)

  • Peak usage: 193
  • Current trend: insufficient_data (0%)
  • Projected removal: unknown

Usage Details

  • /home/runner/work/OpenRacing/OpenRacing/crates/schemas/src/service_example.rs:189 - temp_c
  • /home/runner/work/OpenRacing/OpenRacing/crates/schemas/src/service_example.rs:218 - temp_c
  • /home/runner/work/OpenRacing/OpenRacing/crates/schemas/src/integration_test.rs:79 - temp_c
  • /home/runner/work/OpenRacing/OpenRacing/crates/schemas/src/ipc_conversion.rs:191 - temp_c
  • /home/runner/work/OpenRacing/OpenRacing/crates/schemas/src/ipc_conversion.rs:194 - temp_c
  • /home/runner/work/OpenRacing/OpenRacing/crates/schemas/src/ipc_conversion.rs:213 - temp_c
  • /home/runner/work/OpenRacing/OpenRacing/crates/schemas/src/ipc_conversion.rs:620 - temp_c
  • /home/runner/work/OpenRacing/OpenRacing/crates/ui/src/commands.rs:357 - temp_c
  • /home/runner/work/OpenRacing/OpenRacing/crates/engine/src/compat_impl.rs:69 - temp_c
  • /home/runner/work/OpenRacing/OpenRacing/crates/engine/src/hid/linux.rs:1253 - temp_c

... and 183 more occurrences

Migration Guide

To migrate these usages, replace:

  • .temp_c().temperature_c
  • .faults().fault_flags
  • .wheel_angle_mdeg().wheel_angle_deg
  • .wheel_speed_mrad_s().wheel_speed_rad_s

See Migration Patterns for detailed examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant