Skip to content

Tighten release hygiene verification - #440

Merged
mohanagy merged 2 commits into
nextfrom
issue-416-release-doc-hygiene
May 31, 2026
Merged

mohanagy merged 2 commits into
nextfrom
issue-416-release-doc-hygiene

Conversation

@mohanagy

@mohanagy mohanagy commented May 31, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • add a release:verify command and CI check to lock public package metadata, exact changelog links, and npm-stable README URLs
  • convert npm-visible README repo links to stable GitHub URLs and document the release checklist requirement to publish from merged main
  • add regression coverage for release hygiene, including a wrong-changelog-anchor fixture and Windows-safe verifier invocation

Test Plan

  • npm run test:run -- tests/unit/release-hygiene.test.ts tests/unit/package-metadata.test.ts tests/unit/release-docs.test.ts tests/unit/why-madar-doc.test.ts
  • npm run release:verify
  • npm run typecheck
  • npm run build
  • CI=1 npm run test:run
  • npm pack --dry-run

Closes #416

Summary by CodeRabbit

  • Documentation

    • Updated README to use explicit GitHub URLs and refreshed wording/links including a new agent orchestration pointer.
    • Updated release docs to require a release verification step and clarify publish prerequisites.
  • Chores

    • Added a release-hygiene verification step to CI to lock metadata, changelog, and README links before publishing.
    • Added a local npm script to run the release verification.
  • Tests

    • Added unit tests validating the release verification behavior and README/changelog link consistency.

- add a release:verify command and CI hook for public metadata and README hygiene
- convert npm-visible README links to stable GitHub URLs
- document publish-from-main release verification and add regression coverage

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented May 31, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 94139f6c-76a2-43b0-b4c3-cbeb41f17c8d

📥 Commits

Reviewing files that changed from the base of the PR and between c816211 and 8e86515.

📒 Files selected for processing (1)
  • README.md
✅ Files skipped from review due to trivial changes (1)
  • README.md

📝 Walkthrough

Walkthrough

Adds a release-hygiene verification script that checks package.json metadata, computes and validates the changelog anchor for the current version, enforces README link stability, integrates the check into CI via an npm script, updates README links to explicit GitHub URLs, and adds tests and docs updates.

Changes

Release Hygiene Verification System

Layer / File(s) Summary
Release Hygiene Verification Script
.github/scripts/verify-release-hygiene.mjs
New Node.js ESM script that loads package.json, README.md, and CHANGELOG.md, validates GitHub-related package.json fields, ensures CHANGELOG.md has a dated heading matching the current version and derived anchor, verifies README markdown link targets are stable (only allowing absolute URLs, mailto, or in-page anchors), and confirms the README "What's new" link targets the computed changelog blob URL.
npm Script and CI Workflow Integration
package.json, .github/workflows/ci.yml
Adds release:verify npm script pointing to the verification script and a CI step (Ubuntu + Node 22) that runs npm run release:verify after registry validation and before typechecking.
README Link Stabilization to GitHub URLs
README.md
Converts multiple relative README links to explicit GitHub URLs across badges, demos, walkthroughs, changelog references, evidence/measurement links, MCP manifest, tool examples, and documentation lists; refreshes some wording and adds a trace/artifact link and an agent orchestration guide pointer.
Release Process Documentation and Test Suite
docs/release.md, tests/unit/release-hygiene.test.ts
Documents npm run release:verify in the release checklist and requires merging the verified release commit to main before publishing; adds comprehensive Vitest tests that assert README link stability, npm script wiring, verification script execution and mismatch detection via temporary fixtures, and docs coverage.

Sequence Diagram

sequenceDiagram
  participant CI Job
  participant release_verify_script as release:verify script
  participant RepoFiles as package.json / README.md / CHANGELOG.md
  participant GitHub as GitHub blob URL

  CI Job->>release_verify_script: run `npm run release:verify`
  release_verify_script->>RepoFiles: read package.json, README.md, CHANGELOG.md
  release_verify_script->>RepoFiles: compute expected changelog anchor from package.json.version
  release_verify_script->>GitHub: compute expected blob URL for changelog entry
  release_verify_script->>RepoFiles: assert repository/bugs/homepage fields match GitHub URL
  release_verify_script->>RepoFiles: verify README link targets and "What's new" points to computed blob URL
  release_verify_script-->>CI Job: exit success or throw on mismatch
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • mohanagy/madar#397: Bumped package.json and updated CHANGELOG/README "What's new" anchor that the new verification script asserts must match.
  • mohanagy/madar#415: Updated README "What's new" links and changelog entries in a release PR that the verification checks would validate.
  • mohanagy/madar#384: Version bump and changelog changes for a release that the new tests and script target.

Poem

🐰 I hopped through README, changelog, and script,

making anchors and links neat and strict.
CI runs the check, no drift in sight,
Releases stay tidy, everything right!

🚥 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
Title check ✅ Passed The title accurately summarizes the main change: adding verification checks to tighten release hygiene controls.
Description check ✅ Passed The PR description covers the main changes, test plan with checkmarks, and closes the linked issue, matching the template structure.
Linked Issues check ✅ Passed All acceptance criteria from #416 are met: release:verify command added, npm-visible links converted to stable GitHub URLs, verification documented in release checklist.
Out of Scope Changes check ✅ Passed All changes directly support the release hygiene verification objective; no unrelated modifications detected beyond the scope of #416.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-416-release-doc-hygiene

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

@mohanagy
mohanagy merged commit aeb59cc into next May 31, 2026
7 checks passed
This was referenced Jun 1, 2026
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