Skip to content

feat(dc_bridge): add unmanaged-shipper mode and atomic config write - #454

Merged
Minipada merged 2 commits into
jazzyfrom
feature/444-bridge-unmanaged-shipper-mode-and-atomic
Aug 31, 2026
Merged

feat(dc_bridge): add unmanaged-shipper mode and atomic config write#454
Minipada merged 2 commits into
jazzyfrom
feature/444-bridge-unmanaged-shipper-mode-and-atomic

Conversation

@Minipada

Copy link
Copy Markdown
Owner

Summary

  • Adds shipper.managed (bool, default true): the Bridge's existing spawn/supervise
    behavior stays the default and is unchanged. shipper.managed: false (the split-deployment
    topology, Split deployment: Shipper and Uploader as their own containers, for fleet deployment #440) has the Bridge render the config and connect exactly as before, but locate
    no binary, spawn no child, and install no parent-death signal — an orchestrator owns the
    Shipper's lifecycle instead.
  • The rendered config is now written atomically (write to <path>.tmp, then rename()) via a
    new dc_bridge_core::write_file_atomically helper, so a Shipper reading the file — its own
    process in managed mode, an orchestrator-supervised one in unmanaged mode — can never observe
    a partial write.
  • shipper.config_path (optional, defaults to the historic temp-file path) makes the config
    location configurable, so it can be placed on a volume shared with the Shipper
    container/pod.
  • The ~/ready service already tracked the Shipper via a TCP probe independent of the
    supervisor, so readiness reports correctly in both modes with no logic change there.

Acceptance criteria (issue #444)

  • A parameter selects managed (default) or unmanaged shipper supervision
  • In unmanaged mode the Bridge locates no binary, spawns no child, and installs no parent-death signal
  • In unmanaged mode the Bridge still renders the config and still connects
  • The readiness service reports ready only once the Shipper is accepting connections, in both modes
  • The rendered config is written atomically (write then rename)
  • The config path is configurable, so it can be placed on a shared location
  • Managed mode is byte-for-byte unchanged in behaviour; no existing deployment is affected
  • Demoable: start a Shipper by hand, point the Bridge at it in unmanaged mode, and Records arrive

Test plan

  • prek run --all-files --skip build-doc passes (clang-format, ruff, REUSE, etc.)
  • Added AtomicWrite gtest cases to dc_bridge/test/misc_test.cpp (write+rename, overwrite, failure on missing directory)
  • CI (colcon test) — this environment has no ROS/colcon workspace to build/test locally; relying on CI
  • Manual demo: start vector by hand pointed at shipper.config_path, launch the Bridge with shipper.managed: false, confirm Records arrive

Closes #444

🤖 Generated with Claude Code

https://claude.ai/code/session_01VuumU1P7drY5cr54p3dw9D

@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 19.44444% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.02%. Comparing base (cc95aab) to head (a81c0b8).
⚠️ Report is 5 commits behind head on jazzy.

Files with missing lines Patch % Lines
dc_bridge/src/bridge_node.cpp 0.00% 28 Missing ⚠️
dc_bridge/src/atomic_write.cpp 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            jazzy     #454      +/-   ##
==========================================
+ Coverage   70.93%   71.02%   +0.09%     
==========================================
  Files         119      120       +1     
  Lines        7402     7462      +60     
==========================================
+ Hits         5250     5299      +49     
- Misses       2152     2163      +11     
Flag Coverage Δ
cpp-jazzy 71.02% <19.45%> (+0.09%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Minipada and others added 2 commits August 31, 2026 13:25
`shipper.managed: false` lets an orchestrator own the Shipper's lifecycle
(the split-deployment topology, #440): the Bridge still renders the config
and connects over the shipper ingest protocol, but locates no binary, spawns
no child, and installs no parent-death signal. Readiness already tracked the
Shipper via a TCP probe rather than the supervisor, so it reports ready the
same way in both modes with no change needed there.

The rendered config is now always written atomically (write then rename,
matching the Uploader intent queue's existing convention) via a new
dc_bridge_core `atomic_write` helper, and its path is configurable via
`shipper.config_path` so it can be placed on a volume shared with an
unmanaged Shipper container.

Closes #444

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VuumU1P7drY5cr54p3dw9D
Signed-off-by: David Bensoussan <d.bensoussan@proton.me>
Add a "Deployment modes" section to doc/src/dc/destinations.md: a
side-by-side comparison of managed vs. unmanaged supervision, and which
one to pick — managed (default) for single-robot/simulation/local dev,
unmanaged for a multi-container/orchestrator-managed deployment. Points
to #440 for the larger split-deployment/fleet work this parameter is a
building block for, without overclaiming it's already shipped.

Also cross-references the new doc section from the shipper.managed
comment in dc_bringup/params/dc_params.yaml.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VuumU1P7drY5cr54p3dw9D
Signed-off-by: David Bensoussan <d.bensoussan@proton.me>
@Minipada
Minipada force-pushed the feature/444-bridge-unmanaged-shipper-mode-and-atomic branch from 4c0250e to a81c0b8 Compare August 31, 2026 11:25
@Minipada
Minipada merged commit 393b4f0 into jazzy Aug 31, 2026
7 of 8 checks passed
@github-actions
github-actions Bot deleted the feature/444-bridge-unmanaged-shipper-mode-and-atomic branch August 31, 2026 12:07
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.

1 participant