From the 2026-04-09 audit (docs/audits/2026-04-09/01-tui-scripts-audit.md).
The 2026-04-09 audit asked for set -euo pipefail to be added to ~26 scripts that lacked it (priority: power/ scripts — charge.sh, cpu-freq-cap.sh, pmu-voltage-min.sh).
As of 2026-04-25: only 15 of 47 bash scripts under device/scripts/ set the strict mode. Without it, scripts silently continue past errors:
set -e — exit on any unchecked failed command
set -u — exit on use of an unset variable
-o pipefail — propagate failure through pipelines (e.g. something | grep doesn't mask the something exit code)
Acceptance: every shell script under device/scripts/ either has set -euo pipefail near the top OR has a one-line comment explaining why it deliberately doesn't (e.g. "interactive prompt loop relies on read returning non-zero on EOF").
Audit-prioritized scripts to start with (safety-critical):
device/scripts/power/charge.sh
device/scripts/power/cpu-freq-cap.sh
device/scripts/power/pmu-voltage-min.sh
Per CLAUDE.md, battery/power scripts should not be auto-fixed — review each one by hand before adding strict mode, since it can change failure behaviour.
Context: marked partial (15/47) in docs/audits/2026-04-09/STATUS.md as of 2026-04-25.
From the 2026-04-09 audit (
docs/audits/2026-04-09/01-tui-scripts-audit.md).The 2026-04-09 audit asked for
set -euo pipefailto be added to ~26 scripts that lacked it (priority:power/scripts —charge.sh,cpu-freq-cap.sh,pmu-voltage-min.sh).As of 2026-04-25: only 15 of 47 bash scripts under
device/scripts/set the strict mode. Without it, scripts silently continue past errors:set -e— exit on any unchecked failed commandset -u— exit on use of an unset variable-o pipefail— propagate failure through pipelines (e.g.something | grepdoesn't mask the something exit code)Acceptance: every shell script under
device/scripts/either hasset -euo pipefailnear the top OR has a one-line comment explaining why it deliberately doesn't (e.g. "interactive prompt loop relies on read returning non-zero on EOF").Audit-prioritized scripts to start with (safety-critical):
device/scripts/power/charge.shdevice/scripts/power/cpu-freq-cap.shdevice/scripts/power/pmu-voltage-min.shPer CLAUDE.md, battery/power scripts should not be auto-fixed — review each one by hand before adding strict mode, since it can change failure behaviour.
Context: marked partial (15/47) in
docs/audits/2026-04-09/STATUS.mdas of 2026-04-25.