Skip to content

feat(messages): install and register external CDR messages - #4721

Open
TomCC7 wants to merge 3 commits into
cc/feat/cdr-message-packagesfrom
cc/feat/cdr-unit-external-messages
Open

TomCC7 wants to merge 3 commits into
cc/feat/cdr-message-packagesfrom
cc/feat/cdr-unit-external-messages

Conversation

@TomCC7

@TomCC7 TomCC7 commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

What this adds

Install an external .msg project as a Python package. Its cdrgen provider registers the generated types alongside built-in messages.

Base: #4366. This layer adds external message authoring and registration; it does not add another code generator or transport SDK.

How to test

From this PR's checkout, with uv and a C++ compiler:

uv venv .venv-msg-review --python 3.12
DIMOS_ALLOW_MISSING_COCKPIT=1 uv pip install --python .venv-msg-review/bin/python .
uv pip install --python .venv-msg-review/bin/python 'setuptools>=70' wheel
uv pip install --python .venv-msg-review/bin/python --no-build-isolation ./examples/external-messages
.venv-msg-review/bin/python -I examples/external-messages/demo_reading.py

No previous PR installation is needed. The example checks provider registration, shared Header identity and decoded DeviceReading values. Reinstall the external package and restart Python after changing definitions.

Full instructions. WIP: application integration follows in later layers.

Shared CDR foundation

Standard ROS definitions are fetched and verified through the existing source lock and generation pipeline in #4366. Native SDK support is included in #4722. Shared Python value implementations and regressions are reviewed in #4800–#4803 before the #4734 caller migration. SDK and consumers use the same generated Rust message crate, including Time, TransformStamped and TFMessage; there is no separate TF schema package or generation command. Camera/depth callers migrate in #4734 and mapping/navigation callers in #4737.

The external CDR and transforms library pins remain unchanged. Local verification passed 122 SDK tests, all existing native consumer suites, and all 24 real native/DimSim/port acceptance tests without skips. Seven staged Nix source layouts resolve exactly one message crate with locked Cargo metadata. This is not a full Nix build or hardware validation. Fresh CI runs verify #4722 independently and the combined stack tip.

Stack #4804 contains the 12 original feature PRs and four separately reviewed adapter/buffer PRs (#4800–#4803). The redundant #4774 is superseded by #4722. No feature PR has been merged into main; existing conflicts with main and the WIP cutover failures in #4739 remain.

@github-actions github-actions Bot 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.

go2 replay realtime (arm64)

Details
Benchmark suite Current: 086c166 Previous: ecc2b8f Ratio
peak memory 1591.996 MB 1570.996 MB 1.01
peak threads 353 threads 355 threads 0.99
network (transport) 2722.111 MB 2730.387 MB 1.00
disk write 1.52 MB 1.496 MB 1.02
instructions 115.235 G 115 G 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@codecov

codecov Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 23.43750% with 49 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
dimos/message_codegen/test_project_install.py 23.43% 48 Missing and 1 partial ⚠️
@@                       Coverage Diff                        @@
##           cc/feat/cdr-message-packages    #4721      +/-   ##
================================================================
- Coverage                         82.33%   82.33%   -0.01%     
================================================================
  Files                              1677     1678       +1     
  Lines                            156940   157004      +64     
  Branches                          13161    13166       +5     
================================================================
+ Hits                             129220   129266      +46     
- Misses                            24048    24075      +27     
+ Partials                           3672     3663       -9     
Components Coverage Δ
Tests 96.71% <23.43%> (-0.07%) ⬇️
Flag Coverage Δ
OS-macos-latest 76.27% <23.43%> (-0.01%) ⬇️
OS-ubuntu-24.04-arm 76.02% <23.43%> (-0.03%) ⬇️
OS-ubuntu-latest 76.37% <23.43%> (-0.02%) ⬇️
Py-3.10 76.25% <23.43%> (?)
Py-3.11 76.38% <23.43%> (-0.03%) ⬇️
Py-3.12 76.38% <23.43%> (-0.03%) ⬇️
SelfHosted-Large 32.15% <20.31%> (+<0.01%) ⬆️
SelfHosted-Linux 40.70% <20.31%> (-0.02%) ⬇️
SelfHosted-macOS 40.99% <20.31%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
dimos/message_codegen/test_project_install.py 23.43% <23.43%> (ø)

... and 16 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@TomCC7
TomCC7 added this pull request to stack #4743 October 20, 2026 22:26
@TomCC7 TomCC7 changed the title feat(messages): build and install external CDR message projects feat(messages): install and register external CDR messages Oct 20, 2026
@TomCC7
TomCC7 marked this pull request as ready for review October 21, 2026 00:08
@greptile-apps

greptile-apps Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] No merge-blocking issue was identified. The installed external message flow passed provider registration, CDR roundtrip, and built-in type identity checks.

Summary

Adds a standalone external message project that reuses the built-in Header through dimos-cdrgen.

  • External Python projects can register messages that reuse DimOS types.
  • Editable message packages pick up definition edits after reinstalling.

TomCC7 explicitly documents that these examples require the matching review DimOS wheel; that requirement is intentional.

No actionable issues were found. No merge-blocking issue was identified in the reviewed changes.

Reviews (1) · Last reviewed commit: "Merge branch 'cc/review/cdr-preserve-leg..." · Reviewed by Greptile

@TomCC7
TomCC7 force-pushed the cc/feat/cdr-unit-external-messages branch from 5032b12 to 085d09d Compare October 21, 2026 00:54
@TomCC7
TomCC7 force-pushed the cc/feat/cdr-unit-external-messages branch from 0446dd3 to 67c50a0 Compare October 21, 2026 04:39
@TomCC7
TomCC7 force-pushed the cc/feat/cdr-unit-external-messages branch from 67c50a0 to 086c166 Compare October 21, 2026 18:43
@TomCC7
TomCC7 removed this pull request from stack #4743 October 22, 2026 18:51
@TomCC7
TomCC7 added this pull request to stack #4776 October 22, 2026 18:52
@TomCC7
TomCC7 removed this pull request from stack #4776 October 23, 2026 08:47
@TomCC7
TomCC7 added this pull request to stack #4799 October 23, 2026 08:47
@TomCC7
TomCC7 removed this pull request from stack #4799 October 23, 2026 09:19
@TomCC7
TomCC7 added this pull request to stack #4804 October 23, 2026 09:19

This branch was successfully deployed

1 active (outdated) deployment
cachix — 67c50a08 Deployed Oct 21, 2026 by TomCC7 via cachix-build #13732
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.

1 participant