test(release): narrow Parallels agent smoke plugins

This commit is contained in:
Peter Steinberger
2026-04-29 10:25:52 +01:00
parent 9aa980bf8e
commit d2fc7b39fc
3 changed files with 18 additions and 6 deletions

View File

@@ -238,7 +238,11 @@ API_KEY_VALUE="${!API_KEY_ENV:-}"
[[ -n "$API_KEY_VALUE" ]] || die "$API_KEY_ENV is required"
release_smoke_plugin_allowlist_json() {
printf '["%s","acpx","bonjour","browser","device-pair","phone-control","talk-voice"]' "$PROVIDER"
if [[ -n "${OPENCLAW_PARALLELS_RELEASE_SMOKE_PLUGIN_ALLOWLIST_JSON:-}" ]]; then
printf '%s' "$OPENCLAW_PARALLELS_RELEASE_SMOKE_PLUGIN_ALLOWLIST_JSON"
return
fi
printf '["%s"]' "$PROVIDER"
}
RELEASE_SMOKE_PLUGIN_ALLOWLIST_JSON="$(release_smoke_plugin_allowlist_json)"

View File

@@ -281,7 +281,11 @@ API_KEY_VALUE="${!API_KEY_ENV:-}"
[[ -n "$API_KEY_VALUE" ]] || die "$API_KEY_ENV is required"
release_smoke_plugin_allowlist_json() {
printf '["%s","acpx","bonjour","browser","device-pair","phone-control","talk-voice"]' "$PROVIDER"
if [[ -n "${OPENCLAW_PARALLELS_RELEASE_SMOKE_PLUGIN_ALLOWLIST_JSON:-}" ]]; then
printf '%s' "$OPENCLAW_PARALLELS_RELEASE_SMOKE_PLUGIN_ALLOWLIST_JSON"
return
fi
printf '["%s"]' "$PROVIDER"
}
ps_single_quote() {

View File

@@ -33,8 +33,8 @@ describe("Parallels smoke model selection", () => {
}
});
it("keeps Parallels agent-turn smokes on a focused plugin allowlist", () => {
for (const scriptPath of [...OS_SCRIPT_PATHS, NPM_UPDATE_SCRIPT_PATH]) {
it("keeps Parallels agent-turn smokes on a provider-only plugin allowlist by default", () => {
for (const scriptPath of ["scripts/e2e/parallels-windows-smoke.sh", NPM_UPDATE_SCRIPT_PATH]) {
const script = readFileSync(scriptPath, "utf8");
expect(script, scriptPath).toContain("release_smoke_plugin_allowlist_json");
@@ -43,8 +43,12 @@ describe("Parallels smoke model selection", () => {
script.includes("config set plugins.allow") || script.includes("config set --batch-file"),
scriptPath,
).toBe(true);
expect(script, scriptPath).toContain('"acpx"');
expect(script, scriptPath).toContain('"device-pair"');
expect(script, scriptPath).toContain('printf \'["%s"]\' "$PROVIDER"');
expect(script, scriptPath).toContain(
"OPENCLAW_PARALLELS_RELEASE_SMOKE_PLUGIN_ALLOWLIST_JSON",
);
expect(script, scriptPath).not.toContain('"acpx"');
expect(script, scriptPath).not.toContain('"device-pair"');
expect(script, scriptPath).not.toContain('"memory-core"');
}
});