Skip to content

Support 64-bit integers in daemon XML-RPC - #1275

Open
sylvesterkaczmarek wants to merge 3 commits into
ros2:rollingfrom
sylvesterkaczmarek:fix-629-xmlrpc-int64
Open

Support 64-bit integers in daemon XML-RPC#1275
sylvesterkaczmarek wants to merge 3 commits into
ros2:rollingfrom
sylvesterkaczmarek:fix-629-xmlrpc-int64

Conversation

@sylvesterkaczmarek

@sylvesterkaczmarek sylvesterkaczmarek commented Aug 20, 2026

Copy link
Copy Markdown

Summary

Fixes #629.

Python's standard XML-RPC marshaller rejects integers outside the signed 32-bit range even though its unmarshaller supports the standard i8 extension.

Register a custom integer marshaller that:

  • preserves the normal int tag for signed 32-bit values
  • uses i8 for signed 64-bit values
  • continues rejecting values outside signed 64-bit range

This allows daemon RPC payloads to carry 64-bit integer values without changing existing 32-bit output.

Testing

Added focused round-trip coverage for:

  • signed 32-bit values using int
  • positive and negative values outside 32-bit using i8
  • signed 64-bit boundaries
  • rejection outside the signed 64-bit range

Did you use Generative AI?

Yes. AI was used to assist with tests.

Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
@mergify

mergify Bot commented Aug 20, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@fujitatomoya fujitatomoya left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the implementation to patch the mashaller looks good to work, but i would take the other path to address the root cause such as JSON-RPC 2.0 over the existing loopback HTTP transport. at least, this needs to be tested.

@@ -0,0 +1,46 @@
# Copyright 2026 Open Source Robotics Foundation, Inc.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we need an actual test with xmlrlc client via ros2daemon.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I added transport-level coverage using ros2daemon's own make_xmlrpc_server() together with DaemonNode, so the test now sends and receives a 64-bit integer through the actual HTTP/XML-RPC client/server path.

I kept this PR scoped to compatibility with the existing XML-RPC transport. Moving the daemon protocol to something like JSON-RPC would be a substantially larger architectural change and can be considered separately.

Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
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.

ros2 daemon XML-RPC can't represent 64-bit integers

2 participants