Skip to content

feat(messages): add built-in CDR types alongside legacy messages - #4366

Open
TomCC7 wants to merge 2 commits into
mainfrom
cc/feat/cdr-message-packages
Open

TomCC7 wants to merge 2 commits into
mainfrom
cc/feat/cdr-message-packages

Conversation

@TomCC7

@TomCC7 TomCC7 commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

What this adds

  • Build built-in .msg definitions with cdrgen during package installation.
  • Package generated Python types at dimos.messages, plus schemas and native source artifacts.
  • Keep existing dimos.msgs and business code unchanged.

Flow: definitions → cdrgen → installed artifacts → runnable examples. Base: main.

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 .
.venv-msg-review/bin/python -I examples/message-package/demo_installed_wheel.py

The example prints the generated message and schema directories and checks CDR round trips.

For Python → C++ → Rust → Python, install CMake and Rust/Cargo, then run:

uv pip install --python .venv-msg-review/bin/python 'dimos-cdrgen[native]==0.1.1'
.venv-msg-review/bin/python -I examples/message-package/demo_native.py

The native example checks map/cpp/rust and the unchanged Header timestamp. Full instructions.

DIMOS_ALLOW_MISSING_COCKPIT=1 permits installation without prebuilt web assets. WIP: transport, SDK and business integration follow in later PRs.

@codecov

codecov Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.92857% with 59 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_bundled.py 19.44% 57 Missing and 1 partial ⚠️
dimos/message_codegen/build.py 98.57% 0 Missing and 1 partial ⚠️
@@            Coverage Diff             @@
##             main    #4366      +/-   ##
==========================================
- Coverage   82.25%   82.17%   -0.08%     
==========================================
  Files        1670     1673       +3     
  Lines      156484   156726     +242     
  Branches    13130    13147      +17     
==========================================
+ Hits       128710   128787      +77     
- Misses      24257    24322      +65     
- Partials     3517     3617     +100     
Components Coverage Δ
Tests 96.78% <72.38%> (-0.09%) ⬇️
Flag Coverage Δ
OS-macos-latest 76.14% <78.92%> (+0.03%) ⬆️
OS-ubuntu-24.04-arm 75.89% <78.92%> (+0.01%) ⬆️
OS-ubuntu-latest 76.25% <78.92%> (+0.02%) ⬆️
Py-3.10 76.25% <78.92%> (+0.01%) ⬆️
Py-3.11 76.25% <78.92%> (+0.04%) ⬆️
Py-3.12 76.25% <78.92%> (+0.37%) ⬆️
SelfHosted-Large 32.12% <22.85%> (-0.03%) ⬇️
SelfHosted-Linux 40.68% <22.85%> (-0.11%) ⬇️
SelfHosted-macOS 40.97% <22.85%> (-0.12%) ⬇️

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

Files with missing lines Coverage Δ
dimos/control/connection/test_connection_module.py 98.06% <100.00%> (+0.13%) ⬆️
dimos/message_codegen/test_build.py 100.00% <100.00%> (ø)
dimos/message_codegen/test_integration.py 100.00% <ø> (ø)
dimos/message_codegen/build.py 98.57% <98.57%> (ø)
dimos/message_codegen/test_bundled.py 19.44% <19.44%> (ø)

... 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 changed the title feat: package native messages for external applications (2/7) feat: package native messages for external applications (2/8) Oct 2, 2026
@greptile-apps

greptile-apps Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The change reaches DimOS installs and message-package builders.

The confirmed problems affect maintainer generation and native packaging workflows and are non-blocking; neither establishes a security vulnerability.

Findings

  1. P2 Schema edits get left out ▶
  2. P2 Packaging fails on Python 3.10 ▶

Summary

Adds built-in CDR messages under dimos.messages while keeping dimos.msgs available.

  • DimOS installs built-in CDR messages under dimos.messages.
  • Installed message examples round-trip in Python and across native languages.
  • Message-codegen checks no longer run in a dedicated CI workflow.

The two maintainer-workflow issues do not block merging.

Reviews (1) · Last reviewed commit: "docs(messages): document complete built-..." · Reviewed by Greptile

Comment thread scripts/generate_builtin_messages.py Outdated
Comment thread scripts/package_messages.sh Outdated
@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Oct 21, 2026
Comment thread packages/dimos-generated/catalog.json Outdated
paul-nechifor
paul-nechifor previously approved these changes Oct 21, 2026
@github-actions github-actions Bot removed the ready-to-merge Required CI checks have passed on this PR label Oct 21, 2026
@TomCC7
TomCC7 requested a review from paul-nechifor October 21, 2026 03:53
paul-nechifor
paul-nechifor previously approved these changes Oct 21, 2026
@TomCC7
TomCC7 force-pushed the cc/feat/cdr-message-packages branch from 9e0d7b3 to 0f3c1f6 Compare October 21, 2026 04:39
@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Oct 21, 2026

This branch was successfully deployed

1 active deployment
cachix — 0f3c1f6c Deployed Oct 21, 2026 by TomCC7 via cachix-build #13726
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Required CI checks have passed on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants