Skip to content

perf(release-prepare): plan, prep, post and the signing setup as code - #1624

Open
potiuk wants to merge 1 commit into
perf/release-mgmt-4-promote-announcefrom
perf/release-mgmt-5-prepare
Open

potiuk wants to merge 1 commit into
perf/release-mgmt-4-promote-announcefrom
perf/release-mgmt-5-prepare

Conversation

@potiuk

@potiuk potiuk commented Oct 13, 2026

Copy link
Copy Markdown
Member

Summary

Fifth PR of the release-management stack; it builds on #1618.

  • Scripts move. release-prepare's three skill-local scripts (prev_tag, next_dev_version, category_x) move unchanged into tools/release-management.
  • New commands cover what the agent did by hand:
    • verdict: Step 0 train coverage.
    • plan-query / plan: the planning issue.
    • versions, notice and changelog (with the 90% coverage check).
    • archive-mode / archive-review: the 2e source-archive review.
    • prep-pr and post-pr.
    • signing-eligibility / signing-render: the automated-signing A1 gate and the A4/A5 drafts.
  • Size. SKILL.md goes from 5,532 to 5,027 tokens, and prep.md from 290 to 209 lines; the 2e review moves to archive-review.md at the skill root.

Security notes

  • PR titles are external content. They are rendered as inert text in the planning issue and the changelog: HTML is escaped and line breaks are folded. A title holding <!-- … --> can no longer be hidden from GitHub's renderer while a later agent still reads it.
  • The 2e listings now write to $TMPDIR, not /tmp, which broke under the sandbox.
  • signing-render refuses key material or a signing step. Step A still never files the Infra ticket, sends mail or adds a key.

Behaviour changes worth a look

  • Step 0 is fail-closed. It blocks without GitHub access, on a planning issue missing its label, and on a release line it cannot read until --train-confirmed is passed.
  • Changelog categories.
    • A new optional key, changelog_label_categories (LABEL=SECTION, documented in the config template), maps labels to sections. Unset, a label is sorted by its words.
    • prep-pr refuses coverage below 90% until --assign classifies the rest, matching the existing "ask the RM to classify before the PR is opened".
  • Planning-issue body: groups are sorted alphabetically with unlabelled PRs last, and numbering runs across groups.

Type of change

  • Skill change — eval fixtures updated below
  • Python package

Test plan

  • prek run --all-files passes on the stack tip.
  • tools/release-management: pytest / ruff / mypy, including the moved script tests and a real-load integration test.
  • Evals: the scripted cases are now pytest cases named after each former case. They are step-0 1/2/4, step-1-plan 1/2, step-2-prep 1/2, and the whole step-14-post suite. The kept judgement cases pass 6/6, against a baseline of 15/15.
  • non-asf-profile-smoke: both of its prepare cases pass. Two of its other cases fail on main independently of this stack; see the notes below.

Notes for reviewers

non-asf-profile-smoke has two failures that reproduce on runs without this change:

Both are follow-ups outside this stack.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 5). I reviewed the diff and the test results; commits carry Generated-by:.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GTPsZ5aEE5bUVYqp47Dpvv

release-prepare had the agent decide train coverage, render the
planning issue, group the changelog, classify what the source archive
ships and compose every PR by hand. Its three skill-local scripts
(prev_tag, next_dev_version, category_x) move unchanged into
tools/release-management, and new commands do the rest, printing JSON
and running nothing:

- `verdict` (Step 0): a release line must cover the version, plus the
  planning issue, its label and GitHub access; fail-closed.
- `plan-query` / `plan`: the tag-date read and the quoted PR search,
  then the empty-set hand-off or the issue title and body with PRs
  grouped by label.
- `versions`, `notice`, `changelog`: the version per manifest, removed
  NOTICE paragraphs from the diff (whether a removal is justified stays
  the RM's call), and the changelog by section with the 90% coverage
  check (`--assign` for the rest).
- `archive-mode` / `archive-review` (2e): full review, drift check or
  skipped; the bucket table, never-excludable and referenced paths
  refused, symlink chains, the `git grep` loop, the before/after
  listing commands, which now write to $TMPDIR instead of /tmp.
- `prep-pr`, `post-pr`: titles, bodies and scope as a set difference.
- `signing-eligibility` / `signing-render`: the automated-signing A1
  gate and the A4 workflow + A5 config diff, refusing key material.

PR titles are external content: they are rendered as inert text
(HTML escaped, line breaks folded) in the planning issue and the
changelog, so a title cannot hide a comment from GitHub's renderer
while a later agent still reads it. A new optional
`changelog_label_categories` key is documented in the config template.

SKILL.md 5,532 → 5,027 tokens; prep.md 290 → 209 lines, with the 2e
review in archive-review.md at the skill root. Golden rules, Hard
rules, the eval headings and the generated blocks are unchanged.

Evals: the scripted cases (step-0 1/2/4, step-1-plan 1/2, step-2-prep
1/2, the whole step-14-post suite) become pytest cases named after each
former case; the judgement cases stay, their fixtures now carrying the
real tool output.

Generated-by: Claude Opus 5
Claude-Session: https://claude.ai/code/session_01GTPsZ5aEE5bUVYqp47Dpvv
@potiuk potiuk added family:setup setup-* skills family:tools tools/* capability:resolve Close-out: invalidate, dedupe, CVE allocate, announcement family:release-management release-* skills substrate:release Tool substrate: release-artefact helpers (reproducible archive build, lint, comparison) labels Oct 13, 2026
@potiuk
potiuk added this pull request to stack #1620 October 13, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capability:resolve Close-out: invalidate, dedupe, CVE allocate, announcement family:release-management release-* skills family:setup setup-* skills family:tools tools/* substrate:release Tool substrate: release-artefact helpers (reproducible archive build, lint, comparison)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant