Skip to content

feat(pr-validation): mark the breaking change so it reads at a glance - #909

Merged
bedatty merged 3 commits into
developfrom
feat/breaking-change-emoji
Oct 16, 2026
Merged

bedatty merged 3 commits into
developfrom
feat/breaking-change-emoji

Conversation

@bedatty

@bedatty bedatty commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Description

Follow-up to #908, from looking at the live comment on #906.

The alert block described the situation in prose, so you had to read it to know what it was. Now a 💥 sits in an ## heading inside the block, which makes the state legible from the PR timeline before anyone opens anything.

> [!IMPORTANT]
> ## 💥 Breaking change detected
>
> **This pull request needs a decision.** Merging it makes the next release a
> **major** version — often deliberate, so this just asks someone to confirm it.

The table gains marks on the three rows that matter, so it can be scanned instead of read:

💥 Breaking commit …
👤 Who can decide …
⬜ Author acknowledgement missing (✅ when present)

And each state now gets the alert that fits it, instead of a plain heading:

State Alert Mark
waiting [!IMPORTANT] 💥 Breaking change detected
approved [!NOTE] ✅ Breaking change approved
rejected [!CAUTION] ⛔ Breaking change rejected
unresolved [!WARNING] 💥 decision not recorded

Colour and icon come from GitHub's own alert rendering; the emoji says what the block is about. CAUTION is reserved for the rejection, since that is the only state where something was actually taken away — the pull request was closed.

Type of Change

  • feat: New workflow or new input/output/step in an existing workflow

Breaking Changes

None. Presentation only; no input, output or job name changes.

Testing

  • YAML syntax validated locally
  • Triggered a real workflow run on a caller repository using @this-branch or the beta tag
  • Verified all existing inputs still work with default values
  • Confirmed no secrets or tokens are printed in logs
  • Checked that unrelated workflows are not affected

All four states rendered locally from the composite's own shell body and read end to end. actionlint, composite-schema and typos clean; 72 wiring tests, one new pinning each state to its alert and mark.

Caller repo / workflow run: the comment this replaces is live on #906.

Related Issues

The alert block said what happened in prose, which meant reading it to
know. A 💥 in an `##` heading inside the block makes the state legible
from the timeline, before anyone opens anything — and the table gains
marks on the three rows that matter, so it can be scanned instead of
read.

Each state now gets the alert that fits it: IMPORTANT while a decision
is pending, NOTE once approved, CAUTION on a rejection that closed the
pull request, WARNING when the decision was never recorded. Colour and
icon come from GitHub; the emoji says what the block is about.
@bedatty
bedatty requested a review from a team as a code owner October 15, 2026 21:57
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: LerianStudio/github-actions-shared-workflows/.coderabbit.yml
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: cd6b4c49-cc69-464f-972c-aaa77c64b320
📥 Commits

Reviewing files that changed from the base of the PR and between 1c162b2 and 72ee2dd.

📒 Files selected for processing: 1
  • src/validate/breaking-change-guard/test-workflow.py

Limit details: You’ve used the included review currently available. Your 60 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Walkthrough

The breaking-change approval reporter now uses state-specific GitHub alerts. The waiting-state table updates its commit and author-acknowledgement labels. A test checks the alert types and state headings.

Changes

Breaking-change approval alerts

Layer / File(s) Summary
State alert formatting and coverage
src/notify/breaking-change-approval-reporter/action.yml, src/validate/breaking-change-guard/test-workflow.py
The reporter uses important, note, caution, and warning alerts for the waiting, approved, rejected, and unresolved states. The waiting-state table renames the commit row and adds an icon to the author-acknowledgement label. A test checks the alert types and headings.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Suggested reviewers: fredcamaral

Merge Risk: ⚪ Minimal · up to 72ee2

The PR updates how breaking-change states appear in comments. Each state emits its matching alert and heading, and waiting-state PR-label behavior is preserved; no concrete merge-blocking issue remains.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 11.11% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly summarizes the main change: making breaking-change status visible at a glance. It is concise and specific.
Description check Passed The description explains the presentation changes, identifies the affected behavior, marks the change type, states that there are no breaking API changes, and documents testing. It also clearly notes …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Usage-based review receipt

Note

This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.

Comment @coderabbitai help to get the list of available commands.

@lerian-studio

lerian-studio commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

🔍 Lint Analysis

Check Files Scanned Status
YAML Lint 1 file(s) ✅ success
Action Lint no changes ⏭️ skipped
Pinned Actions 1 file(s) ✅ success
Markdown Link Check no changes ⏭️ skipped
Spelling Check 2 file(s) ✅ success
Shell Check 1 file(s) ✅ success
README Check 1 file(s) ✅ success
Composite Schema 1 file(s) ✅ success
Deployment Matrix no changes ⏭️ skipped

🔍 View full scan logs

@lerian-studio lerian-studio added size/S PR changes 50–199 lines notify Changes to notification composite actions (src/notify/) validate Changes to PR validation composite actions (src/validate/) composite Changes to any composite action manifest (src/**/*.yml) labels Oct 15, 2026
@lerian-studio

lerian-studio commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

🔍 PR Validation Summary

✅ PR Mergeable — no blocking failures

Check Status Blocking
Source Branch ✅ success yes
PR Title ✅ success yes
PR Description ✅ success yes
Breaking Change Guard ✅ success yes
Commit Signatures ✅ success yes
PR Size ✅ success no
Auto Labels ✅ success no
PR Metadata ✅ success no

🔍 View workflow run

@lerian-studio

lerian-studio commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

🛡️ CodeQL Analysis Results

Languages analyzed: actions

✅ No security issues found.


🔍 View full scan logs | 🛡️ Security tab

@lerian-studio

This comment has been minimized.

@lerian-studio lerian-studio added the review-ready Required checks passed — CodeRabbit is cleared to review label Oct 15, 2026
@coderabbitai

This comment has been minimized.

coderabbitai[bot]

This comment was marked as resolved.

Addresses the CodeRabbit review on #909.

The state assertions searched the whole reporter script, so every alert
and heading was present somewhere no matter which branch used it.
Swapping two states' alerts would have kept the suite green while every
comment said the wrong thing.

The suggested fix pulled each `case` branch out with a regex anchored to
the exact indentation. That trades one fragility for another — any
reindentation breaks the pattern and the test reports a problem that is
not there — and it still reads the source rather than the output.

So the tests now run the composite and read the Markdown it produced.
`render_reporter(state)` executes the body with `gh` stubbed, and each
state is checked for its own alert and mark *and* for the absence of the
other three; exclusivity is what catches a swap. Verified by swapping
IMPORTANT for NOTE on `waiting` and watching it fail.

The link assertions moved the same way: they matched shell fragments
like `${SERVER_URL}/${REPO}/commit/...` and now match rendered URLs, so
the no-bare-mention rule holds however the composite spells it.
@lerian-studio

This comment has been minimized.

@coderabbitai

This comment has been minimized.

coderabbitai[bot]

This comment was marked as resolved.

Addresses the third CodeRabbit review on #909.

The state test read the rendered comment but checked `[!IMPORTANT]` and
`## 💥 …` as separate strings. A GitHub alert only renders inside a
blockquote, so dropping the `>` would leave both assertions green while
the comment rendered as plain text — getting the content right and the
presentation wrong, which is the thing this PR is about.

Now asserted as adjacent quoted lines. Verified by removing the `>` from
`waiting` and watching it fail.
@lerian-studio

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@bedatty
bedatty merged commit 8dc3c0a into develop Oct 16, 2026
47 checks passed
@github-actions
github-actions Bot deleted the feat/breaking-change-emoji branch October 16, 2026 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

composite Changes to any composite action manifest (src/**/*.yml) notify Changes to notification composite actions (src/notify/) review-ready Required checks passed — CodeRabbit is cleared to review size/S PR changes 50–199 lines validate Changes to PR validation composite actions (src/validate/)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants