Skip to content

Commit 53fbe2e

Browse files
authored
fix(release): preserve validation plan across reruns (#127343)
* fix(release): preserve validation plan across reruns * test(release): align rerun plan assertions * refactor(release): use canonical plan cache action * style(test): format release plan cache assertion
1 parent b3d3404 commit 53fbe2e

5 files changed

Lines changed: 35 additions & 18 deletions

File tree

‎.agents/skills/openclaw-testing/SKILL.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,9 +350,10 @@ the failure to that exact active run.
350350
The child-dispatch jobs record run ID, run attempt, and URL, then finish. The
351351
parent seals those tuples, original dispatch titles, gate coverage, reuse
352352
policy, and original parent attempt in one immutable
353-
`full-release-execution-plan-<run-id>` artifact. Collector retries restore that
354-
artifact and adopt its children; they never reconstruct the plan or redispatch
355-
tests.
353+
`full-release-execution-plan-<run-id>` artifact and exact run-ID cache entry.
354+
Collector retries restore the cached bytes, validate them, and re-upload the
355+
artifact for their attempt before adopting its children; they never reconstruct
356+
the plan or redispatch tests.
356357
`Release Decision` polls those exact identities and can report
357358
`blocked_diagnostics_running` before unrelated children finish.
358359
For reused evidence, it also repeats the canonical target, policy, changed-path,

‎.agents/skills/release-openclaw-ci/SKILL.md‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,12 @@ Use this with `$release-openclaw-maintainer` and `$openclaw-testing` when a rele
5757
child that owns a blocking failure.
5858
- After dispatch, one immutable execution-plan artifact records the original
5959
parent attempt, exact child tuples and titles, selected coverage, gates, and
60-
reuse identity. Decision, Drain, manifest writing, evidence validation, and
61-
final verification consume that plan. A collector retry restores it and
62-
adopts the same children; missing plan state is an orchestration failure, not
63-
permission to redispatch.
60+
reuse identity. The same bytes are saved under an exact run-ID cache key.
61+
Decision, Drain, manifest writing, evidence validation, and final verification
62+
consume the artifact for their current attempt. A collector retry restores
63+
the cached plan, validates it, re-uploads its artifact, and adopts the same
64+
children; missing plan state is an orchestration failure, not permission to
65+
reconstruct the plan or redispatch.
6466
- Reused evidence is not trusted merely because plan sealing found it. Release
6567
Decision repeats the sealed target SHA, evidence SHA, policy, changed paths,
6668
selected run, root run, source manifest, trusted tooling identity, and
@@ -321,7 +323,8 @@ The `full-release-diagnostics-<run-id>-<attempt>` artifact is the terminal
321323
failure and timing manifest. Use it after an early blocker instead of
322324
restarting `all` merely to discover what the still-running children found.
323325
The stable `full-release-execution-plan-<run-id>` artifact is the identity
324-
source for every collector attempt.
326+
source within each collector attempt; retry attempts restore its immutable
327+
run-ID-cached bytes first.
325328

326329
## Failure Triage
327330

‎.github/workflows/full-release-validation.yml‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,12 +1096,14 @@ jobs:
10961096
sparse-checkout-cone-mode: false
10971097
persist-credentials: false
10981098

1099-
- name: Restore immutable release execution plan
1100-
if: ${{ github.run_attempt != 1 }}
1101-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
1099+
# Parent reruns hide prior-attempt artifacts. This exact-key cache is immutable;
1100+
# a miss fails closed instead of reconstructing or redispatching child identities.
1101+
- name: Cache immutable release execution plan
1102+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
11021103
with:
1103-
name: full-release-execution-plan-${{ github.run_id }}
11041104
path: ${{ runner.temp }}/full-release-execution-plan
1105+
key: full-release-execution-plan-v1-${{ github.run_id }}
1106+
fail-on-cache-miss: ${{ github.run_attempt != 1 }}
11051107

11061108
- name: Seal immutable release execution plan
11071109
id: plan
@@ -1226,7 +1228,7 @@ jobs:
12261228
node scripts/full-release-validation-state.mjs plan
12271229
12281230
- name: Upload immutable release execution plan
1229-
if: ${{ always() && github.run_attempt == 1 }}
1231+
if: always()
12301232
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
12311233
with:
12321234
name: full-release-execution-plan-${{ github.run_id }}

‎docs/reference/full-release-validation.md‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,16 @@ first-failure path is preferable; Release Decision then cancels only the exact
4545
still-active child that owns the blocking failure.
4646

4747
After dispatch, the parent writes one immutable
48-
`full-release-execution-plan-<run-id>` artifact. It records selected and
48+
`full-release-execution-plan-<run-id>` artifact and preserves the same bytes in
49+
an exact run-ID Actions cache. It records selected and
4950
required coverage, gate results, reuse identity, the original parent attempt,
5051
and every exact child run ID, attempt, title, workflow ref, and Tooling SHA.
5152
Decision, Drain, manifest generation, evidence verification, and the final
52-
verifier consume this artifact. Collector retries restore it and adopt the
53-
same children; they never rebuild the plan or redispatch tests.
53+
verifier consume the artifact for their current attempt. Collector retries
54+
restore the immutable cached copy, validate it, and upload the artifact again
55+
for the retry; they never rebuild the plan or redispatch tests. A missing or
56+
evicted cache fails closed, so start a new validation instead of retrying that
57+
stale parent.
5458
Release Decision also repeats canonical reuse-chain validation before a reused
5559
run can pass. The sealed target SHA, evidence SHA, policy, changed-path set,
5660
selected run, root run, source manifest, trusted tooling identity, and child

‎test/scripts/package-acceptance-workflow.test.ts‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ const ANDROID_RELEASE_WORKFLOW = ".github/workflows/android-release.yml";
5454
const STABLE_MAIN_CLOSEOUT_WORKFLOW = ".github/workflows/openclaw-stable-main-closeout.yml";
5555
const WINDOWS_NODE_RELEASE_WORKFLOW = ".github/workflows/windows-node-release.yml";
5656
const FULL_RELEASE_VALIDATION_WORKFLOW = ".github/workflows/full-release-validation.yml";
57+
const ACTIONS_CACHE_V5 = "actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae";
5758
const CI_WORKFLOW = ".github/workflows/ci.yml";
5859
const PERFORMANCE_WORKFLOW = ".github/workflows/openclaw-performance.yml";
5960
const FULL_RELEASE_CHILD_DISPATCHES = [
@@ -2967,6 +2968,7 @@ describe("package acceptance workflow", () => {
29672968
const decisionUpload = workflowStep(decision, "Upload release decision");
29682969
const drainUpload = workflowStep(drain, "Upload diagnostic drain manifest");
29692970
const planStep = workflowStep(executionPlan, "Seal immutable release execution plan");
2971+
const planCache = workflowStep(executionPlan, "Cache immutable release execution plan");
29702972
const planUpload = workflowStep(executionPlan, "Upload immutable release execution plan");
29712973
const manifestStep = workflowStep(summary, "Write release validation manifest");
29722974
const selectState = workflowStep(summary, "Select newest compatible release state artifacts");
@@ -2999,7 +3001,12 @@ describe("package acceptance workflow", () => {
29993001
expect(planStep.run).not.toContain("EVIDENCE_MANIFEST");
30003002
expect(planStep.run).toContain('--arg evidenceRunId "$EVIDENCE_RUN_ID"');
30013003
expect(planStep.run).toContain('--argjson trustedWorkflow "$TRUSTED_WORKFLOW_JSON"');
3002-
expect(planUpload.if).toBe("${{ always() && github.run_attempt == 1 }}");
3004+
expect(planCache.uses).toBe(ACTIONS_CACHE_V5);
3005+
expect(planCache.with).toMatchObject({
3006+
"fail-on-cache-miss": "${{ github.run_attempt != 1 }}",
3007+
key: "full-release-execution-plan-v1-${{ github.run_id }}",
3008+
});
3009+
expect(planUpload.if).toBe("always()");
30033010
expect(planUpload.with?.name).toBe("full-release-execution-plan-${{ github.run_id }}");
30043011
expect(manifestStep.env).not.toHaveProperty("EVIDENCE_MANIFEST");
30053012
expect(manifestStep.run).toContain(
@@ -3065,7 +3072,7 @@ describe("package acceptance workflow", () => {
30653072
(job.steps ?? []).filter((step) => step.uses?.startsWith("actions/download-artifact@")),
30663073
);
30673074

3068-
expect(downloadSteps).toHaveLength(6);
3075+
expect(downloadSteps).toHaveLength(5);
30693076
for (const step of downloadSteps) {
30703077
expect(step.uses).toBe(DOWNLOAD_ARTIFACT_V8);
30713078
}

0 commit comments

Comments
 (0)