Files
hyperframes/packages/core/scripts/build-position-edits-render.ts
T
Vance Ingalls 601d30e569 fix(core): unwire an LFO when its effect is disposed
The §4c item here was "four hand-rolled wet/dry shells whose dispose
lists have already drifted". Reading them, the drift is one specific
thing and it is a leak, not an untidiness: the chorus and the phaser
stopped their LFO and left it out of the nodes they disconnect. So every
chain rebuild that dropped a modulated effect left a modulator still
wired to the delay or the allpass bank it had been driving. Nothing
audible came of it — the shell around it was disconnected — but the nodes
stayed reachable, and a session of edits to a modulated track piled them
up. Same shape as the worklet leak fixed earlier on this stack.

`stopLfo` becomes `retireLfo` and does both halves, which is the whole
fix. The consolidation the item also asks for is not here: the four
shells are wired differently enough (a feedback loop, a modulated delay,
six allpass stages between two trims, a convolver) that one factory over
them would need a config surface bigger than the four dispose lines it
replaces. The leak was the part with a defect behind it.

Also folds the two artifact build scripts together — 50 lines each,
differing in five names. That one is a genuine copy, and the copy is
where a divergence would hide: whichever stopped being edited would go on
producing a subtly different artifact with nothing to say so. Output is
byte-identical, which `check:position-edits-render` proves by diffing the
tracked artifact.

Falsified: dropping the `disconnect` fails the new test.

core 1726 passing (110 files), engine services 736 passing / 3 skipped.
2026-08-10 15:38:57 -07:00

14 lines
473 B
TypeScript

/** Build the injectable position-edits render artifact from the canonical runtime. */
import { buildInjectedArtifact } from "./buildInjectedArtifact.js";
buildInjectedArtifact({
scriptUrl: import.meta.url,
entry: "stubs/position-edits-render-entry.ts",
out: "position-edits-render-inline.ts",
constName: "POSITION_EDITS_RENDER_IIFE",
fnName: "getPositionEditsRenderScript",
what: "position-edits render IIFE",
event: "position_edits_render_generated",
});