mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 12:54:29 +00:00
Closes #1219 ## Problem On 8GB RAM machines, renders time out at 5% with `Runtime.callFunctionOn timed out` during the duration probe. User-set timeout env vars (`PRODUCER_PUPPETEER_PROTOCOL_TIMEOUT_MS`) are silently ignored by the calibration path, and there are no CLI flags to control timeouts directly. ## Root causes 1. **Calibration timeout cap overrides user settings** — `createCaptureCalibrationConfig` used `Math.min(cfg.protocolTimeout, 30_000)`, meaning even if the user set 300s, calibration still capped at 30s. On slow hardware this causes unnecessary timeouts. 2. **8GB systems get no low-memory treatment** — `getLowMemoryFlags()`, `getGpuMemBudgetMb()`, `memoryAdaptiveCacheLimit()`, and `memoryAdaptiveCacheBytesMb()` all used `< 8192` as the threshold. Systems reporting exactly 8192 MB (common for 8GB machines) fell through to the "plenty of memory" path, getting no Chrome heap reduction or cache limits. 3. **No CLI flags for key timeouts** — Users had to discover the correct env var names (`PRODUCER_PUPPETEER_PROTOCOL_TIMEOUT_MS`, `PRODUCER_PLAYER_READY_TIMEOUT_MS`) by reading source. The non-existent `PUPPETEER_PROTOCOL_TIMEOUT` and `--browser-timeout` were common guesses that did nothing. ## Changes - `captureCost.ts`: `Math.min` → `Math.max` so the 30s calibration default is a floor, not a ceiling. User-set higher timeouts are now respected. - `browserManager.ts`: `>= 8192` → `> 8192` in `getLowMemoryFlags()` and `<= 8192` in `getGpuMemBudgetMb()` so 8GB systems get reduced Chrome heap and GPU memory budget. - `config.ts`: `< 8192` → `<= 8192` in `memoryAdaptiveCacheLimit()` and `memoryAdaptiveCacheBytesMb()` so 8GB systems get reduced frame cache limits. - `render.ts`: Added `--protocol-timeout <ms>` and `--player-ready-timeout <ms>` CLI flags, wired through `resolveConfig` overrides. - Updated calibration tests to match the new floor-not-ceiling behavior. - Added fallow suppressions for pre-existing unused exports in `captureCost.ts`. ## Test plan - [x] Engine config tests pass (`vitest run src/config.test.ts`) - [x] Browser manager tests pass (`vitest run src/services/browserManager.test.ts`) - [x] Calibration safeguard tests pass (4/4 in `renderOrchestrator.test.ts`) - [x] TypeScript compiles cleanly for engine and cli packages - [ ] CI pipeline
154 lines
6.3 KiB
JSON
154 lines
6.3 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/fallow-rs/fallow/main/config-schema.json",
|
|
"entry": [
|
|
"packages/producer/src/**/*.test.ts",
|
|
"packages/aws-lambda/src/**/*.test.ts",
|
|
"packages/producer/src/regression-harness.ts",
|
|
"packages/producer/src/regression-harness-distributed.test.ts",
|
|
"packages/producer/src/regression-harness-lambda-local.ts",
|
|
"packages/producer/src/transparency-test.ts",
|
|
"packages/producer/src/parity-harness.ts",
|
|
"packages/producer/src/parity-fixtures.ts",
|
|
"packages/producer/src/perf-gate.ts",
|
|
"packages/producer/src/runtime-conformance.ts",
|
|
"packages/producer/src/benchmark.ts",
|
|
"packages/producer/scripts/generate-font-data.ts",
|
|
"packages/cli/scripts/generate-font-data.ts",
|
|
"packages/engine/scripts/test-fitTextFontSize-browser.ts",
|
|
"packages/aws-lambda/scripts/*.ts",
|
|
// Built as standalone IIFE for the browser-side sandbox runtime;
|
|
// referenced by file path (not import) in build-hyperframes-runtime-artifact.ts.
|
|
"packages/core/src/runtime/entry.ts",
|
|
// Worker entry points loaded dynamically by their *Pool.ts companions.
|
|
"packages/producer/src/services/pngDecodeBlitWorker.ts",
|
|
"packages/producer/src/services/shaderTransitionWorker.ts",
|
|
// Test fixture worker, spawned by path via the pools' workerEntryPath
|
|
// option from the crash-recovery tests; has no import-graph referrer.
|
|
"packages/producer/src/services/__fixtures__/crashOnMessageWorker.mjs",
|
|
"scripts/*.{ts,mjs,js}",
|
|
"scripts/*/run.mjs",
|
|
// Keyframe UI components — wired dynamically via EaseCurveSection/MotionPanel.
|
|
"packages/studio/src/components/editor/KeyframeDiamond.tsx",
|
|
"packages/studio/src/components/editor/SpringEaseEditor.tsx",
|
|
],
|
|
"ignorePatterns": [
|
|
"docs/**",
|
|
"packages/producer/tests/**",
|
|
"packages/player/tests/**",
|
|
"packages/engine/tests/**",
|
|
"skills/**/test-corpus/**",
|
|
"skills/**/scripts/**",
|
|
"registry/**",
|
|
"examples/**",
|
|
".github/workflows/fixtures/**",
|
|
// Auto-generated TS client for the HeyGen cloud API. Regenerated by
|
|
// experiment-framework/scripts/generate_hyperframes_cli_client.py via
|
|
// the sync-hyperframes-codegen.yml workflow; complexity/dead-code
|
|
// findings on this file are not actionable from this repo.
|
|
"packages/cli/src/cloud/_gen/**",
|
|
],
|
|
"ignoreExports": [
|
|
// CLI command files: every command exports a const `examples` per the
|
|
// convention documented in CLAUDE.md. This is a namespace barrel, not a
|
|
// collision.
|
|
{ "file": "packages/cli/src/commands/*.ts", "exports": ["examples"] },
|
|
// Independent ML model managers each declare their own DEFAULT_MODEL /
|
|
// MODELS_DIR / ensureModel for their model namespace.
|
|
{
|
|
"file": "packages/cli/src/{background-removal,tts,whisper}/manager.ts",
|
|
"exports": ["DEFAULT_MODEL", "MODELS_DIR", "ensureModel"],
|
|
},
|
|
// `isPathInside` is documented as exported-for-tests only in fileServer.ts;
|
|
// it has different semantics (symlink resolution) from utils/paths.ts.
|
|
{
|
|
"file": "packages/producer/src/services/fileServer.ts",
|
|
"exports": ["isPathInside"],
|
|
},
|
|
// Studio telemetry: consumed by useRenderQueue.ts / StudioFeedbackBar.tsx
|
|
// (deep relative imports) but fallow's static analyzer doesn't trace
|
|
// them. Same path-resolution quirk — trackStudioSessionStart from the
|
|
// same file resolves fine.
|
|
{
|
|
"file": "packages/studio/src/telemetry/events.ts",
|
|
"exports": ["trackStudioRenderStart", "trackStudioFeedback"],
|
|
},
|
|
// domEditingLayers: these exports are consumed via the browser iframe
|
|
// runtime context (not traceable by static import analysis from the
|
|
// studio entry point) or re-exported through the domEditing barrel but
|
|
// have no downstream consumers yet.
|
|
{
|
|
"file": "packages/studio/src/components/editor/domEditingLayers.ts",
|
|
"exports": [
|
|
"isEditableTextLeaf",
|
|
"collectDomEditTextFields",
|
|
"buildElementLabel",
|
|
"refreshDomEditSelection",
|
|
],
|
|
},
|
|
// domEditing barrel: re-exports consumed throughout the studio but
|
|
// fallow's static analyzer can't trace re-exports through barrel files.
|
|
{
|
|
"file": "packages/studio/src/components/editor/domEditing.ts",
|
|
"exports": ["*"],
|
|
},
|
|
// Exported for render.test.ts (exported-for-tests pattern).
|
|
{
|
|
"file": "packages/cli/src/commands/render.ts",
|
|
"exports": ["resolveBrowserGpuForCli", "renderLocal"],
|
|
},
|
|
// captureCost.ts: constants and helpers consumed by the runCaptureCalibration
|
|
// orchestration function and tests, but the entry-point graph doesn't
|
|
// reach them because the orchestrator's caller resolves them dynamically.
|
|
{
|
|
"file": "packages/producer/src/services/render/captureCost.ts",
|
|
"exports": [
|
|
"CAPTURE_CALIBRATION_TARGET_MS",
|
|
"MAX_MEASURED_CAPTURE_COST_MULTIPLIER",
|
|
"CAPTURE_CALIBRATION_PROTOCOL_TIMEOUT_MS",
|
|
"measureCaptureCostFromSession",
|
|
"logCaptureCalibrationResult",
|
|
"createFailedCaptureCalibrationEstimate",
|
|
],
|
|
},
|
|
],
|
|
"ignoreDependencies": [
|
|
// Runtime/dynamic deps not visible to static analysis: tsup `external`,
|
|
// dynamic require() resolution, peer/static-file consumption in tests,
|
|
// and bun-hoisted workspace devDeps (e.g. happy-dom in root package.json
|
|
// resolves for every workspace, so workspaces don't redeclare it).
|
|
// Required by @puppeteer/browsers and puppeteer-core at runtime; listed
|
|
// as a direct dep to guarantee installation even when transitive
|
|
// resolution fails (corrupted cache, dedup edge cases).
|
|
"debug",
|
|
"puppeteer",
|
|
"puppeteer-core",
|
|
"esbuild",
|
|
"giget",
|
|
"gsap",
|
|
"happy-dom",
|
|
"ffmpeg-static",
|
|
"ffprobe-static",
|
|
"@hyperframes/core",
|
|
"@hyperframes/studio",
|
|
"@hyperframes/producer",
|
|
"@fontsource/archivo-black",
|
|
"@fontsource/eb-garamond",
|
|
"@fontsource/ibm-plex-mono",
|
|
"@fontsource/inter",
|
|
"@fontsource/jetbrains-mono",
|
|
"@fontsource/league-gothic",
|
|
"@fontsource/montserrat",
|
|
"@fontsource/nunito",
|
|
"@fontsource/oswald",
|
|
"@fontsource/outfit",
|
|
"@fontsource/space-mono",
|
|
"@fontsource/lato",
|
|
"@fontsource/noto-sans-jp",
|
|
"@fontsource/open-sans",
|
|
"@fontsource/playfair-display",
|
|
"@fontsource/poppins",
|
|
"@fontsource/roboto",
|
|
"@fontsource/source-code-pro",
|
|
],
|
|
}
|