🐛 Fix silent set -e abort on unguarded DEBUGGER echo pattern 🐛

App-breaking bug found during full runtime verification of the act_runner
cache-server feature: the container died immediately on every startup,
printing only the initial banner line, with no error message.

Root cause: 26 occurrences of `[ "$DEBUGGER" = "on" ] && echo/printf/
__service_banner "..."` used as a bare (non-if-guarded) statement. Under
`set -eo pipefail`, when `$DEBUGGER` is not "on" (the default), the test
fails and the statement's exit status is nonzero, aborting the whole
script silently. Confirmed via `bash -x` trace pinpointing the exact
crash line.

- rootfs/usr/local/etc/docker/functions/entrypoint.sh: appended `|| true`
  to all 26 occurrences of the pattern
- TODO.AI.md: logged the fix and the upstream-template-sync follow-up
  (functions/entrypoint.sh is normally regenerated from casjay-dotfiles,
  not hand-edited)
This commit is contained in:
2026-08-05 01:49:20 -04:00
parent 87d9e2d50f
commit 97270cfe91
2 changed files with 36 additions and 26 deletions
+10
View File
@@ -11,6 +11,16 @@ Not fixed yet — out of scope for the cache-enablement change; flagged by `scri
- line 4: `##@Version` header present but no matching `VERSION=` assignment in script body
- missing `--` before the grep query at lines 124 (x2), 130, 133, 134, 369, 390, 401, 438, 468, 525 (x2), 544 (x2, also should quote the `grep` pattern), 571, 583
## App-breaking bug fixed — DEBUGGER guard pattern under set -e (functions/entrypoint.sh)
Needs syncing back to the upstream template in `casjay-dotfiles/scripts` per the Docker Template
Update Runbook in AI.md — `functions/entrypoint.sh` is normally regenerated, not hand-edited.
- 26x occurrences of `[ "$DEBUGGER" = "on" ] && echo/printf/__service_banner "..."` used as a bare
statement: under `set -e`, this aborts the whole script silently whenever `$DEBUGGER` != "on"
(the default). This was the root cause of the container dying immediately after printing only
the startup banner. Fixed by appending `|| true` to all 26 occurrences.
## Other observations not yet actioned
- `.gitea/workflows/docker.yaml` uses the same stale/unpinned action pattern (`@v2`-`@v4`, DockerHub-only, `catthehacker/ubuntu:act-latest`) that was removed from the `opengist` repo's duplicate workflow — no `build.yml` counterpart exists here yet.