# Reproducible cross-process proof for the use_rtps tool.
#
#   cd examples/ros2/rtps_proof
#   docker compose run --build --rm proof
#
# Builds a ros:jazzy image with CycloneDDS (from source) + strands-robots[ros2]
# + turtlesim, then runs a real turtlesim node and drives it through use_rtps
# over pure RTPS (no rclpy on the publish side). Exits 0 iff the turtle moved.
#
# Note: build context is the repo root (three levels up) so the image can
# `pip install` the local strands-robots checkout.
services:
  proof:
    build:
      context: ../../..
      dockerfile: examples/ros2/rtps_proof/Dockerfile
    command: ["bash", "examples/ros2/rtps_proof/run_proof.sh"]
    # turtlesim + our publisher share the container's DDS domain; no host
    # networking needed - this isolates wire-format correctness from any
    # macOS/VM multicast quirks.
