box/host
dan-claude-bot dc09d54cbe fix: the fresh-UFW test block no longer flakes on a missing log
It was never a test bug. box-firewall.sh decided the host's entire
firewall stance with `ufw status | grep -q "Status: active"`, and
"Status: active" is the FIRST line ufw prints: grep -q matches it and
exits immediately, closing the pipe while ufw is still writing the rest
of the table, so ufw dies of SIGPIPE. grep returned 0, but under the
script's own `set -o pipefail` the PIPELINE returns 141 (PIPESTATUS =
"141 0") — the if reads false, and a host with UFW plainly active takes
the nft-fallback branch and never builds the DNS carve-out.

`ufw status` is now read once into a variable and matched with [[ ]]:
no reader means no early exit means no race. The stale-rule scan reads
the same snapshot, so the branch decision and the converge loop cannot
disagree.

Separately, test/cli.sh now asserts that each shimmed run logged ufw
mutations at all, before the content greps, and dumps $WFW, the log and
the run's stderr when it did not — so the next occurrence reports its
own cause instead of four content-free grep failures.

Closes #102

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 18:17:42 +00:00
..
box-firewall.service Give box-firewall.service RemainAfterExit so its state means something 2026-07-17 14:05:23 +00:00
box-firewall.sh fix: the fresh-UFW test block no longer flakes on a missing log 2026-07-19 18:17:42 +00:00
grant-user.sh fix: grant the 'incus' membership to incus-admin members too (#101 review) 2026-07-19 17:33:37 +00:00
migrate-host.sh feat(setup-host): refuse a claimed subnet, and BOX_SUBNET to move off one (#80) 2026-07-18 19:46:58 +00:00
revoke-user.sh fix: grant the 'incus' membership to incus-admin members too (#101 review) 2026-07-19 17:33:37 +00:00
setup-host.sh feat(setup-host): auto-pick a free subnet — nested box-in-box, zero flags (#80) 2026-07-18 21:22:00 +00:00
teardown-host.sh feat(cli): versions, use, uninstall — the install managed from the CLI, absence-asserted 2026-07-18 16:01:57 +00:00