ci: isolate prompt snapshot check

This commit is contained in:
Peter Steinberger
2026-05-07 03:07:58 +01:00
parent bf2511098f
commit f2458d8828
5 changed files with 60 additions and 35 deletions

View File

@@ -1,6 +1,7 @@
import { describe, expect, it } from "vitest";
import {
BOUNDARY_CHECKS,
PROMPT_SNAPSHOT_CHECK,
filterChecksForEnvironment,
formatCommand,
parseShardSpec,
@@ -23,22 +24,19 @@ function createOutputBuffer() {
}
describe("run-additional-boundary-checks", () => {
it("runs prompt snapshot drift checks in CI", () => {
expect(BOUNDARY_CHECKS).toContainEqual({
it("keeps prompt snapshot drift checks as a dedicated CI check", () => {
expect(PROMPT_SNAPSHOT_CHECK).toEqual({
label: "prompt:snapshots:check",
command: "pnpm",
args: ["prompt:snapshots:check"],
});
expect(BOUNDARY_CHECKS.map((check) => check.label)).not.toContain("prompt:snapshots:check");
});
it("skips prompt snapshot drift checks when preflight says they are unrelated", () => {
it("leaves boundary checks unchanged when prompt snapshots are unrelated", () => {
expect(
filterChecksForEnvironment(BOUNDARY_CHECKS, { OPENCLAW_RUN_PROMPT_SNAPSHOTS: "false" }),
).not.toContainEqual({
label: "prompt:snapshots:check",
command: "pnpm",
args: ["prompt:snapshots:check"],
});
).toEqual(BOUNDARY_CHECKS);
});
it("normalizes concurrency input", () => {