Skip to content

Graph Expression Parser and ROS_DOMAIN_ID - #331

Closed
0x53A wants to merge 4 commits into
ZettaScaleLabs:mainfrom
0x53A:fix/graph-bootstrap-qos
Closed

0x53A wants to merge 4 commits into
ZettaScaleLabs:mainfrom
0x53A:fix/graph-bootstrap-qos

Conversation

@0x53A

@0x53A 0x53A commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

This PR was LLM generated in a hurry, which is why I am opening it as draft. It contains fixes for two issues:

The default domain of 0 was assumed in a few places, and, the key parser failed on valid expressions.

I'll have some time ~late September, otherwise please treat this like an issue/bug report and extract the two relevant changes.

0x53A added 4 commits August 29, 2026 18:06
  Restore synchronous, history-enabled graph initialization after review of
  the asynchronous bootstrap experiment.

  Accept rmw_zenoh SYSTEM_DEFAULT QoS encodings, preserve node domain and
  key-expression settings for built-in services, and add regression coverage.
@YuanYuYuan

Copy link
Copy Markdown
Collaborator

Thanks for the report and the draft — both issues you flagged are real, and both are now fixed on main:

Both PRs extracted the underlying defects rather than taking this PR's implementation directly, with new tests covering the SYSTEM_DEFAULT wire-omission case and the built-in-service domain/format propagation. Closing this in favor of those — thank you for catching both.

@YuanYuYuan YuanYuYuan closed this Sep 1, 2026
0x53A added a commit to 0x53A/hiroz that referenced this pull request Sep 1, 2026
Upstream extracted both defects from the draft PR ZettaScaleLabs#331 into ZettaScaleLabs#336 and
ZettaScaleLabs#337 and merged them, so every native change on this branch is now
superseded. Resolved by taking upstream verbatim everywhere the two
sides overlapped:

- hiroz-protocol/src/qos.rs: upstream's parser is ours plus a real
  correction -- an omitted history depth resolves to rmw_zenoh_cpp's
  wire default RMW_ZENOH_DEFAULT_HISTORY_DEPTH (42), not hiroz's own
  unrelated QosProfile default of 10. Ours misreported the depth of
  every peer that relied on the SYSTEM_DEFAULT omission.
- parameter/service.rs and node.rs: upstream is a strict superset,
  additionally propagating the node's enclave, which we had dropped.
- tests/graph.rs: upstream's version, with the shared TestRouter in
  tests/common/mod.rs replacing our inline DomainTestRouter.
- Dropped our inline tests in qos.rs and format/rmw_zenoh.rs; upstream
  adopted the same cases into tests/qos.rs and tests/key_expr.rs. Ours
  would now fail anyway, having asserted the pre-ZettaScaleLabs#337 depth of 10.
- Dropped docs/patches/, an artifact of the draft PR.

Two wasm-only fixes were needed on top:

- ZContextBuilder's new hand-written Default impl initialises
  shm_config, which does not exist on wasm32; cfg it out to match the
  field.
- build_async() now has to resolve the DomainId enum ZettaScaleLabs#336 introduced.
  It rejects an unparseable ROS_DOMAIN_ID exactly as build() does,
  rather than silently falling back to domain 0 and landing the node on
  the wrong ROS graph.

Verified: cargo test -p hiroz-protocol (51 tests), cargo test -p hiroz
--test graph --test domain_id (28 tests), and cargo check -p hiroz
--target wasm32-unknown-unknown --no-default-features --features
rmw-zenoh,jazzy.
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.

2 participants