From 56ac52384f477fb2b059cdd43f90b2f14e761772 Mon Sep 17 00:00:00 2001 From: James Date: Mon, 11 May 2026 18:13:01 +0000 Subject: [PATCH] refactor(producer): drop internal PR/phase identifiers from stages doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Comment-only cleanup. Removes "PR 1.x", "Phase 1 PR", and "Phase 3 PR 3.1" references from JSDoc blocks in `compileStage.ts`, `probeStage.ts`, `planHash.ts`, and `freezePlan.ts`. Track / PR identifiers rot quickly and belong in PR descriptions, not in source. Design-doc section citations (DISTRIBUTED-RENDERING-PLAN.md §X.Y) are kept — those reference a stable external artifact. Also tightens the `probeStage.ts` `browserProbeMs` doc string to say "near-zero when `needsBrowser` was false" instead of "0" — the Date.now() delta around the function body is sub-ms but not literally zero. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../services/render/stages/compileStage.ts | 6 +++--- .../src/services/render/stages/freezePlan.ts | 19 +++++++------------ .../src/services/render/stages/probeStage.ts | 2 +- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/packages/producer/src/services/render/stages/compileStage.ts b/packages/producer/src/services/render/stages/compileStage.ts index d9d465459a..a007248009 100644 --- a/packages/producer/src/services/render/stages/compileStage.ts +++ b/packages/producer/src/services/render/stages/compileStage.ts @@ -8,9 +8,9 @@ * `deviceScaleFactor` for supersampling. * * The probe sub-stage (browser launch, duration discovery, recompile, - * media reconciliation) is extracted separately in PR 1.3. This stage - * stops at the point where the in-process renderer formerly entered the - * `if (needsBrowser)` branch. + * media reconciliation) lives in a sibling stage. This stage stops at + * the point where the in-process renderer enters the `if (needsBrowser)` + * branch. * * Hard constraints preserved verbatim from the in-process renderer: * - `applyRenderModeHints(cfg, ...)` is allowed to mutate `cfg.forceScreenshot`. diff --git a/packages/producer/src/services/render/stages/freezePlan.ts b/packages/producer/src/services/render/stages/freezePlan.ts index f2cf28236d..7e99627d18 100644 --- a/packages/producer/src/services/render/stages/freezePlan.ts +++ b/packages/producer/src/services/render/stages/freezePlan.ts @@ -3,11 +3,9 @@ * manifest at the end of `plan()`, compute the planHash from the frozen * artifacts, and return the manifest path. * - * Phase 1 PR 1.1 ships the signature only: there are no callers yet. The - * function body is added in Phase 3 PR 3.1 when `services/distributed/plan.ts` - * lands and composes the Phase-1 stages. Keeping the skeleton in this PR - * means subsequent stage-extraction PRs can grow the `stages/` directory - * without touching the `producer/src/index.ts` export surface again. + * Signature-only skeleton: there are no callers yet. The function body + * lands when `services/distributed/plan.ts` is added and composes the + * stage primitives. * * See DISTRIBUTED-RENDERING-PLAN.md §2.1 phase 6, §4.1 directory layout, * §4.3 LockedRenderConfig. @@ -18,9 +16,7 @@ import type { PlanDimensions } from "./planHash.js"; /** * The encoder configuration locked in at plan time. Mirrors §4.3 - * LockedRenderConfig in the design doc. Phase 1 declares the shape; Phase 2 - * + Phase 3 populate it from the existing `renderOrchestrator` config and - * the new closed-GOP encoder args. + * LockedRenderConfig in the design doc. */ export interface LockedRenderConfig { // Capture @@ -97,10 +93,9 @@ export interface FreezePlanResult { * Freeze a plan directory: write `meta/*.json` + top-level `plan.json`, then * compute `planHash` over the canonicalized contents. * - * Skeleton only in Phase 1. Phase 3 PR 3.1 wires this up. + * Skeleton — body lands when the distributed-render primitives compose the + * stage functions. */ export async function freezePlan(_input: FreezePlanInput): Promise { - throw new Error( - "freezePlan is not implemented yet — wired in Phase 3 PR 3.1 (see DISTRIBUTED-RENDERING-PLAN.md §11).", - ); + throw new Error("freezePlan is not implemented yet — see DISTRIBUTED-RENDERING-PLAN.md §11."); } diff --git a/packages/producer/src/services/render/stages/probeStage.ts b/packages/producer/src/services/render/stages/probeStage.ts index c4709401a1..e1655db55e 100644 --- a/packages/producer/src/services/render/stages/probeStage.ts +++ b/packages/producer/src/services/render/stages/probeStage.ts @@ -78,7 +78,7 @@ export interface ProbeStageResult { /** Composition duration (post-probe). Guaranteed > 0 — the stage throws on <= 0. */ duration: number; totalFrames: number; - /** Wall-clock ms for the entire probe phase (0 if `needsBrowser` was false). */ + /** Wall-clock ms for the entire probe phase (near-zero when `needsBrowser` was false). */ browserProbeMs: number; }