Skip to content

v1alpha4: conditional steps (when) and workflow steps - #31

Merged
weisser-dev merged 6 commits into
mainfrom
feat/v1alpha4-when-workflow-steps
Nov 27, 2026
Merged

weisser-dev merged 6 commits into
mainfrom
feat/v1alpha4-when-workflow-steps

Conversation

@weisser-dev

Copy link
Copy Markdown
Member

Summary

Adds v1alpha4 as the next draft: v1alpha3 plus exactly two additions.

  • Conditional steps (when, spec section 3.12, AEP-0001 accepted): a restricted, typed
    condition grammar with limits and static rules; step outputs are read as JSON in conditions.
    Changed execution model (5.6.3): skipped with reason condition counts as success,
    conditionError, dependencyFailed, missingOutput; new event step.skipped.
  • Workflow steps (type: workflow, section 5.6.6, new AEP-0028 accepted): start another
    workflow of the same scope as a child execution (action workflow.start), with its own
    permissions, policies, approvals and budget; shared parent budget, cycle (workflowCycle) and
    depth 5 (workflowDepthExceeded) limits, outputs executionId and status, childFailed.

Both AEPs are accepted by lead decision D23 (same exception to D16 as D19/D22, alpha waiver).

What changed

  • schema/awp.v1alpha4.json, CRDs serving v1alpha3 (storage) and v1alpha4
  • conformance/v1alpha4/, conformance/conditions.mjs, migrate to v1alpha4
  • Conditions are section 3.12 (3.10/3.11 are taken); case ids and diagnostics now cite 3.12
  • spec/v1alpha4/ (text, glossary, examples incl. cve-risk-then-fix.yaml), spec/README.md
  • AEP-0001 (Accepted, adapted), AEP-0028 (new), AEP-0006 alternatives, docs/decisions.md D23,
    GOVERNANCE.md, docs/aep-process.md
  • Website: v1alpha4 as next draft (sidebar, selector, banners, overview, versioning, schema)
  • CHANGELOG

v1alpha3 stays the current draft. README, Quickstart and tool defaults are unchanged.

Test results

  • npm test: 956/956 passed
  • site: check:examples (9/0 failed), build, check:links OK
  • git diff origin/main for older schemas, specs and suites: empty

Follow-ups

  • awp-validator PR: add v1alpha4 (sync needs conformance/conditions.mjs)
  • awp-editor PR: render when and workflow steps, add the v1alpha4 example set

v1alpha4 is v1alpha3 plus two additions: an optional `when` condition on every step
(AEP-0001) and the step type `workflow`, which starts another workflow of the same scope as
a child execution. The schema is a copy of v1alpha3 so that older versions stay unchanged;
`type: workflow` requires `workflow` and forbids the payloads of the other step types,
which in turn forbid `workflow`.

The CRDs now serve v1alpha3 and v1alpha4, each generated from its own schema. v1alpha3 stays
the storage version while it is the current draft; the versions differ only by additions.

Signed-off-by: Erik <erik@weisser.dev>
The reference checker has to know v1alpha4 before the specification text and the tools can
follow. The suite is the v1alpha3 suite with apiVersion v1alpha4 (the two digest cases are
recomputed because the digest covers apiVersion) plus cases for conditions and workflow steps.
The spec examples are copied as v1alpha4 examples because the runner validates the examples of
every version.

Conditions are parsed by a new module, conformance/conditions.mjs, with the grammar and limits
of AEP-0001; semantic.mjs checks references to steps (dependency, declared output) and inputs
(warning), restricts workflow step outputs to executionId and status, and treats
workflow.inputs values as expression-enabled. migrate converts v1alpha1, v1alpha2 and
v1alpha3 to v1alpha4; from v1alpha3 only apiVersion changes.

Signed-off-by: Erik <erik@weisser.dev>
Section 3.10 of the v1alpha3 text, which v1alpha4 starts from, is "Object stores and
Kubernetes" and 3.11 is "Status", so the new conditions section is 3.12. The v1alpha4 case
ids, the diagnostics of conditions.mjs, the schema description, the CRD and the rule catalogue
now cite 3.12.

Signed-off-by: Erik <erik@weisser.dev>
The analyse-then-act pattern (a risk analysis decides whether a fix workflow runs) needs step
conditions and a way to start another workflow from a step. Lead decision D23 accepts AEP-0001
and the new AEP-0028 into a new draft, v1alpha4, with the same exception to the external review
as D19 and D22 and an alpha waiver of the discussion period. v1alpha3 stays the current draft.

AEP-0001 is adapted to v1alpha4: section 3.12, no event root, outputs read as JSON. AEP-0006
points to AEP-0028 in its alternatives. GOVERNANCE.md and the AEP process name D23 as a recorded
exception.

Signed-off-by: Erik <erik@weisser.dev>
v1alpha4 is the v1alpha3 text plus conditions (section 3.12, matching conformance/conditions.mjs
and the schema), the changed execution model (5.6.3), workflow steps (5.6.6), workflow.start,
step.skipped and the parent fields of workflow.started, and section 14.3 with the changes from
v1alpha3. The Kubernetes binding describes CRDs that serve v1alpha3 (storage) and v1alpha4. The
example cve-risk-then-fix shows a condition and a workflow step; spec/README.md lists the new
version as the next draft.

Signed-off-by: Erik <erik@weisser.dev>
The website renders the v1alpha4 text and glossary with a next-draft banner, lists v1alpha4 in
the sidebar, the version selector, the specification overview and the versioning page, and
serves its schema. v1alpha3 stays the current draft and the default everywhere else. The
changelog records v1alpha4.

Signed-off-by: Erik <erik@weisser.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant