Repository navigation
feat(release): add the resumable release:stable orchestrator - #157941
Conversation
pnpm release:stable <version> drives one regular stable release as a resumable state machine (cut, validate, publish, sync-beta, flip-github, macos, closeout) over the existing helpers, with two operator prompts, --from/--status/--dry-run, capability probes for the concurrent publish parent, approval receipt, and closeout changes, and Next: commands on every refusal. RELEASING.md leads with it and keeps the manual fallback.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs real behavior proof before merge. Reviewed September 25, 2026, 2:31 AM ET / 06:31 UTC (Revision 4). ClawSweeper reviewWhat this changesAdds a resumable stable-release command that records phase state and coordinates existing validation, npm, GitHub, macOS, and closeout workflows, with tests and operator guidance. Merge readiness⛔ Blocked before merge - 16 items remain Keep open. Current main has no resumable stable-release command, and this branch remains useful. The latest head removes automatic child-run mutations, but its default path fails an existing release gate and its run approval and recovery paths still have blocking gaps. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw's release tooling takes a selected version, source commit, operator approval, and validation evidence, then dispatches publication workflows. The new command sits above existing release helpers and records progress so an operator can resume after a failure. flowchart LR
A[Version and operator choices] --> B[Saved release state]
B --> C{Next release phase}
C --> D[Validation and candidate helpers]
C --> E[GitHub and npm workflows]
D --> F[Published release]
E --> F
F --> G[Main closeout evidence]
Decision needed
Why: That choice delegates a release approval across repositories and across resumptions; contributor intent alone does not settle the intended authority boundary. Before merge
Findings
Agent review detailsSecurityNeeds attention: Cross-repository macOS deployment approval can target a supplied or wrongly adopted run without verifying its release identity before GitHub I/O. PR surfaceTests +1542, Docs +71, Config +1, Other +2276. Total +3890 across 13 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one resumable command over the existing release helpers, use strict stable validation unless the operator explicitly selects a version-bound fast-path waiver, and verify each resumed or adopted run's release identity before acting on it. Do we have a high-confidence way to reproduce the issue? Yes, from source: the default waiver fails the existing version-prefix gate, and a substituted macOS run ID reaches deployment approval before run metadata is checked. This read-only review did not execute the release command. Is this the best way to solve the issue? No in its current form. Coordinating the existing helpers is a maintainable direction, but the default waiver, run identity, and documented recovery paths need repair before it can safely become the operator fast path. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against aee60fd7629b. LabelsLabel changes: No label changes. Label justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
…lock the state directory Sweep and approve only bot-dispatched children whose head_branch is this release's protected tooling tag, selected by exact workflow path (the core OpenClaw NPM Release child was missed by the name regex), and refuse a second release:stable process on the same state directory.
|
P1s fixed in the new head (child sweep/approval bound to this release's tooling tag + exact workflow path; cross-process state lock). Deferred P2 follow-ups, tracked for a separate PR: (1) verify dispatched inputs/source identity when reconciling a main-dispatched run id, (2) treat a beta dist-tag newer than the release as already synchronized instead of dispatching the sync, (3) support the documented failed-publisher closeout recovery ( |
…ispatch reconciliation to the operator The API cannot prove which publish parent dispatched a child, so the orchestrator no longer approves or cancels children: it approves only the recorded parent's npm-release gate and prints the exact child-approval and stale-child sweep commands until the approval receipt and self-sweeping parent are present at the tooling SHA. Runs dispatched on main are reconciled by workflow path, ref, the operator's login, and a bounded window, refusing on ambiguity; stale-lock takeover retries the exclusive create.
|
Head 0221ba3: the orchestrator no longer mutates any child run (parent gate only; child approval and stale-sweep commands are printed, exact and once per run), main-ref dispatch reconciliation is bound to workflow path, ref, the operator's login and a bounded window with an ambiguity refusal, and stale-lock takeover retries the exclusive create. Remaining P2 findings are tracked in #157959 for a follow-up PR. |
|
Landing evidence for head 0221ba3: check-lint, check-prod-types, check-test-types green; the two new suites ran in checks-node-compact-small-39 (success: release-stable.test.ts 19 tests, release-stable-post.test.ts 17 tests). The only red job, checks-node-compact-small-40, fails on test/scripts/ci-node-test-plan-hosted-tail.test.ts ( |
…4-prep * commit 'cb64558f80bcf053ee3f0bf87a60016aa789a287': fix(macos): stop repeated Keychain prompts after access is denied (#157951) test(macos): await cron fixture readiness before polling feat(release): add the resumable release:stable orchestrator (#157941) fix(plugins): report retained-work settlement once (#157836) fix(doctor): preserve current sessions after restored-index replay (#157615) chore(ui): refresh control ui locales (#157978)
* feat(release): add the resumable release:stable orchestrator pnpm release:stable <version> drives one regular stable release as a resumable state machine (cut, validate, publish, sync-beta, flip-github, macos, closeout) over the existing helpers, with two operator prompts, --from/--status/--dry-run, capability probes for the concurrent publish parent, approval receipt, and closeout changes, and Next: commands on every refusal. RELEASING.md leads with it and keeps the manual fallback. * fix(release): bind release:stable child gates to the tooling tag and lock the state directory Sweep and approve only bot-dispatched children whose head_branch is this release's protected tooling tag, selected by exact workflow path (the core OpenClaw NPM Release child was missed by the name regex), and refuse a second release:stable process on the same state directory. * fix(release): stop release:stable from mutating child runs and bind dispatch reconciliation to the operator The API cannot prove which publish parent dispatched a child, so the orchestrator no longer approves or cancels children: it approves only the recorded parent's npm-release gate and prints the exact child-approval and stale-child sweep commands until the approval receipt and self-sweeping parent are present at the tooling SHA. Runs dispatched on main are reconciled by workflow path, ref, the operator's login, and a bounded window, refusing on ambiguity; stale-lock takeover retries the exclusive create. (cherry picked from commit 878ee97)
…w#157941) * feat(release): add the resumable release:stable orchestrator pnpm release:stable <version> drives one regular stable release as a resumable state machine (cut, validate, publish, sync-beta, flip-github, macos, closeout) over the existing helpers, with two operator prompts, --from/--status/--dry-run, capability probes for the concurrent publish parent, approval receipt, and closeout changes, and Next: commands on every refusal. RELEASING.md leads with it and keeps the manual fallback. * fix(release): bind release:stable child gates to the tooling tag and lock the state directory Sweep and approve only bot-dispatched children whose head_branch is this release's protected tooling tag, selected by exact workflow path (the core OpenClaw NPM Release child was missed by the name regex), and refuse a second release:stable process on the same state directory. * fix(release): stop release:stable from mutating child runs and bind dispatch reconciliation to the operator The API cannot prove which publish parent dispatched a child, so the orchestrator no longer approves or cancels children: it approves only the recorded parent's npm-release gate and prints the exact child-approval and stale-child sweep commands until the approval receipt and self-sweeping parent are present at the tooling SHA. Runs dispatched on main are reconciled by workflow path, ref, the operator's login, and a bounded window, refusing on ambiguity; stale-lock takeover retries the exclusive create.
What Problem This Solves
The 2026.9.6 stable took 21 hours from takeover to core npm, with 8 publish dispatches, 11 tooling tags, three closeout replays, and every phase driven by hand-written command scripts in a scratchpad. Each step (cut, tooling tag, FRV dispatch and continuation, candidate helper, final tag, publish dispatch, gate approvals, stale-child sweep, dist-tag sync, GitHub flip, macOS validate/preflight/publish, compat inventory, appcast, closeout) had to be remembered, ordered, and re-derived after every failure. Item 9 of the release-speed round-2 brief asks for one resumable orchestrator with two operator decisions.
Summary
pnpm release:stable <version>(scripts/release-stable.mts) models the exact 2026.9.6 sequence as a state machine:cut → validate → publish → sync-beta → flip-github → macos → closeout, with state in.artifacts/release-<version>/state.json(zod-validated, atomic writes, history of every dispatch intent).--from <phase>to restart (recorded ids are kept so a resume never double-dispatches),--statusto inspect,--dry-runto print every command (+ …) without spawning anything or writing state.--confirm-cut-shawithout a TTY) and approve publication (--approve-publication). The single approval authorizes the parent'snpm-releasegates, the npm children's gates (until the approval receipt lands), and themac-releasegates; ClawHub gates are never approved.pnpm ci:full-release(request-file reconcile on resume,pnpm frv continue --failedat most twice),pnpm release:candidate(its printed publish command is parsed, never re-derived),openclaw-npm-dist-tags.yml,openclaw-macos-validate.yml/openclaw-macos-publish.yml,openclaw-stable-main-closeout.yml.npm-releasegate and prints the exact child-approval and stale-child sweep commands (once per run id) until the approval receipt (feat(release): one approval per release via an attested parent approval receipt #157911) and self-sweeping parent (fix(release): let one publish parent dispatch finish #157937,sweep_superseded_children) are present at the tooling SHA. Runs dispatched onmainare reconciled by workflow path, ref, the operator's own login (gh api user), and a [-60 s, +10 min] window; two matches refuse. Astate.lock(pid) refuses a secondrelease:stableon the same state directory; a dead owner's lock is replaced through the same exclusive-create loop.sync_beta_to_stablein the tooling publisher), parent approval receipt (openclaw-release-approval-v1), closeout resolving waivers from sealed publish evidence (published_stable_soak_waiveronmain).Refused: <reason>andNext:with the exact commands (compat inventory PR, notarization resume, appcast PR, closeout PR, publish preflight for resume ids) ending in the resume command; exit 2.Evidence
test/scripts/release-stable.test.ts+release-stable-post.test.ts(fakegh/git/npm/pnpmon PATH, real CLI process): 36 tests covering dry-run through all seven phases without execution or state writes, cut refusals and branch creation, tooling-tag reuse, FRV continue budget, waiver composition, quoted candidate input parsing, single dispatch on resume, stale-child sweep, npm-release-only approvals, receipt-based child-gate suppression, parent failure before npm visibility, beta sync fallback, GitHub flip, compat-inventory refusal, notarization resume command, appcast PR refusal, closeout asset completion,--from macosoverrides, corrupt state refusal, gh GET retry vs single mutation attempt, cross-process state lock (live owner refused, stale owner replaced), other-release bot children and human/push runs never swept or approved, no child POST ever, the manual approval line printed once for this release's waiting child and never for another release's or an older parent's, ambiguous main-ref dispatch refused, actor/path/event/time mismatches not adopted. Deferred findings: release:stable orchestrator follow-ups (beta floor, failed-publisher closeout, late-main closeout, dispatch identity) #157959.pnpm tsgo:scripts,pnpm tsgo:test:root, typed oxlint on the touched files,pnpm deadcode:exports, serializedpnpm check:changedon the rebased tree.gh release view --json isLatest(unsupported field, so the CLI readsisDraft,tagName).