Problem
A batch of independently-verified smaller correctness defects across subsystems.
Evidence
backup compare row counts are wrong (backup/compare.sh:241-246): the subquery counts pg_class catalog entries (≈1), not table rows — every table prints "1 vs 1 ✓". Use pg_stat_user_tables.n_live_tup or per-table count(*). (Also hardcodes container names ignoring BACKUP_*_SERVICE, and the advertised --service flag is parsed but unused.)
- Cron install/remove over-matches sibling stacks by substring (
drift/schedule.sh:35,69; drift/autofix.sh:81,142): grep -q "drift monitor.*$stack" matches api inside api-v2 — installing for api says "already exists"; enabling auto-fix for api removes api-v2's job. Anchor on the full log path or a # strut:drift-<stack> tag.
remote:init ignores DEFAULT_BRANCH (cmd_remote_init.sh:46 sets branch="main", making :79's ${branch:-${DEFAULT_BRANCH:-main}} dead) → a master project clones/leaves main, and subsequent release/sync hard-reset to the wrong branch. Initialize branch="".
logs -f interrupt reports a false SSH error (cmd_logs.sh:63 → utils.sh:987): Ctrl-C on a followed remote log makes ssh exit 130 → the caller's || fail "Remote command failed — check VPS_HOST…". Treat rc 130/143 as clean for follow mode.
install.sh breaks on tag pins on re-run (install.sh:76-77): git reset --hard origin/$STRUT_BRANCH fails when STRUT_BRANCH is a release tag (which action.yml recommends) on an existing clone. Use FETCH_HEAD.
[ -z "$RED" ] guards abort under set -u (drift.sh:11, drift/alerts.sh:10, autofix.sh:10, schedule.sh:10): the guard exists for the case utils.sh wasn't sourced, but $RED is then unbound → set -u aborts before the fallback. Use ${RED:-}.
Acceptance
Filed from the 2026-07-12 full-codebase audit (docs/AUDIT-2026-07-12.md).
Problem
A batch of independently-verified smaller correctness defects across subsystems.
Evidence
backup comparerow counts are wrong (backup/compare.sh:241-246): the subquery countspg_classcatalog entries (≈1), not table rows — every table prints "1 vs 1 ✓". Usepg_stat_user_tables.n_live_tupor per-tablecount(*). (Also hardcodes container names ignoringBACKUP_*_SERVICE, and the advertised--serviceflag is parsed but unused.)drift/schedule.sh:35,69;drift/autofix.sh:81,142):grep -q "drift monitor.*$stack"matchesapiinsideapi-v2— installing forapisays "already exists"; enabling auto-fix forapiremovesapi-v2's job. Anchor on the full log path or a# strut:drift-<stack>tag.remote:initignoresDEFAULT_BRANCH(cmd_remote_init.sh:46setsbranch="main", making:79's${branch:-${DEFAULT_BRANCH:-main}}dead) → amasterproject clones/leavesmain, and subsequentrelease/synchard-reset to the wrong branch. Initializebranch="".logs -finterrupt reports a false SSH error (cmd_logs.sh:63→utils.sh:987): Ctrl-C on a followed remote log makes ssh exit 130 → the caller's|| fail "Remote command failed — check VPS_HOST…". Treat rc 130/143 as clean for follow mode.install.shbreaks on tag pins on re-run (install.sh:76-77):git reset --hard origin/$STRUT_BRANCHfails whenSTRUT_BRANCHis a release tag (whichaction.ymlrecommends) on an existing clone. UseFETCH_HEAD.[ -z "$RED" ]guards abort underset -u(drift.sh:11,drift/alerts.sh:10,autofix.sh:10,schedule.sh:10): the guard exists for the case utils.sh wasn't sourced, but$REDis then unbound →set -uaborts before the fallback. Use${RED:-}.Acceptance
Filed from the 2026-07-12 full-codebase audit (docs/AUDIT-2026-07-12.md).