Skip to content

feat(web): channel authoring API and web codec registry - #3570

Open
paul-nechifor wants to merge 1 commit into
paul/feat/w5-dynamic-bridge-classesfrom
paul/feat/w6-channel-authoring
Open

feat(web): channel authoring API and web codec registry#3570
paul-nechifor wants to merge 1 commit into
paul/feat/w5-dynamic-bridge-classesfrom
paul/feat/w6-channel-authoring

Conversation

@paul-nechifor

Copy link
Copy Markdown
Contributor

No description provided.

- New dimos.web.codecs: @web_encoder / @web_decoder registry keyed by encoding
  id. An encoder turns one DimOS message into the bytes of a relay data frame.
- Encoders return bytes, an EncodedPayload when the frame needs header meta,
  or None to skip a sample. json.v1 stays the only unregistered fallback.
- New Channel in dimos.web.cockpit plus cockpit(channels=[...]) to put a
  stream on the wire without a panel. rx only for now, publish arrives in W7.
- The blueprint compiler resolves encoding ids to callables at definition time
  and ships them in immutable runtime channel specs through the config.
- Workers never depend on the user's codec module being imported there. Codecs
  must live at module level so pickle ships them by reference.
- Built-in codecs (jpeg.v1, costmap.zlib.v1, json.v1) move to
  relay_bridge/builtin_codecs.py. The static class stays for the default path.
- examples/custom-path/ is the end-to-end custom codec demo, pinned by a new
  browser e2e in CI (test_custom_channel_browser.py).
@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Patch % Lines
dimos/e2e_tests/test_custom_channel_browser.py 21.31% 48 Missing ⚠️
dimos/web/test_codecs.py 86.24% 26 Missing ⚠️
dimos/web/cockpit.py 94.96% 6 Missing and 1 partial ⚠️
dimos/web/relay_bridge/relay_bridge_module.py 95.55% 4 Missing and 2 partials ⚠️
dimos/web/relay_bridge/builtin_codecs.py 95.12% 1 Missing and 1 partial ⚠️
dimos/web/relay_bridge/gen_costmap_fixtures.py 50.00% 2 Missing ⚠️
dimos/web/relay_bridge/test_relay_bridge_module.py 98.70% 2 Missing ⚠️
dimos/web/test_cockpit.py 98.64% 2 Missing ⚠️
@@                          Coverage Diff                           @@
##             paul/feat/w5-dynamic-bridge-classes    #3570   +/-   ##
======================================================================
  Coverage                                       ?   77.07%           
======================================================================
  Files                                          ?     1274           
  Lines                                          ?   124818           
  Branches                                       ?    11143           
======================================================================
  Hits                                           ?    96201           
  Misses                                         ?    25488           
  Partials                                       ?     3129           
Flag Coverage Δ
OS-ubuntu-24.04-arm 71.68% <91.24%> (?)
OS-ubuntu-latest 73.37% <91.24%> (?)
Py-3.10 73.36% <91.24%> (?)
Py-3.11 73.36% <91.24%> (?)
Py-3.12 73.36% <91.24%> (?)
Py-3.13 73.36% <91.24%> (?)
Py-3.14 73.36% <91.24%> (?)
Py-3.14t 73.36% <91.24%> (?)
SelfHosted-Large 29.75% <30.59%> (?)
SelfHosted-Linux 35.71% <30.59%> (?)

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

Files with missing lines Coverage Δ
dimos/web/codecs.py 100.00% <100.00%> (ø)
dimos/web/relay_bridge/test_costmap_encoding.py 100.00% <100.00%> (ø)
dimos/web/relay_bridge/test_dynamic.py 99.55% <100.00%> (ø)
dimos/web/relay_bridge/test_relay_bridge_e2e.py 95.50% <ø> (ø)
dimos/web/relay_bridge/builtin_codecs.py 95.12% <95.12%> (ø)
dimos/web/relay_bridge/gen_costmap_fixtures.py 57.57% <50.00%> (ø)
dimos/web/relay_bridge/test_relay_bridge_module.py 98.80% <98.70%> (ø)
dimos/web/test_cockpit.py 99.07% <98.64%> (ø)
dimos/web/relay_bridge/relay_bridge_module.py 94.01% <95.55%> (ø)
dimos/web/cockpit.py 95.43% <94.96%> (ø)
... and 2 more
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@greptile-apps

greptile-apps Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This change adds Python-authored browser channels and codec registration, generates relay bridge ports for those declarations, and delivers encoded custom streams through lazy browser subscriptions.

The custom path flow was exercised with a real local relay and Chromium browser: the page connected and rendered all three delivered points. Focused coverage also passed for generated-port routing, subscription-gated encoding, codec parameter isolation, cache replay, encoder-failure isolation, parameter validation, dynamic class deployment, and blueprint pickling.

T-Rex validation blocked

  • Tool: the prescribed SDK test command could not execute because ensure_deno() wrote an informational message to standard output, contaminating the captured Deno binary path and causing exit 127. The browser and Python relay validations completed successfully.

Confidence Score: 5/5

The exercised custom-channel authoring and browser-delivery flow is safe to merge.

No defects remain in the review output. A real browser session verified delivery through the local relay, and 216 focused runtime tests covered the main routing, serialization, lazy-subscription, and isolation behaviors.

Files Needing Attention: No files require corrective changes. The SDK test invocation in the setup guidance merits follow-up because resolver logging prevents the documented command from locating the Deno binary.

T-Rex T-Rex Logs

What T-Rex did

  • T-Rex completed the requested contract verification, noting that local artifact references were not uploaded.
  • A browser and runtime verification sweep was performed, covering the browser-session assertion (points: 3, coordinates 1.5 and -2.5, connected) and a suite of runtime tests including generated-port lazy encode routing, no encode before subscription, subscription toggling, independent JPEG qualities, cache replay, encoder-failure isolation, parameter validation, dynamic class deployment, and blueprint pickling.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "feat(web): channel authoring API and web..." | Re-trigger Greptile

@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