Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/cli/src/commands/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2010,7 +2010,6 @@ function handleRenderError(
errorName: error instanceof Error ? error.name : "unknown",
failedStageCode: normalizeStageCode(failedStage || "pipeline"),
missingPathKind: missingPathKind(error),
missingPath: job?.errorDetails?.missingPath,
...renderJobObservabilityTelemetryPayload(job),
...getMemorySnapshot(),
...cpu.stop(),
Expand Down
18 changes: 0 additions & 18 deletions packages/cli/src/telemetry/events.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -690,24 +690,6 @@ describe("render telemetry events", () => {
expect(props.hf_env_overrides).toEqual(["HF_DE_VERIFY", "HYPERFRAMES_FONT_CACHE_DIR"]);
});

it("sends only the closed-list missing-path facts on render_error", () => {
trackRenderError({
fps: 30,
quality: "draft",
docker: false,
missingPath: { scope: "cache_entry", synced: true, root: "system_temp" },
});
const props = trackEvent.mock.calls[0]?.[1] as Record<string, unknown>;
expect(props).toMatchObject({
missing_path_scope: "cache_entry",
missing_path_synced: true,
missing_path_root: "system_temp",
});
expect(Object.values(props).filter((v) => typeof v === "string" && /[\\/]/.test(v))).toEqual(
[],
);
});

it("reports an empty array, not an absent field, when no override was resolved", () => {
trackRenderError({ fps: 30, quality: "draft", docker: false });
const props = trackEvent.mock.calls[0]?.[1] as Record<string, unknown>;
Expand Down
7 changes: 0 additions & 7 deletions packages/cli/src/telemetry/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
renderMotionBlurEventProperties,
} from "./renderMotionBlur.js";
import { CliRuntimeError } from "../utils/commandResult.js";
import type { MissingPathFacts } from "@hyperframes/producer";

// Power state is volatile (a laptop docks/undocks mid-session), so it is
// sampled per render event rather than cached with SystemMeta. Attached to
Expand Down Expand Up @@ -128,7 +127,6 @@ export interface RenderObservabilityTelemetryPayload {
observabilityExtractVfrPreflightCount?: number;
observabilityExtractCacheHits?: number;
observabilityExtractCacheMisses?: number;
observabilityExtractCachePublishFailures?: number;
observabilityInitDurationMs?: number;
observabilityInitTweenCount?: number;
observabilityInitElementCount?: number;
Expand Down Expand Up @@ -209,7 +207,6 @@ function renderObservabilityEventProperties(props: RenderObservabilityTelemetryP
observability_extract_vfr_preflight_count: props.observabilityExtractVfrPreflightCount,
observability_extract_cache_hits: props.observabilityExtractCacheHits,
observability_extract_cache_misses: props.observabilityExtractCacheMisses,
observability_extract_cache_publish_failures: props.observabilityExtractCachePublishFailures,
observability_init_duration_ms: props.observabilityInitDurationMs,
observability_init_tween_count: props.observabilityInitTweenCount,
observability_init_element_count: props.observabilityInitElementCount,
Expand Down Expand Up @@ -705,7 +702,6 @@ export function trackRenderError(
/** failedStage normalized to a stable snake_case code. */
failedStageCode?: string;
missingPathKind?: string;
missingPath?: MissingPathFacts;
errorMessage?: string;
elapsedMs?: number;
peakMemoryMb?: number;
Expand Down Expand Up @@ -735,9 +731,6 @@ export function trackRenderError(
error_name: props.errorName,
failed_stage_code: props.failedStageCode,
missing_path_kind: props.missingPathKind,
missing_path_scope: props.missingPath?.scope,
missing_path_synced: props.missingPath?.synced,
missing_path_root: props.missingPath?.root,
error_message: props.errorMessage ? redactTelemetryMessage(props.errorMessage) : undefined,
elapsed_ms: props.elapsedMs,
...renderOutputShapeEventProperties(props),
Expand Down
20 changes: 18 additions & 2 deletions packages/cli/src/telemetry/missingPathKind.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { missingPathOf } from "@hyperframes/core/missing-path";

const KINDS: ReadonlyArray<[RegExp, string]> = [
[/(^|[\\/])hfcache-/, "extract_cache"],
[/(^|[\\/])__hyperframes_video_frames([\\/]|$)/, "video_frames"],
Expand All @@ -13,6 +11,24 @@ const KINDS: ReadonlyArray<[RegExp, string]> = [
[/(^|[\\/])(hf-render-|work-[0-9a-f]{8}-)/, "work_dir"],
];

const quotedPath = (text: string) => /'([^']+)'/.exec(text)?.[1] ?? "";

function errorChain(error: unknown): Error[] {
const chain: Error[] = [];
for (let seen = error; seen instanceof Error && chain.length < 5; seen = seen.cause)
chain.push(seen);
return chain;
}

function missingPathOf(error: unknown): string | undefined {
const enoent = errorChain(error).find(
(seen) => (seen as NodeJS.ErrnoException).code === "ENOENT",
);
if (enoent) return (enoent as NodeJS.ErrnoException).path ?? quotedPath(enoent.message);
const message = error instanceof Error ? error.message : String(error);
return /\bENOENT\b/.test(message) ? quotedPath(message) : undefined;
}

/** Which kind of file a render found missing (a fixed name, never the path), or undefined when nothing was missing. */
export function missingPathKind(error: unknown): string | undefined {
const path = missingPathOf(error);
Expand Down
1 change: 0 additions & 1 deletion packages/cli/src/telemetry/renderObservability.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ export function renderObservabilityTelemetryPayload(
observabilityExtractVfrPreflightCount: extraction?.vfrPreflightCount,
observabilityExtractCacheHits: extraction?.cacheHits,
observabilityExtractCacheMisses: extraction?.cacheMisses,
observabilityExtractCachePublishFailures: extraction?.cachePublishFailures,
observabilityInitDurationMs: init?.initDurationMs,
observabilityInitTweenCount: init?.tweenCount,
observabilityInitElementCount: init?.elementCount,
Expand Down
6 changes: 0 additions & 6 deletions packages/core/package-subpaths.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,6 @@
"types": "./dist/envProxy.d.ts",
"environments": ["bun", "node"]
},
"./missing-path": {
"source": "./src/missingPath.ts",
"runtime": "./dist/missingPath.js",
"types": "./dist/missingPath.d.ts",
"environments": ["bun", "node"]
},
"./rename-retry": {
"source": "./src/renameWithRetry.ts",
"runtime": "./dist/renameWithRetry.js",
Expand Down
10 changes: 0 additions & 10 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,6 @@
"import": "./src/envProxy.ts",
"types": "./src/envProxy.ts"
},
"./missing-path": {
"bun": "./src/missingPath.ts",
"node": "./dist/missingPath.js",
"import": "./src/missingPath.ts",
"types": "./src/missingPath.ts"
},
"./rename-retry": {
"bun": "./src/renameWithRetry.ts",
"node": "./dist/renameWithRetry.js",
Expand Down Expand Up @@ -750,10 +744,6 @@
"import": "./dist/envProxy.js",
"types": "./dist/envProxy.d.ts"
},
"./missing-path": {
"import": "./dist/missingPath.js",
"types": "./dist/missingPath.d.ts"
},
"./rename-retry": {
"import": "./dist/renameWithRetry.js",
"types": "./dist/renameWithRetry.d.ts"
Expand Down
18 changes: 0 additions & 18 deletions packages/core/src/missingPath.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/producer/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ export {
createOwnedRenderDir,
listAbandonedRenderDirs,
} from "./services/render/renderDirOwner.js";
export type { MissingPathFacts } from "./services/render/missingPath.js";
export {
RENDER_REQUEST_VERSION,
createRenderRequest,
Expand Down
3 changes: 0 additions & 3 deletions packages/producer/src/services/render/cleanup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { type SubTimelineWaitOutcome } from "@hyperframes/engine";
import type { HdrDiagnostics, RenderJob } from "../renderOrchestrator.js";
import { normalizeErrorMessage } from "../../utils/errorMessage.js";
import type { RenderObservabilitySummary } from "./observability.js";
import type { MissingPathFacts } from "./missingPath.js";

/**
* Build the `RenderJob.errorDetails` shape downstream consumers (SSE,
Expand All @@ -19,7 +18,6 @@ export function buildRenderErrorDetails(input: {
hdrDiagnostics: HdrDiagnostics;
observability?: RenderObservabilitySummary;
subTimelineWait?: SubTimelineWaitOutcome;
missingPath?: MissingPathFacts;
}): NonNullable<RenderJob["errorDetails"]> {
const errorMessage = normalizeErrorMessage(input.error);
const errorStack = input.error instanceof Error ? input.error.stack : undefined;
Expand All @@ -38,6 +36,5 @@ export function buildRenderErrorDetails(input: {
: undefined,
observability: input.observability,
subTimelineWait: input.subTimelineWait,
missingPath: input.missingPath,
};
}
128 changes: 0 additions & 128 deletions packages/producer/src/services/render/missingPath.test.ts

This file was deleted.

Loading
Loading