Skip to content

Fix dashboard post-process restart - #120

Merged
moodmosaic merged 1 commit into
protocol-security:masterfrom
aryaethn:fix/dashboard-post-process-restart
Sep 28, 2026
Merged

moodmosaic merged 1 commit into
protocol-security:masterfrom
aryaethn:fix/dashboard-post-process-restart

Conversation

@aryaethn

Copy link
Copy Markdown
Contributor

The credit for this bug and its fix goes entirely to @moodmosaic. I just coded his patch proposal from #110 to speed things up. Only small additions on top: two lines wrapped to 79 chars (the replacement notice now says "post-process container"), extra behavioural tests, and a stale USAGE.md line fixed.

Summary

  • Dashboard p now refuses to start post-processing only when the post-process container is actually running, so an exited container no longer blocks a restart (fixes Dashboard post-process restart issue #110).
  • When an exited container is present, p says it will be replaced; launch.sh post-process already runs docker rm -f on it before starting.
  • p passes the dashboard's SWARM_CONFIG to launch.sh post-process, so dashboards opened with a non-default config launch the right post-process.
  • P (logs) still works on an exited container, so a finished run's logs stay reachable.

Changes

  • dashboard.sh: add post_process_container_running; use it for the p guard and the [p] footer hint; print a replacement notice for exited containers; prefix the launch with SWARM_CONFIG="$CONFIG_FILE".
  • tests/test_dashboard.sh: the static checks from Dashboard post-process restart issue #110, plus behavioural tests that load the real post_process_container_exists/_running from dashboard.sh with a stubbed container_state across running, exited, created, paused, not found, and none.
  • USAGE.md: note that p replaces an exited run; fix the stale "Trigger via [P]" text, which has meant logs since the key swap in 85f60cd.
  • CHANGELOG.md: entry under Unreleased.

Test plan

  • ./tests/test.sh --unit: 13 files, 1381 tests pass (macOS).
  • /bin/bash tests/test_dashboard.sh passes under bash 3.2 (163 tests).
  • Against the unpatched dashboard.sh, 6 of the new checks fail, so they catch the bug.
  • shellcheck -s bash --severity=warning dashboard.sh tests/test_dashboard.sh is clean.
  • ./tests/test.sh --all.
  • Manual: run post-process from the dashboard, let it exit, press s, then p; it should warn that the previous container will be replaced and start a new run.
  • Manual: open the dashboard with SWARM_CONFIG=<non-default>.json, press p; the post-process uses that config.

The last three are unchecked because Docker wasn't available locally.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

Dashboard p treated any existing post container as running, so an
exited post-process container could not be restarted from the TUI.

Gate restart blocking on Docker state running, not container
existence, and tell operators when an exited container will be
replaced.  Preserve the dashboard's active SWARM_CONFIG when invoking
launch.sh post-process.

Fixes protocol-security#110.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@moodmosaic moodmosaic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

Comment thread USAGE.md
@moodmosaic

Copy link
Copy Markdown
Member

This resolves #110.

@moodmosaic
moodmosaic merged commit d35f789 into protocol-security:master Sep 28, 2026
5 checks passed
@moodmosaic

Copy link
Copy Markdown
Member

Thank you, @aryaethn!

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.

Dashboard post-process restart issue

2 participants