mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-05 00:56:23 +00:00
feat(cli): --frame-check accepts a severity/seek/tol spec
The pipeline already carried FrameCheckOptions; only the flag was boolean, which meant a pipeline caller tuning severity or seek points would have them silently dropped — the two sides only agreed because today's caller happens to match the defaults. Bare --frame-check keeps the defaults; the value form mirrors --caption-zone's grammar, freezing the contract before a release pins it.
This commit is contained in:
@@ -1112,6 +1112,22 @@ describe("check pipeline", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("frame-check flag grammar", () => {
|
||||
it("keeps bare --frame-check on defaults and parses the value form", async () => {
|
||||
const { parseFrameCheck } = await import("./check.js");
|
||||
expect(parseFrameCheck(undefined)).toBeUndefined();
|
||||
expect(parseFrameCheck(true)).toEqual({});
|
||||
expect(parseFrameCheck("")).toEqual({});
|
||||
expect(parseFrameCheck("severity=error;seek=.25,.75;tol=4")).toEqual({
|
||||
severity: "error",
|
||||
seek: [0.25, 0.75],
|
||||
tol: 4,
|
||||
});
|
||||
expect(() => parseFrameCheck("bogus=1")).toThrow("Invalid --frame-check");
|
||||
expect(() => parseFrameCheck("tol=-2")).toThrow("Invalid --frame-check");
|
||||
});
|
||||
});
|
||||
|
||||
describe("contrast persistence", () => {
|
||||
it("demotes a single-sample contrast failure to warning but gates held failures", async () => {
|
||||
const driver = fakeDriver({
|
||||
|
||||
Reference in New Issue
Block a user