Release-token gate
When GitHub Actions opens a pull request using the workflow's default github.token or secrets.GITHUB_TOKEN, GitHub does not emit new workflow trigger events for that pull request. A release pull request opened by release-please under the default workflow token therefore sits without required status checks, unable to trigger CI verification.
The release-token gate fails any workflow step invoking release-please that does not source its token from a dedicated GitHub App token step. The gate is adopt.AuditReleaseToken in internal/adopt/release_token_audit.go over the measurement in internal/forge/release_token.go. Both praetorctl audit and the MCP tool standards_audit run it.
Quick start
Passing shape
Mint a GitHub App installation token in an earlier step of the same job, and pass its output token to release-please:
jobs:
release:
runs-on: ubuntu-26.04
steps:
- name: Mint the release token
id: app-token
uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
with:
client-id: ${{ vars.RELEASE_APP_CLIENT_ID }}
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
- uses: googleapis/release-please-action@v4
with:
token: ${{ steps.app-token.outputs.token }}
Exceptions
If a repository cannot immediately adopt a GitHub App token, declare an entry in .standards.yaml under exceptions:. The gate enforces category C (a fixed 10-day rectification interval):
exceptions:
- rule: "release-token"
path: ".github/workflows/release.yml"
category: "C"
entered: "2026-10-18"
expires: "2026-10-28"
reason: "GitHub App creation underway; awaiting organization administrator approval"
The entry excuses every release-please step in the named workflow. A live entry passes and prints the workflow findings with its reason and expiry. An expired entry fails like a missing one. An entry naming a workflow with no findings is stale and fails until removed.
What the gate reads
Every workflow document under .github/workflows is parsed and checked:
- Release-please step identification. Any step whose
uses:starts withgoogleapis/release-please-action@orgoogle-github-actions/release-please-action@is evaluated. - Token expression.
with.tokenmust be exactly one${{ steps.<id>.outputs.token }}expression (whitespace inside braces allowed). It must not contain||fallbacks or surrounding text. Default tokens (${{ github.token }}or${{ secrets.GITHUB_TOKEN }}) are refused. - App token step placement. An earlier step in the same job must declare
id: <id>anduses:starting withactions/create-github-app-token@. Referencing a step in another job or a later step in the same job is refused. - Unconditional execution. The app-token step must have no
if:condition and nocontinue-on-error:. A skipped or forgiven token step yields an empty token, causingrelease-pleaseto silently fall back togithub.token. - Secret and App identifiers. The app-token step's
with.private-keymust be a single${{ secrets.<NAME> }}expression. The step must also setclient-idorapp-idto a non-empty value. - Skip condition. A repository with no
release-pleasestep skips the gate with a[SKIP]report.
Reading the output
A failure names each workflow, job, step, and line where known:
[FAIL] Release token: .github/workflows/release.yml:14: job release, step "release-please": takes the workflow token (github.token or secrets.GITHUB_TOKEN), which starts no checks on its release pull request.
[FAIL] Release token: no live exceptions entry declares the steps above; give each a token from an actions/create-github-app-token step (docs/guides/release-token.md), or, for a step that cannot yet, declare its workflow in the exceptions list of .standards.yaml (rule release-token, path .github/workflows/<workflow>, category C, a reason, and an expiry at most 10 days ahead).
A pass reports the evaluated steps:
[PASS] Release token: 1 release-please step takes token from a GitHub App token step.
Read from the workflow files under .github/workflows; no release pull request was checked on the forge.
When no workflow invokes release-please, the gate skips:
Repository-owned release publisher (release-own-publisher)
When a repository builds and publishes its own release assets, set "skip-github-release": true in its release-please configuration:
The release-own-publisher check runs through adopt.AuditReleaseToken, shared by the CLI and MCP audits. Its implementation is internal/adopt/release_own_publisher.go; publisher detection reuses the bounded workflow and shell readers in internal/forge/release_publisher.go. It checks release-please-config.json and .github/release-please-config.json; the corresponding .release-please-manifest.json paths also identify release-please repositories, but a version manifest alone cannot declare the skip setting.
A publishing workflow has an executable step using jellysin/release-helper/actions/publish, softprops/action-gh-release, ncipollo/release-action or actions/create-release, or running gh release create, gh release upload or gh release edit --draft=false. A goreleaser/goreleaser-action step publishes when GoReleaser runs its release command: args starting with release, with only flags, or empty (GoReleaser runs release when no subcommand is given). It does not count with install-only: true, another subcommand such as build, a lone --version or --help, --snapshot, or a --skip list that names publish. Action references may use any version or commit. Comments, printed commands and steps or jobs with a constant-false condition do not count. Every configured package must resolve either skip-github-release to true, or both draft and force-tag-creation to true. The latter creates a draft release and its tag for the repository-owned publisher to publish. Each package value takes precedence over the top-level default; packages may use different accepted forms. Without a publisher or release-please configuration, this check skips with a stated reason. internal/adopt/release_own_publisher_test.go exercises these cases through the shared audit entry point.
Failures identify the configuration, publishing workflows and corrective setting:
[FAIL] release-own-publisher: release-please-config.json: package "." resolves neither skip-github-release nor draft with force-tag-creation to true; publishing workflow(s): .github/workflows/release.yml; set "skip-github-release": true or both "draft": true and "force-tag-creation": true at the top level or on every package in release-please-config.json (including package overrides)
This prevents release-please from publishing immediately after its release pull request merges, before the repository's publisher attaches the built and signed assets. With immutable releases, publication locks release assets and the tag; the repository's workflow must finish uploading assets to its draft before publishing.
Release end-to-end test evidence gate (release.e2e)
Both praetorctl audit (cmd/standardsctl/audit_release_e2e.go) and the MCP tool standards_audit (cmd/standards-mcp/audit_tools.go) also run the release end-to-end evidence gate (release.AuditE2E and release.Judge in internal/release/e2e_gate.go, order engine-release-feature-e2e-gate-20261027).
Configuration in .standards.yaml
Configure release.e2e in .standards.yaml (internal/config/release_policy.go):
release:
e2e:
paths:
- "e2e/**"
- "tests/e2e/**"
- "test/e2e/**"
- "**/*_e2e_test.go"
- "**/*.e2e.ts"
- "**/*.e2e.js"
- "playwright/**"
- "cypress/**"
tests:
- "login-flow"
since: "a1b2c3d4e5f60123456789abcdef0123456789ab"
paths: repository-relative slash globs matching end-to-end test files. When omitted or empty, the built-in default list above applies (config.DefaultReleaseE2EPaths).tests: declared end-to-end test identifiers accepted inE2E-Test: <id>commit trailers.since: baseline commit SHA. Commits reachable fromsinceare exempt from the check.
How commits are judged
- When
.standards.yamldoes not declarerelease.e2e, the gate prints[SKIP] Release end-to-end evidence not checked: release.e2e not declared.and succeeds. - Before inspecting tags, the gate runs
git rev-parse --is-shallow-repository. When the checkout is shallow, release context fails with[FAIL] Release end-to-end evidence check failed: shallow history: repository history is shallow; checkout needs fetch-depth 0, and non-release context prints a[SKIP]line naming the shallow history. - The gate resolves the most recent reachable tag matching
v[0-9]*viagit describe --tags --abbrev=0 --match v[0-9]*. Whengit describereports no reachable matching tag (No names foundorcannot describe), the gate prints[SKIP] Release end-to-end evidence not checked: no release tag matching v[0-9]* is reachable from HEAD.Any other git failure fails the check closed naming the subcommand and stderr. - Non-merge commits in
<tag>..HEAD(excluding commits reachable fromrelease.e2e.since) with Conventional Commit typefeatorfix(with optional(scope)and!) are inspected. Other commit types (chore,docs,refactor, etc.) are ignored. - A
featorfixcommit satisfies the gate when at least one changed path matchesrelease.e2e.pathsor its commit message carries anE2E-Test: <id>trailer whose<id>is listed inrelease.e2e.tests. AnE2E-Test: <id>trailer naming an undeclared identifier produces a finding naming that identifier. - In release context (
praetorctl audit --release,PRAETOR_RELEASE_PR=true, orGITHUB_HEAD_REFstarting withrelease-please--), each finding prints[FAIL] Release end-to-end evidence: <sha12> (<subject>): <reason>and fails the audit. Outside release context, findings print[WARN]lines and the audit passes. - During
praetorctl adopt(internal/adopt/release_e2e.go), repositories with arelease-pleaseconfiguration or a version-tag release workflow receiverelease.e2e.sinceset toHEADat adoption time. WhenHEADcannot be resolved, adoption omitsrelease.e2eand records a warning naming the resolution error.
Release test levels gate (release.test_levels)
Both praetorctl audit (cmd/standardsctl/audit_release_e2e.go) and the MCP tool standards_audit (cmd/standards-mcp/audit_tools.go) run the release test levels gate (release.AuditTestLevels in internal/release/test_levels_gate.go, #1733).
Archetype defaults
Each profile under .config/archetypes/<profile>.yaml declares its default release_test_levels list (internal/config/archetype.go):
app-service:unit,integration,e2e,load_soak,recovery_restorelibrary-client:unit,integrationweb-package:unit,e2e,a11ynative-gpu-systems:unit,integrationcontainer-image,gitops-infra,os-image:smokeframework,org-health,planning-artifacts,template-seed,upstream-fork,pages-site,closed-private: none
A repository's required test levels are the union of release_test_levels across the profiles of its resolved flavor (HISSProfile plus AlsoImplements via flavor.ResolveTargets / flavor.ResolveForProfile) and its declared profiles. For example, a go-service repository (framework + app-service) inherits the app-service levels, and a go-library repository (framework + library-client) inherits unit and integration.
Test level configuration in .standards.yaml
Configure release.test_levels in .standards.yaml (internal/config/release_policy.go) to bind levels to repository test files and workflow jobs or to add additional required levels:
release:
test_levels:
unit:
paths:
- "**/*_test.go"
job: "test"
run: "go test"
integration:
paths:
- "tests/integration/**"
- "**/*_integration_test.go"
pattern: "TestIntegration"
job: "integration"
run: "go test -tags=integration"
paths: non-empty list of repository-relative slash globs matching tracked test files for the level.pattern: optional regular expression matched against the content of files matched bypaths.job: optional GitHub Actions workflow job ID or display name under.github/workflows/.run: optional command substring matched againstrun:steps of executable workflow jobs (ghworkflow.RunSteps).- When
release.test_levelsis declared in.standards.yaml, it must include every level required by the repository's effective profiles (ReleasePolicy.ValidateForProfiles). The release test levels gate checks this with the resolved flavor profiles and the repository's own.config/archetypes, so a dropped level fails the gate; loading the manifest checks only the block's shape.
Verification, live run health, and baseline ratchet
- Static binding. For every required or declared level, the gate checks that at least one tracked file matches
paths(andpatternwhen set) and that at least one workflow job under.github/workflows/without a constant-false condition (ghworkflow.NeverRuns) matchesjoborrun. - Release commit CI. With
--release, every level with a runnable workflow requires a completed successful run on the configured default branch whosehead_shaequals the checked-out commit (HEAD), plus a successful record for the matched job in that run (WorkflowRunHistoryandWorkflowRunJobsininternal/forge/actions_state.go). The newest completed run for that exact commit is checked; a healthy run for another commit, a missing job, or a skipped or failed job cannot satisfy the level. Release mode fails closed without live forge access, without a release commit, or when either read fails. The report names the release commit CI path and the refusal cause. Outside--release, the existing default-branch workflow-health audit remains advisory when offline and reports"live run health unmeasured"; scheduled workflows retain their default-branch health check (internal/release/test_levels_gate_test.go). - Ratchet (
RELEASE-TEST-LEVEL). Existing level gaps recorded duringpraetorctl adoptin.standards-baseline.jsonunder ruleRELEASE-TEST-LEVEL(anchorlevel:<profile>:<level>) are shrink-only (baseline.CheckReleaseTestLevelsSubset); these static baselines cannot waive missing or failed release CI evidence:praetorctl baseline --recordandpraetorctl audit --baserefuse any newRELEASE-TEST-LEVELanchor not already present on the default branch's baseline. - Enforcement context. In release context (
--release,PRAETOR_RELEASE_PR=true,GITHUB_HEAD_REFstarting withrelease-please--, orrefs/tags/v*), an unbaselined gap prints[FAIL] Release test levels:and returns a non-nil error. Outside release context, unbaselined gaps print[WARN] Release test levels:and do not fail the audit.