Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 54 additions & 22 deletions .abcd/development/release-gate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,61 @@ Design of record: [`../plans/2026-07-11-iss35-semantic-release-gate.md`](../plan
## Deterministic gates (CI-enforced)

The [`release.yml`](../../../.github/workflows/release.yml) `verify` job runs
these, in order, on Linux (`ubuntu-latest`); `ci.yml`'s `check` job gates the
merge on Linux as well. `release.yml` is authoritative; this list is the
human-readable mirror. The macOS suite runs beside `verify` on the same commit
(see *The macOS gate* below).

1. Format (gofmt)
2. Build
3. Vet
4. Test
5. Test (race, internal)
6. Record-lint (design-record drift gate)
7. Docs-lint (docs-currency gate)
8. Reviews-charter discipline (RD001-RD004)
9. Smoke every command (self-discovering harness)
10. Plugin archive reproduces the committed pin (fail-closed)
11. The release tag names the released CHANGELOG version (fail-closed)

Gate 11 runs on a real release only too: it refuses unless the release tag is
these, in order, on Linux (`ubuntu-latest`). `release.yml` is authoritative;
this list is the human-readable mirror. The macOS suite runs beside `verify` on
the same commit (see *The macOS gate* below).

1. Merge queue check passed on the released commit (fail-closed)
2. Record-lint (design-record drift gate)
3. Docs-lint (docs-currency gate)
4. Reviews-charter discipline (RD001-RD004)
5. Plugin archive reproduces the committed pin (fail-closed)
6. The release tag names the released CHANGELOG version (fail-closed)

`verify` runs no Linux test of its own. The merge queue already ran `ci.yml`'s
`check (ubuntu-latest)` job (format, build, vet, the plain and race passes) on
exactly the commit a release cuts, because the queue merges the commit it
tested, and its required `smoke` check ran beside it. Running them again cost 55
to 85 Linux minutes a release attempt, and the only `verify` failures in a month
were flaky tests on trees the queue had passed (iss-2612031238180751). Gate 1
reads that check instead, with the job token's `checks: read` and `actions:
read`, and admits the commit only when a check run named `check (ubuntu-latest)`,
in its latest attempt, completed with success, made by GitHub Actions, in a
check suite of this repository at the released commit, owned by a workflow run
of `.github/workflows/ci.yml` that the `merge_group` event started — and only
when that run's own latest jobs list a job of that name, on that commit,
completed with success, whose check run is that same check run. The second read
is the binding: any token holding `checks: write`, which a workflow pushed on a
branch can grant itself, can create a check run of that name and outcome on the
commit, but a check run made through the Checks API is never a job of the run.
A pull-request or dispatched run, another workflow file, another repository or
commit, a check or job that failed, was skipped or has not finished, a check run
no job of the run stands behind, a read that fails, and a commit with no such
run all refuse, before anything is checked out. A commit that never went
through the queue is the last case: a rehearsal dispatched on a branch head is
refused here by design, and one dispatched on the default branch's tip, which
the queue tested, passes. The refusal tags nothing; land the change through the
queue, and its push starts the release again.

Gate 1 also refuses a commit carrying more than 100 GitHub Actions check suites,
more than its one read lists, rather than guess at the rest. It fails closed, so
the cost is availability: nightly and dispatched runs pile up on a default-branch
tip that does not move, so a late re-release of an old tag can meet it.

Gate 1 reads `check (ubuntu-latest)` alone. That smoke ran on the released
commit rests on the ruleset, not on this gate: the queue merges a commit only
once every required check passed, and `smoke` is one of them
(`.abcd/work/rulesets/main-protection.json`). A ruleset change that drops `smoke`
from the required list, or adds a bypass actor, would let a commit whose smoke
never passed reach a release with nothing here noticing.

Gate 6 runs on a real release only too: it refuses unless the release tag is
`v` plus the version `record-lint --released-version` reads from the released
tree, the reader the semantic receipts are bound with. Gate 10 refuses such a
tag first on this repository's own release; gate 11 is the check a scaffolded
tree, the reader the semantic receipts are bound with. Gate 5 refuses such a
tag first on this repository's own release; gate 6 is the check a scaffolded
repository, which has no archive gate, relies on (iss-2609251945586202).

Gate 10 runs on a real release only (a rehearsal has no release tag to bind). It
Gate 5 runs on a real release only (a rehearsal has no release tag to bind). It
re-renders the release's plugin archive from the tagged commit and refuses unless
its SHA-256 is the one the ship pinned in `.claude-plugin/marketplace.json`
([adr-2609231048308186](../decisions/adrs/2609231048308186-the-catalog-pins-the-latest-release-s.md)).
Expand Down Expand Up @@ -108,7 +139,8 @@ repository pays for each macOS minute.

## Enforced at merge only

`verify` is a subset of what CI enforces at merge, not a substitute for it: the
`verify` reads one of the merge gate's checks and does not repeat it, and the
rest of what CI enforces at merge it does not re-check at all: the
merge gate additionally runs the issue-resolution gate (RS001-RS003 plus its
cases), the site-render gate, secret scanning, the workflow audit, dependency
review, `govulncheck`, the attribution gate and the external review. The macOS
Expand Down
2 changes: 1 addition & 1 deletion .abcd/record-lint.json
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@
"Set up Go",
"Semantic-gate receipts (fail-closed, before tag)"
],
"min_gates": 9
"min_gates": 6
},
"forbidden_synonyms": {
"enabled": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
schema_version: 1
id: "iss-2612031238180751"
slug: "the-release-workflow-s-verify-job"
severity: "minor"
category: "process"
source: "user-observation"
found_during: "manual-capture"
origin: researcher-authored
production_mode: hand-written
found_at: ".github/workflows/release.yml"
remedy: "Cut verify to its release-specific steps and, in place of the tests, require a successful check (ubuntu-latest) check run from a merge_group run of .github/workflows/ci.yml on this repository at the released sha, read in one GraphQL call with read-only scopes, refusing a sha with no such run"
resolution: "release.yml's verify job no longer runs the tests: its first step requires a successful check (ubuntu-latest) from a merge_group run of .github/workflows/ci.yml on this repository at the released commit, read in one GraphQL call with checks: read and actions: read, and refuses any other; the rest of verify is the release-specific gates"
impact: internal
---

The release workflow's verify job re-runs the merge queue's tests on the commit the queue already passed: lab 8 (R2) found every release run since 1 Nov ran on a head sha whose merge_group ci run had passed, verify repeating the race step, build, vet and smoke plus a plain go test on a cacheless runner, 55 to 85 Linux minutes per attempt, and all four verify failures in the window were flakes on trees the queue had passed; v0.17.1 lost three runs to them
7 changes: 6 additions & 1 deletion .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,10 @@ jobs:
# transitive: release.yml in turn calls site.yml (adr-48), so this job hands
# down every scope BOTH workflows' jobs need (contents/id-token/attestations:
# write). The three happen to be the same set, so the site deploy widens
# nothing here.
# nothing here. The two read scopes are verify's alone: its first step reads
# the merge queue's check on the released commit (iss-2612031238180751), and
# a called job asking for a scope its caller withholds fails the whole run
# before any job starts.
release:
needs: detect
# Run when a release is needed: a fresh version (need_tag, so release.yml
Expand All @@ -160,6 +163,8 @@ jobs:
contents: write # release.yml: push the new tag after verify, create the draft Release; site.yml: attach site.tar.gz and publish the Release
id-token: write # release.yml + site.yml: OIDC for build-provenance attestation
attestations: write # release.yml: publish + read back the attestations; site.yml: attest site.tar.gz
checks: read # release.yml verify: the released commit's check suites and check runs
actions: read # release.yml verify: the workflow run that owns each suite (its event and file)
uses: ./.github/workflows/release.yml
with:
tag: v${{ needs.detect.outputs.version }}
Expand Down
Loading
Loading