Skip to content

Commit 55abb43

Browse files
authored
fix(release): reject unrecoverable FRV continuation (#132711)
1 parent 50e1f09 commit 55abb43

5 files changed

Lines changed: 64 additions & 2 deletions

File tree

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ Use this with `$release-openclaw-maintainer` and `$openclaw-testing` when a rele
5858
- Same-parent continuation requires the original root to have been dispatched
5959
with `fail_fast=false`. The controller verifies that exact logged input
6060
before any rerun mutation.
61+
- A parent that produced its own sealed candidate artifacts cannot be continued:
62+
GitHub reruns make those prior-attempt artifacts unavailable. Keep the
63+
candidate and Tooling SHAs frozen, supersede that parent, and start a fresh
64+
all-group Full Release Validation.
6165
- After dispatch, one immutable execution-plan artifact records the original
6266
parent attempt, exact child tuples and titles, selected coverage, gates, and
6367
reuse identity. The same bytes are saved under an exact run-ID cache key.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1674,8 +1674,8 @@ jobs:
16741674
DIAGNOSTIC_DRAIN_PATH: ${{ runner.temp }}/full-release-diagnostics/full-release-diagnostic-manifest.json
16751675
run: node scripts/full-release-validation-state.mjs verify
16761676

1677-
# Artifact v4 keeps prior attempts readable within the same workflow run.
1678-
# Exact IDs from the sealed plan prevent recovery from drifting to a newer upload.
1677+
# Exact IDs from the sealed plan prevent verification from drifting to a newer upload.
1678+
# Parent-owned candidate plans are rejected before same-parent continuation.
16791679
- name: Verify sealed release candidate
16801680
env:
16811681
GH_TOKEN: ${{ github.token }}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ still-active child that owns the blocking failure.
4646
Same-parent continuation requires the original root to have been dispatched
4747
with `fail_fast=false`. The controller verifies that exact logged input before
4848
any rerun mutation.
49+
It is also unavailable when that parent produced the sealed candidate
50+
artifacts, because GitHub reruns make those prior-attempt artifacts unavailable.
51+
Keep the candidate and Tooling SHAs frozen, supersede the parent, and start a
52+
fresh all-group Full Release Validation.
4953

5054
After dispatch, the parent writes one immutable
5155
`full-release-execution-plan-<run-id>` artifact and preserves the same bytes in

‎scripts/frv.mjs‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,11 @@ export async function preflightContinuation(
249249
client,
250250
repository = DEFAULT_REPOSITORY,
251251
) {
252+
if (plan.candidate?.producer.runId === String(rootRunId)) {
253+
throw new Error(
254+
"parent-owned sealed candidate artifacts do not survive parent reruns; start a fresh all-group FRV",
255+
);
256+
}
252257
if (plan.rerunGroup !== "all") {
253258
throw new Error("FRV continuation requires an all-group root");
254259
}

‎test/scripts/frv.test.ts‎

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,55 @@ describe("FRV immutable plan eligibility", () => {
418418
});
419419

420420
describe("FRV continuation preflight", () => {
421+
it("rejects parent-owned candidate artifacts before any GitHub access", async () => {
422+
const selected = child("normalCi", "101");
423+
const parentOwnedPlan = {
424+
...plan([selected]),
425+
candidate: { producer: { runId: "77" } },
426+
};
427+
let reads = 0;
428+
let mutations = 0;
429+
const read = async () => {
430+
reads += 1;
431+
throw new Error("unexpected GitHub read");
432+
};
433+
const mutate = async () => {
434+
mutations += 1;
435+
};
436+
437+
await expect(
438+
continueFailed(parentOwnedPlan, "77", {
439+
getAttemptJobs: read,
440+
getJobLog: read,
441+
getParentJobs: read,
442+
getRun: read,
443+
getRunAttempt: read,
444+
repository: REPOSITORY,
445+
rerunFailed: mutate,
446+
rerunParent: mutate,
447+
verify: mutate,
448+
}),
449+
).rejects.toThrow(
450+
"parent-owned sealed candidate artifacts do not survive parent reruns; start a fresh all-group FRV",
451+
);
452+
expect(reads).toBe(0);
453+
expect(mutations).toBe(0);
454+
});
455+
456+
it.each([
457+
["candidate-free", undefined],
458+
["externally produced", { producer: { runId: "88" } }],
459+
])("allows %s plans through candidate ownership preflight", async (_label, candidate) => {
460+
const selected = child("normalCi", "101");
461+
await expect(
462+
preflightContinuation(
463+
{ ...plan([selected]), candidate },
464+
"77",
465+
preflightMethods([selected], (entry) => runFor(entry, 1, "failure")),
466+
),
467+
).resolves.toMatchObject({ id: 77 });
468+
});
469+
421470
it("rejects fail-fast roots before any rerun mutation", async () => {
422471
const selected = child("normalCi", "101");
423472
let mutations = 0;

0 commit comments

Comments
 (0)