Repository navigation
feat(ci): reject an empty stack-command before it can pass silently - #29
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
Adds a guard step to
stack-tests.ymlthat fails visibly when a caller'sstack-commandis empty or blank, before the gate step executes. Also addstests/workflows/stack-tests-contract.bats, the first automated contract coverage for this workflow.Why
Investigating gitops spec 007 T027 (verify "enabled-but-empty fails visibly" once per gate) after already finding and fixing the identical defect in
ci.yml'stest-command(gitops spec 003 T024, PR #27):stack-commandhas the exact same shape --required: true, no default, silently satisfiable by an empty string, andrun: ${{ inputs.stack-command }}with an empty value succeeds having run no e2e/perf/dast/pact/conformance gate at all. This workflow backs five separate gates across the frontend repo (e2e, perf, dast, pact, conformance), so the blast radius of a caller accidentally leavingstack-commandempty was larger than the one already fixed.Confirmed live on real GitHub Actions before the fix (disposable draft PR, closed without merging): a probe run with
stack-command: ""against a minimal one-service compose stack succeeded. After this fix (disposable draft PR #28, closed without merging): the same input fails at the new guard with"Reject an empty stack-command": conclusion "failure"and"Run probe gate": conclusion "skipped".Tasks
gitops specs/007-advanced-testing T027 (delivered -- see this repo's evidence in the linked gitops PR)
The task register is updated in the linked gitops pull request
Every task ticked there was verified by locating its artifact
How it is verified
tests/workflows/stack-tests-contract.bats(new file) fails before the guard exists and passes after, following the SDD test-then-feat pair.actionlint .github/workflows/stack-tests.ymlis clean.stack-command: ""against a minimalredis:7-alpine-only compose stack now fails at the new guard step with::error::stack-command must not be empty or blank -- an empty run: step succeeds having run no probe gate (FR-017: a gate must fail visibly, never pass silently), and the gate step itself is correctly skipped. Closed without merging once observed.Risk and rollback
Low: adds one guard step; every existing caller (frontend's e2e/perf/dast/pact/conformance workflows) already supplies a real, non-empty
stack-command, so no caller is currently affected. Rollback is reverting this commit.What this PR does not do
Does not change
compose-fileorready-command, which are legitimately optional (default: "") and alreadyif:-guarded to skip visibly when unset -- onlystack-commandisrequired: trueyet was silently satisfiable by an empty string, exactly likeci.yml'stest-commandbefore PR #27.