Skip to content

Ivan/docs low level module plumbing - #3564

Open
leshy wants to merge 4 commits into
mainfrom
ivan/docs-module-transports
Open

Ivan/docs low level module plumbing#3564
leshy wants to merge 4 commits into
mainfrom
ivan/docs-module-transports

Conversation

@leshy

@leshy leshy commented Aug 20, 2026

Copy link
Copy Markdown
Member

No description provided.

leshy added 3 commits August 20, 2026 00:06
Instead of .connect within one process, each side assigns the same
typed transport to its stream and the modules run as independent
scripts. Also fix the stale detector.image name in the connect
example (Detection2DModule's input is color_image).
Two additions under the low-level section: a transport is directly
usable from a plain script (publish/subscribe/get_next, no module or
declared I/O), and modules can grow In/Out streams at runtime —
introspection scans instance attributes and handle_<name> auto-binding
covers anything added before start(). Both patterns verified live
against LCMTransport.
@mintlify

mintlify Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
dimensional 🟢 Ready View Preview Aug 20, 2026, 8:46 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@greptile-apps

greptile-apps Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This update expands the module usage documentation with lower-level LCM transport, raw publish/subscribe, and dynamically attached stream examples. The dynamic-stream example overrides start() without preserving the base startup call; copying it into a module that uses main() or handle_<input> methods leaves those framework-managed behaviors uninitialized.

T-Rex validation blocked

The focused lifecycle reproduction could not run because the required reactivex package was unavailable. Installing the locked dependency set was blocked while building pyaudio==0.2.14, because the PortAudio development header portaudio.h is missing.

Confidence Score: 4/5

The documentation should be corrected before merging so copied dynamic-stream modules retain standard startup behavior.

The framework implementation directly shows that the omitted base call performs main-lifecycle startup and automatic input-handler binding. The focused runtime comparison could not reach that path because dependency installation is blocked by missing PortAudio headers.

Files Needing Attention: docs/usage/modules.md needs the dynamic start() example to invoke the inherited startup implementation.

T-Rex T-Rex Logs

What T-Rex did

  • A focused Python reproduction was authored to compare a dynamic start() implementation with and without super().start(), exercising an async main() and a handle_echo input handler.
  • The reproduction ran but stopped before the lifecycle path due to ModuleNotFoundError: No module named 'reactivex' during import.
  • An attempt to sync and build dependencies failed because portaudio.h was unavailable, preventing the pyaudio==0.2.14 build and the runtime comparison.
  • Documentation and lifecycle implementation references were identified to map how Dyn.start() behaves and how handlers are bound.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "mini cleanup" | Re-trigger Greptile

Comment thread docs/usage/modules.md
Comment on lines +557 to +561
class Dyn(Module):
def start(self):
# module can add a random input
self.echo = In(String, "echo", m)
print("Externally attached output:", self.words)

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.

P2 Dynamic example bypasses module startup

Readers copying this pattern into a module with main() or handle_<input> methods will override ModuleBase.start() without invoking it, so the framework never initializes the main lifecycle or binds input handlers and incoming messages remain unhandled.

@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

@@            Coverage Diff             @@
##             main    #3564      +/-   ##
==========================================
+ Coverage   76.13%   76.44%   +0.31%     
==========================================
  Files        1228     1247      +19     
  Lines      119172   120670    +1498     
  Branches    10684    10890     +206     
==========================================
+ Hits        90726    92250    +1524     
+ Misses      25345    25317      -28     
- Partials     3101     3103       +2     
Flag Coverage Δ
OS-ubuntu-24.04-arm 70.94% <ø> (+0.39%) ⬆️
OS-ubuntu-latest 72.69% <ø> (+0.36%) ⬆️
Py-3.10 72.68% <ø> (+0.36%) ⬆️
Py-3.11 72.68% <ø> (+0.36%) ⬆️
Py-3.12 72.68% <ø> (+0.36%) ⬆️
Py-3.13 72.68% <ø> (+0.36%) ⬆️
Py-3.14 72.69% <ø> (+0.36%) ⬆️
Py-3.14t 72.68% <ø> (+0.36%) ⬆️
SelfHosted-Large 29.81% <ø> (+0.06%) ⬆️
SelfHosted-Linux 35.77% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 61 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.

@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Aug 20, 2026
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.

1 participant