Skip to content

fix(ci): the hosted-Supabase test died on the runner instead of reporting - #5

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/hosted-audit-test-hermetic
Aug 28, 2026
Merged

fix(ci): the hosted-Supabase test died on the runner instead of reporting#5
github-actions[bot] merged 1 commit into
mainfrom
fix/hosted-audit-test-hermetic

Conversation

@catomean

Copy link
Copy Markdown
Contributor

main is red. The suite exited 128 mid-file with no failure line — a red that named nothing.

Two causes, both mine:

  1. set -e leaked in. The test sources the audit to reach its pure helpers, which also runs the audit's set -euo pipefail in the test's own shell. A suite whose whole job is to run commands that fail must not die on the first one.
  2. The fixture repo relied on ambient git identity. A GitHub runner has none, so git commit exits 128 — combined with (1), that killed the run.

Locally both were invisible: my git identity is configured, so nothing ever failed at that line. The gate passed for a reason that had nothing to do with the code being right.

Fix: set +e after sourcing (keeping -u and pipefail), and an explicit -c user.email=… -c user.name=… on the fixture commit so it does not care what the machine has.

Verified the way it breaks, not the way it passes:

HOME=$(mktemp -d) GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_SYSTEM=/dev/null \
  bash scripts/ci/test-hosted-supabase-audit.sh

exit 128 before, 28/28 and exit 0 after. Still 28/28 in a normal shell.

Follows #4, which I merged on a misread signal — I took a background job's own exit code for the CI conclusion. That is on me; this restores main.

…ting

CI went red on main with exit 128 and no failure line — the suite stopped
mid-file, naming nothing.

Two causes, both mine. Sourcing the audit to get at its pure helpers also runs
its `set -euo pipefail` in the test's shell, so the first command that failed
took the whole suite with it. And the fixture repo committed with whatever git
identity happened to be lying around; a GitHub runner has none, so `git commit`
exits 128. Locally both were invisible: my identity is configured, so nothing
ever failed at that line.

A test suite whose job is to run commands that fail must not die on the first
one. Take -e back after sourcing, keep -u and pipefail, and give the fixture an
explicit identity so it does not care what the machine has.

Verified the way it actually breaks, not the way it passes:
HOME=$(mktemp -d) GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_SYSTEM=/dev/null
reproduces exit 128 before the fix and 28/28 after.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018waGt1ieA9TjpscqrbrnGb
@github-actions
github-actions Bot merged commit 5dfdb19 into main Aug 28, 2026
1 check passed
@github-actions
github-actions Bot deleted the fix/hosted-audit-test-hermetic branch August 28, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant