Skip to content

Commit 946d4a6

Browse files
Limit caller variation to test data
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent f296f37 commit 946d4a6

3 files changed

Lines changed: 23 additions & 22 deletions

File tree

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

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ decisions before canonical guides, templates, or consumer workflows adopt it:
148148
| 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. |
149149
| 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. |
150150
| 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. |
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. |
151+
| Optional surface | Permit only the documented `TestData` secret mapping. | Selected for the candidate; every other caller-contract field matches the canonical template. |
152152

153153
The `v8` reference is the controlled moving major tag for this PSModule-owned workflow. On 2026-08-15, `v8`, `v8.0`,
154154
and the immutable `v8.0.0` release tag all resolve to commit `5a11e8e8b018faf97017e0416f136a751c026713`.
@@ -191,21 +191,15 @@ fleet campaign. Branch names, `latest`, floating minor tags, and unqualified tar
191191
| Credentials | Explicitly map the three required secrets. | Satisfies the `v7+` contract and prevents unrelated secret inheritance. |
192192
| Scope | Require one conforming `Process-PSModule` delegation job. | Additional repository-owned jobs do not change caller conformance. |
193193

194-
## Candidate optional elements
194+
## Allowed caller variation
195195

196-
These are evidence-based candidate variations, not approved policy.
196+
The only conforming variation from the canonical template is the optional `TestData` secret mapping shown above.
197+
Callers use it only when module-local tests need caller-defined secrets or variables, and expose only the required
198+
values in the documented `secrets` and `variables` maps.
197199

198-
| Option | When it is appropriate | Constraint |
199-
| --- | --- | --- |
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. |
201-
| `with.SettingsPath` | The settings file is not `.github/PSModule.yml`. | Prefer the standard path for normal module repositories. |
202-
| `with.WorkingDirectory` | The module is intentionally rooted below the repository root. | Keep the default `.` for the standard layout. |
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. |
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. |
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. |
206-
| `run-name` | A repository needs clearer run presentation. | Presentation must not change job names or routing behavior. |
207-
208-
Conforming callers do not set `with.Debug: true`; the reusable workflow default remains `false`.
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.
209203

210204
## Variations requiring a decision
211205

@@ -220,6 +214,10 @@ an approved structure:
220214
- a concurrency key other than workflow plus PR number or full ref, or cancellation behavior other than pull-request-only;
221215
- a caller-level fork or event-authorization condition;
222216
- trigger-level path filters that bypass Process-PSModule important-file evaluation;
217+
- any `with:` input, including `Debug`, `ImportantFilePatterns`, `Prerelease`, `SettingsPath`, `Verbose`, `Version`, or
218+
`WorkingDirectory`;
219+
- a schedule other than the canonical `0 0 * * *`;
220+
- `run-name`;
223221
- caller permissions beyond `contents: read`, `pages: write`, and `id-token: write`.
224222

225223
Use the built-in `GITHUB_TOKEN` for non-user-facing operations confined to the calling repository, including checkout
@@ -256,7 +254,7 @@ the stable slug
256254
| Inherited secrets | 41 | Replace `secrets: inherit` with the three explicit `v8` credential mappings. |
257255
| Old API key only | 14 | Replace `APIKey`/`APIKEY` with the three explicit mappings; excludes the template pilot. |
258256
| Test data | 3 | Preserve each existing `TestData` payload while replacing the old API key contract. |
259-
| Custom input | 1 | Update `Yaml` last while preserving `TestData` and `ImportantFilePatterns`. |
257+
| Custom input | 1 | Update `Yaml` last, preserve `TestData`, and remove the caller-level `ImportantFilePatterns` override. |
260258

261259
Before opening leaves:
262260

@@ -271,7 +269,7 @@ Before opening leaves:
271269
6. Confirm workflow-only changes are not important release changes. The fleet defaults match only `src/` and
272270
`README.md`; `Yaml` explicitly matches `src/`, `tests/`, and `README.md`, so this campaign should not publish modules.
273271

274-
After approval, each leaf would apply the agreed caller, retain the agreed optional mappings, and prove the PR path
272+
After approval, each leaf would apply the canonical caller, retain optional `TestData` only where required, and prove the PR path
275273
before merge. Advance one wave only after the previous wave's push run completes without an unintended release.
276274
Completion would require a fresh inventory showing `60/60` on `v8`, the agreed trigger and concurrency contract,
277275
the agreed credential mapping, and no unresolved review or CI failures.

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ These explicit secret mappings are required. `secrets: inherit` is prohibited. T
116116
```
117117

118118
When present, `TestData` contains a JSON object with separate `secrets` and `variables` maps. It is omitted when
119-
unused. Callers do not set `with.Debug: true`; the reusable workflow default is `false`.
119+
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.
120122

121123
Built-in `GITHUB_TOKEN` authorizes checkout, repository-local reads, and standard Pages/OIDC deployment within the job
122124
boundary. Step-scoped GitHub App installation tokens authorize pull-request comments and labels, commit statuses and

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,8 @@ The caller MUST declare top-level `permissions: {}`. Its Process-PSModule job MU
227227
`pages: write`, and `id-token: write`. It MUST explicitly map `PSGALLERY_API_KEY`, `GitHubAppClientId`, and
228228
`GitHubAppPrivateKey`; `secrets: inherit` MUST NOT be used. It MAY map `TestData` only for module-local tests.
229229
When present, `TestData` MUST contain a JSON object with separate `secrets` and `variables` maps; callers MUST omit it
230-
when unused. A caller MUST NOT set `with.Debug: true`; the reusable workflow default is `false`.
230+
when unused. `TestData` MUST be the only variation from the canonical caller template. A caller MUST NOT declare
231+
`run-name`, alter the canonical schedule, add a caller condition, or pass any `with:` input.
231232

232233
Built-in `GITHUB_TOKEN` MAY authorize repository-local, non-user-facing work when those permissions are sufficient,
233234
including checkout, reads, and standard Pages/OIDC deployment. GitHub App installation tokens MUST authorize all
@@ -256,11 +257,11 @@ Scenario: Provide optional module-local test data
256257
Then its secret value is a JSON object with separate secrets and variables maps
257258
And the caller omits TestData when tests do not require it
258259
259-
Scenario: Keep caller debug disabled
260+
Scenario: Match the canonical caller template
260261
Given a conforming caller invokes the reusable workflow
261-
When it sets workflow inputs
262-
Then it does not set Debug to true
263-
And the reusable workflow uses its false default
262+
When its Process-PSModule caller contract is compared with the canonical template
263+
Then every field matches the template
264+
And TestData is the only permitted optional mapping
264265
265266
Scenario: Perform a user-facing repository operation
266267
Given the reusable workflow must create a pull-request comment or release

0 commit comments

Comments
 (0)