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
This commit is contained in:
Dallin Romney
2026-08-21 19:08:32 -07:00
committed by GitHub
parent b3d3404ae6
commit 53fbe2eb33
5 changed files with 35 additions and 18 deletions
@@ -54,6 +54,7 @@ const ANDROID_RELEASE_WORKFLOW = ".github/workflows/android-release.yml";
const STABLE_MAIN_CLOSEOUT_WORKFLOW = ".github/workflows/openclaw-stable-main-closeout.yml";
const WINDOWS_NODE_RELEASE_WORKFLOW = ".github/workflows/windows-node-release.yml";
const FULL_RELEASE_VALIDATION_WORKFLOW = ".github/workflows/full-release-validation.yml";
const ACTIONS_CACHE_V5 = "actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae";
const CI_WORKFLOW = ".github/workflows/ci.yml";
const PERFORMANCE_WORKFLOW = ".github/workflows/openclaw-performance.yml";
const FULL_RELEASE_CHILD_DISPATCHES = [
@@ -2967,6 +2968,7 @@ describe("package acceptance workflow", () => {
const decisionUpload = workflowStep(decision, "Upload release decision");
const drainUpload = workflowStep(drain, "Upload diagnostic drain manifest");
const planStep = workflowStep(executionPlan, "Seal immutable release execution plan");
const planCache = workflowStep(executionPlan, "Cache immutable release execution plan");
const planUpload = workflowStep(executionPlan, "Upload immutable release execution plan");
const manifestStep = workflowStep(summary, "Write release validation manifest");
const selectState = workflowStep(summary, "Select newest compatible release state artifacts");
@@ -2999,7 +3001,12 @@ describe("package acceptance workflow", () => {
expect(planStep.run).not.toContain("EVIDENCE_MANIFEST");
expect(planStep.run).toContain('--arg evidenceRunId "$EVIDENCE_RUN_ID"');
expect(planStep.run).toContain('--argjson trustedWorkflow "$TRUSTED_WORKFLOW_JSON"');
expect(planUpload.if).toBe("${{ always() && github.run_attempt == 1 }}");
expect(planCache.uses).toBe(ACTIONS_CACHE_V5);
expect(planCache.with).toMatchObject({
"fail-on-cache-miss": "${{ github.run_attempt != 1 }}",
key: "full-release-execution-plan-v1-${{ github.run_id }}",
});
expect(planUpload.if).toBe("always()");
expect(planUpload.with?.name).toBe("full-release-execution-plan-${{ github.run_id }}");
expect(manifestStep.env).not.toHaveProperty("EVIDENCE_MANIFEST");
expect(manifestStep.run).toContain(
@@ -3065,7 +3072,7 @@ describe("package acceptance workflow", () => {
(job.steps ?? []).filter((step) => step.uses?.startsWith("actions/download-artifact@")),
);
expect(downloadSteps).toHaveLength(6);
expect(downloadSteps).toHaveLength(5);
for (const step of downloadSteps) {
expect(step.uses).toBe(DOWNLOAD_ARTIFACT_V8);
}