Skip to content

Allow activate-only launcher use without hako-cmd - #59

Merged
tmori merged 5 commits into
mainfrom
fix/activate-only-without-hako-cmd
Sep 20, 2026
Merged

tmori merged 5 commits into
mainfrom
fix/activate-only-without-hako-cmd

Conversation

@tmori

@tmori tmori commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Make activate-only usable for process-only / Core-free launcher configurations without requiring hako-cmd, while preserving the historical hako-cmd preflight for normal activation paths.

This enables configurations such as:

  • standalone PDU Bridge
  • Web server
  • topology aggregator
  • other before_start tools

to run with:

python -m hakoniwa_pdu.apps.launcher.hako_launcher launch.json --mode activate-only

without installing Hakoniwa Core or hako-cmd.

Compatibility boundary

The change is intentionally scoped to activate-only.

immediate / normal activate()
  -> prepare hako-cmd first (historical fail-fast behavior preserved)
  -> prepare runtime
  -> start before_start assets
  -> hako-cmd start

activate-only
  -> skip unconditional hako-cmd preflight
  -> prepare runtime
  -> start before_start assets
  -> no hako-cmd start

later cmd(start|stop|reset)
  -> prepare hako-cmd before lifecycle command

LauncherService.activate() keeps require_hako_cmd=True as the default, so direct callers and serve/immediate paths retain the existing behavior. Only the CLI/background activate-only path passes require_hako_cmd=False.

A readiness.type = hako_asset probe still resolves hako-cmd lazily through the existing monitor/provider path.

Existing activate-only users checked

A repository-wide search of the Hakoniwa organization found current activate-only usage in:

  • hakoniwa-mujoco-robots
    • tb3-demo.bash
    • tb3-mbody-demo.bash
    • tb3-obstacle-avoidance-demo.bash
  • hakoniwa-drone-pro
    • X500 tuning launcher (activate-only is the default)
    • distributed fleet client launcher (activate-only is the default)

The inspected launch files use activate-only to start before_start processes without issuing the simulation start command. Their normal behavior is unchanged when hako-cmd exists.

The one intentional observable difference is failure behavior when hako-cmd is absent:

  • before: activate-only failed before starting any process
  • after: activate-only may start its before_start processes; hako-cmd is required only if a Hakoniwa lifecycle command or hako_asset readiness probe is actually used

That is the desired Core-free behavior.

Tests

Adds regression coverage that:

  • Core-free activation can explicitly skip hako-cmd
  • normal activation still performs the historical hako-cmd preflight before starting assets
  • lifecycle start still prepares hako-cmd
  • background activate-only does not start the simulation and opts out of the preflight

This is needed by the Core-free Zenoh Topology Viewer launcher flow.

@tmori
tmori merged commit e1ca396 into main Sep 20, 2026
8 checks passed
@tmori
tmori deleted the fix/activate-only-without-hako-cmd branch September 20, 2026 03:04
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