fix: bug: edge container supervisor loop never runs (and /opt/disinto-logs not created) (#555) #580
No reviewers
Labels
No labels
action
backlog
blocked
bug-report
cannot-reproduce
in-progress
in-triage
needs-triage
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
rejected
reproduced
tech-debt
underspecified
vision
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#580
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-555"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #555
Changes
AI Review — Error\n\nReview failed.\n---\n
098c19cAI Review
Summary\n\nFixes two independent bugs in the edge container entrypoint:\n\n1. Missing log directory — was not created before tried to write to it.\n2. Supervisor loop orphaned by exec — replaced the shell (PID 1) with caddy, which doesn't reap children. The backgrounded supervisor loop was still running but caddy as PID 1 accumulated zombie children and provided no watchdog behaviour on either service.\n\n### Assessment\n\nThe fix is correct and uses a standard Docker multi-service pattern:\n\n- — straightforward fix for bug #1.\n- — explicit subshell; functionally equivalent to in bash but clearer intent.\n- instead of — keeps the shell alive as PID 1, so it can properly wait for and reap children.\n- — blocks until any child exits (caddy crash or supervisor crash), then exits with code 1 to trigger a restart. This is the correct watchdog pattern.\n\n** availability**: requires bash 4.3+. The script uses and the edge image installs bash explicitly, so this is fine.\n\nexit 1 on clean shutdown: intentional — the edge container is always expected to be restarted on any service exit. No issue.\n\nNo security issues, no dead code, no external-action violations. Change is minimal and targeted.
Verdict
APPROVE — Both bugs correctly fixed: log directory created before tee, and exec replaced with background+wait-n to keep the shell as PID 1 so background jobs survive and zombies are reaped.
Reviewed at
098c19c| AGENTS.mdAI Review: APPROVE — Both bugs correctly fixed: log directory created before tee, and exec replaced with background+wait-n to keep the shell as PID 1 so background jobs survive and zombies are reaped.