fix(release): restore frozen beta validation (#121791)

Punchcard-Session: coral-summit-brook-8j
This commit is contained in:
Patrick Erichsen
2026-08-10 18:45:42 -07:00
committed by GitHub
parent 595ac6eb28
commit abb856ece4
4 changed files with 52 additions and 3 deletions
+22 -1
View File
@@ -970,7 +970,11 @@ function runProtocolSinceFixture(checkout: string, baseSha: string) {
});
}
function runDependencyCheckFixture(options: { historicalTarget: boolean; scripts: string[] }): {
function runDependencyCheckFixture(options: {
historicalTarget: boolean;
releaseToolingEntry?: boolean;
scripts: string[];
}): {
calls: string[];
output: string;
status: number | null;
@@ -986,9 +990,23 @@ function runDependencyCheckFixture(options: { historicalTarget: boolean; scripts
scripts: Object.fromEntries(options.scripts.map((name) => [name, "true"])),
})}\n`,
);
if (options.releaseToolingEntry) {
mkdirSync(path.join(root, "config"), { recursive: true });
mkdirSync(path.join(root, "scripts"), { recursive: true });
writeFileSync(
path.join(root, "config/knip.config.ts"),
"const repositoryScriptEntries = [\n] as const;\n",
);
writeFileSync(path.join(root, "scripts/generate-dependency-release-evidence.mts"), "");
}
writeExecutable(path.join(fakeBin, "pnpm"), [
"#!/usr/bin/env bash",
"set -euo pipefail",
'if [ "${EXPECT_RELEASE_TOOLING_ENTRY:-false}" = "true" ] &&',
" ! grep -Fq '\"scripts/generate-dependency-release-evidence.mts!\"' config/knip.config.ts; then",
' echo "release-only helper is missing from Knip entries" >&2',
" exit 1",
"fi",
'printf "%s\\n" "$*" >> "$PNPM_CALLS"',
]);
const checkShardRun = readCiWorkflow().jobs["check-shard"].steps.find(
@@ -999,6 +1017,8 @@ function runDependencyCheckFixture(options: { historicalTarget: boolean; scripts
encoding: "utf8",
env: {
...process.env,
EXPECT_RELEASE_TOOLING_ENTRY: options.releaseToolingEntry ? "true" : "false",
FROZEN_TARGET: options.historicalTarget ? "true" : "false",
FORMAT_CHECK: "false",
HISTORICAL_TARGET: options.historicalTarget ? "true" : "false",
PATH: `${fakeBin}:${process.env.PATH ?? ""}`,
@@ -4842,6 +4862,7 @@ printf '%s\n' "\${CURL_SUCCESS_IP:-203.0.113.7}"
const frozenWithExports = runDependencyCheckFixture({
historicalTarget: true,
releaseToolingEntry: true,
scripts: ["deadcode:dependencies", "deadcode:unused-files", "deadcode:exports"],
});
expect(frozenWithExports.status, frozenWithExports.output).toBe(0);
+4 -1
View File
@@ -2370,8 +2370,11 @@ docker_e2e_docker_run_cmd run demo
publishedRunner.indexOf("phase assert-prepublish-requests node"),
);
expect(publishedRunner).toContain('if [ "$candidate_version" = "2026.6.35" ]; then');
expect(publishedRunner).toContain('prepublish_package="@openclaw/whatsapp"');
expect(publishedRunner).toContain('if [ "$SCENARIO" = "configured-plugin-installs" ]; then');
expect(publishedRunner).toContain('prepublish_package="@openclaw/matrix"');
expect(publishedRunner).toContain(
'assert-prepublish-requests "$OPENCLAW_CLAWHUB_URL" "@openclaw/matrix" "$candidate_version"',
'assert-prepublish-requests "$OPENCLAW_CLAWHUB_URL" "$prepublish_package" "$candidate_version"',
);
expect(publishedRunner).toContain('"$clawhub_security_mode"');
expect(publishedRunner.indexOf("phase assert-prepublish-requests node")).toBeLessThan(