Skip to content

fix(unitree): validate robot addresses before deployment - #5230

Merged
paul-nechifor merged 4 commits into
mainfrom
aa-monts/fix/dim-468-missing-robot-ip
Nov 15, 2026
Merged

paul-nechifor merged 4 commits into
mainfrom
aa-monts/fix/dim-468-missing-robot-ip

Conversation

@aa-MONTS

@aa-MONTS aa-MONTS commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Running a Unitree WebRTC stack without a robot IP now fails during configuration validation, before deployment, with guidance naming the relevant settings. The CLI exits 2. Blank addresses and empty fleet lists also produce configuration errors instead of reaching WebRTC or raising unrelated exceptions.

Resolve the run's global settings before validating module configs, normalize fleet addresses before checking the primary IP, and preserve Go2 replay/simulation and scoped or namespaced IP overrides. Both G1 WebRTC paths receive hardware-specific guidance. Python builds and dynamic loads validate before starting new resources; hosted fragments validate against the destination host's environment. The introductory CLI examples now use replay.

Validation:

  • Focused Unitree connection, parser, CLI, simulator-blueprint, coordinator, and hosted tests passed.
  • Mypy passed for all eight changed production Python files; commit hooks passed.
  • On Linux, the original missing-IP dimos --viewer none run unitree-go2 case exits 2 with one configuration error before deployment.
  • No real robot or simulator was started for validation.

Fixes DIM-468.

  • I have read and approved the CLA.

@aa-MONTS
aa-MONTS requested a review from leshy as a code owner November 12, 2026 07:20
@aa-MONTS aa-MONTS added the backport:skip Skip creating a backport to any release branches label Nov 12, 2026
@greptile-apps

greptile-apps Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Low impact] The change is limited to missing-IP guidance in Go2 WebRTC setup.

The PR appears safe to merge, with a non-blocking improvement needed to keep the new test independent of exported settings.

Findings

  1. P2 Exported settings break the test ▶

Summary

Replaces the missing-IP assertion in make_connection() with a ValueError that names the robot setting and the offline options.

  • Go2 WebRTC setup explains what to do when no robot IP is set.

Reviews (1) · Last reviewed commit: "fix(go2): say how to run without a robot..." · Reviewed by Greptile

@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: 721a21a Previous: 8512cd3 Ratio
peak memory 1729.098 MB 1724.516 MB 1.00
peak threads 382 threads 383 threads 1.00
network (transport) 2731.578 MB 2731.025 MB 1.00
disk write 1.625 MB 1.672 MB 0.97
instructions 136.93 G 138.808 G 0.99

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

@codecov

codecov Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Patch % Lines
dimos/core/coordination/blueprint_config/fields.py 91.66% 0 Missing and 1 partial ⚠️
dimos/robot/unitree/g1/connection.py 90.00% 0 Missing and 1 partial ⚠️
dimos/robot/unitree/go2/connection.py 93.33% 1 Missing ⚠️
@@            Coverage Diff             @@
##             main    #5230      +/-   ##
==========================================
+ Coverage   84.52%   84.55%   +0.03%     
==========================================
  Files        1918     1925       +7     
  Lines      189261   189686     +425     
  Branches    15488    15511      +23     
==========================================
+ Hits       159972   160393     +421     
- Misses      25171    25236      +65     
+ Partials     4118     4057      -61     
Components Coverage Δ
Tests 96.67% <100.00%> (-0.04%) ⬇️
Flag Coverage Δ
OS-macos-latest 78.99% <98.47%> (+0.03%) ⬆️
OS-ubuntu-24.04-arm 78.58% <98.47%> (+0.04%) ⬆️
OS-ubuntu-latest 79.04% <98.47%> (+0.03%) ⬆️
Py-3.10 79.03% <98.47%> (+0.03%) ⬆️
Py-3.11 79.01% <98.47%> (+0.03%) ⬆️
Py-3.12 79.02% <98.47%> (+0.03%) ⬆️
SelfHosted-Linux 40.67% <50.25%> (+0.02%) ⬆️
SelfHosted-macOS 40.40% <50.25%> (+0.02%) ⬆️

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

Files with missing lines Coverage Δ
dimos/cli/test_dimos.py 99.22% <100.00%> (+0.03%) ⬆️
dimos/core/coordination/blueprint_config/parser.py 92.68% <100.00%> (+3.48%) ⬆️
dimos/core/coordination/module_coordinator.py 93.17% <100.00%> (+4.09%) ⬆️
dimos/robot/unitree/config.py 100.00% <100.00%> (ø)
...bot/unitree/g1/effectors/high_level/test_webrtc.py 100.00% <100.00%> (ø)
...os/robot/unitree/g1/effectors/high_level/webrtc.py 67.08% <100.00%> (ø)
dimos/robot/unitree/g1/test_connection.py 100.00% <100.00%> (ø)
dimos/robot/unitree/go2/fleet_connection.py 38.63% <100.00%> (+1.96%) ⬆️
dimos/robot/unitree/go2/test_connection.py 100.00% <100.00%> (ø)
dimos/robot/unitree/go2/test_fleet_connection.py 100.00% <100.00%> (ø)
... and 4 more

... and 15 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 Nov 12, 2026
@paul-nechifor
paul-nechifor enabled auto-merge (squash) November 15, 2026 04:22
@github-actions github-actions Bot removed the ready-to-merge Required CI checks have passed on this PR label Nov 15, 2026
@paul-nechifor paul-nechifor changed the title fix(go2): say how to run without a robot when no robot IP is set fix(unitree): validate robot addresses before deployment Nov 15, 2026
aa-MONTS and others added 3 commits November 15, 2026 06:45
`dimos run unitree-go2` with no robot IP ended in a bare
`AssertionError: IP address must be provided` from make_connection().
Raise a ValueError that names the setting and the two ways to run without
a robot, in the style of processed_robot_ips.
GlobalConfig() reads REPLAY and SIMULATION from the environment, so with
either exported make_connection() took the replay or simulator branch
and the test failed although the check works.
@paul-nechifor
paul-nechifor force-pushed the aa-monts/fix/dim-468-missing-robot-ip branch from 1d60e34 to d85cae9 Compare November 15, 2026 04:47
validate_module_config dropped every key that is not a config field, so a
misspelled override passed validation silently. Only kwargs pinned on a
blueprint can carry constructor arguments that are not config fields, and
the parser already filters those. Filter them in the coordinator as well
and validate everything else as given.

The hosted Go2 teleop blueprint test now supplies a robot IP, which
GO2Connection requires at parse time.
@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Nov 15, 2026
@paul-nechifor
paul-nechifor merged commit 7f85f19 into main Nov 15, 2026
43 checks passed
@paul-nechifor
paul-nechifor deleted the aa-monts/fix/dim-468-missing-robot-ip branch November 15, 2026 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip Skip creating a backport to any release branches 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