Skip to content

Commit b6dde9d

Browse files
Adopt minimal caller concurrency policy
1 parent 305562f commit b6dde9d

6 files changed

Lines changed: 165 additions & 373 deletions

File tree

docs/content/get-started/repository-setup.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ on:
5454

5555
concurrency:
5656
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
57-
cancel-in-progress: false
57+
queue: ${{ github.event_name == 'pull_request' && 'single' || 'max' }}
58+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
5859

5960
permissions:
6061
contents: read
@@ -75,6 +76,10 @@ the pull-request trigger handles CI, prereleases, and prerelease cleanup. See
7576
[Workflow inputs](../reference/workflow-inputs.md) for what each permission is used for, and
7677
[Calling the workflow](../guides/calling-the-workflow.md) for passing test secrets and variables.
7778

79+
The caller-level concurrency block retains production and manual work while replacing obsolete work for the same pull
80+
request. The fallback expression uses the pull-request number for every pull-request action, including `closed`; other
81+
events use their Git ref. Keep its group distinct from the reusable workflow's prefixed group.
82+
7883
## 4. Add the settings file
7984

8085
Create `.github/PSModule.yml`. An empty file is valid — every setting has a default:

docs/content/guides/calling-the-workflow.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ on:
3737

3838
concurrency:
3939
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
40-
cancel-in-progress: false
40+
queue: ${{ github.event_name == 'pull_request' && 'single' || 'max' }}
41+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
4142

4243
permissions:
4344
contents: read
@@ -59,11 +60,10 @@ Stable releases are evaluated from a push to the default branch. A merged pull r
5960
release notes; a direct default-branch push or a manual dispatch uses the default `Patch` bump and commit-based notes.
6061
Keep the `pull_request` trigger for CI, prereleases, and prerelease cleanup.
6162

62-
The concurrency key keeps a pull request distinct from a default-branch push, so the close-event cleanup and the
63-
resulting stable release do not serialize as one run. Keep `cancel-in-progress: false`: a release-capable run mutates
64-
the PowerShell Gallery, GitHub Releases, and tags, so later runs must queue rather than interrupt it.
65-
The reusable workflow uses its own prefixed concurrency group, so it cannot queue behind the caller while the caller
66-
waits for it to finish.
63+
The concurrency key keeps each pull request distinct from the default branch, so a close event interrupts only its own
64+
pull-request activity and does not block the resulting stable release. Pull-request events replace obsolete activity;
65+
all other events, including a manual default-branch release, retain the maximum native queue. The reusable workflow
66+
uses a distinct prefixed concurrency group. Do not give the caller the reusable workflow's group name.
6767

6868
## Passing test data
6969

docs/content/specification/design.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ documented in [Workflow inputs](../reference/workflow-inputs.md).
1919

2020
### Trigger admission
2121

22-
The [workflow trigger design](workflow-triggers/design.md) owns admission before processing: a retained production queue,
23-
replaceable pull-request activity, and protected closure coordination. Concurrency belongs to the reusable entry point,
24-
not to caller templates or individual processing stages. The complete processing call retains its admission slot through
25-
the final enabled stage; closure stops obsolete activity before optional prerelease cleanup.
22+
The [workflow trigger design](workflow-triggers/design.md) owns caller-level admission before processing: a retained
23+
production queue and replaceable pull-request activity. The caller's workflow-level group covers the complete reusable
24+
workflow call through its final enabled stage; the reusable workflow identifies closure and performs optional prerelease
25+
cleanup.
2626

2727
### Composed reusable workflows
2828

docs/content/specification/spec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Versions MUST follow [SemVer 2.0.0](https://semver.org/) (`vMAJOR.MINOR.PATCH` o
6161

6262
### NFR2 — Serialized releases {#nfr2}
6363

64-
Production pipelines MUST execute serially from planning through their final enabled stage, retaining pending work within the platform's maximum queue capacity. Pull-request updates MUST supersede obsolete activity without canceling production or closure cleanup. The [workflow trigger spec](workflow-triggers/spec.md) owns admission, ordering boundaries, and cleanup guarantees.
64+
Production pipelines MUST execute serially from planning through their final enabled stage, retaining pending work within the platform's maximum queue capacity. Pull-request updates MUST supersede obsolete activity without canceling production or work for other pull requests; closing a pull request supersedes its activity. The [workflow trigger spec](workflow-triggers/spec.md) owns admission, ordering boundaries, and cleanup guarantees.
6565

6666
### NFR3 — Single production authority {#nfr3}
6767

0 commit comments

Comments
 (0)