set -e usage has no documented convention across scripts/*.sh, and --help is missing from four entry points
Id: TD-PPagop-26082418 · Status: resolved · Filed: 2026-08-24 · Resolved: 2026-09-13 · Ref: #1447 · Review: reviews/project-review-2026-08-23 R-15 F-CODE-03 F-TOOL-01 F-UX-03 F-TOOL-02 F-TOOL-03
Severity: Low
Of 47 scripts/*.sh files that set shell options, 42 use set -uo pipefail and 5 use set -euo pipefail, with no documented rule for which
a new script should pick, despite docs/IMPLEMENTATION-PIPELINE-SPEC.md’s
own gotcha table showing the project is well aware -e is a hazard.
Separately, agent-cycle.sh, review-cycle.sh, scripts/serve-dashboard.sh,
and scripts/open-dashboard.sh have no -h/--help handling, unlike
scripts/doctor.sh, scripts/watch-node.sh, scripts/run-tests.sh, and
scripts/state-sync.sh, which all have one. There is also no root-level
Makefile or .editorconfig.
Each of these is organic drift — a new script picks whichever set
options its author happened to reach for, and --help was added to some
scripts as they were written without a rule being written down anywhere.
Ongoing cost: low — internally consistent per file, and both --help-
missing scripts still fail clearly when misused — but the next standalone
script has no signal for the set -e convention, and repeats the same
undocumented-choice pattern the spec’s own gotcha table already paid for
once.
Suggested fix: document a default set convention (recommend set -uo pipefail matching the majority, -e as a commented opt-in) in
scripts/lint-shell.sh’s header; add the existing -h/--help convention
to the four missing entry points; optionally add a thin Makefile wrapping
existing lint/test/build scripts and a minimal .editorconfig.
Migrated to https://github.com/Poetic-Poems/agent-ops/issues/974.