Skip to content

fix(ci): Hypatia reusable gate uploads findings instead of failing opaquely#424

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/hypatia-gate-visibility
Jun 24, 2026
Merged

fix(ci): Hypatia reusable gate uploads findings instead of failing opaquely#424
hyperpolymath merged 1 commit into
mainfrom
claude/hypatia-gate-visibility

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Make the Hypatia reusable gate visible, not opaque

The Run Hypatia scan step runs hypatia-cli.sh scan under the default bash -eo pipefail. hypatia-cli exits 1 whenever findings exist (documented behaviour), so the step aborts at the scan line before the jq counts / $GITHUB_OUTPUT / step-summary run — and because Upload findings artifacts had no if:, it's skipped on that failure. Result: a red ❌ with zero visible findings.

Changes (minimal, licence-neutral)

  1. scan — add --exit-zero (the CLI flag built exactly for "CI gates on the counts"), so the step succeeds and the severity counts / outputs / step-summary populate. Gating is already done on the counts (the Check for critical issues step warns-don't-fail / fix-forward), not on the scanner's exit code.
  2. uploadif: always() so findings upload even when an earlier step (build / scan) fails.

No behaviour change for clean repos; failing repos now surface findings as an artifact + step summary instead of an opaque red X.

Does not touch the file's SPDX header (left as-is per the no-automated-licence-edits guardrail).

🤖 Generated with Claude Code

…aquely

The "Run Hypatia scan" step runs `hypatia-cli.sh scan` under the default
`bash -eo pipefail`. hypatia-cli exits 1 whenever findings exist (its
documented behaviour), so the step aborted at the scan line BEFORE the jq
counts, $GITHUB_OUTPUT, and the step summary ran — and because the
"Upload findings artifacts" step had no `if:`, it was skipped on that
failure. Net effect: the gate went red with zero visible findings.

Two minimal changes restore visibility:
- scan: add `--exit-zero` (the CLI flag built for this) so the step
  succeeds and the severity counts/outputs/summary populate. Gating is on
  the counts, not the scanner exit code (the existing "Check for critical
  issues" step already warns-don't-fail / fix-forward).
- upload: `if: always()` so findings upload even when an earlier step
  (build, scan) fails.

No behaviour change for clean repos; failing repos now surface their
findings as an artifact + step summary instead of an opaque red X.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@hyperpolymath hyperpolymath marked this pull request as ready for review June 24, 2026 19:27
@hyperpolymath hyperpolymath merged commit f15ced3 into main Jun 24, 2026
7 of 16 checks passed
@hyperpolymath hyperpolymath deleted the claude/hypatia-gate-visibility branch June 24, 2026 19:27
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