Skip to content

fix(bringup): loud AUTOLAUNCH FAILED banner instead of silent tmux prompt - #402

Merged
andrewjong merged 1 commit into
developfrom
fix/autolaunch-failure-banner
Aug 24, 2026
Merged

andrewjong merged 1 commit into
developfrom
fix/autolaunch-failure-banner

Conversation

@andrewjong

Copy link
Copy Markdown
Member

Motivation

While live-testing the Foxglove auto-layout feature (#401), the robot container's autolaunch chain bws && sws && ros2 launch ... died silently: one package failed to build (a machine-local stale dpvo leftover needing nvcc), the && chain short-circuited, and the tmux pane just returned to a prompt. docker logs showed nothing. The symptom surfaced only far downstream — "Foxglove has a connection issue" (empty panels, no robot topics on the GCS domain) — and took a full debugging session to trace back to a build failure at bring-up.

The GCS variant was worse: bws && sws; ros2 launch ... — after a failed build it skipped sourcing but still ran the launch.

What changed

Both bind-mounted .bashrc files (robot/docker/.bashrc, gcs/docker/.bashrc) gain an autolaunch() helper that runs build → source → launch and prints an unmissable banner when a stage fails:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  AUTOLAUNCH FAILED on <hostname> (ROBOT_NAME=robot_1)
  colcon build (bws) failed — the stack was NOT launched
  Scroll up in this tmux pane (airstack connect) or 'airstack logs'
  for the first error.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
AUTOLAUNCH FAILED: colcon build (bws) failed — the stack was NOT launched

Red/white ANSI banner plus a plain-text repeat (for ANSI-stripping log processors); the tmux output-mirroring hooks carry it into docker logs / airstack logs. A nonzero ros2 launch exit gets the same treatment ("the stack is DOWN", with the exit code).

The compose autolaunch commands now use it:

File Services
robot/docker/docker-compose.yaml robot-desktop (and everything extending it), robot-voxl-onboard, robot-l4t
gcs/docker/gcs-base-docker-compose.yaml gcs (also fixes the bws && sws; ros2 launch mis-chain that launched unsourced after a failed build)

The zed camera service keeps its own chain — it mounts a separate bashrc and is camera-only.

Since the .bashrcs are bind-mounted, the change takes effect on next container start with no image rebuild. VERSION bumped 0.20.0-alpha.10 → 0.20.0-alpha.11; release-notes Changed bullet added.

Validation

  • Helper unit-tested with stubbed bws/sws/ros2: build failure → banner + rc=1 + no launch attempt; launch exiting 42 → banner + rc=42; success → no banner, rc=0.
  • bash -n on both .bashrcs; YAML parse on both compose files.
  • Live check pending: next airstack up with a deliberately broken package should show the banner in airstack logs.

🤖 Generated with Claude Code

…ompt

The autolaunch tmux chains (bws && sws && ros2 launch ...) died silently
when any package failed to build: the pane returned to a prompt, docker
logs showed nothing, and the symptom surfaced only as missing data far
downstream (e.g. 'Foxglove has a connection issue'). The GCS variant
(bws && sws; ros2 launch) even launched unsourced after a failed build.

Both bind-mounted .bashrc files gain an autolaunch() helper that runs
build → source → launch and prints an unmissable red banner (plus a
plain-text repeat for ANSI-stripping log processors) when the build
fails or the launch exits nonzero. All robot variants (desktop, voxl,
l4t) and the GCS compose commands now use it; the zed camera service
keeps its own chain (separate bashrc).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@andrewjong
andrewjong merged commit 2f11a8c into develop Aug 24, 2026
3 of 4 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Test Metrics — d38db079d1d502f58039e5473bcdf13c3d89b88b

No metrics report generated.

@andrewjong
andrewjong deleted the fix/autolaunch-failure-banner branch August 30, 2026 04:47
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