Skip to content

Commit b754503

Browse files
authored
fix(release): publish frozen 2026.8.2 with approved Codex pin (#135246)
* fix(release): retain approved Codex pin for frozen 2026.8.2 * test(release): verify trusted plugin planning checkout * test(release): retain workflow case tuple types
1 parent 0b809b7 commit b754503

9 files changed

Lines changed: 260 additions & 27 deletions

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,14 @@ jobs:
196196
git checkout --detach "${TARGET_REF}"
197197
echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
198198
199+
- name: Checkout trusted planning tooling
200+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
201+
with:
202+
persist-credentials: false
203+
ref: ${{ github.workflow_sha }}
204+
path: .release-tooling
205+
fetch-depth: 1
206+
199207
- name: Setup Node environment
200208
uses: ./.github/actions/setup-node-env
201209
with:
@@ -205,24 +213,26 @@ jobs:
205213

206214
- name: Validate publishable plugin metadata
207215
env:
216+
TSX_TSCONFIG_PATH: ${{ github.workspace }}/.release-tooling/tsconfig.json
208217
RELEASE_PLUGINS: ${{ inputs.plugins }}
209218
run: |
210219
set -euo pipefail
211220
if [[ -z "${RELEASE_PLUGINS// }" ]]; then
212221
echo "Plugin ClawHub bootstrap requires at least one package name in plugins." >&2
213222
exit 1
214223
fi
215-
pnpm release:plugins:clawhub:check -- --selection-mode selected --plugins "${RELEASE_PLUGINS}"
224+
node --import tsx .release-tooling/scripts/plugin-clawhub-release-check.ts --selection-mode selected --plugins "${RELEASE_PLUGINS}"
216225
217226
- name: Resolve plugin bootstrap plan
218227
id: plan
219228
env:
229+
TSX_TSCONFIG_PATH: ${{ github.workspace }}/.release-tooling/tsconfig.json
220230
RELEASE_PLUGINS: ${{ inputs.plugins }}
221231
CLAWHUB_REGISTRY: ${{ env.CLAWHUB_REGISTRY }}
222232
run: |
223233
set -euo pipefail
224234
mkdir -p .local
225-
node --import tsx scripts/plugin-clawhub-release-plan.ts \
235+
node --import tsx .release-tooling/scripts/plugin-clawhub-release-plan.ts \
226236
--selection-mode selected \
227237
--plugins "${RELEASE_PLUGINS}" > .local/plugin-clawhub-release-plan.json
228238

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

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,14 @@ jobs:
276276
raise SystemExit(1)
277277
PYTHON
278278
279+
- name: Checkout trusted planning tooling
280+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
281+
with:
282+
persist-credentials: false
283+
ref: ${{ github.workflow_sha }}
284+
path: .release-tooling
285+
fetch-depth: 1
286+
279287
- name: Setup Node environment
280288
uses: ./.github/actions/setup-node-env
281289
with:
@@ -285,6 +293,7 @@ jobs:
285293

286294
- name: Validate publishable plugin metadata
287295
env:
296+
TSX_TSCONFIG_PATH: ${{ github.workspace }}/.release-tooling/tsconfig.json
288297
PUBLISH_SCOPE: ${{ github.event_name == 'workflow_dispatch' && inputs.publish_scope || '' }}
289298
RELEASE_PLUGINS: ${{ github.event_name == 'workflow_dispatch' && inputs.plugins || '' }}
290299
BASE_REF: ${{ github.event_name != 'workflow_dispatch' && github.event.before || '' }}
@@ -296,16 +305,17 @@ jobs:
296305
if [[ -n "${RELEASE_PLUGINS}" ]]; then
297306
release_args+=(--plugins "${RELEASE_PLUGINS}")
298307
fi
299-
pnpm release:plugins:clawhub:check -- "${release_args[@]}"
308+
node --import tsx .release-tooling/scripts/plugin-clawhub-release-check.ts "${release_args[@]}"
300309
elif [[ -n "${BASE_REF}" ]]; then
301-
pnpm release:plugins:clawhub:check -- --base-ref "${BASE_REF}" --head-ref "${HEAD_REF}"
310+
node --import tsx .release-tooling/scripts/plugin-clawhub-release-check.ts --base-ref "${BASE_REF}" --head-ref "${HEAD_REF}"
302311
else
303-
pnpm release:plugins:clawhub:check
312+
node --import tsx .release-tooling/scripts/plugin-clawhub-release-check.ts
304313
fi
305314
306315
- name: Resolve plugin release plan
307316
id: plan
308317
env:
318+
TSX_TSCONFIG_PATH: ${{ github.workspace }}/.release-tooling/tsconfig.json
309319
PUBLISH_SCOPE: ${{ github.event_name == 'workflow_dispatch' && inputs.publish_scope || '' }}
310320
RELEASE_PLUGINS: ${{ github.event_name == 'workflow_dispatch' && inputs.plugins || '' }}
311321
BASE_REF: ${{ github.event_name != 'workflow_dispatch' && github.event.before || '' }}
@@ -319,11 +329,11 @@ jobs:
319329
if [[ -n "${RELEASE_PLUGINS}" ]]; then
320330
plan_args+=(--plugins "${RELEASE_PLUGINS}")
321331
fi
322-
node --import tsx scripts/plugin-clawhub-release-plan.ts "${plan_args[@]}" > .local/plugin-clawhub-release-plan.json
332+
node --import tsx .release-tooling/scripts/plugin-clawhub-release-plan.ts "${plan_args[@]}" > .local/plugin-clawhub-release-plan.json
323333
elif [[ -n "${BASE_REF}" ]]; then
324-
node --import tsx scripts/plugin-clawhub-release-plan.ts --base-ref "${BASE_REF}" --head-ref "${HEAD_REF}" > .local/plugin-clawhub-release-plan.json
334+
node --import tsx .release-tooling/scripts/plugin-clawhub-release-plan.ts --base-ref "${BASE_REF}" --head-ref "${HEAD_REF}" > .local/plugin-clawhub-release-plan.json
325335
else
326-
node --import tsx scripts/plugin-clawhub-release-plan.ts > .local/plugin-clawhub-release-plan.json
336+
node --import tsx .release-tooling/scripts/plugin-clawhub-release-plan.ts > .local/plugin-clawhub-release-plan.json
327337
fi
328338
329339
cat .local/plugin-clawhub-release-plan.json

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

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -123,18 +123,13 @@ jobs:
123123
fetch-depth: 0
124124
filter: blob:none
125125

126-
- name: Checkout trusted preflight tooling
127-
if: github.event_name == 'workflow_dispatch' && inputs.preflight_only
126+
- name: Checkout trusted planning tooling
128127
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
129128
with:
130129
persist-credentials: false
131130
ref: ${{ github.workflow_sha }}
132131
path: .release-tooling
133132
fetch-depth: 1
134-
sparse-checkout: |
135-
scripts/lib/record-shared.mjs
136-
scripts/release-tooling-identity.mjs
137-
sparse-checkout-cone-mode: false
138133

139134
- name: Resolve checked-out ref
140135
id: ref
@@ -329,6 +324,7 @@ jobs:
329324

330325
- name: Validate publishable plugin metadata
331326
env:
327+
TSX_TSCONFIG_PATH: ${{ github.workspace }}/.release-tooling/tsconfig.json
332328
PUBLISH_SCOPE: ${{ github.event_name == 'workflow_dispatch' && inputs.publish_scope || '' }}
333329
RELEASE_PLUGINS: ${{ github.event_name == 'workflow_dispatch' && inputs.plugins || '' }}
334330
BASE_REF: ${{ github.event_name != 'workflow_dispatch' && github.event.before || '' }}
@@ -344,16 +340,17 @@ jobs:
344340
if [[ "${NPM_DIST_TAG}" == "extended-stable" ]]; then
345341
release_args+=(--npm-dist-tag "${NPM_DIST_TAG}")
346342
fi
347-
pnpm release:plugins:npm:check -- "${release_args[@]}"
343+
node --import tsx .release-tooling/scripts/plugin-npm-release-check.ts "${release_args[@]}"
348344
elif [[ -n "${BASE_REF}" ]]; then
349-
pnpm release:plugins:npm:check -- --base-ref "${BASE_REF}" --head-ref "${HEAD_REF}"
345+
node --import tsx .release-tooling/scripts/plugin-npm-release-check.ts --base-ref "${BASE_REF}" --head-ref "${HEAD_REF}"
350346
else
351-
pnpm release:plugins:npm:check
347+
node --import tsx .release-tooling/scripts/plugin-npm-release-check.ts
352348
fi
353349
354350
- name: Resolve plugin release plan
355351
id: plan
356352
env:
353+
TSX_TSCONFIG_PATH: ${{ github.workspace }}/.release-tooling/tsconfig.json
357354
PUBLISH_SCOPE: ${{ github.event_name == 'workflow_dispatch' && inputs.publish_scope || '' }}
358355
RELEASE_PLUGINS: ${{ github.event_name == 'workflow_dispatch' && inputs.plugins || '' }}
359356
BASE_REF: ${{ github.event_name != 'workflow_dispatch' && github.event.before || '' }}
@@ -371,11 +368,11 @@ jobs:
371368
if [[ "${NPM_DIST_TAG}" == "extended-stable" ]]; then
372369
plan_args+=(--npm-dist-tag "${NPM_DIST_TAG}")
373370
fi
374-
node --import tsx scripts/plugin-npm-release-plan.ts "${plan_args[@]}" > .local/plugin-npm-release-plan.json
371+
node --import tsx .release-tooling/scripts/plugin-npm-release-plan.ts "${plan_args[@]}" > .local/plugin-npm-release-plan.json
375372
elif [[ -n "${BASE_REF}" ]]; then
376-
node --import tsx scripts/plugin-npm-release-plan.ts --base-ref "${BASE_REF}" --head-ref "${HEAD_REF}" > .local/plugin-npm-release-plan.json
373+
node --import tsx .release-tooling/scripts/plugin-npm-release-plan.ts --base-ref "${BASE_REF}" --head-ref "${HEAD_REF}" > .local/plugin-npm-release-plan.json
377374
else
378-
node --import tsx scripts/plugin-npm-release-plan.ts > .local/plugin-npm-release-plan.json
375+
node --import tsx .release-tooling/scripts/plugin-npm-release-plan.ts > .local/plugin-npm-release-plan.json
379376
fi
380377
381378
cat .local/plugin-npm-release-plan.json

‎scripts/lib/plugin-npm-release.ts‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,29 @@ function resolveNpmLatestVersion(packageName: string): string {
420420
return parsed.trim();
421421
}
422422

423+
function hasApprovedReleaseDependencyException(
424+
plugin: PublishablePluginPackage,
425+
dependency: { packageName: string; version: string },
426+
): boolean {
427+
if (
428+
plugin.packageName !== "@openclaw/codex" ||
429+
plugin.version !== "2026.8.2" ||
430+
dependency.packageName !== "@openai/codex" ||
431+
dependency.version !== "0.151.0"
432+
) {
433+
return false;
434+
}
435+
// The maintainer-approved frozen release keeps its tested pin; later releases remain strict.
436+
try {
437+
return (
438+
resolveGitCommitSha(plugin.packageDir, "HEAD", "release dependency exception target") ===
439+
"0965053fe6b9341776df147a6934b7485c60b5ca"
440+
);
441+
} catch {
442+
return false;
443+
}
444+
}
445+
423446
export function collectPluginReleaseDependencyFreshnessErrors(
424447
plugins: readonly PublishablePluginPackage[],
425448
resolveLatestVersion: NpmLatestVersionResolver = resolveNpmLatestVersion,
@@ -444,6 +467,12 @@ export function collectPluginReleaseDependencyFreshnessErrors(
444467
}
445468
}
446469
if (dependency.version !== latestVersion) {
470+
if (hasApprovedReleaseDependencyException(plugin, dependency)) {
471+
console.warn(
472+
`${plugin.packageName}@${plugin.version}: approved release dependency exception for 0965053fe6b9341776df147a6934b7485c60b5ca retains ${dependency.packageName} "${dependency.version}"; npm latest is "${latestVersion}".`,
473+
);
474+
continue;
475+
}
447476
errors.push(
448477
`${plugin.packageName}@${plugin.version}: ${dependency.packageName} must match npm latest for release; found "${dependency.version}", latest is "${latestVersion}".`,
449478
);

‎scripts/release-candidate-checklist.mts‎

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import {
3232
validateReleasePreflightTagIdentity,
3333
} from "./npm-preflight-tooling-identity.mjs";
3434
import { validatePluginSdkApiReleaseEvidence } from "./plugin-sdk-api-release-evidence.mjs";
35+
import { verifyReleaseToolingIdentity } from "./release-tooling-identity.mjs";
3536
import {
3637
dedicatedSectionVersionForTag,
3738
extractChangelogReleaseSections,
@@ -108,6 +109,7 @@ const RELEASE_CANDIDATE_STATE_KEYS = [
108109
"targetSha",
109110
"toolingSha",
110111
"workflowRef",
112+
"publishWorkflowRef",
111113
"provider",
112114
"mode",
113115
"releaseProfile",
@@ -145,6 +147,7 @@ Options:
145147
--tag <tag> Planned release tag. The tag must not exist yet.
146148
--target-sha <sha> Frozen release SHA. Defaults to the current HEAD.
147149
--workflow-ref <ref> Trusted workflow ref. Default: main; matching Tideclaw branch required for alpha.
150+
--publish-workflow-ref <tag> Protected publication tooling tag matching the trusted helper checkout.
148151
--repo <owner/repo> GitHub repo. Default: ${DEFAULT_REPO}
149152
--full-release-run <id> Reuse successful Full Release Validation run.
150153
--npm-preflight-run <id> Reuse successful OpenClaw NPM Release preflight run.
@@ -207,6 +210,7 @@ export function parseArgs(argv: string[]) {
207210
tag: "",
208211
targetSha: "",
209212
workflowRef: "",
213+
publishWorkflowRef: "",
210214
fullReleaseRunId: "",
211215
npmPreflightRunId: "",
212216
pluginSdkApiAcknowledgement: "",
@@ -224,6 +228,7 @@ export function parseArgs(argv: string[]) {
224228
["--tag", "tag"],
225229
["--target-sha", "targetSha"],
226230
["--workflow-ref", "workflowRef"],
231+
["--publish-workflow-ref", "publishWorkflowRef"],
227232
["--repo", "repo"],
228233
["--full-release-run", "fullReleaseRunId"],
229234
["--npm-preflight-run", "npmPreflightRunId"],
@@ -286,6 +291,15 @@ export function parseArgs(argv: string[]) {
286291
if (!options.tag.includes("-alpha.") && options.workflowRef !== "main") {
287292
throw new Error("--workflow-ref must be main for regular beta and stable release candidates");
288293
}
294+
if (
295+
options.publishWorkflowRef &&
296+
(options.tag.includes("-alpha.") ||
297+
!/^release-publish\/[a-f0-9]{12}-[1-9][0-9]*$/u.test(options.publishWorkflowRef))
298+
) {
299+
throw new Error(
300+
"--publish-workflow-ref must name a protected release-publish tag for a regular release",
301+
);
302+
}
289303
options.releaseProfile ||=
290304
options.tag.includes("-alpha.") || options.tag.includes("-beta.") ? "beta" : "stable";
291305
if (!["beta", "stable", "full"].includes(options.releaseProfile)) {
@@ -451,6 +465,7 @@ export function buildReleaseCandidateState(
451465
targetSha,
452466
toolingSha,
453467
workflowRef: options.workflowRef,
468+
publishWorkflowRef: options.publishWorkflowRef,
454469
provider: options.provider,
455470
mode: options.mode,
456471
releaseProfile: options.releaseProfile,
@@ -1461,7 +1476,9 @@ function pluginPlanArgs(options: ReturnType<typeof parseArgs>) {
14611476

14621477
function collectPluginPlan(script: string, options: ReturnType<typeof parseArgs>): unknown {
14631478
return JSON.parse(
1464-
run("node", ["--import", "tsx", script, ...pluginPlanArgs(options)], { capture: true }),
1479+
run("node", ["--import", "tsx", join(TOOLING_ROOT, script), ...pluginPlanArgs(options)], {
1480+
capture: true,
1481+
}),
14651482
);
14661483
}
14671484

@@ -1505,7 +1522,8 @@ export function buildPublishCommand(
15051522
npmPreflightSource?: Awaited<ReturnType<typeof validateNpmPreflightRunSource>>,
15061523
) {
15071524
const workflowRef =
1508-
npmPreflightSource?.workflowRef ??
1525+
options.publishWorkflowRef ||
1526+
npmPreflightSource?.workflowRef ||
15091527
(options.tag.includes("-alpha.") ? options.workflowRef : "main");
15101528
if (options.tag.includes("-alpha.") && !TIDECLAW_ALPHA_WORKFLOW_REF_PATTERN.test(workflowRef)) {
15111529
throw new Error(
@@ -1872,6 +1890,15 @@ async function main() {
18721890
toolingTrackedStatus: gitTrackedStatus(TOOLING_ROOT),
18731891
workflowRef: options.workflowRef,
18741892
});
1893+
// Publication may use repaired tooling while the prepared tarball retains its original producer.
1894+
const publishWorkflowIdentity = options.publishWorkflowRef
1895+
? verifyReleaseToolingIdentity({
1896+
repository: options.repo,
1897+
workflowRef: options.publishWorkflowRef,
1898+
workflowFullRef: `refs/tags/${options.publishWorkflowRef}`,
1899+
workflowSha: toolingSha,
1900+
})
1901+
: undefined;
18751902
options.parallelsRegistryPackageArtifacts = options.parallelsRegistryPackageArtifactDirs.map(
18761903
(artifactDir) =>
18771904
validateParallelsRegistryPackageArtifact(artifactDir, {
@@ -2148,6 +2175,7 @@ async function main() {
21482175
tag: options.tag,
21492176
targetSha,
21502177
workflowRef: options.workflowRef,
2178+
publishWorkflowIdentity,
21512179
npmDistTag: options.npmDistTag,
21522180
fullReleaseValidationRunId: options.fullReleaseRunId,
21532181
fullReleaseValidationRunAttempt: fullRun.runAttempt,

0 commit comments

Comments
 (0)