Repository navigation
feat(release): publish npm children in npm-publish behind the single parent approval - #158500
Conversation
…parent approval The parent's npm-release approval already mints an attested receipt. The npm children now publish in the npm-publish environment (release-publish/* tags only, no reviewers) where the npm trusted publishers are rebound, and skip their own human gate when the receipt verifies. Direct, manual, and recovery dispatch keeps a separate npm-release approval job. On the receipt route the publish job waits for the parent attempt's authorization through the shared awaiter that ClawHub uses, which also requires the parent to still be live. Real publishes and OIDC preflight fail fast unless dispatched from a protected release-publish tag. Extended-stable core receipts now verify from trusted tooling. The parent no longer approves or prints npm child gates, and release:stable detects npm-publish tooling before printing child approval commands.
|
🦞👀 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, 10:14 PM ET / September 26, 2026, 02:14 UTC (Revision 4). ClawSweeper reviewWhat this changesThe branch moves core and plugin npm publication to a tag-restricted GitHub environment, lets a verified parent approval replace child approvals, and updates release recovery, saved state, tests, and operator guidance. Merge readiness⛔ Blocked before merge - 6 items remain Keep this PR open. Current main still requires separate npm child approvals, and the branch addresses that remaining release workflow. The npm registry cutover and final-effect authority proof remain unresolved. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw's release parent receives a qualified candidate and human approval, then dispatches npm child workflows. Those children validate publication authority before sending immutable packages to npm. flowchart LR
A[Qualified candidate] --> B[Parent approval]
B --> C[Approval receipt]
C --> D{Child authorization}
E[Direct recovery approval] --> D
D --> F[Live parent check]
F --> G[npm publish environment]
G --> H[npm registry]
Decision needed
Why: The PR records intent to collect live proof on the first publish after merge, but the authority proof gate has no recorded override and the external registry bindings must change in the same window. Before merge
Findings
Agent review detailsSecurityNeeds attention: No concrete bypass was found, but receipt-only publication lacks observed final-effect proof for a completed or revoked parent. PR surfaceTests +466, Docs +26, Config +4, Other +16. Total +512 across 25 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the parent approval as release authority and a separate approval for direct recovery, then activate the new route with verified registry bindings and an explicit final-effect proof disposition. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a release-workflow improvement. Current main's separate npm child gates establish the existing behavior. Is this the best way to solve the issue? Yes, the split direct-recovery approval and tag-restricted publication fit the existing release owner. Activation still depends on the registry readback and an explicit authority-proof disposition. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 25f4dfa5aff5. LabelsLabel changes: No label changes. Label justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
…ase-speed/npm-publish-env # Conflicts: # docs/reference/RELEASING.md # scripts/lib/release-stable-state.mts # test/scripts/release-stable.test-support.ts # test/scripts/release-stable.test.ts
On the receipt route no human approves the npm child, so every final plugin publish step (artifact check, OIDC publish, token-bootstrap publish) now re-verifies the release parent with the live-only policy immediately before npm I/O; a parent that completed with any conclusion refuses. The human-approved route keeps active-or-failure, and core's publish step was already live-only. Document tag-based manual recovery.
|
Release-owner cutover record:
|
…parent approval (#158500) * feat(release): publish npm children in npm-publish behind the single parent approval The parent's npm-release approval already mints an attested receipt. The npm children now publish in the npm-publish environment (release-publish/* tags only, no reviewers) where the npm trusted publishers are rebound, and skip their own human gate when the receipt verifies. Direct, manual, and recovery dispatch keeps a separate npm-release approval job. On the receipt route the publish job waits for the parent attempt's authorization through the shared awaiter that ClawHub uses, which also requires the parent to still be live. Real publishes and OIDC preflight fail fast unless dispatched from a protected release-publish tag. Extended-stable core receipts now verify from trusted tooling. The parent no longer approves or prints npm child gates, and release:stable detects npm-publish tooling before printing child approval commands. * fix(release): require a live parent before receipt-route npm publication On the receipt route no human approves the npm child, so every final plugin publish step (artifact check, OIDC publish, token-bootstrap publish) now re-verifies the release parent with the live-only policy immediately before npm I/O; a parent that completed with any conclusion refuses. The human-approved route keeps active-or-failure, and core's publish step was already live-only. Document tag-based manual recovery. * test(release): expect waiting npm child cleanup without gate rejection * test(release): align plugin npm ref admission fixtures with protected-tag publication (cherry picked from commit 68f7ba1)
…parent approval (openclaw#158500) * feat(release): publish npm children in npm-publish behind the single parent approval The parent's npm-release approval already mints an attested receipt. The npm children now publish in the npm-publish environment (release-publish/* tags only, no reviewers) where the npm trusted publishers are rebound, and skip their own human gate when the receipt verifies. Direct, manual, and recovery dispatch keeps a separate npm-release approval job. On the receipt route the publish job waits for the parent attempt's authorization through the shared awaiter that ClawHub uses, which also requires the parent to still be live. Real publishes and OIDC preflight fail fast unless dispatched from a protected release-publish tag. Extended-stable core receipts now verify from trusted tooling. The parent no longer approves or prints npm child gates, and release:stable detects npm-publish tooling before printing child approval commands. * fix(release): require a live parent before receipt-route npm publication On the receipt route no human approves the npm child, so every final plugin publish step (artifact check, OIDC publish, token-bootstrap publish) now re-verifies the release parent with the live-only policy immediately before npm I/O; a parent that completed with any conclusion refuses. The human-approved route keeps active-or-failure, and core's publish step was already live-only. Document tag-based manual recovery. * test(release): expect waiting npm child cleanup without gate rejection * test(release): align plugin npm ref admission fixtures with protected-tag publication
What Problem This Solves
#157911 made the parent's
npm-releaseapproval mint an attested receipt, which lets the ClawHub child run without its own gate. The npm children still ran their publish jobs innpm-release, because the npm trusted publishers were bound to that environment. As a result, every release still needed separate human approvals on the plugin npm child and the core npm child.The coordinator created a new
npm-publishenvironment with no reviewers and a deployment policy that admits onlyrelease-publish/*tags (protected by ruleset 22730712). The coordinator is rebinding all 99 npm trusted publishers to it: 4 onopenclaw-npm-release.yml(openclawplus the gateway packages) and 95 onplugin-npm-release.yml. This PR moves the workflows so that one parent approval covers the whole release. The registry rebinding and this merge must land together.Summary
Children (
openclaw-npm-release.yml,plugin-npm-release.yml): the OIDC publish jobs (publish_openclaw_npm,publish_plugins_npm) and plugintrusted_publisher_preflightnow run inenvironment: npm-publishon every route.approve_openclaw_npm_release/approve_plugins_npm_releasejobs (environment: npm-release). These run only when the parent receipt did not verify (direct, manual, or recovery dispatch) and are skipped whenparent_approval == 'receipt'.always() && !cancelled() && validation success && (approval success || (approval skipped && parent_approval == 'receipt')).Parent authorization, shared helper:
awaitClawHubParentAuthorizationbecomes oneawaitParentAuthorization, parameterized by artifact name. ClawHub keeps its child-bound v2 artifact and detached behavior.wait-npm-authorizationcommand: on the receipt route, runs immediately beforenpm publishand the bootstrap-token publish.Extended-stable: core receipt verification now runs from a trusted checkout of
github.workflow_sha, so parent-dispatched extended-stable publishes also need only the parent approval. Before this, the receipt step was skipped on that route.Ref check fails fast: real (non-preflight) publishes and OIDC preflight require a
release-publish/<sha12>-<n>ref before anyone approves anything. Admissions thatnpm-publishcan no longer serve are removed:main,release/*,extended-stable/*branch publishes, and Tideclaw alpha branches.Parent (
openclaw-release-publish.yml,scripts/lib/release-publish-children.sh): npm children are awaited without approving or printing gates.approved_environmentparameter and its early return are deleted.cleanup_waiting_npm_childrenno longer rejects deployments.clawhub-plugin-bootstrapapproval are unchanged.npm-releaseapproval andapprove_github_releaseare unchanged.release:stable: new capabilitychildNpmPublishEnvironment, detected from the tooling SHA'sopenclaw-npm-release.yml. The orchestrator no longer prints child approval commands onnpm-publishtooling, and still prints them for older tooling.parentApprovalReceipthad no other consumer and is removed; state files from an in-flight release that still carry it load and trigger a re-probe.npm-token bootstrap route: covers the 4 plugins that have no trusted publisher (babelfish, crabbox-plugin, onnx, typesafe). It keeps working because
NPM_TOKENis a repository secret; neither environment has environment secrets.Docs and skills:
RELEASING.md,regular-release.md,publication-recovery.md,extended-stable-publish.md,first-package.md,release-openclaw-ci(Publish children), plugin-testing, and nightly. They now describe one parent approval, thenpm-publishenvironment and its tag policy, and trusted publishers bound tonpm-publish. Manual child dispatch still needsnpm-releaseand must use arelease-publish/*tag. Placeholder and bootstrap summaries now point operators atnpm-publish.Live parent re-verified right before
npm publish(ClawSweeper P1): on the receipt route, where no human approved the child, every final plugin publish step now verifies the parent with the live-onlyactivepolicy. That covers the early artifact step, the OIDC publish, and the token-bootstrap publish. The parent run and attempt must be queued, requested, pending, waiting, or in_progress with a null conclusion; a completed parent refuses with any conclusion.Publishstep already usedactiveon the bot route immediately beforeopenclaw-npm-publish.sh --publish.active-or-failurestays only on the human-approved route, where children may still finish after a parent fails. Direct human recovery keepsmanual-recovery.Maintainer decisions (release owner, authorized by Peter)
--workflow-sha(ensureReleasePublishToolingTag, feat(release): mint the protected tooling tag from a trusted main SHA #157896).publication-recovery.mddocuments this.npm-publishin the same window as this merge and verified with annpm trust listreadback: 4 core packages onopenclaw-npm-release.ymland 95 plugins onplugin-npm-release.yml. The 4 plugins without a trusted publisher (babelfish, crabbox-plugin, onnx, typesafe) keep publishing through the token-bootstrap route.Callers checked
openclaw-release-publish.yml(beta/stable/extended-stable)release-publish/*tagrelease:stable, candidate checklist,release:publish-preflightrelease-publish/*tagopenclaw-release-ready.mjspreflight_only=truemain, now arelease-publish/*tag +release_candidate_branchnpm-releaseapproval jobmain,preflight_only=truestable-publish-recovery.mjs,openclaw-npm-resume-run.mtstideclaw/alpha/*branchTideclaw alpha blocker (not caused by this PR): Tideclaw alpha publication is already broken on main. The parent's receipt
create(refIdentity) rejectstideclaw/alpha/*refs, and alpha branch SHAs are not reachable frommain, soensureReleasePublishToolingTagcannot mint a tooling tag for them. This PR does not widen the environment policy. The nightly skill now records the blocker instead of instructing a dispatch.Evidence
node scripts/run-vitest.mjs run --maxWorkers=2across 9 suites: 277/277 passed (182s wall). The suites: release-approval-receipt, clawhub-parent-authorization, release-approval-workflows, release-publish-children, openclaw-npm-extended-stable-workflow, plugin-npm-extended-stable-workflow, release-stable, release-stable-post, release-runner-routing.--maxWorkers=1):package-acceptance-workflow.test.ts(runs serially; its unchanged 420s planner cases dominate): run bydescribeblock.origin/mainunder identical load, base and branch both passed all four with equal timings (about 9s each), so these failures are host load, not this change.release-approval-workflows.test.tscover all three final publish steps (corePublish, plugin OIDC, plugin bootstrap). The receipt route resolves toactive, a parent that failed or succeeded between the authorization wait and the publish is refused, a live parent is admitted, and the parent check precedes the npm mutation in each script. The file passes 13/13 in 22s wall (--maxWorkers=1). These cases fail against the previousactive-or-failurepolicy.pnpm check:workflows: passed (zizmor, CI Git owner, composite interpolation).pnpm check:changed(after a fresh frozen-lockfile install): every lane passed (conflict markers, line-cap ratchet, formatting, core tsgo boundary, script and test-root typecheck, Knip dead-export scan, script lint) except test-root lint. Its two findings, a test-only TS2532 and three unnecessary conversions, are fixed; a targeted oxlint rerun on both files is clean. CI is authoritative for the remaining lanes on this head.npm-publish. The workflows and the registry must switch together.