Skip to content

perf(release-promote, release-announce-draft): render the promotion and announcement as code - #1618

Open
potiuk wants to merge 3 commits into
perf/release-mgmt-3-votesfrom
perf/release-mgmt-4-promote-announce
Open

potiuk wants to merge 3 commits into
perf/release-mgmt-3-votesfrom
perf/release-mgmt-4-promote-announce

Conversation

@potiuk

@potiuk potiuk commented Oct 13, 2026

Copy link
Copy Markdown
Member

Summary

Fourth PR of the stack; it builds on the vote PR.

  • release-promote:
    • verdict fails closed: no --vote-passed means blocked.
    • render draws the per-backend block: svnpubsub svn mv + svn list + the final signed tag on the RC commit; github-releases, which refuses a draft-tag mismatch until it is confirmed; s3; and self-hosted.
    • It also draws the hand-off note, the convenience publish commands, the HOLD notes and the mandatory mirror note.
    • A self-hosted backend without a template is now also a Step 0 blocker in release-config.
  • release-announce-draft:
    • verdict adds the promoted check.
    • render --step 2 draws the [ANNOUNCE] for all four backends. The @apache.org reminder is always present (Golden rule 4), and a dist.apache.org Download Page gets a warning (Golden rule 5).
    • render --step 3 draws the site-bump PR and computes scope violations as a set difference.
    • The site-bump step moves, byte-identical with its generated adversarial block, to site-bump.md at the skill root.
  • Size: promote goes from 6,982 to 4,886 tokens, announce-draft from 6,809 to 5,662.

Security notes

Every rendered command quotes its values with the shared shell helpers. That matters most here: the RC commit SHA and the vote-result URL come from the planning issue, which is external content. A test proves both come out as inert words.

Behaviour changes worth a look

  • A bug fix: the svnpubsub template's \ # release_dist_backend=svnpubsub continuation lines broke the pasted command, so the comments are gone. The step headers keep the backend tag.
  • The default [ANNOUNCE] body drops its <NOTE: do not include direct dist.apache.org links…> line. It was a drafting instruction inside the template; the rule is now enforced as a warning.
  • When announce_cc_lists is empty, the Cc line is omitted.

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, with two real-load integration tests. tools/release-config has a new self-hosted blocker test.
  • Evals: the scripted cases are now pytest cases named after each former case. The kept injection and verdict-smoke cases pass 2/2 per skill, against a baseline of 9/9 each.

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

@potiuk potiuk added 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 14:14
@potiuk
potiuk force-pushed the perf/release-mgmt-4-promote-announce branch from b0edf6a to 170968c Compare October 13, 2026 15:23
Comment thread tools/release-management/src/release_management/promote/render.py Fixed
Comment thread tools/release-management/tests/test_announce_draft.py Fixed
…nd announcement as code

Both skills had the agent assemble the Step-0 verdict and fill in every
command block, mail and PR body by hand. tools/release-management now
renders them from `release-config load`; the agent supplies the facts
it read (the vote-passed label, whether the target exists, the
attestation) as flags and keeps the judgement:

- promote: `verdict` fails closed (no --vote-passed is blocked), keeps
  the trusted-hardware blocker text, and returns handoff-non-pmc when
  only PMC membership is missing. `render` draws the backend block:
  svnpubsub `svn mv` + `svn list` + the final signed tag on the RC's
  commit, github-releases (refusing a draft-tag mismatch until it is
  confirmed), s3 with the bucket parsed from the template, self-hosted
  (refused without a template, now also a Step 0 blocker in
  release-config); plus the hand-off note, convenience publish
  commands and HOLD notes, and the mandatory mirror note.
- announce-draft: `verdict` adds the `promoted` check; `render --step
  2` draws the [ANNOUNCE] subject and body for all four backends, with
  Cc, convenience and skip-wait handling, `canned_body` substitution,
  the @apache.org reminder always present (Golden rule 4) and a warning
  when the Download Page is a dist.apache.org URL; `render --step 3`
  skips the site bump when site_repo is unset, computes scope
  violations as a set difference, and draws the PR title, body and
  `gh pr create --web` line.

Every rendered command quotes its values with the shared shell helpers;
the RC commit SHA and the vote-result URL come from the planning issue,
which is external content.

Each backend, blocker and outcome gets its own file; announce-draft's
site-bump step moves, byte-identical with its generated adversarial
block, to site-bump.md at the skill root. Golden rules, Hard rules and
the JSON contracts are unchanged. promote 6,982 → 4,886 tokens,
announce-draft 6,809 → 5,662.

Evals: the scripted cases become pytest cases named after each former
case; the injection cases and one verdict smoke case per skill stay,
their fixtures now carrying the real tool output.

Also fixes the svnpubsub promote template, whose `\  # comment`
continuation lines broke the pasted command.

Generated-by: Claude Opus 5
Claude-Session: https://claude.ai/code/session_01GTPsZ5aEE5bUVYqp47Dpvv
@potiuk
potiuk force-pushed the perf/release-mgmt-4-promote-announce branch from 170968c to 94c2201 Compare October 14, 2026 08:09
potiuk and others added 2 commits October 14, 2026 09:19
…ring sanitization'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…ring sanitization'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@github-actions github-actions Bot added family:docs Docs, MISSION.md, READMEs substrate:framework-dev Tool substrate: build / validate / eval the framework itself labels Oct 14, 2026
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:docs Docs, MISSION.md, READMEs family:release-management release-* skills family:tools tools/* substrate:framework-dev Tool substrate: build / validate / eval the framework itself 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.

2 participants