Skip to content

Commit cad9160

Browse files
authored
chore(producer): drop internal plan-doc refs from source + docs (#903)
The producer source + docs referenced an internal coordination doc (DISTRIBUTED-RENDERING-PLAN.md) that doesn't ship in the OSS repo, leaving broken cross-links for adopters. Drops the references and the bare section-number shorthand that depended on them; behavioural content (hash contract, retry semantics, threshold rationale) is preserved inline where it was previously offloaded to a section number.
1 parent efc16a9 commit cad9160

7 files changed

Lines changed: 35 additions & 31 deletions

File tree

packages/producer/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,6 @@ await assemble(
136136

137137
The three activity functions plus their result types are also re-exported from `@hyperframes/producer` so callers that pin the main package don't need a separate subpath import. Supported formats: `mp4` SDR, `mov` ProRes 4444, and `png-sequence`. webm and HDR mp4 trip a typed `FormatNotSupportedInDistributedError` — use the in-process renderer (`executeRenderJob`) for those.
138138

139-
See [`DISTRIBUTED-RENDERING-PLAN.md`](../../DISTRIBUTED-RENDERING-PLAN.md) for the full architecture.
140-
141139
## How it works
142140

143141
1. **Serve** — spins up a local file server for the HTML composition

packages/producer/src/distributed.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/**
22
* `@hyperframes/producer/distributed` — the distributed render primitives.
33
*
4-
* See `DISTRIBUTED-RENDERING-PLAN.md` for the full architecture. The three
5-
* activities (`plan` → `renderChunk` × N → `assemble`) are pure functions
6-
* over local file paths; networking + orchestration live in adapters.
4+
* The three activities (`plan` → `renderChunk` × N → `assemble`) are pure
5+
* functions over local file paths; networking + orchestration live in
6+
* adapters.
77
*
88
* Adopters (AWS Lambda, Cloud Run Jobs, Temporal, K8s Jobs, plain SSH):
99
*

packages/producer/src/regression-harness-distributed.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
* pass the same quality bar the in-process renderer passes against the
1919
* same frozen baseline. A separate {@link DISTRIBUTED_SIMULATED_MIN_PSNR_DB}
2020
* pathology floor catches the case where a fixture authored a permissive
21-
* threshold and distributed regresses to fully-black output. The §5.1
22-
* 50 dB target was written for per-render comparison (fresh in-process vs
23-
* fresh distributed); against the frozen baseline file it's unreachable
24-
* for either mode due to shared encoder/JPEG-capture jitter, so the
25-
* harness can't use it as a per-test gate.
21+
* threshold and distributed regresses to fully-black output. The 50 dB
22+
* "distributed vs in-process" contract is a per-render comparison
23+
* (fresh in-process vs fresh distributed); against the frozen baseline
24+
* file it's unreachable for either mode due to shared encoder/JPEG-
25+
* capture jitter, so the harness can't use it as a per-test gate.
2626
*
2727
* Not every fixture can run in distributed-simulated mode. Distributed mode
2828
* refuses webm, HDR mp4, NTSC framerates, and non-{24,30,60} fps at plan
@@ -44,8 +44,9 @@ export type HarnessMode = "in-process" | "distributed-simulated";
4444
* a chunk that renders fully-black against a fixture authored with a
4545
* permissive `minPsnr`. Non-pathological drift is caught by the fixture's
4646
* own threshold; both modes share the same encoder/JPEG-capture jitter
47-
* floor against the frozen baseline file, so the §5.1 50 dB target is
48-
* unreachable for either mode and isn't a useful per-test gate.
47+
* floor against the frozen baseline file, so the 50 dB distributed-vs-
48+
* in-process contract value is unreachable for either mode and isn't a
49+
* useful per-test gate.
4950
*/
5051
export const DISTRIBUTED_SIMULATED_MIN_PSNR_DB = 10;
5152

packages/producer/src/services/render/stages/planHash.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* planHash — content-addressed hash for distributed render plans.
33
*
4-
* See DISTRIBUTED-RENDERING-PLAN.md §4.2 for the contract:
4+
* Hash contract:
55
*
66
* planHash = sha256(
77
* SCHEMA_PREFIX
@@ -14,9 +14,10 @@
1414
* ⊕ fps ⊕ width ⊕ height ⊕ format
1515
* )
1616
*
17-
* Two invocations with identical inputs MUST produce the same hash. Adapters
18-
* use this to short-circuit `plan()` on workflow replay and to detect
19-
* cross-version mismatches (§9.3 PLAN_HASH_MISMATCH).
17+
* Two invocations with identical inputs MUST produce the same hash.
18+
* Adapters use this to short-circuit `plan()` on workflow replay and to
19+
* detect cross-version mismatches via a typed PLAN_HASH_MISMATCH error
20+
* (defined in `errors.ts` and enumerated in `events.ts`).
2021
*
2122
* Pure utility; no caller exists yet — the distributed-render
2223
* `services/distributed/plan.ts` will compose it.

packages/producer/src/services/render/stages/probeStage.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
* clean them up in its `finally` block.
99
*
1010
* Hard constraints preserved verbatim from the in-process renderer:
11-
* - `recompileWithResolutions` runs inside this stage because it depends
12-
* on browser-resolved durations, even though §2.1 of the distributed
13-
* plan lists recompile as a sibling phase.
11+
* - `recompileWithResolutions` runs inside this stage because it
12+
* depends on browser-resolved durations. (Distributed-pipeline
13+
* callers can think of recompile as logically separate from probe,
14+
* but the implementation co-locates them here because they share
15+
* the browser session.)
1416
* - `composition` (videos/audios/duration) is mutated in place — callers
1517
* downstream see the reconciled view through the same object reference.
1618
* - The stage computes the final composition `duration` and `totalFrames`

packages/producer/src/services/renderOrchestrator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,8 +1452,8 @@ export async function executeRenderJob(
14521452
// returned on `compileResult.forceScreenshot`. The sequencer stores it
14531453
// in a local `captureForceScreenshot` below; the BeginFrame calibration
14541454
// fallback updates the local — not `cfg` — and capture stages receive
1455-
// the value as an explicit parameter. See DISTRIBUTED-RENDERING-PLAN.md
1456-
// §4.3 (`LockedRenderConfig.forceScreenshot`).
1455+
// the value as an explicit parameter. This keeps `cfg` immutable for
1456+
// the rest of the pipeline.
14571457
const enableChunkedEncode = cfg.enableChunkedEncode;
14581458
const chunkedEncodeSize = cfg.chunkSizeFrames;
14591459
// Declared outside the try so `finally` can stop the interval, but

packages/producer/tests/README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,16 @@ passing in the summary):
9898

9999
Both modes use the fixture's authored `minPsnr` as the per-test
100100
threshold — distributed must clear the same quality bar in-process
101-
clears against the same frozen baseline. (`DISTRIBUTED-RENDERING-PLAN.md`
102-
§5.1's 50 dB target is a per-render distributed-vs-in-process contract;
103-
against the frozen baseline file, neither mode reaches it consistently
104-
due to shared encoder/JPEG-capture jitter.) An absolute 10 dB pathology
105-
floor catches fully-black-output regressions when a fixture authors a
106-
permissive threshold. A distributed failure at the fixture's own
107-
threshold means the distributed pipeline has drifted — file an issue
108-
rather than relaxing the fixture.
101+
clears against the same frozen baseline. (Internal contract: distributed
102+
vs in-process renders of the same fixture should clear 50 dB PSNR
103+
against each other within the same Docker image. Against the frozen
104+
committed baseline, neither mode reaches that consistently due to
105+
shared encoder/JPEG-capture jitter — that's why the fixture's authored
106+
threshold gates here, not the 50 dB contract value.) An absolute 10 dB
107+
pathology floor catches fully-black-output regressions when a fixture
108+
authors a permissive threshold. A distributed failure at the fixture's
109+
own threshold means the distributed pipeline has drifted — file an
110+
issue rather than relaxing the fixture.
109111

110112
`--update` is incompatible with `--mode=distributed-simulated`: the
111113
in-process renderer is the source of truth for baselines, and the
@@ -145,8 +147,8 @@ exercises one of:
145147
- per-format chunk-boundary correctness (mp4 H.264, mp4 H.265, ProRes, png-sequence)
146148
- per-adapter chunk-seam state preservation (GSAP, Anime.js, Three.js, Lottie, CSS, WAAPI)
147149

148-
See `DISTRIBUTED-RENDERING-PLAN.md` §10.2 for the equivalence axes each
149-
distributed fixture covers.
150+
Each distributed fixture covers one or more equivalence axes — see the
151+
`meta.json` `description` field for what a given fixture is locking in.
150152

151153
### Fixture pattern (4.2 onward)
152154

0 commit comments

Comments
 (0)