You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-ups from the pre-open review of #23 (badges feature). The happy path is live-tested and works; these are no-silent-failure hardening items on scripts/write-badges.sh.
fetch error masking — git fetch origin "$badge_branch" || true swallows all failures (auth/network), not just the benign "branch doesn't exist yet" case, then silently falls through to the orphan-rebuild path. Mitigated today because the non-force git push rejects a non-fast-forward (fails loud), but it still violates our no-silent-failure rule. Fix: guard with git ls-remote --exit-code origin refs/heads/$badge_branch and only fetch when the ref exists (let a real fetch failure abort).
matrix loop null-guard — the coverage loop skips empty/nullpercent, but the matrix loop has no equivalent guard, so a malformed matrix-data entry would write ci-null-null-null.json. Mirror the coverage-loop guard (skip or, better, error).
tests — write-badges.sh has no test, yet it owns the null-skip and the coverage-<slug>.json / ci-<lang>-<os>-<arch>.json filename contract that the README badge URLs depend on. Add a bats or python-subprocess test pinning the produced filename set and the null-skip behavior.
Follow-ups from the pre-open review of #23 (badges feature). The happy path is live-tested and works; these are no-silent-failure hardening items on
scripts/write-badges.sh.git fetch origin "$badge_branch" || trueswallows all failures (auth/network), not just the benign "branch doesn't exist yet" case, then silently falls through to the orphan-rebuild path. Mitigated today because the non-forcegit pushrejects a non-fast-forward (fails loud), but it still violates our no-silent-failure rule. Fix: guard withgit ls-remote --exit-code origin refs/heads/$badge_branchand only fetch when the ref exists (let a real fetch failure abort).nullpercent, but the matrix loop has no equivalent guard, so a malformedmatrix-dataentry would writeci-null-null-null.json. Mirror the coverage-loop guard (skip or, better, error).write-badges.shhas no test, yet it owns the null-skip and thecoverage-<slug>.json/ci-<lang>-<os>-<arch>.jsonfilename contract that the README badge URLs depend on. Add a bats or python-subprocess test pinning the produced filename set and the null-skip behavior.