Skip to content

fix(github): number unsafe findings and count the same unit on every surface - #1152

Draft
aparajon wants to merge 1 commit into
armand/glyph-state-cancelledfrom
armand/numbered-unsafe-findings
Draft

fix(github): number unsafe findings and count the same unit on every surface#1152
aparajon wants to merge 1 commit into
armand/glyph-state-cancelledfrom
armand/numbered-unsafe-findings

Conversation

@aparajon

Copy link
Copy Markdown
Collaborator

Renders unsafe changes as a flat numbered list — one line per finding — on both the PR comment and the CLI, and makes every heading count the same unit the list shows.

  • Numbered, flat findings. The heading advertises a count, so the list below is now an ordered list the reader can check it against, and a finding can be referenced by its number ("2 is the blocker"). A table with several joined findings gets one line per finding with the table name repeated, instead of a nested sub-list.
  • One counting unit everywhere. The PR comment counted individual findings while the CLI counted changes, so the same apply could say "3 unsafe changes" in the terminal and "4" on the PR. Both surfaces now count findings, and the count always equals the number of lines rendered below it.
PR comment — before / after

Before:

⛔ Apply rejected: 3 unsafe changes detected

  • orders:
    • Primary key column id has type int
    • Column created_at uses TIMESTAMP which overflows on 2038-01-19. Consider using DATETIME instead.
  • users: Column rename detected in table users: email to email_address. …

After:

⛔ Apply rejected: 3 unsafe changes detected

  1. orders: Primary key column id has type int
  2. orders: Column created_at uses TIMESTAMP which overflows on 2038-01-19. Consider using DATETIME instead.
  3. users: Column rename detected in table users: email to email_address. …
CLI — before / after (note the count now matches the list)

Before:

⛔ Apply blocked: 3 unsafe change(s) detected
  • users: DROP COLUMN email
  • orders: DROP TABLE
  • products:
      - MODIFY COLUMN price_cents: INT → SMALLINT (potential data loss)
      - DROP INDEX idx_category

After:

⛔ Apply blocked: 4 unsafe change(s) detected
  1. users: DROP COLUMN email
  2. orders: DROP TABLE
  3. products: MODIFY COLUMN price_cents: INT → SMALLINT (potential data loss)
  4. products: DROP INDEX idx_category

This PR was written by an AI agent (Claude Code, model Claude Fable 5) on behalf of the author.

…surface

The unsafe-changes headings advertise a count, but the list below was
unordered and, on the CLI, counted changes while the PR comment counted
findings — the same apply could say 3 in the terminal and 4 on the PR.
Both surfaces now render one numbered line per finding (the table name
repeats instead of nesting a sub-list), and every heading counts
findings, so the count always equals the number of lines below it and a
finding can be referenced by its number.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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