DOCFIX-173: full-project sweep -- script logic bugs + security hardening
Four confirmed logic bugs (unguarded pipelines/function calls under
set -e+pipefail), all independently reproduced in isolation before being
trusted -- including catching that a first proposed fix for one of them
was itself wrong: `|| true` after a failing pipeline under pipefail
silently discards PIPESTATUS, which would have made phase-06-capi-stack's
own gate check never fire again. The correct `if pipeline; then :; fi`
idiom was verified via reproduction before committing.

- carve-host-interfaces.sh: emit()'s unguarded `return 1` killed apply-mode
  runs on the first MAAS error, before the FATAL-accumulator summary
  could print.
- phase-06-capi-stack.sh: run_step's PIPESTATUS read was dead code.
- juju-spaces-check.sh, osd-blank-check.sh: one unguarded display-only
  pipe each, safely `|| true`-able.
- ledger-scan.sh: DOCFIX/BUNDLEFIX next-free regex used a fixed {3} not
  {3,} -- the same bug class already fixed once for the D-series, never
  mirrored here. Dormant, not yet reachable, but a real landmine.
- dc-dc-rbd-mirror.sh: hardened the bootstrap token's default path
  (random suffix + immediate chmod 600, was a predictable /tmp filename
  with no permission hardening).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QrcJx8TUar7pYAvpGJw57A
1 parent 3403d7e commit a3016bcaf0f2ac2882d21a8cdc6c9c0a95b1eaf0
@JANeumatrix JANeumatrix authored 3 hours ago
Showing 7 changed files
View
docs/changelog-20260710-sweep-script-fixes.md 0 → 100644
View
scripts/carve-host-interfaces.sh
View
scripts/dc-dc-rbd-mirror.sh
View
scripts/juju-spaces-check.sh
View
scripts/ledger-scan.sh
View
scripts/osd-blank-check.sh
View
scripts/phase-06-capi-stack.sh