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
Copy file name to clipboardExpand all lines: docs/agent-task-reusable-workflow.md
+12-8Lines changed: 12 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,18 +39,20 @@ with `wp_codebox_release_ref: v0.12.3`. The accepted format is exactly
39
39
`vX.Y.Z`; branches, commit SHAs, moving major tags, prereleases, and arbitrary
40
40
refs are rejected.
41
41
42
-
The workflow validates that its own `uses:` reference and
43
-
`wp_codebox_release_ref`match exactly before checkout. It always checks helpers
44
-
out from `Automattic/wp-codebox`, verifies the checked-out commit equals the
45
-
remote release tag commit, and verifies the checked-out `package.json` version
46
-
equals the requested tag without its `v` prefix. The caller cannot select a
47
-
different helper repository.
42
+
The workflow requires `wp_codebox_release_ref` to be an exact release tag. It
43
+
always checks helpers out from `Automattic/wp-codebox`, verifies the checked-out
44
+
commit equals the remote release tag commit, and verifies the checked-out
45
+
`package.json`version equals the requested tag without its `v` prefix. The
46
+
caller cannot select a different helper repository. GitHub nested workflows
47
+
expose the caller's `github.workflow_ref`, and the running workflow cannot
48
+
introspect its own `uses:` ref, so helper selection relies on the required input
49
+
and verified checkout rather than that caller context.
48
50
49
51
This release-coherence contract fixes [#1759](https://github.com/Automattic/wp-codebox/issues/1759).
50
52
51
53
## Inputs
52
54
53
-
- `wp_codebox_release_ref`: required exact immutable WP Codebox release tag. It must match the `@vX.Y.Z` tag in the caller's `uses:` declaration exactly.
55
+
- `wp_codebox_release_ref`: required exact immutable WP Codebox release tag in `vX.Y.Z` form.
54
56
- `external_package_source`: immutable descriptor with `repository`, full commit `revision`, one package-relative `.agent.json` `path`, and `digest`. Packages are supported only from publicly accessible GitHub repositories, fetched from canonical `https://github.com/OWNER/REPOSITORY.git` without credentials. `digest` is exactly `sha256-bytes-v1:<lowercase-sha256>` over the raw file bytes; filenames and JSON content are UTF-8-safe and are not normalized before hashing.
55
57
- `EXTERNAL_PACKAGE_SOURCE_POLICY`: required reusable-workflow secret, supplied by the caller's operator-controlled secret configuration. Its strict version 1 JSON shape is `{"version":1,"repositories":{"owner/repository":["agents/example.agent.json"]}}`. Every entry is an exact standalone `.agent.json` path. The policy is validated in runner memory, is never part of task input, and is not uploaded.
56
58
- `target_repo`: `OWNER/REPO`target repository.
@@ -173,7 +175,9 @@ remain caller-workflow responsibilities. This is an intentional exposed-workflow
173
175
174
176
`wp_codebox_release_ref`is a required v1 input. Existing callers must switch
175
177
their `uses:` reference from a branch or other ref to an exact release tag and
176
-
pass that identical tag through this input.
178
+
pass that exact release tag through this input. Consumer contract tests can
179
+
compare both values where the caller workflow is available; the reusable
180
+
workflow itself cannot inspect the caller's `uses:` declaration at runtime.
0 commit comments