From 3161f845f88bc6e2b8b58879363525558f8ab3a4 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Mon, 9 Nov 2026 08:31:58 -0800 Subject: [PATCH 1/2] Scope the Publisher Group to Its Ref and Name the Aggregator by Event publish-release.yml takes the ref-scoped group WORKFLOW.md D7.1 requires, with the run-id suffix for a push the plan does not publish, matching the hub's catalog publisher snippet and publish-plan-task.yml's actor allowlist. test-pull-request.yml's aggregator posts the ruleset-bound name only on a pull_request run, per D1.5, so a push or dispatch run on a pull request's head cannot satisfy the required check. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/publish-release.yml | 6 +++--- .github/workflows/test-pull-request.yml | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 1f3060f..c3e080f 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -25,10 +25,10 @@ on: - 'Directory.Packages.props' workflow_dispatch: -# The group is ref-independent so concurrent publishes serialize. -# The cancel-in-progress setting is false so a publish is never cancelled mid-release, which would leave a half-created GitHub release or a partial NuGet push. +# GOVERNANCE.md "Workflow YAML Conventions" Concurrency exception (2). +# The expression must track publish-plan-task.yml's push rule and actor allowlist. concurrency: - group: ${{ github.workflow }} + group: ${{ github.workflow }}-${{ github.ref }}${{ github.event_name == 'push' && (github.ref != 'refs/heads/main' || (github.actor != 'ptr727-codegen[bot]' && github.actor != 'dependabot[bot]')) && format('-{0}', github.run_id) || '' }} cancel-in-progress: false # GITHUB_TOKEN gets no scope by default, and each job below grants only what it writes with. diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index 22833ae..ea52596 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -92,9 +92,10 @@ jobs: # Single required status check. # Its name is the ruleset-bound context, so do not rename it without updating the ruleset in lockstep. + # A push or dispatch run takes another name, so only the pull request's own run can post that context on its head. # It treats a skipped smoke build, meaning an unchanged target, as a pass, and blocks on failure or cancelled (D1.5, D7.4). check-workflow-status: - name: Check pull request workflow status job + name: ${{ github.event_name == 'pull_request' && 'Check pull request workflow status job' || 'Check workflow status job' }} runs-on: ubuntu-latest needs: [changes, validate, smoke-build] if: always() From f2e075ea06ad85eac94612c11df84c87e1084a7d Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Mon, 9 Nov 2026 09:28:44 -0800 Subject: [PATCH 2/2] Cite the Merge-Bot and Codegen Concurrency Exceptions by Number GOVERNANCE.md's Concurrency rule has each documented exception cited by number above its concurrency key rather than restated. That matches the hub's catalog snippets for both workflows. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/merge-bot-pull-request.yml | 3 +-- .github/workflows/run-periodic-codegen-pull-request.yml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/merge-bot-pull-request.yml b/.github/workflows/merge-bot-pull-request.yml index ec0d06c..49170f5 100644 --- a/.github/workflows/merge-bot-pull-request.yml +++ b/.github/workflows/merge-bot-pull-request.yml @@ -6,8 +6,7 @@ on: pull_request_target: types: [opened, reopened, synchronize] -# Concurrency keys on the PR number rather than on github.ref, which under pull_request_target is the base branch and would serialize every bot PR against it, so each PR queues independently. -# The cancel-in-progress setting is false so a follow-up synchronize does not cancel an in-flight opened run before it enables auto-merge. +# GOVERNANCE.md "Workflow YAML Conventions" Concurrency exception (1). concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number }} cancel-in-progress: false diff --git a/.github/workflows/run-periodic-codegen-pull-request.yml b/.github/workflows/run-periodic-codegen-pull-request.yml index e36f2ea..bbe392d 100644 --- a/.github/workflows/run-periodic-codegen-pull-request.yml +++ b/.github/workflows/run-periodic-codegen-pull-request.yml @@ -10,8 +10,7 @@ on: schedule: - cron: '0 4 * * *' -# Workflow-only group, with no github.ref, because the task writes to the fixed codegen-main and codegen-develop branches regardless of the triggering ref. -# A dispatch and the scheduled run must therefore not race on them. +# GOVERNANCE.md "Workflow YAML Conventions" Concurrency exception (5). concurrency: group: ${{ github.workflow }} cancel-in-progress: true