fix(github): align PR comment severity glyphs with the shared vocabulary - #1135
Open
aparajon wants to merge 3 commits into
Open
fix(github): align PR comment severity glyphs with the shared vocabulary#1135aparajon wants to merge 3 commits into
aparajon wants to merge 3 commits into
Conversation
aparajon
force-pushed
the
armand/glyph-webhook-surface
branch
from
August 25, 2026 16:14
241de35 to
f830783
Compare
aparajon
force-pushed
the
armand/glyph-webhook-surface
branch
from
August 26, 2026 02:20
f830783 to
1b90b32
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR standardizes severity glyphs across GitHub PR-comment templates by switching hard-coded emoji to the shared pkg/glyph vocabulary, and adjusts a few headings/callouts so the glyph meaning matches the underlying event (refusal vs failure vs attention).
Changes:
- Replace raw severity glyphs in
pkg/webhook/templates/*withpkg/glyphconstants (e.g.,Attention,Failed,Refused,Info,Escalation). - Update “unsafe changes” apply rejection and “Apply Blocked” headings to use the refusal glyph (⛔) and update error/first-failure callouts to use the failure glyph (❌).
- Refresh template previews and documentation to reflect the new glyph semantics.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| TEMPLATES.md | Updates rendered preview snippets to match the new glyph vocabulary and corrected headings/callouts. |
| pkg/webhook/templates/sharded_apply.go | Switches sharded failure callouts to glyph.Failed. |
| pkg/webhook/templates/sharded_apply_test.go | Updates expectations for sharded failure callouts. |
| pkg/webhook/templates/reconciliation.go | Uses glyph.Attention for the reconciliation-required heading. |
| pkg/webhook/templates/plan.go | Replaces severity glyph literals with glyph.* constants in plan comment rendering. |
| pkg/webhook/templates/multi_apply.go | Switches multi-deployment first-failure callout to glyph.Failed. |
| pkg/webhook/templates/multi_apply_test.go | Updates expectations for multi-deployment first-failure callout. |
| pkg/webhook/templates/existing_copy.go | Uses glyph.Attention / glyph.Info for the discarded-copies disclosure marker. |
| pkg/webhook/templates/errors.go | Converts error templates to use glyph.Attention / glyph.Info / glyph.Failed constants. |
| pkg/webhook/templates/common.go | Changes error blockquote markers from glyph.Failed for Error: / Last error: lines. |
| pkg/webhook/templates/common_test.go | Updates expectations for the new error blockquote glyph. |
| pkg/webhook/templates/apply.go | Uses glyph.Failed in headings / grouped emoji selection, plus glyph.Info in informational bullets. |
| pkg/webhook/templates/apply_test.go | Updates expectations for Apply Blocked headings and error markers. |
| pkg/webhook/templates/apply_commands.go | Updates unsafe-change rejection copy and apply-blocked headings to use glyph.Refused / glyph.Escalation / glyph.Attention. |
| pkg/webhook/sharded_apply_test.go | Updates sharded summary expectation for the apply-level failure callout. |
| pkg/webhook/plan_test.go | Updates unsafe-changes rejection copy expectations. |
| docs/lint-and-safety-levels.md | Updates documentation to reflect revised glyph semantics and adds ❌ to the legend. |
Suppressed comments (1)
pkg/webhook/templates/common.go:322
- writeTableErrorLine now always prefixes with the failure glyph (❌), but apply progress rendering calls this for retryable interruptions (state.Task.FailedRetryable in apply.go). That makes an in-progress retry read like a terminal failure; consider letting the caller choose glyph.Attention vs glyph.Failed (or split into two helpers) based on task/apply state.
if sanitized == "" {
return
}
fmt.Fprintf(sb, "> "+glyph.Failed+" Last error: %s\n", quoteBlockLines(html.EscapeString(sanitized)))
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
aparajon
marked this pull request as ready for review
August 26, 2026 03:01
aparajon
requested review from
JashLal,
Kiran01bm,
eeSeeGee,
jayjanssen,
jemiahw and
morgo
as code owners
August 26, 2026 03:01
Migrate every raw severity glyph in the webhook templates to the pkg/glyph constants and correct the sites whose glyph misled: - The unsafe-changes rejection heading attaches Refused to the refusal itself: "Apply rejected: N unsafe changes detected", matching the engine-blocked rejection heading's style. - Error and last-error callouts quote a recorded failure, not a pre-proceed warning; they now carry Failed. - Multi-deployment and sharded first-failure callouts carry Failed, matching the row they point at. - The Apply Blocked headings are safety-gate refusals, not attempted failures, so they move from Failed to Refused — matching the merged/closed-PR blocks that already carried it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The per-table failed rows spelled the failure glyph as a unicode escape, hiding it from the vocabulary migration. Reference glyph.Failed like every other severity site, and correct the writeErrorBlock doc comment that still described a warning emoji. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Section headings already carry a bold label, so bolding the count as
well double-emphasized the line. The count stays bold only in the plan
summary ("**2** tables to create"), where it is the line's sole
emphasis.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
aparajon
force-pushed
the
armand/glyph-webhook-surface
branch
from
August 27, 2026 05:12
bb8b258 to
e473cee
Compare
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.
Why this matters
The PR-comment surface spells every severity glyph inline, so the same situation reads differently from comment to comment: a recorded failure renders⚠️ — one notch below a plan-time warning — safety-gate refusals split between ❌ and ⛔, and the unsafe-changes rejection heading pins ⛔ to the changes themselves rather than the refusal. Operators triage urgency from these glyphs, and
pkg/glyphalready defines the one-glyph-per-meaning vocabulary the CLI surface uses. This PR moves the PR-comment surface onto it and corrects the sites whose glyph said the wrong thing.What it does
Migrates every raw severity glyph in
pkg/webhook/templatesto thepkg/glyphconstants, and fixes the misleads:**⛔ Apply rejected**: N unsafe changes detected, matching the engine-blocked rejection heading, instead of labeling the changes.> ⚠️ **Error:**and> ⚠️ Last error:quotes render a recorded failure, not a pre-proceed warning.Apply Blockedheadings move from ❌ to ⛔. Prior-environment gate, non-passing PR checks, check-read errors failing closed, missing/untrusted prior-environment check, unlisted environment — all are refusals by a safety gate, not attempted-and-failed operations, matching theApply Blocked: PR Is Merged/Closedheadings that already carried ⛔.Everything else (escalation, info notices, config-error templates) keeps its rendering and now references the constants. Cancelled/stopped state glyphs are a separate vocabulary and are untouched here.
Apply rejected over unsafe changes — before / after
Before:
After:
Failed apply error callouts — before / after
Before:
After:
Multi-deployment / sharded first failure — before / after
Before:
After:
Apply blocked by a safety gate — before / after
Before:
After:
Unbolded heading counts — before / after
Before:
After:
How it moves us toward the northstar
This completes the PR-comment half of the shared severity vocabulary: with the CLI surface already migrated, both operator surfaces now read from
pkg/glyph, so a glyph can never drift on one surface without the other. That unblocks the final step of the vocabulary work — the analyzer that forbids raw severity glyph literals outsidepkg/glyph— which can only be turned on once no surface spells its own.Opened by Claude (Fable 5).