Skip to content

fix: run the reporting steps after a failing check - #8

Merged
asgeirf merged 3 commits into
mainfrom
fix/reporting-after-failed-check
Sep 13, 2026
Merged

fix: run the reporting steps after a failing check#8
asgeirf merged 3 commits into
mainfrom
fix/reporting-after-failed-check

Conversation

@asgeirf

@asgeirf asgeirf commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #7, before any release.

What changed

  • Reporting after a failing check. "Check for changes", "Sticky PR comment" and "Set outputs" were skipped whenever the check step failed, because a composite step's if: implies success(). They now run on !cancelled() && (success() || result is failed or did_not_run), keeping their existing conditions. After exit 3 or 4, status is failed, has-changes is set, and with pr-comment the 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. A kapi up that fails, or a check that errors, still reports nothing, so a delivery step is never handed partial work.
  • Rename. The output added in feat: report did-not-run checks as their own result #7 is now did-not-run-cause, matching the action's kebab-case outputs. It has not been released.
  • Fixture. test/fixture/fixture.kapi moves from the retired content: key to collections: (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 and check --ship passes), and rc29 rejects the old shape.

Tests

  • test/stub/gh records the comment body instead of calling the API.
  • The new job "reporting after a failing check" runs the action with pr-comment for exit 0, 3 and 4. It asserts the step outcome (failure for 3 and 4), status, has-changes, did-not-run-cause and, on pull_request events, the comment body; on push and schedule events it asserts that no comment is posted.
  • test/check-outcomes.sh also renders the comment for 7 outcomes, and uses the renamed output.
  • test-check-gate now asserts status: failed against real kapi.
  • The fixture was validated with kapi 1.2.0-rc29 and with a build of neokapi 67d143a61, each with throwaway config, data, cache and plugin directories: the plan finds 6 units, check --ship exits 3, the file check exits 0, and pseudo-translate writes en_qps.json.
  • Must-fail: f151550 put the three if: conditions back as they were. In run 34765554314 the reporting job failed on its new assertions: after exit 3 and exit 4, status was empty instead of failed, has-changes was empty instead of false, and no comment was posted. test-check-gate failed too, because status was 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

asgeirf and others added 3 commits September 13, 2026 17:24
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
@asgeirf
asgeirf merged commit 333ffb4 into main Sep 13, 2026
7 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