SOL-BASHRS-004 // bashrs
Anti-Vacuity File-Count Verifier
Fail-loud CI guard ensuring glob-matched artifact suites never pass silently when zero files are discovered.
Measured delta: Eliminates silent 0-file CI false passes (anti-vacuity >= 100)
Before (Failing Anti-Pattern)
#!/bin/bash for f in site/public/*.html; do test -f "$f"; done # passes vacuously on 0 files
After (Verified Code)
#!/usr/bin/env bash
set -euo pipefail
COUNT="$(find site/public -name '*.html' | wc -l)"
if [ "${COUNT}" -lt 100 ]; then
printf 'anti-vacuity fail: found %s html files\n' "${COUNT}" >&2
exit 1
fi
Verification Contract
schema: bashrs.contract.v1 rules: - CI001: anti-vacuity-nonzero - SEC002: quoted-integer-compare max_warnings: 0
Verified CLI Command & Output
$ bashrs lint --strict anti-vacuity.sh bashrs lint: 0 errors, 0 warnings (anti-vacuity guard verified)