Skip to content

Commit 3ed12b8

Browse files
fix(release): complete ClawHub publication after parent success (#134053)
* fix: restore gateway recovery fixture lint and types Preserve the recovery coverage added in #134165 while using the actual WebSocket dependency and authored SecretRef fixture boundary. Co-authored-by: Shakker <[email protected]> * fix(release): bind ClawHub staging to exact parent transactions Seal packed inventories before parent authorization, preserve distinct parent and child refs, and verify public bytes after terminal success. Record immutable npm producer provenance and avoid claiming historical OIDC authentication from artifact readback. * fix(release): pin ClawHub parent receipt contract Use the reviewed merged reusable workflow with parent-only 64 KiB receipt parsing and bounded file preflight. Keep v2 identity and recovery limits unchanged. * fix: authenticate CI checkout and lazy blob fetches * fix: prepare immutable reader history during CI checkout * fix(ci): declare historical reader selector entry point * test(release): follow canonical publication helpers * perf(anthropic): defer auth and catalog runtime imports Keep provider descriptors synchronous without importing credential stores, external auth discovery, or live catalog transport during registration. Load those implementations only when the existing asynchronous setup, doctor, usage, and catalog hooks need them. Expose the existing lightweight API-key descriptor factory through provider-entry while preserving the shipped auth SDK helpers and their synchronous contracts. The unchanged fresh-process registry proof retains its original timeout and verifies scoped failover without global activation. * docs(release): clarify optional ClawHub staging wait * docs(plugins): use public provider auth import in tutorial * test(ui): await agent menu lifecycle before keyboard navigation Wait for opening focus initialization and visible popup retirement before exercising selection and typing ownership. Preserve the existing focus, selected-agent, and composer assertions without changing product behavior or timeouts. * docs(release): explain parent-bound ClawHub repair authority --------- Co-authored-by: Shakker <[email protected]>
1 parent eebf68d commit 3ed12b8

23 files changed

Lines changed: 3339 additions & 1351 deletions

‎.github/workflows/openclaw-npm-release.yml‎

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,8 @@ jobs:
518518
- name: Pack prepared npm tarball
519519
id: packed_tarball
520520
env:
521+
PREFLIGHT_WORKFLOW_REF: ${{ github.workflow_ref }}
522+
PREFLIGHT_WORKFLOW_SHA: ${{ github.workflow_sha }}
521523
OPENCLAW_PREPACK_PREPARED: "1"
522524
RELEASE_REF: ${{ inputs.tag }}
523525
RELEASE_NPM_DIST_TAG: ${{ inputs.npm_dist_tag }}
@@ -723,7 +725,14 @@ jobs:
723725
fs.readFileSync(".artifacts/plugin-sdk-api-release-evidence.json", "utf8"),
724726
);
725727
const manifest = {
726-
version: 1,
728+
version: 2,
729+
producer: {
730+
repository: process.env.GITHUB_REPOSITORY,
731+
workflowRef: process.env.PREFLIGHT_WORKFLOW_REF,
732+
workflowSha: process.env.PREFLIGHT_WORKFLOW_SHA,
733+
runId: process.env.GITHUB_RUN_ID,
734+
runAttempt: process.env.GITHUB_RUN_ATTEMPT,
735+
},
727736
releaseTag: process.env.RELEASE_TAG,
728737
releaseSha: process.env.RELEASE_SHA,
729738
npmDistTag: process.env.RELEASE_NPM_DIST_TAG,
@@ -1181,6 +1190,7 @@ jobs:
11811190
exit 1
11821191
fi
11831192
echo "head_sha=${preflight_head_sha}" >> "$GITHUB_OUTPUT"
1193+
echo "head_branch=${preflight_head_branch}" >> "$GITHUB_OUTPUT"
11841194
echo "run_attempt=${preflight_run_attempt}" >> "$GITHUB_OUTPUT"
11851195
11861196
- name: Download full release validation manifest
@@ -1360,6 +1370,9 @@ jobs:
13601370
RELEASE_NPM_DIST_TAG: ${{ inputs.npm_dist_tag }}
13611371
PLUGIN_SDK_API_ACKNOWLEDGEMENT: ${{ inputs.plugin_sdk_api_acknowledgement }}
13621372
PREFLIGHT_WORKFLOW_SHA: ${{ steps.preflight_run.outputs.head_sha }}
1373+
PREFLIGHT_WORKFLOW_BRANCH: ${{ steps.preflight_run.outputs.head_branch }}
1374+
PREFLIGHT_RUN_ID: ${{ inputs.preflight_run_id }}
1375+
PREFLIGHT_RUN_ATTEMPT: ${{ steps.preflight_run.outputs.run_attempt }}
13631376
run: |
13641377
set -euo pipefail
13651378
EXPECTED_RELEASE_SHA="$(git rev-parse HEAD)"
@@ -1369,6 +1382,17 @@ jobs:
13691382
ls -la preflight-tarball >&2 || true
13701383
exit 1
13711384
fi
1385+
producer_full_ref="refs/heads/${PREFLIGHT_WORKFLOW_BRANCH}"
1386+
if [[ "$PREFLIGHT_WORKFLOW_BRANCH" == release-publish/* ]]; then
1387+
producer_full_ref="refs/tags/${PREFLIGHT_WORKFLOW_BRANCH}"
1388+
fi
1389+
node trusted-workflow/scripts/npm-preflight-tooling-identity.mjs \
1390+
--manifest "$MANIFEST_FILE" \
1391+
--repository "$GITHUB_REPOSITORY" \
1392+
--workflow-full-ref "$producer_full_ref" \
1393+
--workflow-sha "$PREFLIGHT_WORKFLOW_SHA" \
1394+
--run-id "$PREFLIGHT_RUN_ID" \
1395+
--run-attempt "$PREFLIGHT_RUN_ATTEMPT"
13721396
ARTIFACT_RELEASE_TAG="$(jq -r '.releaseTag // ""' "$MANIFEST_FILE")"
13731397
ARTIFACT_RELEASE_SHA="$(jq -r '.releaseSha // ""' "$MANIFEST_FILE")"
13741398
ARTIFACT_RELEASE_NPM_DIST_TAG="$(jq -r '.npmDistTag // ""' "$MANIFEST_FILE")"

‎.github/workflows/openclaw-release-publish.yml‎

Lines changed: 164 additions & 1252 deletions
Large diffs are not rendered by default.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Plugin ClawHub Postpublish
2+
3+
on:
4+
workflow_run: # zizmor: ignore[dangerous-triggers] read-only verifier; authenticates exact successful parent/child attempts and immutable receipt/artifact tuples; never executes downloaded content
5+
workflows: [OpenClaw Release Publish]
6+
types: [completed]
7+
8+
permissions:
9+
actions: read
10+
contents: read
11+
12+
concurrency:
13+
group: plugin-clawhub-postpublish-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}
14+
cancel-in-progress: false
15+
16+
env:
17+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
18+
19+
jobs:
20+
verify:
21+
if: >-
22+
github.repository == 'openclaw/openclaw' &&
23+
github.event.workflow_run.repository.full_name == 'openclaw/openclaw' &&
24+
github.event.workflow_run.event == 'workflow_dispatch' &&
25+
github.event.workflow_run.conclusion == 'success'
26+
runs-on: ubuntu-latest
27+
timeout-minutes: 60
28+
steps:
29+
- name: Checkout trusted verification tooling
30+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
31+
with:
32+
persist-credentials: false
33+
ref: ${{ github.workflow_sha }}
34+
fetch-depth: 1
35+
36+
- name: Setup Node
37+
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
38+
with:
39+
node-version: "24.19.0"
40+
41+
- name: Verify terminal publication and canonical registry bytes
42+
env:
43+
GH_TOKEN: ${{ github.token }}
44+
VERIFIER_SHA: ${{ github.workflow_sha }}
45+
run: node scripts/clawhub-postpublish.mjs
46+
47+
- name: Retain publication verification evidence
48+
if: always()
49+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
50+
with:
51+
name: clawhub-postpublish-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}
52+
path: ${{ runner.temp }}/clawhub-postpublish/evidence.json
53+
if-no-files-found: warn
54+
retention-days: 30

‎.github/workflows/plugin-clawhub-release.yml‎

Lines changed: 69 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,7 @@ jobs:
427427
- name: Validate release publish approval run
428428
env:
429429
ALLOW_COMPLETED_SUCCESSFUL_PARENT: "true"
430+
DRY_RUN: ${{ inputs.dry_run && 'true' || 'false' }}
430431
GH_TOKEN: ${{ github.token }}
431432
RELEASE_PUBLISH_RUN_ID: ${{ inputs.release_publish_run_id }}
432433
EXPECTED_RUN_ATTEMPT: ${{ inputs.release_publish_run_attempt }}
@@ -436,12 +437,12 @@ jobs:
436437
run: |
437438
set -euo pipefail
438439
if [[ -z "${RELEASE_PUBLISH_RUN_ID// }" ]]; then
439-
if [[ "${GITHUB_ACTOR}" == "github-actions[bot]" ]]; then
440-
echo "Plugin ClawHub publish dispatched by another workflow must include release_publish_run_id." >&2
441-
exit 1
440+
if [[ "${DRY_RUN}" == "true" ]]; then
441+
echo "Validation-only ClawHub package preparation; no publication authority requested."
442+
exit 0
442443
fi
443-
echo "Direct Plugin ClawHub Release dispatch; relying on this workflow's clawhub-plugin-release environment approval."
444-
exit 0
444+
echo "ClawHub OIDC publication requires a release parent with an exact transaction authorization receipt. Use the release parent workflow, or the separately authenticated manual ClawHub owner route." >&2
445+
exit 1
445446
fi
446447
direct_recovery=false
447448
if [[ "${GITHUB_ACTOR}" != "github-actions[bot]" ]]; then
@@ -534,9 +535,59 @@ jobs:
534535
if-no-files-found: error
535536
retention-days: 7
536537

537-
approve_plugins_clawhub_release:
538+
seal_clawhub_transactions:
539+
name: Seal ClawHub package transactions
538540
needs: [preview_plugins_clawhub, pack_plugins_clawhub_artifacts]
539-
if: always() && github.event_name == 'workflow_dispatch' && inputs.dry_run != true && needs.preview_plugins_clawhub.outputs.has_candidates == 'true' && needs.pack_plugins_clawhub_artifacts.result == 'success'
541+
if: github.event_name == 'workflow_dispatch' && inputs.dry_run != true && needs.preview_plugins_clawhub.outputs.has_candidates == 'true'
542+
runs-on: ubuntu-latest
543+
permissions:
544+
actions: read
545+
contents: read
546+
outputs:
547+
identity: ${{ steps.seal.outputs.identity }}
548+
steps:
549+
- name: Checkout trusted transaction tooling
550+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
551+
with:
552+
persist-credentials: false
553+
ref: ${{ github.workflow_sha }}
554+
- name: Setup Node
555+
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
556+
with:
557+
node-version: ${{ env.NODE_VERSION }}
558+
- name: Download exact packed transactions
559+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
560+
with:
561+
pattern: clawhub-package-*
562+
path: ${{ runner.temp }}/clawhub-transactions/packages
563+
- name: Seal actual packed inventories
564+
id: seal
565+
env:
566+
TARGET_SHA: ${{ needs.preview_plugins_clawhub.outputs.ref_revision }}
567+
PACKAGE_MATRIX: ${{ needs.preview_plugins_clawhub.outputs.matrix }}
568+
RELEASE_PUBLISH_RUN_ID: ${{ inputs.release_publish_run_id }}
569+
RELEASE_PUBLISH_RUN_ATTEMPT: ${{ inputs.release_publish_run_attempt }}
570+
RELEASE_PUBLISH_BRANCH: ${{ inputs.release_publish_branch }}
571+
RELEASE_PUBLISH_FULL_REF: ${{ inputs.release_publish_full_ref }}
572+
RELEASE_PUBLISH_WORKFLOW_SHA: ${{ inputs.release_publish_workflow_sha }}
573+
run: |
574+
set -euo pipefail
575+
printf '%s' "$PACKAGE_MATRIX" > "$RUNNER_TEMP/clawhub-transactions/matrix.json"
576+
node scripts/clawhub-parent-authorization.mjs seal \
577+
--matrix "$RUNNER_TEMP/clawhub-transactions/matrix.json" \
578+
--directory "$RUNNER_TEMP/clawhub-transactions/packages" \
579+
--output "$RUNNER_TEMP/clawhub-transactions/transactions.json"
580+
- name: Upload exact transaction identity
581+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
582+
with:
583+
name: ${{ steps.seal.outputs.artifact_name }}
584+
path: ${{ runner.temp }}/clawhub-transactions/transactions.json
585+
if-no-files-found: error
586+
retention-days: 30
587+
588+
approve_plugins_clawhub_release:
589+
needs: [preview_plugins_clawhub, pack_plugins_clawhub_artifacts, seal_clawhub_transactions]
590+
if: always() && github.event_name == 'workflow_dispatch' && inputs.dry_run != true && needs.preview_plugins_clawhub.outputs.has_candidates == 'true' && needs.pack_plugins_clawhub_artifacts.result == 'success' && needs.seal_clawhub_transactions.result == 'success'
540591
runs-on: ubuntu-latest
541592
environment: clawhub-plugin-release
542593
permissions:
@@ -548,9 +599,14 @@ jobs:
548599
549600
publish_plugins_clawhub:
550601
needs:
551-
[preview_plugins_clawhub, pack_plugins_clawhub_artifacts, approve_plugins_clawhub_release]
602+
[
603+
preview_plugins_clawhub,
604+
pack_plugins_clawhub_artifacts,
605+
seal_clawhub_transactions,
606+
approve_plugins_clawhub_release,
607+
]
552608
if: always() && github.event_name == 'workflow_dispatch' && needs.preview_plugins_clawhub.outputs.has_candidates == 'true' && needs.pack_plugins_clawhub_artifacts.result == 'success' && (inputs.dry_run == true || needs.approve_plugins_clawhub_release.result == 'success')
553-
uses: openclaw/clawhub/.github/workflows/package-publish.yml@87ca030c30f3cfb78ab15c8e66b5ff1469c8f9c8 # v0.23.3
609+
uses: openclaw/clawhub/.github/workflows/package-publish.yml@db2a12c4625ffa162910a3e6aa2cb786ced89e2f # reviewed parent receipt contract
554610
permissions:
555611
actions: read
556612
contents: read
@@ -561,6 +617,8 @@ jobs:
561617
matrix:
562618
plugin: ${{ fromJson(needs.preview_plugins_clawhub.outputs.matrix) }}
563619
with:
620+
trusted_tooling_identity_json: ${{ needs.seal_clawhub_transactions.outputs.identity }}
621+
wait_for_publication: false
564622
package_artifact_name: ${{ matrix.plugin.artifactName }}
565623
dry_run: ${{ inputs.dry_run }}
566624
registry: https://clawhub.ai
@@ -574,52 +632,5 @@ jobs:
574632
inspector_artifact_name: ${{ matrix.plugin.artifactName }}-inspector
575633
publish_json_artifact_name: ${{ matrix.plugin.artifactName }}-publish-json
576634

577-
verify_published_clawhub_package:
578-
needs: [preview_plugins_clawhub, publish_plugins_clawhub]
579-
if: github.event_name == 'workflow_dispatch' && inputs.dry_run != true && needs.preview_plugins_clawhub.outputs.has_candidates == 'true'
580-
runs-on: ubuntu-latest
581-
timeout-minutes: 45
582-
permissions:
583-
actions: read
584-
contents: read
585-
strategy:
586-
fail-fast: false
587-
max-parallel: 32
588-
matrix:
589-
plugin: ${{ fromJson(needs.preview_plugins_clawhub.outputs.matrix) }}
590-
steps:
591-
- name: Checkout verification tooling
592-
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
593-
with:
594-
persist-credentials: false
595-
ref: ${{ github.sha }}
596-
fetch-depth: 1
597-
598-
- name: Setup Node environment
599-
uses: ./.github/actions/setup-node-env
600-
with:
601-
cache-mode: off
602-
node-version: ${{ env.NODE_VERSION }}
603-
install-bun: "false"
604-
install-deps: "false"
605-
606-
- name: Download published package input
607-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
608-
with:
609-
name: ${{ matrix.plugin.artifactName }}
610-
path: ${{ runner.temp }}/clawhub-package-artifact
611-
612-
- name: Verify published ClawHub package
613-
env:
614-
CLAWHUB_REGISTRY: ${{ env.CLAWHUB_REGISTRY }}
615-
PACKAGE_NAME: ${{ matrix.plugin.packageName }}
616-
PACKAGE_VERSION: ${{ matrix.plugin.version }}
617-
PACKAGE_TAG: ${{ matrix.plugin.publishTag }}
618-
run: |
619-
set -euo pipefail
620-
node scripts/verify-clawhub-published-artifact.mjs \
621-
--expected-artifact-dir "${RUNNER_TEMP}/clawhub-package-artifact" \
622-
--package-name "${PACKAGE_NAME}" \
623-
--package-version "${PACKAGE_VERSION}" \
624-
--publish-tag "${PACKAGE_TAG}" \
625-
--registry "${CLAWHUB_REGISTRY}"
635+
# Exact public artifact verification runs in plugin-clawhub-postpublish.yml
636+
# after the authorizing parent succeeds. Waiting here would deadlock staging.

0 commit comments

Comments
 (0)