Skip to content

v0.5.1 — GitHub Actions composite-action reliability fixes - #6

Merged
geyutu6755 merged 4 commits into
mainfrom
fix/v0.5.1-actions-reliability
Nov 5, 2026
Merged

geyutu6755 merged 4 commits into
mainfrom
fix/v0.5.1-actions-reliability

Conversation

@geyutu6755

Copy link
Copy Markdown
Owner

Summary

Three real defects in the composite action found by external-repo CI runs and code audit:

  1. fail-on-new input declared but its env var never read (P1): the gate always used the new-findings gate. Now: true gates on new findings; false reports the diff without gating; invalid values produce an explicit error.
  2. Scan step exited 1, skipping the gate step (P1): the scan step now completes on exit 0 or 1, and only exits 2 for environment errors. A new Final CI decision step produces the final exit code.
  3. reprocase-ref SHA support claimed but not implemented (P2): now supports tags, branches, and full commit SHAs with explicit errors for unresolvable refs.

Also: npm install → npm ci, hashFiles artifact guard, 18 new regression tests (action structure + gate semantics).

External acceptance

reprocase-actions-demo: clean green, incident red, fix green, honest-error green.

Verification

160/160 tests, npm audit 0, docs-CLI consistency guard 7/7.

…it-code ordering, SHA support, npm ci

Three real defects found by external-repo CI runs and code audit:

1. fail-on-new input was declared but its env var never read — the gate
   always used --fail-on new regardless of the user's setting. Now:
   fail-on-new=true → compare --fail-on new (gate on new findings);
   fail-on-new=false → compare without the flag (report only);
   invalid values → explicit error.

2. Scan step exited 1 when findings existed, causing GitHub Actions to skip
   the gate step. Now the scan step completes on exit 0 or 1 (recording the
   verdict), and only exits 2 for environment errors. A new Final CI
   decision step evaluates scan verdict + gate conclusion in priority order
   (error > gate > findings > clean) and produces the final exit code.

3. reprocase-ref claimed to support tags, branches and commit SHAs but used
   git clone --branch which fails for SHAs. Now: --branch first, then
   fallback to full clone + git checkout for SHAs, with an explicit error
   for unresolvable refs (no silent version fallback). The checked-out
   commit is verified and reported.

Also: npm install → npm ci for lockfile-reproducible installs; hashFiles
guard prevents empty artifact upload; invalid fail-on-new values produce
an explicit error. 18 new tests (10 action structure + 8 gate semantics).
142/142 tests green, npm audit 0.
@geyutu6755
geyutu6755 merged commit 7e67bca into main Nov 5, 2026
4 checks passed
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