You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reusable workflow exports only the declared entries to module-local test setup, tests, and teardown. Callers omit
136
+
`TestData` when no module-local test data is required.
137
+
132
138
This YAML is a recommendation derived from the v8 interface and fleet evidence. It is not an approved standard.
133
139
Issue [#514](https://github.com/PSModule/Process-PSModule/issues/514) must record agreement on the following structural
134
140
decisions before canonical guides, templates, or consumer workflows adopt it:
135
141
136
142
| Decision | Candidate | Alternatives still open |
137
143
| --- | --- | --- |
138
-
| Wrapper scope | Exactly one conforming Process-PSModule reusable-workflow call job plus the shared top-level controls that govern it. Repository-owned jobs may coexist in the same file or separate workflows when they do not weaken or bypass that boundary. | Decide only the placement of repository-owned jobs. |
144
+
| Contract scope | Standardize the `Process-PSModule` caller job and its shared workflow controls, not every job in the file. | Selected for the candidate; repository-owned jobs remain outside the caller contract. |
139
145
| Trigger ownership | The caller owns manual, schedule, default-branch push, and pull-request triggers. | Move some trigger policy into separate workflows or omit selected event classes. |
140
146
| Pull-request activities | Keep all six listed activity types. | Reduce the activity list if a v8 behavior is intentionally unsupported. |
141
-
| Concurrency | Use the PR-number-or-ref key and cancel only superseded pull-request runs. | Use separate groups per event class or disable cancellation for all runs. |
142
-
| Permissions | Set top-level permissions to empty and grant only `contents: read`, `pages: write`, and `id-token: write` to the caller job. | Define a narrower profile for repositories that do not publish Pages. |
143
-
| Fork behavior | Invoke the reusable workflow unconditionally; Plan classifies normal fork `pull_request` events into restricted read-only validation and rejects `pull_request_target` until separately designed. | Omit fork validation or design a separate `pull_request_target` trust boundary. |
144
-
| Credentials | Explicitly map `PSGALLERY_API_KEY`, `GitHubAppClientId`, and `GitHubAppPrivateKey`; `secrets: inherit` is nonconforming. | Define a narrower profile only for repositories with an approved non-publication contract. |
147
+
| Concurrency | Use the workflow plus PR-number-or-full-ref key and cancel only pull-request runs. | Selected for the candidate: PR reconciliation must be resumable; non-PR runs serialize by full ref. |
148
+
| Permissions | Default deny at workflow level, then grant the caller job `contents: read`, `pages: write`, and `id-token: write`. | Selected for the candidate: use `GITHUB_TOKEN` for repository-local, non-user-facing platform operations and App tokens for user-facing or otherwise unsupported operations. |
149
+
| Fork behavior | Keep the caller unconditional; classify fork pull requests as restricted read-only validation in `Plan`. | Selected for the candidate; execution policy belongs to Process-PSModule rather than every consumer. |
150
+
| Credentials | Explicitly map the three v8 credentials; optionally map `TestData` when module-local tests need it. | Define a narrower credential profile for repositories that cannot publish. |
145
151
| Optional surface | Permit only documented `TestData`, workflow inputs, schedule timing, and presentation metadata. | Allow additional extension points after naming and compatibility rules are agreed. |
146
152
147
153
The `v8` reference is the controlled moving major tag for this PSModule-owned workflow. On 2026-08-15, `v8`, `v8.0`,
@@ -154,6 +160,11 @@ Release automation is therefore the operational owner, but actors with sufficien
154
160
from moving the major tag manually. Enforce release-identity-only governance for moving tags before migrating the fleet
155
161
to `@v8`; until then, consumers must retain immutable SHA references.
156
162
163
+
The reusable workflow remains at `.github/workflows/workflow.yml`. A private cross-repository experiment on 2026-08-15
164
+
confirmed that GitHub rejects a root-level reusable workflow reference with
165
+
`references to workflows must be rooted in '.github/workflows'`, even when the provider repository grants the caller
166
+
the required Actions access.
167
+
157
168
### Owned and external references
158
169
159
170
| Automation source | Standard reference | Update model |
@@ -173,76 +184,66 @@ fleet campaign. Branch names, `latest`, floating minor tags, and unqualified tar
173
184
| Default-branch push | Keep `push.branches: [main]`. | `v8` authorizes stable releases from the tested default-branch push. |
174
185
| Manual dispatch | Keep `workflow_dispatch`. | Provides the documented default-branch manual release and recovery path. |
175
186
| Schedule | Keep a scheduled health run. | Exercises current dependencies even when repository code is unchanged. |
176
-
| Concurrency | Use the PR-number-or-ref key and cancel only pull-request runs. | Pull-request changes converge promptly while non-pull-request runs serialize by ref. |
177
-
| Permissions | Use empty top-level permissionsand the three caller-job permissions shown above. | Repository-local reads and Pages/OIDC stay narrow; App tokens provide broader authority. |
178
-
| Fork authorization | Leave the caller job unconditional. | Plan grants normal fork `pull_request` events only restricted read-only validation capabilities and rejects `pull_request_target` before credentialsor repository-defined code run. |
187
+
| Concurrency | Use the PR-number-or-ref key and cancel only pull-request runs. | New PR events supersede older declarative reconciliation runs; same-ref push, dispatch, and schedule runs serialize without cancellation. |
188
+
| Permissions | Set top-level `permissions: {}` and grant only `contents: read`, `pages: write`, and `id-token: write` to the caller job. | Checkout and Pages remain repository-local built-in capabilities; user-facing interactions and operations outside the built-in token boundary use scoped GitHub App tokens. |
189
+
| Event gate | Keep the caller unconditional and authorize capabilities in `Plan`. | The reusable workflow owns execution policy; fork pull requests may validate but cannot obtain App credentials, publish, deploy, clean up, or mutate repository state. |
179
190
| Reference | Use the intended internal floating major tag (`v8`) after tag governance is enforced. | Compatible owned releases roll out centrally; breaking releases require a new major and campaign. |
180
-
| Credentials | Explicitly map `PSGALLERY_API_KEY`, `GitHubAppClientId`, and `GitHubAppPrivateKey`; do not use `secrets: inherit`. | Satisfies the `v7+` contract and prevents unrelated secret inheritance. |
181
-
| Scope | Require exactly one conforming Process-PSModule delegation job and its governing triggers, concurrency, permissions, Plan authorization, and credential boundary. | Repository-owned jobs may be reported for visibility but are not nonconforming merely by existing. |
191
+
| Credentials | Explicitly map the three required secrets. | Satisfies the `v7+` contract and prevents unrelated secret inheritance. |
192
+
| Scope | Require one conforming `Process-PSModule` delegation job. | Additional repository-owned jobs do not change caller conformance. |
182
193
183
194
## Candidate optional elements
184
195
185
196
These are evidence-based candidate variations, not approved policy.
186
197
187
198
| Option | When it is appropriate | Constraint |
188
199
| --- | --- | --- |
189
-
| `TestData` secret mapping | Module-local tests need caller-defined secrets or variables. | Map `TestData: ${{ secrets.TestData }}` only when used. Its value is a JSON object with separate `secrets` and `variables` maps; omit the mapping when unused. |
200
+
| `TestData` secret | Module-local tests need caller-defined secrets or variables. | Optionally map the documented JSON object with separate `secrets` and `variables` maps, exposing only required values. |
190
201
| `with.SettingsPath` | The settings file is not `.github/PSModule.yml`. | Prefer the standard path for normal module repositories. |
191
202
| `with.WorkingDirectory` | The module is intentionally rooted below the repository root. | Keep the default `.` for the standard layout. |
192
203
| `with.ImportantFilePatterns` | A caller must override change detection at the workflow boundary. | Prefer stable configuration in `.github/PSModule.yml`; the supplied list replaces all defaults. |
193
204
| `with.Verbose`, `Version`, or `Prerelease` | A deliberate diagnostic or dependency-selection scenario needs it. | Do not hard-code temporary diagnostics into the fleet baseline. |
194
205
| Schedule time | Health runs need staggering or a repository-specific maintenance window. | Keep at least one documented schedule unless the repository records why health runs are unnecessary. |
195
206
| `run-name` | A repository needs clearer run presentation. | Presentation must not change job names or routing behavior. |
196
207
208
+
Conforming callers do not set `with.Debug: true`; the reusable workflow default remains `false`.
209
+
197
210
## Variations requiring a decision
198
211
199
-
The following are nonconforming with locked candidate decisions. They remain inventory classifications rather than
200
-
approved organization policy until #514 records an approved structure:
212
+
The following differ from the candidate. They are inventory classifications, not policy violations, until #514 records
213
+
an approved structure:
201
214
202
-
- `secrets: inherit`, which is nonconforming because the candidate requires the three explicit baseline mappings;
215
+
- `secrets: inherit`;
203
216
- `APIKey`or `APIKEY` mappings from the pre-`v7` contract;
204
217
- any Process-PSModule reference other than the intended major tag (`v8`), including a branch, `latest`, minor tag,
205
218
exact patch tag, or full commit SHA;
206
219
- missing `push` or `unlabeled` triggers;
207
-
- a `cancel-in-progress` expression other than `github.event_name == 'pull_request'` or the old ref-only concurrency key;
220
+
- a concurrency key other than workflow plus PR number or full ref, or cancellation behavior other than pull-request-only;
221
+
- a caller-level fork or event-authorization condition;
208
222
- trigger-level path filters that bypass Process-PSModule important-file evaluation;
209
-
- omitted documented permissions without a verified settings-based least-privilege profile;
210
-
- `with.Debug: true`, which is nonconforming because the reusable workflow default remains `false`.
211
-
212
-
When required, the optional test-data mapping extends the candidate baseline without broadening it:
0 commit comments