fix: run the reporting steps after a failing check - #8
Merged
Conversation
A failed gate (exit 3) or a check that did not run (exit 4) skipped every later composite step, because a step's if: implies success(). The change detection, sticky PR comment and status steps now also run after a check verdict: status is failed, has-changes is set, and pr-comment posts the gate result or a did-not-run line naming the cause. The check step's exit code still fails the job. A kapi up that fails, or a check that errors, still reports nothing. The did_not_run_cause output is renamed did-not-run-cause to match the action's other outputs. It has not been released. The test fixture moves from the retired content: key to collections:, and the self-tests pin kapi 1.2.0-rc29, because 1.2.0-rc14 reads no content from the new shape. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VRid8i4qnuNfE7Lio73Uu4
Temporary, reverted in the next commit. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VRid8i4qnuNfE7Lio73Uu4
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VRid8i4qnuNfE7Lio73Uu4
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.
Follow-up to #7, before any release.
What changed
if:impliessuccess(). They now run on!cancelled() && (success() || result is failed or did_not_run), keeping their existing conditions. After exit 3 or 4,statusisfailed,has-changesis set, and withpr-commentthe sticky comment shows the gate result or a did-not-run line naming the cause. The check step's exit code still fails the job. Akapi upthat fails, or a check that errors, still reports nothing, so a delivery step is never handed partial work.did-not-run-cause, matching the action's kebab-case outputs. It has not been released.test/fixture/fixture.kapimoves from the retiredcontent:key tocollections:(feat(recipe): structural profiles, collections, and the bowrain venue neokapi#1709, first released in 1.2.0-rc17). The self-tests now pin kapi 1.2.0-rc29 in one place,env.KAPI_VERSION. On rc14 the new shape reads no content (the plan finds 0 units andcheck --shippasses), and rc29 rejects the old shape.Tests
test/stub/ghrecords the comment body instead of calling the API.pr-commentfor exit 0, 3 and 4. It asserts the step outcome (failurefor 3 and 4),status,has-changes,did-not-run-causeand, on pull_request events, the comment body; on push and schedule events it asserts that no comment is posted.test/check-outcomes.shalso renders the comment for 7 outcomes, and uses the renamed output.test-check-gatenow assertsstatus: failedagainst real kapi.check --shipexits 3, the file check exits 0, and pseudo-translate writesen_qps.json.if:conditions back as they were. In run 34765554314 the reporting job failed on its new assertions: after exit 3 and exit 4,statuswas empty instead offailed,has-changeswas empty instead offalse, and no comment was posted.test-check-gatefailed too, becausestatuswas empty against real kapi. 318309a reverts it (run 34765596132, 7/7 green), and the branch tree equals fdb839c's.No tag or release comes with this PR.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VRid8i4qnuNfE7Lio73Uu4