Skip to content

feat: opt-in "dangerous" flag for upgrades.json removals#39

Merged
rubydusa merged 1 commit into
mainfrom
Rubydusa/upgrades-dangerous-flag
Apr 27, 2026
Merged

feat: opt-in "dangerous" flag for upgrades.json removals#39
rubydusa merged 1 commit into
mainfrom
Rubydusa/upgrades-dangerous-flag

Conversation

@rubydusa
Copy link
Copy Markdown
Contributor

Summary

  • Adds an opt-in top-level "dangerous": true field to upgrades.json.
  • When set, validate-config.sh reports removed contract entries as a warning (with ::warning:: annotation + step-summary note) instead of erroring out.
  • Lets a PR intentionally retire a contract; reset the flag to false (or drop it) in a follow-up PR to re-arm the guard.
  • README updated with a "Removing entries" subsection under Upgrade Safety.

The flag is read from the PR's config (not base), so the escape hatch only applies to PRs that explicitly set it.

Test plan

  • PR removes an entry without dangerous: true → upgrade-config job fails with an error, summary points the user at the flag.
  • PR removes an entry with dangerous: true → upgrade-config job succeeds with a warning annotation and warning summary.
  • PR doesn't touch removals → behavior unchanged regardless of dangerous value.
  • Malformed dangerous (string "true", number 1, etc.) is treated as not set — uses jq '.dangerous == true' for strict boolean check.

🤖 Generated with Claude Code

Set top-level "dangerous": true in upgrades.json to downgrade the
removal-diff guard in validate-config.sh from an error to a warning,
so a PR can intentionally retire an entry.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rubydusa rubydusa merged commit a00a221 into main Apr 27, 2026
2 checks passed
@rubydusa rubydusa deleted the Rubydusa/upgrades-dangerous-flag branch April 27, 2026 18:46
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