Skip to content

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:

  1. Release-please step identification. Any step whose uses: starts with googleapis/release-please-action@ or google-github-actions/release-please-action@ is evaluated.
  2. Token expression. with.token must 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.
  3. App token step placement. An earlier step in the same job must declare id: <id> and uses: starting with actions/create-github-app-token@. Referencing a step in another job or a later step in the same job is refused.
  4. Unconditional execution. The app-token step must have no if: condition and no continue-on-error:. A skipped or forgiven token step yields an empty token, causing release-please to silently fall back to github.token.
  5. Secret and App identifiers. The app-token step's with.private-key must be a single ${{ secrets.<NAME> }} expression. The step must also set client-id or app-id to a non-empty value.
  6. Skip condition. A repository with no release-please step 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:

[SKIP] Release token not checked: no workflow under .github/workflows holds a release-please step.

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:

{
  "skip-github-release": true,
  "packages": {
    ".": {}
  }
}

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 in E2E-Test: <id> commit trailers.
  • since: baseline commit SHA. Commits reachable from since are exempt from the check.

How commits are judged

  1. When .standards.yaml does not declare release.e2e, the gate prints [SKIP] Release end-to-end evidence not checked: release.e2e not declared. and succeeds.
  2. 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.
  3. The gate resolves the most recent reachable tag matching v[0-9]* via git describe --tags --abbrev=0 --match v[0-9]*. When git describe reports no reachable matching tag (No names found or cannot 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.
  4. Non-merge commits in <tag>..HEAD (excluding commits reachable from release.e2e.since) with Conventional Commit type feat or fix (with optional (scope) and !) are inspected. Other commit types (chore, docs, refactor, etc.) are ignored.
  5. A feat or fix commit satisfies the gate when at least one changed path matches release.e2e.paths or its commit message carries an E2E-Test: <id> trailer whose <id> is listed in release.e2e.tests. An E2E-Test: <id> trailer naming an undeclared identifier produces a finding naming that identifier.
  6. In release context (praetorctl audit --release, PRAETOR_RELEASE_PR=true, or GITHUB_HEAD_REF starting with release-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.
  7. During praetorctl adopt (internal/adopt/release_e2e.go), repositories with a release-please configuration or a version-tag release workflow receive release.e2e.since set to HEAD at adoption time. When HEAD cannot be resolved, adoption omits release.e2e and 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_restore
  • library-client: unit, integration
  • web-package: unit, e2e, a11y
  • native-gpu-systems: unit, integration
  • container-image, gitops-infra, os-image: smoke
  • framework, 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 by paths.
  • job: optional GitHub Actions workflow job ID or display name under .github/workflows/.
  • run: optional command substring matched against run: steps of executable workflow jobs (ghworkflow.RunSteps).
  • When release.test_levels is 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

  1. Static binding. For every required or declared level, the gate checks that at least one tracked file matches paths (and pattern when set) and that at least one workflow job under .github/workflows/ without a constant-false condition (ghworkflow.NeverRuns) matches job or run.
  2. Release commit CI. With --release, every level with a runnable workflow requires a completed successful run on the configured default branch whose head_sha equals the checked-out commit (HEAD), plus a successful record for the matched job in that run (WorkflowRunHistory and WorkflowRunJobs in internal/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).
  3. Ratchet (RELEASE-TEST-LEVEL). Existing level gaps recorded during praetorctl adopt in .standards-baseline.json under rule RELEASE-TEST-LEVEL (anchor level:<profile>:<level>) are shrink-only (baseline.CheckReleaseTestLevelsSubset); these static baselines cannot waive missing or failed release CI evidence: praetorctl baseline --record and praetorctl audit --base refuse any new RELEASE-TEST-LEVEL anchor not already present on the default branch's baseline.
  4. Enforcement context. In release context (--release, PRAETOR_RELEASE_PR=true, GITHUB_HEAD_REF starting with release-please--, or refs/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.