Skip to content

feat: re-approval path for approve-rule with explicit changelog - #2453

Open
WilcoFiers wants to merge 2 commits into
developfrom
feat/approve-rule-reapproval
Open

WilcoFiers wants to merge 2 commits into
developfrom
feat/approve-rule-reapproval

Conversation

@WilcoFiers

Copy link
Copy Markdown
Member

Summary

  • support re-approval by archiving the previous index.md under its ISO date
  • update rule version history with explicit changelog entries from repeated --change flags and/or a YAML --changesFile
  • retain first-time approval behavior, including rules that already have a proposed version row
  • document changelog input and add focused unit coverage

Test plan

  • npm run test:approve-rule (5 passed)
  • npm test -- --runInBand (11 suites, 9704 tests passed)

Closes act-rules/act-tools#64

Archive the previous approved rule and require explicit change entries
when approving an updated rule.

Co-authored-by: Cursor <cursoragent@cursor.com>
@netlify

netlify Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for act-rules failed.

Name Link
🔨 Latest commit 91cf818
🔍 Latest deploy log https://app.netlify.com/projects/act-rules/deploys/6ab146039bc9b000089b9350

Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

Workflow changelog forwarding is incomplete, and same-day re-approvals can overwrite archived snapshots.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity · 1 Medium severity

Open (2)
What changed in this PR

Adds re-approval support for ACT rules, including archived snapshots, changelog handling, focused tests, and CI coverage.

Changes:

  • Archives prior approved rule versions.
  • Parses explicit changelog entries from CLI flags or YAML.
  • Updates version history and approval workflows.
  • Adds tests and CI integration.

Unresolved issues include missing workflow changelog forwarding and same-day snapshot overwrite risk.

File Summary
README.md Documents changelog inputs; workflow invocation remains incomplete.
package.json Adds approval-script tests.
.github/​workflows/​test.yml Runs approval-script tests in CI.
.github/​scripts/​update-rule-versions.test.mjs Tests version updates and changelog parsing.
.github/​scripts/​update-rule-versions.mjs Updates version history and archives snapshots; same-day collisions remain possible.
.github/​scripts/​archive-rule-snapshot.test.mjs Tests archived snapshot rewriting.
.github/​scripts/​archive-rule-snapshot.mjs Rewrites archived snapshot metadata.
.github/​scripts/​approve-rule.mjs Integrates re-approval and changelog handling.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +55 to +56
file: `${currentIndex.isoDate}.md`,
url: `${ruleId}/${currentIndex.isoDate}/`,
Comment thread README.md

This repository automatically pushes changes to rules to the [w3c/wcag-act-rules](https://github.com/w3c/wcag-act-rules/) repository. There is an "Approve rule" action available which can be triggered manually by an ACT Task Force facilitator, which will set a proposed rule to "approved".

Rule updates require an explicit changelog when using the approval script. Pass entries with repeated `--change "..."` flags, with `--changesFile path.yaml` containing a YAML list of strings, or with both. First-time approvals do not require a changelog.

This branch has not been deployed

No deployments
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.

AFK: Extend approve-rule for re-approval, one branch per rule

2 participants