Skip to content

Conversation

@manumerous
Copy link
Owner

@manumerous manumerous commented Jan 2, 2026

Summary by CodeRabbit

  • Tests

    • Added a comprehensive test suite for the fixed-ID array covering initialization, access, bounds, iteration, optional values, Eigen extraction, and error cases.
  • Chores

    • Added CI coverage workflow and README coverage badge; updated CI cache step and Python toolchain support.
    • Added build tooling updates to support new tests and coverage reporting.
  • Bug Fixes

    • Improved type handling to support both optional-like and plain values in fixed-ID array operations.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 2, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Adds a Codecov coverage GitHub Actions workflow and README badge, introduces Python toolchain and rules_python in Bazel, adds Bazel/CMake test targets and GoogleTest suite for FixedIDArray, broadens the IDMapExtractor concept to accept optional-like and plain types, and updates a workflow cache action.

Changes

Cohort / File(s) Summary
CI & Coverage
.github/workflows/coverage.yml, README.md, .github/workflows/colcon_build_test.yml
New GitHub Actions workflow coverage.yml to run Bazel coverage and upload LCOV to Codecov; README badge for Codecov added; actions/cache upgraded to v4 in colcon_build_test.yml.
Build system (Bazel & Python toolchain)
MODULE.bazel
Added rules_python dependency (1.7.0), Python extension binding, and Python toolchain config (python_version = "3.10").
motorium_model build files
motorium/motorium_model/BUILD.bazel, motorium/motorium_model/CMakeLists.txt
Added test_fixed_id_array test target (Bazel/CMake); CMake links absl::log and absl::check; test target wired to project lib and gtest.
Core header API
motorium/motorium_model/include/motorium_model/FixedIDArray.h
Updated public concept IDMapExtractor from a single requires clause to a disjunctive form supporting optional-like T (checks has_value() and uses *val) or plain T, and uses std::convertible_to for ScalarType.
Unit tests
motorium/motorium_model/test/testFixedIDArray.cpp
Added comprehensive GoogleTest suite covering initialization, bounds checks, element access (including std::optional), Eigen extraction, copy/assignment, iteration, and death tests.

Sequence Diagram(s)

(omitted — changes do not introduce a multi-component runtime control-flow that benefits from a sequence diagram)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

  • Add cli tests #3 — Edits to motorium/motorium_model/include/motorium_model/FixedIDArray.h affecting the IDMapExtractor concept (formatting and related adjustments).

Poem

🐰
I hopped through headers, tests, and rules,
Optional or plain, extractors now schmooze.
Coverage badges gleam, CI takes a spin,
Tests march forward — let the builds begin!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'Feature/test coverage' is vague and generic, using non-descriptive terminology that doesn't clearly convey what specific changes are included in this substantial changeset. Consider a more specific title that highlights the primary changes, such as 'Add test coverage for FixedIDArray with CI integration' or 'Add FixedIDArray tests and coverage workflows'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

📜 Recent review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4007c37 and 620c0e6.

📒 Files selected for processing (1)
  • .github/workflows/coverage.yml

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

Copy link

@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: 8

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
motorium/motorium_model/include/motorium_model/FixedIDArray.h (1)

1-1: Pipeline failure: Abseil ABI/version mismatch during test linking.

The test executable test_fixed_id_array failed to link due to missing Abseil log symbols (ABI/version mismatch). This is a build configuration issue, not a problem with the FixedIDArray.h header itself. The test target transitively depends on Abseil through the motorium_model library, and the mismatch likely stems from incompatible Abseil versions between dependencies.

Recommended steps to resolve:

  1. Check Abseil version consistency: Ensure all dependencies, particularly motorium_core, use compatible Abseil versions.
  2. Review test build configuration: Verify that Abseil dependencies are properly linked for the test target in both motorium/motorium_model/BUILD.bazel and motorium/motorium_model/CMakeLists.txt.
  3. Verify compiler flags and ABI settings: Ensure consistent compiler flags and ABI compatibility across all Abseil-dependent targets.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0ae15ed and b3c9c11.

📒 Files selected for processing (6)
  • .github/workflows/coverage.yml
  • README.md
  • motorium/motorium_model/BUILD.bazel
  • motorium/motorium_model/CMakeLists.txt
  • motorium/motorium_model/include/motorium_model/FixedIDArray.h
  • motorium/motorium_model/test/testFixedIDArray.cpp
🧰 Additional context used
🪛 actionlint (1.7.9)
.github/workflows/coverage.yml

22-22: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


25-25: the runner of "actions/cache@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


34-34: the runner of "actions/cache@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


66-66: the runner of "codecov/codecov-action@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🪛 Cppcheck (2.19.0)
motorium/motorium_model/test/testFixedIDArray.cpp

[information] 1-1: Include file

(missingIncludeSystem)


[information] 3-3: Include file

(missingIncludeSystem)


[information] 4-4: Include file

(missingInclude)

🪛 GitHub Actions: Colcon Build
motorium/motorium_model/BUILD.bazel

[error] 1-1: Command failed during linking: the test executable 'test_fixed_id_array' could not be produced due to missing Abseil log symbols (ABI/version mismatch).

motorium/motorium_model/CMakeLists.txt

[error] 1-1: Command failed during linking: the test executable 'test_fixed_id_array' could not be produced due to missing Abseil log symbols (ABI/version mismatch).

motorium/motorium_model/include/motorium_model/FixedIDArray.h

[error] 1-1: Command failed during linking: the test executable 'test_fixed_id_array' could not be produced due to missing Abseil log symbols (ABI/version mismatch).

motorium/motorium_model/test/testFixedIDArray.cpp

[error] 1-1: Linking failed: undefined references to absl::lts_20250814::log_internal::LogMessageFatal and related Abseil log symbols. Possible ABI mismatch or missing Abseil libraries when building test_fixed_id_array.

🔇 Additional comments (8)
README.md (1)

6-7: LGTM! Codecov badge integration is correct.

The codecov badge properly references the main branch and links to the Codecov dashboard, aligning with the new Coverage workflow introduced in .github/workflows/coverage.yml.

motorium/motorium_model/test/testFixedIDArray.cpp (6)

1-16: LGTM! Well-structured test setup.

The test includes proper headers and defines a helper struct with appropriate equality operator for testing non-trivial types.


20-31: LGTM! Comprehensive initialization tests.

The tests properly cover:

  • Valid size initialization
  • Zero size failure (using EXPECT_DEATH)
  • Too large size failure (using EXPECT_DEATH)

The death tests ensure proper error handling for invalid initialization scenarios.


33-46: LGTM! Thorough access validation.

The tests verify both operator[] and at() methods for valid indices and properly use EXPECT_DEATH to check out-of-bounds access failures.


48-55: LGTM! Const-correctness validation.

The test properly verifies that const references to FixedIDArray provide read-only access through both accessor methods.


57-75: LGTM! Assignment behavior properly tested.

The tests validate successful copy assignment and properly check for size mismatch failures using EXPECT_DEATH.


90-150: LGTM! Comprehensive Eigen integration tests.

Excellent coverage of toEigenVector functionality across multiple scenarios:

  • Simple types (double)
  • Optional-wrapped types with default values for nullopt
  • Custom structs with member extraction
  • Optional-wrapped structs

The tests validate both the extraction logic and proper handling of missing values (nullopt) with defaults.

motorium/motorium_model/BUILD.bazel (1)

29-36: Remove proposed Abseil dependencies—they are already available transitively.

The test target test_fixed_id_array depends on :motorium_model, which depends on //motorium/motorium_core. The motorium_core library explicitly declares @com_google_absl//absl/log:check and @com_google_absl//absl/log:absl_log in its deps. These transitive dependencies are automatically available to any target that depends on motorium_model, making the proposed additions redundant. FixedIDArray.h includes motorium_core/Check.h, which uses these Abseil modules, and the dependency chain is already complete.

Likely an incorrect or invalid review comment.

Copy link

@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: 1

📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b3c9c11 and 987750e.

📒 Files selected for processing (2)
  • MODULE.bazel
  • README.md
⏰ 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). (2)
  • GitHub Check: bazel-build
  • GitHub Check: coverage
🔇 Additional comments (1)
README.md (1)

6-7: LGTM! Coverage badge addition is well-formatted.

The Codecov badge follows the standard pattern and is correctly positioned with the other CI status badges. This will provide visibility into test coverage metrics for the project.

@codecov-commenter
Copy link

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@manumerous manumerous merged commit aa879f1 into main Jan 5, 2026
4 of 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.

3 participants