fix(cli): align CLI severity glyphs with the shared vocabulary - #1129
Conversation
Migrate every raw severity glyph in pkg/cmd to the pkg/glyph constants and correct the sites whose glyph misled: - The plan-time unsafe-changes heading carried Refused before anything was refused; it now carries Attention, matching the PR plan comment and list-plans. - The apply-blocked heading keeps Refused but names the refusal itself: "Apply blocked: N unsafe change(s) detected". - The multi-deployment first-failure callout marked an actual failure with a bare one-cell warning glyph; it now carries Failed, matching the deployment row beside it. - The database-locked conflict is a refusal, not a failure, so its heading moves from Failed to Refused. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Aligns CLI operator-facing severity glyphs with the shared pkg/glyph vocabulary so CLI output matches the PR-comment/UI semantics (plan-time attention vs apply-time refusal vs actual failure), and updates docs/templates/tests accordingly.
Changes:
- Replaces raw severity glyph literals in CLI templates/commands with
pkg/glyphconstants and adjusts headings to match intended meanings (attention vs refused vs failed). - Updates lock-conflict and multi-deployment “first failure” callouts to use the correct severity glyph.
- Refreshes templates/docs and adjusts integration/e2e expectations to match the new headings.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| TEMPLATES.md | Updates rendered CLI template examples to match new headings/glyphs. |
| pkg/cmd/internal/templates/progress.go | Uses glyph.Failed/glyph.Info in table-progress output. |
| pkg/cmd/internal/templates/progress_multi.go | Uses glyph.Failed for the multi-deployment first-failure callout. |
| pkg/cmd/internal/templates/plan.go | Uses pkg/glyph in plan/apply unsafe-change headings and ignore-namespace notices. |
| pkg/cmd/internal/templates/plan_unsafe_test.go | Adds coverage for plan-vs-apply unsafe heading glyph semantics using pkg/glyph. |
| pkg/cmd/internal/templates/locks.go | Changes lock-conflict heading to refused/blocked wording and uses pkg/glyph. |
| pkg/cmd/commands/watch_tui_view_multi.go | Uses glyph.Failed for “First failure” in the TUI multi-deployment header. |
| pkg/cmd/commands/watch_tui_test.go | Updates expected “First failure” glyph in tests. |
| pkg/cmd/commands/plan.go | Updates comments to reflect plan-time unsafe warning as attention ( |
| pkg/cmd/commands/fixlint.go | Uses glyph.Failed for unfixable lint issues heading. |
| integration/cli_test.go | Updates apply-blocked output assertions to match new wording. |
| e2e/local/vitess_test.go | Updates apply-blocked output assertions to match new wording. |
| e2e/local/local_test.go | Updates plan/apply output assertions/comments to match new plan/apply semantics. |
| docs/lint-and-safety-levels.md | Documents the updated mapping of glyphs to meanings and where they appear. |
Suppressed comments (1)
pkg/cmd/commands/watch_tui_test.go:322
- Same issue here: the expected string hardcodes ❌. Prefer glyph.Failed in the assertion so tests track the shared severity vocabulary rather than duplicating the raw glyph.
assert.Contains(t, view, "running (degraded)")
assert.Contains(t, view, "1 running · 1 failed")
assert.Contains(t, view, "❌ First failure: eu — duplicate column")
assert.Contains(t, view, "🔄 us — running table copy")
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
🤖 Review findings - created by Kiran's code review agent - for schemabot/pull/1129, 7dee414. Verdict: 3 findings — 0 blocking, 2 non-blocking (stale doc note, cross-surface glyph split), 1 suggestion. Non-blocking
General suggestions
The one thing that could have broken, verifiedFive negative lock assertions in Verified correct
This review was generated by Claude Code (claude-opus-5). |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
🤖 Thanks — addressed as follows, on Armand's behalf:
This reply was generated by Claude Code (Claude Fable 5). |
…-applies * origin/main: test(storage): add Tasks parity family to the cross-dialect suite (#1138) test(storage): add ApplyOperations parity family to the cross-dialect suite (#1140) fix(github): release cancelled apply check ownership (#1134) fix(github): silence participant discovery noise (#1133) fix(cli): align CLI severity glyphs with the shared vocabulary (#1129) # Conflicts: # pkg/storage/storagetest/storagetest.go
Migrates every raw severity glyph in the CLI (
pkg/cmd) to the sharedpkg/glyphvocabulary, and corrects the sites whose glyph said the wrong thing:list-plans; the CLIplanheading was the outlier. Nothing has been refused at plan time — the changes await consent.⛔ Apply blocked: N unsafe change(s) detected, instead of labeling the changes themselves.⚠to ❌ (Failed) — it points at a deployment row already marked ❌, and an actual failure was marked a notch below a plan-time warning.Escalation (🚨) and Info (ℹ️) sites are unchanged in rendering and now reference the constants. Apply-operation state glyphs (⏹️/🚫/⏸) are a separate vocabulary and are untouched here.
CLI plan with unsafe changes — before / after
Before:
After:
CLI apply blocked without --allow-unsafe — before / after
Before:
After:
Apply blocked by a database lock — before / after
Before:
After:
Multi-deployment first failure — before / after
Before:
After:
This PR was written by an AI agent (Claude Code, model Claude Fable 5) on behalf of the author.