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/content/reference/process-workflow-lifecycle-design.md
+26-16Lines changed: 26 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,32 +19,42 @@ The current code detects an existing published version, resumes GitHub Release c
19
19
20
20
## Candidate event routing
21
21
22
-
The planner classifies the caller event before build and publication work begins. Each route produces one of three mutation classes: validation only, prerelease mutation, or stable-release mutation. Pull-request events may cancel their predecessors, so every pull-request route must converge to the latest pull-request state.
22
+
Plan resolves the caller event into one release classification before build and publication work begins. The classification is stable release, prerelease, recovery or resume, cleanup-only, or no-op. Pull-request events may cancel their predecessors, so every pull-request route must converge to the latest pull-request state.
| Event | Candidate Plan classification | Desired release action| Cancellation | Required result |
25
25
| --- | --- | --- | --- | --- |
26
-
|`workflow_dispatch` on the default branch | Recovery release | Stable release or explicit no-op | Never cancel | Rebuild and validate the selected commit; reconstruct the unreleased release notes. |
27
-
|`schedule`| Published-artifact validation |Validation only| Never cancel | Validate the latest published stable artifact and its documentation. |
28
-
| Pull request `opened`, `reopened`, `synchronize`| Pull-request CI|Validation only | Cancels a superseded pull-request run; the later run converges state | Report configured validation on the pull request. |
29
-
| Pull request `labeled`, `unlabeled`|Prerelease evaluation | Prereleaseor validation only | Cancels a superseded pull-request run; the later run converges state |Re-evaluate the full label set and publish only an eligible prerelease. |
30
-
| Merged pull request `closed`| Post-merge close |Validation only| Cancels a superseded pull-request run; the later run converges state | Do not clean up; the successful main-push release owns promotion cleanup. |
31
-
| Abandoned pull request `closed`|Pull-request cleanup|Prerelease cleanup only | Cancels a superseded pull-request run; the later run converges state |Remove only prereleases owned by the abandoned pull request. |
26
+
|`workflow_dispatch` on the default branch | Recovery or resume | Stable release or no-op | Never cancel | Rebuild and validate the selected commit; reconstruct the unreleased release notes. |
27
+
|`schedule`| Published-artifact validation |No-op after validation| Never cancel | Validate the latest published stable artifact and its documentation. |
28
+
| Pull request `opened`, `reopened`, `synchronize`| Pull-request classification|Prerelease or no-op | Cancels a superseded pull-request run; the later run converges state | Report configured validation and execute the planned release action. |
29
+
| Pull request `labeled`, `unlabeled`|Pull-request classification refresh | Prerelease, cleanup-only, or no-op | Cancels a superseded pull-request run; the later run converges state |Resolve the complete current classification and execute its action. |
30
+
| Merged pull request `closed`| Post-merge close |No-op| Cancels a superseded pull-request run; the later run converges state | Do not clean up; the successful main-push release owns promotion cleanup. |
31
+
| Abandoned pull request `closed`|Abandoned-close classification|Cleanup-only | Cancels a superseded pull-request run; the later run converges state |Reconcile only prereleases owned by the abandoned pull request. |
32
32
| Push to the default branch | Stable release | Stable release | Never cancel | Resolve merged-pull-request intent when applicable, then publish and perform promotion cleanup after required gates. |
33
33
34
-
The classifier records the route, mutable resource scope, commit identity, and release decision in the plan result. Downstream jobs consume that record rather than infer the event again.
34
+
Plan records its classification and release decision in enriched Settings. Downstream jobs consume that Settings object and do not infer policy from events, labels, or repository settings again.
35
35
36
36
## Candidate artifact and version boundary
37
37
38
-
Version resolution is the boundary between planning and release-capable work. The candidate carries one immutable release record through build, test, and publication:
38
+
Version resolution is the boundary between planning and release-capable work. The candidate carries one immutable release record in enriched Settings through build, test, and release execution:
39
39
40
40
| Record field | Purpose |
41
41
| --- | --- |
42
-
| Commit identity | Binds validation, artifact, and release to one source revision. |
43
-
| Resolved stable version and prerelease identity | Defines the only version permitted in the built artifact. |
44
-
| Event route and mutation class | Restricts each downstream stage to its authorized behavior. |
45
-
| Release-note range | Identifies the merged pull requests eligible for a recovery release note. |
46
-
47
-
The build stage stamps the resolved version into the module artifact. Before any package, tag, or release becomes visible, the publication stage verifies that the artifact version and prerelease identity equal the immutable release record. A mismatch stops publication; it is not corrected by retagging or by recalculating a version after the artifact is built.
42
+
| Event and run type | Identifies the GitHub event and its candidate lifecycle classification. |
43
+
| Event action | Preserves the relevant pull-request activity or non-pull-request action. |
44
+
| Pull-request identity, state, and merged status | Distinguishes active, merged, and abandoned pull-request outcomes. |
45
+
| Labels and repository settings result | Captures the input policy state used only by Plan. |
46
+
| Version bump and base version | Explains the selected version transition. |
47
+
| Manifest version, prerelease identifier, and full version or tag | Defines the only version and tag permitted in the built artifact and release. |
48
+
| Target commit | Binds validation, artifact, and release to one source revision. |
49
+
| Desired release action and create or publish flags | Selects stable release, prerelease, recovery or resume, cleanup-only, or no-op. |
50
+
| Cleanup intent and artifact identity | Defines the exact artifacts that release execution may reconcile. |
51
+
| Release-note source and boundary | Identifies the merged pull requests eligible for a recovery release note. |
52
+
53
+
The build stage stamps exactly the planned manifest version and prerelease identifier into the module artifact. Before any package, tag, or release becomes visible, release execution verifies that the artifact equals the immutable Settings record. A mismatch stops execution; it is not corrected by retagging or by recalculating a version after the artifact is built.
54
+
55
+
## Candidate general release execution
56
+
57
+
One general module release action or reusable workflow consumes enriched Settings after validation. It handles stable release, prerelease, recovery or resume, cleanup-only, and no-op actions according to the planned desired release action and flags. It verifies the artifact when an artifact is required and reconciles only the requested state. It does not recompute versioning, labels, event routing, or cleanup policy.
Copy file name to clipboardExpand all lines: docs/content/reference/process-workflow-lifecycle-specification.md
+28-8Lines changed: 28 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,23 +78,23 @@ Scenario: Validate a synchronized pull request
78
78
And it does not publish a stable version
79
79
```
80
80
81
-
### FR4 — Label changes MUST re-evaluate prerelease eligibility {#fr4}
81
+
### FR4 — Label changes MUST refresh the planned release classification {#fr4}
82
82
83
-
A `labeled` or `unlabeled` pull-request event targeting the default branch MUST re-evaluate prerelease eligibility from the complete current label set. A prerelease publication MUST occur only when the pull request is eligible and every required validation succeeds.
83
+
A `labeled` or `unlabeled` pull-request event targeting the default branch MUST refresh the complete planned release classification from the current label set and repository settings. A prerelease publication MUST occur only when the planned classification is prerelease and every required validation succeeds.
84
84
85
85
#### Behavioral scenarios {#fr4-scenarios}
86
86
87
87
```gherkin
88
88
Scenario: Add prerelease eligibility
89
89
Given a validated pull request has no prerelease eligibility
90
90
When a prerelease label is added
91
-
Then the workflow re-evaluates the pull request
91
+
Then the plan resolves the pull request as prerelease eligible
92
92
And it publishes at most one eligible prerelease version
93
93
94
94
Scenario: Remove prerelease eligibility
95
95
Given a pull request has prerelease eligibility
96
96
When its prerelease label is removed
97
-
Then the workflow re-evaluates the pull request as ineligible
97
+
Then the plan resolves the pull request as prerelease ineligible
98
98
And it does not create a new prerelease version
99
99
```
100
100
@@ -134,15 +134,15 @@ Scenario: Publish a merged pull request
134
134
And the successful release performs promotion cleanup
135
135
```
136
136
137
-
### FR7 — Published artifacts MUST match the resolved version {#fr7}
137
+
### FR7 — Published artifacts MUST match the planned version {#fr7}
138
138
139
-
Every prerelease or stable publication MUST contain the version and prerelease identity resolved for its workflow run. A version mismatch MUST fail publication before the release is made visible.
139
+
Every prerelease or stable publication MUST contain the version and prerelease identity in the planned release decision. A version mismatch MUST fail publication before the release is made visible.
140
140
141
141
#### Behavioral scenarios {#fr7-scenarios}
142
142
143
143
```gherkin
144
144
Scenario: Reject an incorrectly stamped artifact
145
-
Given a workflow resolves a release version
145
+
Given the plan resolves a release version
146
146
And the built artifact reports a different version
Then each pull request resolves a distinct prerelease identity
169
169
```
170
170
171
+
### FR9 — Lifecycle policy MUST be resolved once before downstream work {#fr9}
172
+
173
+
The plan MUST resolve the lifecycle policy before build, test, or release execution begins. Downstream work MUST consume that planned policy and MUST NOT reinterpret event data, labels, or repository settings.
174
+
175
+
#### Behavioral scenarios {#fr9-scenarios}
176
+
177
+
```gherkin
178
+
Scenario: Execute a planned prerelease action
179
+
Given the plan resolves a pull request as an eligible prerelease publication
180
+
When downstream work executes
181
+
Then it consumes the planned release action and version
182
+
And it does not re-evaluate pull-request labels or event data
183
+
184
+
Scenario: Execute a planned cleanup-only action
185
+
Given the plan resolves an abandoned pull-request close as cleanup only
186
+
When release execution runs
187
+
Then it reconciles only the planned cleanup state
188
+
And it does not create or publish an artifact
189
+
```
190
+
171
191
## Non-functional requirements
172
192
173
193
### NFR1 — Lifecycle mutations MUST be idempotent {#nfr1}
@@ -288,7 +308,7 @@ Scenario: Recover release notes after a missed main-push publication
0 commit comments