Skip to content

Add release change policy gate#104

Merged
punk6529 merged 3 commits into
mainfrom
codex/release-change-policy
Jun 11, 2026
Merged

Add release change policy gate#104
punk6529 merged 3 commits into
mainfrom
codex/release-change-policy

Conversation

@punk6529

@punk6529 punk6529 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add CHANGELOG.md and docs/release-policy.md for release-impacting changes, breaking-change approval, ABI/artifact baseline refresh expectations, and release checklist evidence
  • add a stdlib-only changelog gate plus focused tests requiring non-placeholder Unreleased entries for release-impacting paths
  • wire the changelog gate into make check, Linux/Windows wrappers, CI, the PR template, README/tooling/status docs, roadmap, and autonomous run state

Closes #103.

Validation

  • python scripts\test_changelog_check.py
  • python scripts\check_changelog.py
  • python -m py_compile scripts\check_changelog.py scripts\test_changelog_check.py
  • bash -n scripts/check.sh
  • PowerShell parser check for scripts/check.ps1 and scripts/bootstrap-windows.ps1
  • rg -n "^#|^##|^###" ops\ROADMAP.md docs\release-policy.md CHANGELOG.md
  • git diff --check
  • make check
  • powershell -ExecutionPolicy Bypass -File scripts\check.ps1

Review Notes

This is a release-process/tooling/docs PR. It does not change Solidity runtime behavior or produce production release signatures/tags/address books.

Summary by CodeRabbit

  • New Features

    • Enforced changelog validation: release-impacting changes must include a non-placeholder entry under "Unreleased".
    • Added a top-level CHANGELOG with an initial Unreleased and baseline entry.
  • Documentation

    • New release governance policy covering version surfaces, breaking-change criteria, and pre-release gates.
    • Updated README, status, tooling, roadmap, and ops docs to describe the changelog gate and release checklist.
  • Chores

    • CI and local check workflows now run changelog validation.
    • Added automated tests covering the changelog gate behavior.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 01d1691a-454a-4ab0-8318-7f8cf131f2bf

📥 Commits

Reviewing files that changed from the base of the PR and between 00c45b9 and 172aaf2.

📒 Files selected for processing (4)
  • .github/PULL_REQUEST_TEMPLATE.md
  • ops/AUTONOMOUS_RUN.md
  • scripts/check_changelog.py
  • scripts/test_changelog_check.py
✅ Files skipped from review due to trivial changes (2)
  • .github/PULL_REQUEST_TEMPLATE.md
  • ops/AUTONOMOUS_RUN.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • scripts/check_changelog.py
  • scripts/test_changelog_check.py

📝 Walkthrough

Walkthrough

This PR adds a release-policy doc and top-level CHANGELOG.md, implements a changelog-gate validator with unit tests, and wires the gate into CI, Makefile, and local check scripts while updating docs, PR template, and ops state to reflect the new gate.

Changes

Release Change Approval Policy and Changelog Gate

Layer / File(s) Summary
Release Policy and Changelog Structure
docs/release-policy.md, CHANGELOG.md
Introduces comprehensive release governance covering version surfaces (protocol, contract, ABI, schema, deployment, artifacts), breaking-change classifications, maintainer approval requirements, and changelog gate rules. Establishes CHANGELOG.md with Unreleased section and v0.1.0 baseline.
Changelog Gate Validator Implementation
scripts/check_changelog.py
Implements core validation logic: classifies changed files into release-impact groups, collects changes via git or explicit inputs, parses CHANGELOG.md for Unreleased section and non-placeholder bullets, and enforces presence of both file and valid entries when impacting paths change. Exports CLI with --base-ref, --changed-file, and --repo-root options.
Changelog Validator Unit Tests
scripts/test_changelog_check.py
Unittest suite covering no-impact pass, missing changelog failures, missing Unreleased failures, placeholder-entry failures, changed-file inclusion checks, and valid-entry success with expected path→tool mappings.
GitHub Actions CI Wiring
.github/workflows/ci.yml
Extends CI "Repository hygiene" step to syntax-check check_changelog.py and test_changelog_check.py. Adds "Changelog gate" job step that runs the test suite, then validator with computed --base-ref (PR base SHA, or push before SHA when available, omitted otherwise).
Local and Makefile Check Integration
Makefile, scripts/check.sh, scripts/check.ps1
Adds changelog-check Makefile target and phony declaration; integrates into make check prerequisites. Updates cross-platform check scripts to execute test and validator steps in the standard local verification sequence.
User-Facing Documentation
README.md, docs/tooling.md, docs/status.md, ops/ROADMAP.md
Updates README CI proofs list and canonical make check command; documents changelog gate behavior in tooling guide with release-policy link; updates status and roadmap to reflect gate coverage and release-checklist changes; inserts validator into release-artifact regeneration and --check flows.
PR Template and Autonomous Run State Updates
.github/PULL_REQUEST_TEMPLATE.md, ops/AUTONOMOUS_RUN.md
Expands PR template with release-impact and breaking-change approval checkboxes; updates durable ops state and autonomous-run logs to mark prior work merged and track the active release-policy/changelog-gate progress.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A changelog gate stands proud and tall,
Catching changes that matter—one and all!
When paths transform the ABI dance,
The Unreleased section gets its chance. ✨
Approve with care, document with grace,
Release readiness now has a place!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add release change policy gate' clearly summarizes the main change: introducing a release change approval policy and changelog gate mechanism for managing release-impacting changes.
Linked Issues check ✅ Passed All objectives from issue #103 are met: release-impacting path documentation and encoding are implemented, changelog gate passes/fails correctly per acceptance criteria, stdlib-only tests cover required scenarios, and gate is wired into make check, CI, and wrapper scripts.
Out of Scope Changes check ✅ Passed All changes align with issue #103 scope: docs/policy, changelog gate implementation, tests, make/CI/wrapper wiring, and documentation updates. No out-of-scope changes detected; out-of-scope items (signed tags, production addresses, version auto-selection) are not included.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/release-change-policy

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

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 11, 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/PULL_REQUEST_TEMPLATE.md (1)

48-51: ⚡ Quick win

Align checkbox wording with validator requirements.

The checkbox on line 50 says CHANGELOG.md has an "Unreleased entry," but the validator (from scripts/check_changelog.py lines 191-215) enforces two distinct requirements:

  1. A ## Unreleased section heading must exist
  2. At least one non-placeholder bullet must appear under that section

The current wording is ambiguous—authors might add just the section or a placeholder bullet (e.g., - TBD) and believe they've satisfied the checkbox, only to have CI reject it.

📝 Suggested refinement
 ## Release Notes
 
-- [ ] `CHANGELOG.md` has an `Unreleased` entry, or this PR has no release-impacting paths.
+- [ ] `CHANGELOG.md` has a `## Unreleased` section with at least one non-placeholder bullet, or this PR has no release-impacting paths.
 - [ ] Release-impacting ABI, metadata schema, authorization, role, deployment, or artifact changes are documented.

Optionally, make line 51 more explicit about where documentation is expected:

-- [ ] Release-impacting ABI, metadata schema, authorization, role, deployment, or artifact changes are documented.
+- [ ] Release-impacting ABI, metadata schema, authorization, role, deployment, or artifact changes are documented in `CHANGELOG.md`.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/PULL_REQUEST_TEMPLATE.md around lines 48 - 51, Change the checkbox
wording to explicitly require both that the changelog contains a "## Unreleased"
section header and that this section contains at least one non-placeholder
bullet (e.g., not just "- TBD"), since the validator in
scripts/check_changelog.py (lines ~191-215) enforces both rules; update the
second bullet text (the current "CHANGELOG.md has an `Unreleased` entry") to
read something like "CHANGELOG.md has a '## Unreleased' section AND at least one
non-placeholder entry (not a placeholder like 'TBD')" so authors cannot
mistakenly satisfy the checkbox with only a placeholder.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/check_changelog.py`:
- Around line 50-58: The current placeholder detection using the
PLACEHOLDER_ENTRIES set is too strict and misses variants like "TODO:", "TBD -
pending" — update the detection to perform a case-insensitive regex search
instead of exact set membership: build a pattern from the keys in
PLACEHOLDER_ENTRIES (e.g. r'\b(tbd|todo|none|n/?a|placeholder)\b') and use
re.search on each changelog line after stripping surrounding punctuation;
replace the existing membership checks that reference PLACEHOLDER_ENTRIES (both
occurrences) with this regex-based check so variants like "TODO:", "- TBD -
pending", or "n/a" are caught.

---

Nitpick comments:
In @.github/PULL_REQUEST_TEMPLATE.md:
- Around line 48-51: Change the checkbox wording to explicitly require both that
the changelog contains a "## Unreleased" section header and that this section
contains at least one non-placeholder bullet (e.g., not just "- TBD"), since the
validator in scripts/check_changelog.py (lines ~191-215) enforces both rules;
update the second bullet text (the current "CHANGELOG.md has an `Unreleased`
entry") to read something like "CHANGELOG.md has a '## Unreleased' section AND
at least one non-placeholder entry (not a placeholder like 'TBD')" so authors
cannot mistakenly satisfy the checkbox with only a placeholder.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a91954e2-a02a-45c1-baaa-5450ae21af0a

📥 Commits

Reviewing files that changed from the base of the PR and between de10363 and 00c45b9.

📒 Files selected for processing (14)
  • .github/PULL_REQUEST_TEMPLATE.md
  • .github/workflows/ci.yml
  • CHANGELOG.md
  • Makefile
  • README.md
  • docs/release-policy.md
  • docs/status.md
  • docs/tooling.md
  • ops/AUTONOMOUS_RUN.md
  • ops/ROADMAP.md
  • scripts/check.ps1
  • scripts/check.sh
  • scripts/check_changelog.py
  • scripts/test_changelog_check.py

Comment thread scripts/check_changelog.py Outdated

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 11, 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.

Copy link
Copy Markdown
Contributor Author

Merge evidence for PR #104:

  • Final reviewed head: 172aaf2244162ff9b19cb580ec7f0b85f9102ac9.
  • CI run 27344538408 completed successfully.
  • CodeRabbit aggregate status is success after the review-fix commit.
  • Latest CodeRabbit pass reported no actionable comments.
  • The earlier inline review thread is resolved and outdated.
  • Local focused review-fix validation passed before push: changelog unit tests, changelog gate, Python compile, shell/PowerShell syntax checks, and git diff --check.

@punk6529 punk6529 merged commit 012bea9 into main Jun 11, 2026
2 checks passed
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.

[P1-RELEASE-005] Add release change approval policy and changelog gate

1 participant