Repository navigation
Description
Problem or Motivation
Child 11 of the ADR modernization (#5233). Decision (owner decision 1). It waits for the owner. Agents change the release workflow only through an ordinary PR such as this one.
The review of each record that this item changes:
- ADR 0013 (supersede after owner decision 1 (release record)): It is in force and mostly true, but it has no options (no rejected release tool reaches the check). 'There is no schedule' contradicts its own 6-hour merge, and that merge merged 0 of 20 runs.
- ADR 0011 (retire): It is superseded by 0012 and then by 0013. No towncrier, version milestone, Release Gate or tag deploy exists. It stays frozen as the evidence record of docs(adr): decide the release model: branches and cuts, versioning and changelog, and testing the release tip #1751, and its rejections go into the release record.
- ADR 0012 (retire): It is superseded by 0013, and it got two notes after the supersession. Its live points move: the squash settings and the release-please keys to the release record, the required checks to the merge-gate record, and its Pages note to Status History.
Proposed Solution & Architectural Design
release-merge.yml runs gh pr merge --auto --squash --match-head-commit after the static guards. A required-job step refuses a release-please head that changes a file outside the 4 release files. hold-release turns auto-merge off. Delete the check and mergeable guards and their tests. A contract test checks that the 3 required jobs never skip on pull_request. If the owner turns on immutable releases: set draft and force-tag-creation, add a publish job, then remove the image grace code. A new record supersedes 0013, with Considered Options, Confirmation and a revisit condition (the action bundles release-please 17.6.0). Prove the fix first with devops ci fail-to-pass.
Owner decision 1 of 2026-11-12: Option A, with immutable releases on. At the 6-hour tick, the job checks the static guards and arms GitHub auto-merge with --match-head-commit. release-please makes a draft and its tag, and a last job publishes the release after the assets and images.
Rules of the ADR process (docs/adr/README.md, #5225) that apply:
- Supersession: the new record sets 'supersedes', and the same PR sets status and 'superseded-by' on the old record. The test fails on a link that goes only one way. The new record restates each rule and each rejected option that still holds, because the alternatives check drops superseded records. Never amend a superseded record. After a third amendment, or when a body contradicts the code, the next change is a supersession.
- Length: the body of a new record has 1,000 words or fewer, its title has 10 words or fewer, and its slug has 60 characters or fewer. Designs, catalogues, row tables, cutover plans, caps and measurements go to OpenSpec changes and specs, to settings or to docs, with a link under More Information.
- Use one Considered Options section. Each bullet ends with 'chosen.', 'rejected, because .' or 'deferred until .'. 'Deferred' does not match the rejected regex (adr.py:49), so the check stops refusing on a premise that changed. Each record has a Confirmation section that names its test, CI row or metric, and an optional tracker key.
- Code, tests and workflows cite the record in force. A test fails on a citation of a superseded record in src/, tests/ and .github/ (archived changes and CHANGELOG.md are history). Each superseding PR moves the citations of the records that it supersedes. Rename sweeps do not change docs/adr/.
- Merge ADR changes in batches. Each change of the ADR set changes adr_hash (alternatives.py:634-644, 1006) and makes every checked item due again. So all pure status changes go in docs(adr): add MADR front matter, a Status History and the ADR rules #5225, and the record PRs merge one at a time in the planned order.
- Keep the fix(roadmap): the ADRs in force fill the alternatives ADR budget #5049 budget test. A new record must fit in the tokens that the records it supersedes free. Short option bullets keep the budget, because options are 6,883 of the 8,464 tokens today.
Keep these constraints on purpose. The review found a reason for each one:
- ADR 0013, agents never merge or label the release PR and never edit release files; the tool derives the version; Argo CD tracks main.
The owner merges this pull request.
Target Subsystem
.github/workflows/release-merge.yml, .github/workflows/release.yml, release-please-config.json, docs/adr/.
Existing Tool Considered
GitHub auto-merge (gh pr merge --auto --squash --match-head-commit), the release-please options draft and force-tag-creation (17.6.0) and GitHub immutable releases. No new tool.
Acceptance Criteria
- The pull request cites its
devops ci fail-to-passrun first: the release-merge job refuses a release pull request whose checks still run before the fix, and arms auto-merge after it. -
release-merge.ymlrunsgh pr merge --auto --squash --match-head-commitafter the static guards. The check and mergeable guards and their tests go. - A required-job step refuses a release-please head that changes a file outside the 4 release files. The label
hold-releaseturns auto-merge off. - A contract test checks that the 3 required jobs never skip on
pull_request. - Immutable releases: release-please sets
draftandforce-tag-creation, a last job publishes the release after the assets and images, and then the image grace code goes. The owner turns on immutable releases after the merge (tracker owner step 1). - A new record supersedes ADR 0013, with Considered Options, Confirmation and a revisit condition (the action bundles release-please 17.6.0).
- The index and link tests of docs(adr): add MADR front matter, a Status History and the ADR rules #5225 pass, and the fix(roadmap): the ADRs in force fill the alternatives ADR budget #5049 budget test passes: the alternatives check fits every record in force under its cap.
Dependencies
- docs(adr): job limits are settings with a soft cap and a hard ceiling #5246
- fix(ci): the duration alarm fires at 360 s and files a P0 issue #5247
Owner decision 1 of 2026-11-12 is made. This item and the alarm item both change ci.yml.
Related
- Tracker: docs(adr): track the ADR modernization #5233. Review source:
docs/adr/at e413c40.
Source: #5233
Alternatives check of 2026-11-29: none.
Tool: none found.
Reason: Searches found auto-merge actions (peter-evans, pascalgn) and release-please, but none supplies the release-file guard, hold-release handling, required-job contract test or ADR supersession; those are repository-specific workflow controls, so no tool covers the need.
Lacks:
- No release-please head guard on the four release files
- No hold-release label that turns auto-merge off
- No required-jobs contract test or ADR supersession record
Proposed design
Problem statement
The release-merge workflow merges the release pull request directly, so the run fails when a required check still runs. The workflow must arm GitHub auto-merge with --match-head-commit after the static guards. The check and mergeable guards in devops_cli.release.merge_candidate must go. A contract test must stop the three required jobs from skipping on pull_request. A new ADR must supersede ADR 0013 and record owner decision 1.
The release workflow already sets draft and force-tag-creation, publishes after the assets and images, and has immutable releases on. The hold-release label stops the scheduled job, but the push-triggered reusable workflow re-arms auto-merge and reads no label. That fix waits on the upstream library and is deferred.
Acceptance criteria
Requirement: Release auto-merge after static guards
The release-merge workflow SHALL run gh pr merge --auto --squash --match-head-commit only after the pick step's static guards pass.
Scenario: Auto-merge waits for static guards
- WHEN
uv run devops ci fail-to-passruns the release-merge job on a release pull request whose static guards pass and whose checks still run before the fix - THEN The command shows the job refuses the pull request before the fix and arms auto-merge after the fix.
Requirement: Redundant release guards removed
devops_cli.release.merge_candidate MUST remove the check guard, the mergeable guard, the checks: read permission and their tests.
Scenario: Release merge arms with a running check and a not-clean merge state
- WHEN
uv run devops ci fail-to-passruns the release-merge job on a release pull request whose static guards pass, whose check still runs, and whose merge state is not clean - THEN The command shows the job arms auto-merge.
Requirement: Hold label stops scheduled auto-merge
The release-merge workflow MUST not arm auto-merge when the release pull request has the label hold-release.
Scenario: Hold label applied at the 6-hour tick
- WHEN
uv run devops ci fail-to-passruns the release-merge job on a release pull request withhold-release - THEN The command shows auto-merge is off.
Requirement: Required jobs never skip on pull_request
The workflow contract test MUST fail when any of the three required jobs can skip on a pull_request event.
Scenario: Required jobs run on a pull request
- WHEN
uv run devops ci fail-to-passruns the contract test on apull_requestevent after the change - THEN The command shows the test fails before the fix and passes after it for
Static Analysis,Tests & CoverageandSemantic PR title.
Requirement: Changed release workflows pass validators
The changed release workflows MUST pass actionlint and zizmor.
Scenario: Workflow validators pass
- WHEN
uv run devops ci --check --only actionlint,zizmorruns on the changed workflows - THEN The command passes.
Requirement: New release record supersedes ADR 0013
A new ADR MUST supersede ADR 0013, record owner decision 1, and become the citation in src/, tests/ and .github/.
Scenario: ADR supersession and citation tests pass
- WHEN
uv run devops ci test tests/invariants/test_adr_records.py tests/invariants/test_adr_superseded_citations.pyruns - THEN The tests pass and show the two-way supersession link, owner decision 1, and no citation of ADR 0013 in
src/,tests/or.github/.
Requirement: New release record content
The new ADR MUST restate each rule and rejected option that still holds, hold the release-please keys and squash settings from ADR 0012, and include Considered Options, Confirmation, a revisit condition and the publish order.
Scenario: ADR content tests pass
- WHEN
uv run devops ci test tests/invariants/test_adr_records.pyruns - THEN The tests pass and show the required sections, the release-please 17.6.0 revisit condition, the publish order, and the release-please keys and squash settings.
Requirement: ADR length and budget
The new ADR MUST stay under the length limits of docs/adr/README.md and fit in the tokens that the records it supersedes free, under CONST_ROADMAP_ALTERNATIVES_MAX_ADR_TOKENS.
Scenario: ADR docs and budget tests pass
- WHEN
uv run devops docs checkanduv run devops ci test tests/roadmap/test_roadmap_adr.py tests/roadmap/test_roadmap_alternatives.pyrun - THEN Both commands pass and the alternatives check fits every record in force under its cap.
Requirement: Pending a person after the merge
The owner SHALL merge the pull request after its checks pass.
Scenario: Owner merges the pull request
- WHEN The owner merges the pull request
- THEN The next release shows the draft release, its tag, and the publish job after the assets and images.
Existing Tool Considered
gh pr merge --auto (GitHub CLI) covers the auto-merge, and release-please 17.6.0 covers draft and force-tag-creation; GitHub immutable releases cover immutability. The alternatives check of 2026-11-29 found no tool for the release-file guard, the hold-release label, the required-jobs contract test, or the ADR supersession, and its block lists those lacks. The release-file guard already exists in src/devops_cli/release/release_files.py. The repository builds the remaining small controls itself: about 1,000 tokens to write, 500 tokens to keep and fix, and under one day.
Key questions
- Which release auto-merge option did the owner choose?: Option A, with immutable releases on. The 6-hour job checks the static guards and arms GitHub auto-merge with
--match-head-commit. release-please makes a draft and its tag, and a last job publishes the release after the assets and images. (best practice) [sources: RELEASE_CYCLE.md:3, RELEASE_CYCLE.md:62, RELEASE_CYCLE.md:64]- Chosen: Option A, with immutable releases on. Owner decision 1 of 2026-11-12 records this option in the issue body.
- Rejected: Keep the current guards and mutable releases. The owner decision replaces this option.
- Should the release-merge workflow arm auto-merge after the static guards and remove the check and mergeable guards?: Yes.
release-merge.ymlrunsgh pr merge --auto --squash --match-head-commitafter the pick step.devops_cli.release.merge_candidateremoves the check and mergeable guards, thechecks: readpermission and their tests. (best practice) [sources: .github/workflows/release-merge.yml:75-84, src/devops_cli/release/merge_candidate.py:142-145, src/devops_cli/release/merge_candidate.py:164-180, openspec/specs/release-scheduled-merge/spec.md:16, openspec/specs/release-scheduled-merge/spec.md:30, openspec/specs/release-scheduled-merge/spec.md:43-48]- Chosen: Arm auto-merge and remove the guards. The required checks gate the merge, and
--autowaits for them without a failed run. - Rejected: Keep the check and mergeable guards. They duplicate the required checks and fail a run while a check still runs.
- Chosen: Arm auto-merge and remove the guards. The required checks gate the merge, and
- Should a required-job step refuse a release-please head that changes a file outside the four release files?: Yes. The
Tests on Mainjob already runspython -m devops_cli.release.release_filesfrom the base commit and refuses such a head. No new step is needed. (best practice) [sources: .github/workflows/ci.yml:359-403, src/devops_cli/release/release_files.py:16, tests/release/test_release_files.py:1]- Chosen: Keep the existing
Tests on Mainstep. It already reads the compare of the base commit and the head, and it refuses a fifth file. - Rejected: Add a second release-file guard. It duplicates the
Tests on Mainstep and adds no protection.
- Chosen: Keep the existing
- Should the workflow contract test require that the three required jobs never skip on
pull_request?: Yes. Add the check totests/invariants/test_workflow_contracts.pyforStatic Analysis,Tests & CoverageandSemantic PR title. (best practice) [sources: .github/workflows/ci.yml:50-51, .github/workflows/ci.yml:253-255, .github/workflows/pr-checks.yml:37-39, docs/adr/0043-required-checks-and-main-ruleset-gate-merges.md:42]- Chosen: Add the contract test. A skipped job reports success, so the ruleset cannot see that the required check did not run.
- Rejected: Rely on the ruleset alone. The ruleset cannot see a job that skips before it reports.
- Should immutable releases use release-please
draftandforce-tag-creation, with the publish job after the assets and images?: Yes. The repository already setsdraftandforce-tag-creationinrelease-please-config.json, andpublish.ymlruns theassetsjob after each image job. Immutable releases are on. No change is needed. (best practice) [sources: release-please-config.json:8-9, .github/workflows/publish.yml:43-48, RELEASE_CYCLE.md:62-64]- Chosen: Keep the draft release and the publish order. The
assetsjob waits for each image job, so the release publishes after the assets and images. - Rejected: Publish as soon as release-please creates the release. It would publish before the assets and images are ready.
- Chosen: Keep the draft release and the publish order. The
- Should a new ADR supersede ADR 0013 instead of amending it?: Yes. A new record supersedes ADR 0013. It restates each rule and rejected option that still holds, with Considered Options, Confirmation, a revisit condition, and the publish order. (best practice) [sources: docs/adr/README.md:64-71, docs/adr/0013-releases-use-release-please-as-it-ships-and-agents-stay-out.md:44, docs/adr/0043-required-checks-and-main-ruleset-gate-merges.md:7]
- Chosen: Supersede ADR 0013. The body contradicts the code and ADR 0013 has no Considered Options section, so the ADR process requires a supersession.
- Rejected: Amend ADR 0013 in place. The ADR process forbids an edit of the body of an accepted record and requires a supersession after a contradiction.
- Should the new record keep the ADR token budget?: Yes. The new record must fit in the tokens that the records it supersedes free, under
CONST_ROADMAP_ALTERNATIVES_MAX_ADR_TOKENS, which is 10,700 tokens. The README line 77 still says 8,192 tokens; correct it to 10,700 in the same pull request. (best practice) [sources: docs/adr/README.md:73-77, src/devops_cli/config/constants.py:3993-3997, src/devops_cli/roadmap/alternatives.py:1782]- Chosen: Keep the budget test. The alternatives check drops records that exceed the cap, so the new record must fit.
- Rejected: Remove the budget test. The check would then drop a record that the project needs in force.
- Should the release workflow read the
hold-releaselabel before it arms auto-merge?: Yes, but the step is in the reusable workflow ofdan-petty/github-workflowsat v0.5.1, and this repository must not editrelease.ymlby hand. Defer the fix until the upstream library reads the label and this repository updates the pin. (best practice) [sources: RELEASE_CYCLE.md:20, RELEASE_CYCLE.md:56, .github/workflows/release.yml:28, .copier-answers.yml:2]- Chosen: Wait for the upstream library to read the label. The push run re-arms auto-merge after a local disable, so only the upstream step can keep the label held.
- Rejected: Add a repository workflow that disables auto-merge on the label. The next push to
mainturns auto-merge on again.
Fit
Fits in one pull request.
Suspected block
None.
Activity
dan-petty commentedon Nov 12, 2026
Both automate the 6-hour release PR merge, but the candidate adds auto-merge arming, immutable releases, and the ADR 0013 supersession record that #3921 does not include.devops-cli-service commentedon Nov 17, 2026
Refine cannot set this item to Ready at 8cf9935 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.
devops-cli-service commentedon Nov 19, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (9)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 27, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.
dan-petty commentedon Nov 27, 2026
PR #7463 (issue #7444) delivers one step of owner decision 1: the job
Upload Release Assetsofrelease.ymlnow needs each image job, so it publishes the release only after each image has its release tag.Two steps of this item stay open:
release_comments(CONST_ROADMAP_RELEASE_IMAGE_GRACE_MINUTES,src/devops_cli/roadmap/release_roll.py) can go after a real release showspublished_atlater than eachAttest & Tagjob.devops-cli-service commentedon Nov 27, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.
dan-petty commentedon Dec 1, 2026
From the source on
mainon 2026-11-30: the step "Enable auto-merge on the release pull request" of.github/workflows/release.ymlrunsgh pr merge --auto --squashfor each update of the release pull request and reads no label. So the labelhold-releasedoes not hold a release: the next push tomainturns auto-merge on again. This is a reading of the code; no run showed it.devops-cli-service commentedon Dec 1, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.