ci: time-box package acceptance legacy compat

This commit is contained in:
Peter Steinberger
2026-04-27 07:11:11 +01:00
parent e6d2c9b080
commit 44a504cd39
10 changed files with 256 additions and 16 deletions

View File

@@ -8,6 +8,8 @@ const INSTALL_E2E_RUNNER_PATH = "scripts/docker/install-sh-e2e/run.sh";
const OPENAI_WEB_SEARCH_MINIMAL_E2E_PATH = "scripts/e2e/openai-web-search-minimal-docker.sh";
const PLUGINS_DOCKER_E2E_PATH = "scripts/e2e/plugins-docker.sh";
const PLUGIN_UPDATE_DOCKER_E2E_PATH = "scripts/e2e/plugin-update-unchanged-docker.sh";
const DOCTOR_SWITCH_DOCKER_E2E_PATH = "scripts/e2e/doctor-install-switch-docker.sh";
const UPDATE_CHANNEL_SWITCH_DOCKER_E2E_PATH = "scripts/e2e/update-channel-switch-docker.sh";
const CENTRALIZED_BUILD_SCRIPTS = [
"scripts/docker/setup.sh",
"scripts/e2e/browser-cdp-snapshot-docker.sh",
@@ -75,10 +77,31 @@ describe("docker build helper", () => {
expect(runner).toContain("plugin install record changed unexpectedly");
expect(runner).toContain("index.installRecords ?? index.records ?? config.plugins?.installs");
expect(runner).not.toContain("Config changed unexpectedly");
expect(runner).toContain("Config changed unexpectedly for modern package");
expect(runner).not.toContain("before_hash");
});
it("caps package acceptance legacy compatibility at 2026.4.25", () => {
const scripts = [
readFileSync(DOCTOR_SWITCH_DOCKER_E2E_PATH, "utf8"),
readFileSync(UPDATE_CHANNEL_SWITCH_DOCKER_E2E_PATH, "utf8"),
readFileSync(PLUGINS_DOCKER_E2E_PATH, "utf8"),
readFileSync(PLUGIN_UPDATE_DOCKER_E2E_PATH, "utf8"),
];
for (const script of scripts) {
expect(script).toContain("2026, 4, 25");
}
expect(scripts.join("\n")).toContain("OPENCLAW_PACKAGE_ACCEPTANCE_LEGACY_COMPAT");
expect(scripts.join("\n")).toContain(
"Package $package_version must support gateway install --wrapper.",
);
expect(scripts.join("\n")).toContain("expected persisted update.channel dev");
expect(scripts.join("\n")).toContain(
"expected modern installRecords in installed plugin index",
);
});
it("passes installer tag env to bash, not curl", () => {
const runner = readFileSync(INSTALL_E2E_RUNNER_PATH, "utf8");