Skip to content

Commit 581bf0b

Browse files
Require the canonical caller template
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 946d4a6 commit 581bf0b

3 files changed

Lines changed: 25 additions & 31 deletions

File tree

docs/content/reference/process-workflow-fleet-standard.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ decisions before canonical guides, templates, or consumer workflows adopt it:
141141

142142
| Decision | Candidate | Alternatives still open |
143143
| --- | --- | --- |
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. |
144+
| Contract scope | Keep the file identical to the canonical template except for optional `TestData`. | Selected for the candidate; repository-owned jobs use separate workflow files. |
145145
| 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. |
146146
| Pull-request activities | Keep all six listed activity types. | Reduce the activity list if a v8 behavior is intentionally unsupported. |
147147
| 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. |
@@ -189,17 +189,17 @@ fleet campaign. Branch names, `latest`, floating minor tags, and unqualified tar
189189
| 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. |
190190
| 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. |
191191
| 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. |
192+
| Scope | Require exactly the canonical `Process-PSModule` workflow file. | Repository-owned jobs use separate workflow files. |
193193

194194
## Allowed caller variation
195195

196196
The only conforming variation from the canonical template is the optional `TestData` secret mapping shown above.
197197
Callers use it only when module-local tests need caller-defined secrets or variables, and expose only the required
198198
values in the documented `secrets` and `variables` maps.
199199

200-
Every other field in the Process-PSModule caller contract matches the template exactly. Callers do not add `with:`
201-
inputs, change schedule timing, add `run-name`, add a caller condition, or broaden permissions. Repository-owned jobs
202-
may coexist because they are outside the Process-PSModule caller contract; they do not modify the canonical call.
200+
Every other field in the Process-PSModule workflow file matches the template exactly. Callers do not add jobs, `with:`
201+
inputs, change schedule timing, add `run-name`, add a caller condition, or broaden permissions. Repository-owned
202+
automation uses separate workflow files.
203203

204204
## Variations requiring a decision
205205

@@ -214,6 +214,7 @@ an approved structure:
214214
- a concurrency key other than workflow plus PR number or full ref, or cancellation behavior other than pull-request-only;
215215
- a caller-level fork or event-authorization condition;
216216
- trigger-level path filters that bypass Process-PSModule important-file evaluation;
217+
- any additional job in `.github/workflows/Process-PSModule.yml`;
217218
- any `with:` input, including `Debug`, `ImportantFilePatterns`, `Prerelease`, `SettingsPath`, `Verbose`, `Version`, or
218219
`WorkingDirectory`;
219220
- a schedule other than the canonical `0 0 * * *`;
@@ -237,10 +238,8 @@ evaluating Settings. Privileged-context events such as
237238
`pull_request_target` remain unsupported unless separately designed to prevent untrusted code from crossing the
238239
credential boundary.
239240

240-
The contract applies to the shared workflow controls and the `Process-PSModule` delegation job shown above. Repositories
241-
may define additional jobs in the same file or separate workflows. The inventory reports those jobs for visibility, but
242-
the contract does not prescribe their implementation. Additional jobs must not weaken or bypass the permissions,
243-
authorization, trigger, or concurrency controls governing the Process-PSModule call.
241+
The contract applies to the entire `.github/workflows/Process-PSModule.yml` file shown above. Repository-owned
242+
automation uses separate workflow files so the canonical caller remains directly comparable across the fleet.
244243

245244
## Rollout boundary
246245

docs/content/reference/process-workflow-lifecycle-design.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ requested state.
3636

3737
The [Process-PSModule caller contract](process-workflow-fleet-standard.md) contains exactly one reusable-workflow call
3838
job and the shared top-level triggers, concurrency, permissions, Plan authorization, and credential boundary that govern
39-
it. Repository-owned jobs MAY coexist in the same workflow file or in separate workflows. They are visible to
40-
conformance reporting and MUST NOT weaken or bypass the Process-PSModule call boundary.
39+
it. The file matches the canonical template except for optional `TestData`. Repository-owned automation uses separate
40+
workflow files.
4141

4242
## Event authorization
4343

@@ -117,8 +117,7 @@ These explicit secret mappings are required. `secrets: inherit` is prohibited. T
117117

118118
When present, `TestData` contains a JSON object with separate `secrets` and `variables` maps. It is omitted when
119119
unused. It is the only permitted variation from the canonical caller template. Callers do not declare `run-name`,
120-
alter the canonical schedule, add a caller condition, or pass `with:` inputs. Repository-owned jobs may coexist
121-
outside this caller contract.
120+
alter the canonical schedule, add jobs or caller conditions, or pass `with:` inputs.
122121

123122
Built-in `GITHUB_TOKEN` authorizes checkout, repository-local reads, and standard Pages/OIDC deployment within the job
124123
boundary. Step-scoped GitHub App installation tokens authorize pull-request comments and labels, commit statuses and
@@ -194,7 +193,7 @@ The lifecycle is verified with event payload fixtures and publication fakes befo
194193
| Stable aggregation | Push, manual-dispatch, and scheduled bursts replace a pending run and prove all unreleased merged pull requests are aggregated. |
195194
| Caller authorization | Fixtures verify the explicit permissions and credential mappings, App-token failure, and no built-in-token fallback. |
196195
| Fork authorization | Fixtures verify immutable-metadata-first restricted Settings, no privileged operations, and `pull_request_target` rejection. |
197-
| Caller boundary | Fixtures verify repository-owned jobs remain visible without weakening or bypassing the reusable-workflow call boundary. |
196+
| Caller boundary | Fixtures verify exact canonical-template conformance with optional `TestData` as the only variation. |
198197

199198
## Related
200199

docs/content/reference/process-workflow-lifecycle-specification.md

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ The lifecycle covers dispatch recovery, scheduled published-artifact validation,
1616
evaluation, closed-pull-request cleanup, and stable publication after a default-branch push.
1717

1818
The [Process-PSModule caller contract](process-workflow-fleet-standard.md) requires exactly one reusable-workflow call
19-
job and the shared top-level controls that govern it. Repository-owned jobs MAY exist in the same workflow file or in
20-
separate workflows, provided they do not weaken or bypass the call's trigger, concurrency, permissions, Plan
21-
authorization, or credential boundary.
19+
job and the shared top-level controls that govern it. The workflow file MUST match the canonical template except for
20+
optional `TestData`. Repository-owned automation MUST use separate workflow files.
2221

2322
## Functional requirements
2423

@@ -319,27 +318,24 @@ Scenario: Gate a privileged job for a restricted fork run
319318
And it does not create an App token or parse an absent publication configuration
320319
```
321320

322-
### FR13 — Caller conformance MUST be limited to the reusable-workflow boundary {#fr13}
321+
### FR13 — The caller workflow file MUST match the canonical template {#fr13}
323322

324-
A conforming caller MUST contain exactly one Process-PSModule reusable-workflow call job and the shared top-level
325-
triggers, concurrency, permissions, Plan authorization, and credential boundary that govern it. Repository-owned jobs
326-
MAY coexist in the same workflow file or in separate workflows. They MUST NOT weaken or bypass any of those controls for
327-
the Process-PSModule call.
323+
A conforming `.github/workflows/Process-PSModule.yml` MUST match the canonical template exactly except for optional
324+
`TestData`. Repository-owned automation MUST use separate workflow files.
328325

329326
#### Behavioral scenarios {#fr13-scenarios}
330327

331328
```gherkin
332-
Scenario: Retain a repository-owned job beside the reusable-workflow call
333-
Given a workflow contains one conforming Process-PSModule reusable-workflow call job
334-
And a repository-owned documentation job exists in the same workflow file
329+
Scenario: Keep repository-owned automation separate
330+
Given a repository needs a documentation job
335331
When the workflow is evaluated for caller conformance
336-
Then the documentation job is reported for visibility
337-
And its existence does not make the Process-PSModule call nonconforming
332+
Then the documentation job exists in a separate workflow file
333+
And Process-PSModule.yml still matches the canonical template
338334
339-
Scenario: Prevent a repository-owned job from bypassing the caller boundary
340-
Given a repository-owned job exists beside or outside the caller workflow
341-
When it weakens or bypasses the Process-PSModule call's trigger, concurrency, permissions, Plan authorization, or credential boundary
342-
Then the caller arrangement is nonconforming
335+
Scenario: Reject any other caller variation
336+
Given Process-PSModule.yml differs from the canonical template
337+
When the difference is not the optional TestData mapping
338+
Then the caller is nonconforming
343339
```
344340

345341
## Non-functional requirements

0 commit comments

Comments
 (0)