Skip to content

ci: check release-notes links and the signing regexp (#168) - #169

Merged
craigmcchesney merged 5 commits into
mainfrom
ci-168-release-notes-checker
Oct 1, 2026
Merged

craigmcchesney merged 5 commits into
mainfrom
ci-168-release-notes-checker

Conversation

@craigmcchesney

@craigmcchesney craigmcchesney commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #168. Part of osprey-dcs/data-platform#98.

Ports the release-notes checker from osprey-dcs/dp-python-lib#70 to .github/scripts/check-release-notes.py. The file is copied verbatim; only the configuration block differs: REPOSITORY, sigstore-python rules off, and COSIGN_IDENTITY_REGEXP = DP_GRPC_IDENTITY_REGEXP.

Changes

  • Signing regexp: must equal ^https://github.com/osprey-dcs/dp-grpc/\.github/workflows/release\.yml@refs/tags/rel- exactly, matching README.env and NEXT.md.
  • ci.yml: a "Check release notes" step in ci-build checks every rel-*.md and NEXT.md.
  • release.yml, "Verify release notes exist":
    • A release checks the notes being published, and fails if they're missing or have any problem.
    • A rehearsal now runs the step too. It checks every notes file and only warns.
    • The step-level IS_RELEASE guard moved inside the script, and NOTES_PATH is still set only on a release.
  • Docs: NEXT.md's "Cutting the release" checklist points at the checker, and CLAUDE.md says where the checker is and what it does.
  • No new uses:: it runs on the runner's python3, since the script needs only the standard library.

Testing

  • Self-test and real notes: pass, on rel-1.16.0.md and NEXT.md.
  • Deliberately broken notes: the checker catches NEXT.md links moved to rel-*, a simulated release cut without repointing the links (18 errors), a loosened signing regexp, and a broken anchor.
  • Release step, run under bash:
    • release with good notes: passes
    • release with bad notes: fails
    • release with notes missing: fails
    • rehearsal with bad notes: warns and exits 0
  • Workflows: the pin check is clean. actionlint shows the same info-level notes as on main.

Not yet verified

CI passing on this PR, and a dry-run dispatch of release.yml that shows the backstop running.

Merge after osprey-dcs/dp-python-lib#73.

🤖 Generated with Claude Code

https://claude.ai/code/session_012nsCzraPATf4LCKVyUStfd

craigmcchesney and others added 3 commits October 1, 2026 11:15
…#168)

Port osprey-dcs/dp-python-lib's release-notes checker (dp-python-lib#70),
copied verbatim except for the configuration block: REPOSITORY is
osprey-dcs/dp-grpc, the sigstore-python rules are off, and
--certificate-identity-regexp must be exactly DP_GRPC_IDENTITY_REGEXP, the
regexp README.env and NEXT.md document.  The rules are data-platform#98.

It lives at tools/release-notes/ rather than .dev/tools/: .dev/ is
gitignored here and tools/ is this repo's script location.  The extra
directory keeps it two levels below the repo root, which the script's
REPO_ROOT assumes.

CI runs it over every rel-*.md and NEXT.md.  release.yml's "Verify release
notes exist" step runs it on the tagged file as a backstop, and on a
rehearsal over every notes file, so a dry-run dispatch shows it running.
Runner python3, stdlib only; no new actions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012nsCzraPATf4LCKVyUStfd
NEXT.md's "Cutting the release" step 5 no longer asks the reader to find
every main-pinned link by eye; a new step 7 runs the checker, which lists
every one missed and any stale tag.  It also warns that R5 will flag the
generic dp-grpc-<version> asset names in the #137 section at the cut.  A
preamble paragraph states the link rules for the draft.

CLAUDE.md records where the checker lives and that the copy is not edited
in place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012nsCzraPATf4LCKVyUStfd
…sal (#168)

Take the revised reference script from dp-python-lib#70 verbatim, at
.github/scripts/check-release-notes.py, the path chosen for all five
repos.  Only the configuration block differs (REPOSITORY, sigstore-python
rules off, COSIGN_IDENTITY_REGEXP = DP_GRPC_IDENTITY_REGEXP).  It now finds
the repo root by walking up to .git, and R5 no longer flags a bare
<version>, so NEXT.md's cut checklist drops the note about the generic
dp-grpc-<version> asset names.

A workflow_dispatch rehearsal now only warns when the checker finds
problems; a real release still fails, and NOTES_PATH is still set only on
a release.

Also removes a __pycache__ .pyc committed by mistake in the previous
commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012nsCzraPATf4LCKVyUStfd

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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

The checker has anchor and option-parsing false negatives that undermine its validation guarantees.

Review effort: Balanced
Findings: 1 High severity · 2 Medium severity · 1 Low severity

Open (4)
What changed in this PR

Ports the shared release-notes validator into dp-grpc and integrates it into CI and release workflows.

Changes:

  • Adds link, anchor, placeholder, and signing-identity validation.
  • Runs validation during CI, releases, and rehearsals.
  • Documents validation and release-cut procedures.
File Description
.github/​scripts/​check-release-notes.py Implements validation and self-tests.
.github/​workflows/​ci.yml Adds CI validation.
.github/​workflows/​release.yml Adds release-time validation.
doc/​release-notes/​NEXT.md Updates release-cut instructions.
CLAUDE.md Documents the checker and rules.

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

Comment thread .github/scripts/check-release-notes.py Outdated
Comment thread .github/scripts/check-release-notes.py Outdated
Comment thread .github/scripts/check-release-notes.py Outdated
Comment thread CLAUDE.md Outdated
craigmcchesney and others added 2 commits October 1, 2026 14:05
- CLAUDE.md: tools/ no longer claims the release-notes checker; .github/scripts/ is listed
  on its own line.  The checker paragraph is rewrapped and notes that R2 also accepts a full
  commit SHA.
- release.yml: a rehearsal has no rel-* tag (it may still run against some other tag), and
  quote $GITHUB_ENV in the notes step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012nsCzraPATf4LCKVyUStfd
Re-copied from osprey-dcs/dp-python-lib@f04d830 (dp-python-lib#73 as merged); only the
configuration block differs.  Picks up the review fixes made there:

- R2/N2 apply only to the five lockstep repos, not every osprey-dcs repo.
- http:// as well as https:// github.com and raw links are checked.
- A reference definition with its destination on the next line is parsed.
- HTML anchors inside code no longer count as link targets.
- A same-document #L... anchor fails R4; a blob link's line anchor is not range-checked.
- A backslash-newline between a signing flag and its value is accepted.
- Trailing sentence punctuation after the image tag is not read as part of it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012nsCzraPATf4LCKVyUStfd
@craigmcchesney
craigmcchesney merged commit 9d09410 into main Oct 1, 2026
1 check passed
@craigmcchesney
craigmcchesney deleted the ci-168-release-notes-checker branch October 1, 2026 20:24
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.

Port the release-notes checker with link rules and cosign regexp guard (data-platform#98)

2 participants