mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-25 16:55:05 +00:00
* fix(release): define immutable release plan contract * fix(release): harden immutable plan authority * fix(release): tighten release plan authority * fix(release): share plugin publication authority * fix(release): verify plan authority remotely * fix(release): track ClawHub publication authorities * fix(release): trust remote tooling tag identity * fix(release): close plugin publication authority * fix(release): align npm authority selection * fix(release): bind plans to validation intent * fix(release): require qualification cadence * fix(release): reject lossy canonical values * fix(release): narrow qualification cadence * fix(release): bind plan parser dependency * fix(release): add tagless diagnostic plans * fix(release): attest release plan parser tree * fix(release): isolate verified plan parser snapshot * fix(release): verify plan tooling before execution
68 lines
2.1 KiB
TypeScript
68 lines
2.1 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import {
|
|
releaseValidationIntentForPurpose,
|
|
resolveReleaseValidationIntent,
|
|
} from "../../scripts/release-validation-intent.mjs";
|
|
|
|
describe("release validation intent", () => {
|
|
it.each([
|
|
["release-beta", "beta", false, true],
|
|
["release-stable", "stable", true, true],
|
|
["main-daily", "beta", false, false],
|
|
["main-weekly", "full", true, false],
|
|
["diagnostic-full", "full", true, false],
|
|
] as const)(
|
|
"defines %s as profile=%s soak=%s publishable=%s",
|
|
(intent, profile, soak, publishable) => {
|
|
expect(resolveReleaseValidationIntent(intent)).toEqual({
|
|
intent,
|
|
profile,
|
|
publishable,
|
|
soak,
|
|
});
|
|
},
|
|
);
|
|
|
|
it.each([
|
|
["beta-publish", "release-beta"],
|
|
["stable-publish", "release-stable"],
|
|
["diagnostic", "diagnostic-full"],
|
|
["postpublish-confidence", "diagnostic-full"],
|
|
] as const)("maps %s to %s", (purpose, intent) => {
|
|
expect(releaseValidationIntentForPurpose(purpose)).toBe(intent);
|
|
});
|
|
|
|
it("requires main qualification callers to choose daily or weekly", () => {
|
|
expect(() => releaseValidationIntentForPurpose("main-qualification")).toThrow(
|
|
"requires an explicit validation intent",
|
|
);
|
|
expect(releaseValidationIntentForPurpose("main-qualification", "main-daily")).toBe(
|
|
"main-daily",
|
|
);
|
|
expect(releaseValidationIntentForPurpose("main-qualification", "main-weekly")).toBe(
|
|
"main-weekly",
|
|
);
|
|
expect(() =>
|
|
releaseValidationIntentForPurpose("main-qualification", "diagnostic-full"),
|
|
).toThrow("does not allow validation intent");
|
|
});
|
|
|
|
it("treats legacy profile and soak inputs as assertions", () => {
|
|
expect(
|
|
resolveReleaseValidationIntent("main-daily", {
|
|
profile: "beta",
|
|
soak: false,
|
|
}),
|
|
).toMatchObject({ intent: "main-daily" });
|
|
expect(() =>
|
|
resolveReleaseValidationIntent("main-daily", {
|
|
profile: "full",
|
|
}),
|
|
).toThrow("profile assertion conflicts");
|
|
expect(() =>
|
|
resolveReleaseValidationIntent("main-daily", {
|
|
soak: true,
|
|
}),
|
|
).toThrow("soak assertion conflicts");
|
|
});
|
|
});
|