mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-11 23:00:03 +00:00
fix(cli): address review — clip-duration audit in check, failure classing, crop observability
Port validate's per-media-element clip audit into check's session (clip_media_fit findings): an intrinsic duration meaningfully shorter than the data-duration slot silently shortens the slot at render time, and neither lint nor the runtime listeners can see it. A linter crash now reports as check_lint_failure instead of masquerading as a runtime failure. Finding-crop capture failures stay non-gating but emit a stderr note and a telemetry error event so rollouts can measure the second-session failure rate.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { mkdirSync, writeFileSync } from "node:fs";
|
||||
import { join, relative } from "node:path";
|
||||
import { trackCheckReport } from "../telemetry/events.js";
|
||||
import { trackCheckReport, trackCommandFailure } from "../telemetry/events.js";
|
||||
import { getRunId } from "../telemetry/runId.js";
|
||||
import type { ProjectDir } from "./project.js";
|
||||
import { lintProject, shouldBlockRender, type ProjectLintResult } from "./lintProject.js";
|
||||
@@ -518,7 +518,10 @@ export async function runCheckPipeline(
|
||||
try {
|
||||
lintResult = await dependencies.lintProject(project.dir);
|
||||
} catch (error) {
|
||||
return failureReport(options, runtimeFailure(error));
|
||||
// The linter itself crashed (unreadable file, internal error) — distinct
|
||||
// from lint findings; a runtime-failure code would send the agent hunting
|
||||
// for a script problem that doesn't exist.
|
||||
return failureReport(options, runtimeFailure(error, "check_lint_failure"));
|
||||
}
|
||||
|
||||
const lint = buildLintSection(lintResult);
|
||||
@@ -589,7 +592,11 @@ async function withFindingCrops(
|
||||
try {
|
||||
const findingFiles = await dependencies.captureFindingCrops(project, options, cropRequests);
|
||||
return { ...report, snapshots: { ...report.snapshots, findingFiles } };
|
||||
} catch {
|
||||
} catch (error) {
|
||||
// Still non-gating, but observable: rollouts need the crop-failure rate
|
||||
// (a second Chrome launch failing/timing out) without failing the run.
|
||||
console.error(" finding crops skipped: " + normalizeErrorMessage(error));
|
||||
trackCommandFailure("check-finding-crops", error);
|
||||
return report;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user