forked from heavy-duty/box
Both from claude-bot's review of #128. storage_driver's two driver probes had no '|| true' while the pool probe one line up did. They were safe only via a bash subtlety: command substitution strips errexit, so a failing 'incus storage show' fell through to the fallback instead of aborting. Add 'shopt -s inherit_errexit' to bin/box — the class of robustness tweak #107 documents sailing through review — and under pipefail a restricted tier's probe refusal becomes a fatal abort mid-mint, inside the function whose contract is NEVER fatal. All three probes now read alike and depend on nothing. Driven test: refuse both probes with inherit_errexit on, assert the caller survives and the driver reads empty (the unreadable-pool case, which already takes the mark anyway). The clone's inheritance narration piped a multi-line 'incus snapshot list' straight into 'grep -q' — #124's racing-reader class in a 'set -euo pipefail' file. A 141 there reads as "no pristine" and narrates the WRONG inheritance shape on a clone that does carry one. Capture first, then read. Pinned by shape (grep|head|sed|awk|read), not by instance spelling. bin/box has ~10 more sites of that class and no sweep covers the file; one of them unpins an exposure's static address on a fail-open read. Filed as #134 rather than widened into this PR. Refs #104, #107, #124, #134. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| box | ||