@vessel-dsp/runtime 0.4.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,7 +4,7 @@ Headless real time MNA simulation runtime and solver console for compiled Vessel
4
4
 
5
5
  ## Install
6
6
 
7
- `@vessel-dsp/runtime` 0.4.1 is on npm. Use runtime 0.2.1 or later (0.3.0 adds the packaged worklet): 0.2.0 cannot load a program inside an AudioWorklet (`structuredClone` is not defined there).
7
+ `@vessel-dsp/runtime` 0.6.0 is on npm. Use runtime 0.2.1 or later (0.3.0 adds the packaged worklet): 0.2.0 cannot load a program inside an AudioWorklet (`structuredClone` is not defined there).
8
8
 
9
9
 
10
10
  ```bash
@@ -425,6 +425,8 @@ export declare class ReferenceRuntime {
425
425
  private readonly limiterTrace;
426
426
  private limitedIterationCount;
427
427
  private limitedIterationPerSample;
428
+ /** Fold reseeds taken so far (diagnostic, read past `private` by the stall study's tracer). */
429
+ private foldReseedCount;
428
430
  /** Series ohms of whatever drives the input jack -- see `prepare()`'s option. */
429
431
  private inputSourceOhms;
430
432
  /**
@@ -1070,6 +1072,17 @@ export declare class ReferenceRuntime {
1070
1072
  * circuit the sample loop does not solve.
1071
1073
  */
1072
1074
  private iterate;
1075
+ /**
1076
+ * The factor the Newton update is scaled by so that no railed op-amp's differential moves
1077
+ * further than its step cap and no op-amp output node moves further than one full swing:
1078
+ * the smallest `cap / |requested differential step|` and `2 * halfSwing / |requested output
1079
+ * step|` over the block's railed op-amps, or 1. `current` is the iterate the rows were
1080
+ * stamped at and `next` the undamped solve. The history read here is the one the stamps
1081
+ * wrote this iteration, so `differential` is the point each row's tangent was taken at and
1082
+ * `cap` the step the next evaluation will allow; a request inside both bounds scales nothing.
1083
+ * Mirrored in `Engine.cpp` (`opAmpStepDamping`); the two must agree to the operation.
1084
+ */
1085
+ private opAmpStepDamping;
1073
1086
  /**
1074
1087
  * Build-order step 6, vertical slice: the part of a block's matrix that is the same for
1075
1088
  * every Newton iteration of this sample -- every stamp `newtonPortRowsOf` calls linear,
@@ -1 +1 @@
1
- {"version":3,"file":"reference-runtime.d.ts","sourceRoot":"","sources":["../src/reference-runtime.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAGX,cAAc,EAGd,SAAS,EACT,eAAe,EAEf,OAAO,EACP,cAAc,EAEd,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAOpE,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG1D;;;;;;;;GAQG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,4EAA4E;IAC5E,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,0FAA0F;IAC1F,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,iGAAiG;IACjG,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;IACzC;;;OAGG;IACH,QAAQ,CAAC,iBAAiB,EAAE,SAAS;QACpC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAC3B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;KAChC,EAAE,CAAC;IACJ,6EAA6E;IAC7E,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,iDAAiD;IACjD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;IACxC;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,CAAC,wBAAwB,EAAE,MAAM,CAAC;IAC1C;;;;;;;;;;;;;;;;;;;OAmBG;IACH,QAAQ,CAAC,sBAAsB,EAAE,MAAM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CAAC,cAAc,EAAE,MAAM,CAAC;CAChC,GAAG,OAAO,CAqBV;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,cAAc,EACxB,MAAM,EAAE,MAAM,EAAE,EAAE,EAClB,GAAG,EAAE,SAAS,MAAM,EAAE,EACtB,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,YAAY,EACxB,OAAO,EAAE,YAAY,EACrB,GAAG,EAAE,MAAM,EAAE,GACX,OAAO,CAuCT"}
@@ -22,7 +22,7 @@
22
22
  import { computeNumericRepivot } from "@vessel-dsp/compiler";
23
23
  import { admissionVerdict } from "./admission.js";
24
24
  import { HalfBandStage2x, cascadeLatencyHostSamples, designHalfBand2x, resampleStageSpec, } from "./resample.js";
25
- import { taperFraction } from "./taper.js";
25
+ import { IMPLEMENTED_TAPER_NAMES, taperFraction, unrecognisedTapers } from "./taper.js";
26
26
  export class RuntimeError extends Error {
27
27
  constructor(message) {
28
28
  super(message);
@@ -599,11 +599,25 @@ function opAmpHalfSwing(railHigh, railLow) {
599
599
  return Math.max((railHigh - railLow) / 2, 1e-9);
600
600
  }
601
601
  /**
602
- * The op-amp's gain-bandwidth product, in hertz. A class default rather than a part fact:
603
- * the source's per-packet GBP is not read (see `netlist.ts`), so every op-amp in the corpus
604
- * gets the same pole. With a 1e5 gain the open-loop pole sits at `GBP / gain`, 10 Hz here.
602
+ * The gain-bandwidth product, in hertz, of an op-amp section whose stamp states none
603
+ * (`gainBandwidthHz: null`). Before the stamp carried the field every op-amp in every program
604
+ * ran this value, so a `null` section renders exactly as it always did; the compiler names the
605
+ * sections left on it (`opamp-gain-bandwidth-default`). With a 1e5 gain the open-loop pole sits at
606
+ * `GBP / gain`, 10 Hz here.
607
+ *
608
+ * A stamp that states a product runs on that product instead. Mirrored in `Engine.cpp`'s
609
+ * `OPAMP_DEFAULT_GAIN_BANDWIDTH_HZ`.
605
610
  */
606
- const OPAMP_GAIN_BANDWIDTH_HZ = 1e6;
611
+ const OPAMP_DEFAULT_GAIN_BANDWIDTH_HZ = 1e6;
612
+ /**
613
+ * The gain-bandwidth product an op-amp stamp runs on: its own, else the class default. `??` also
614
+ * catches `undefined`, which is what a program compiled before the field existed carries -- that
615
+ * program was compiled against this same default, so reading it as `null` is its meaning, not a
616
+ * fallback invented for it.
617
+ */
618
+ function opAmpGainBandwidthHz(stamp) {
619
+ return stamp.gainBandwidthHz ?? OPAMP_DEFAULT_GAIN_BANDWIDTH_HZ;
620
+ }
607
621
  /**
608
622
  * Anti-windup bound for the op-amp pole's raw state, in units of halfSwing.
609
623
  *
@@ -1354,6 +1368,8 @@ export class ReferenceRuntime {
1354
1368
  limiterTrace = typeof process !== "undefined" && process.env?.VESSEL_LIMITER_TRACE === "1";
1355
1369
  limitedIterationCount = 0;
1356
1370
  limitedIterationPerSample = [];
1371
+ /** Fold reseeds taken so far (diagnostic, read past `private` by the stall study's tracer). */
1372
+ foldReseedCount = 0;
1357
1373
  /** Series ohms of whatever drives the input jack -- see `prepare()`'s option. */
1358
1374
  inputSourceOhms = 0;
1359
1375
  /**
@@ -1686,6 +1702,17 @@ export class ReferenceRuntime {
1686
1702
  if (missingModels.length > 0) {
1687
1703
  throw new RuntimeError(`program requires ${missingModels.length === 1 ? "a DSP model" : "DSP models"} this runtime does not implement: ${missingModels.join(", ")}`);
1688
1704
  }
1705
+ // The same lockout for the taper vocabulary. A taper string used to be read by falling
1706
+ // through to linear, so a program naming a curve this console lacks played the wrong one in
1707
+ // silence; `requiredOperators` cannot carry it (typed by stamp kind), so the names a program
1708
+ // uses are checked here, against the five this runtime implements, and each is named with
1709
+ // where it appears. Before any per-block state is sized, like the two lockouts above.
1710
+ const unrecognised = unrecognisedTapers(this.program);
1711
+ if (unrecognised.length > 0) {
1712
+ throw new RuntimeError(`program names ${unrecognised.length === 1 ? "a taper" : "tapers"} this runtime does not implement: ${unrecognised
1713
+ .map((entry) => `"${entry.taper}" (${entry.where})`)
1714
+ .join(", ")}; it implements ${IMPLEMENTED_TAPER_NAMES.join(", ")}`);
1715
+ }
1689
1716
  // A dispatched macro block is refused by name, never executed and never ignored.
1690
1717
  //
1691
1718
  // **Ordered after the model lockout on purpose.** Both can fire on the same program and
@@ -3855,7 +3882,9 @@ export class ReferenceRuntime {
3855
3882
  let bestDelta = Number.POSITIVE_INFINITY;
3856
3883
  let noImprovement = 0;
3857
3884
  let foldStreak = 0;
3858
- let foldReseeded = false;
3885
+ let foldReseeds = 0;
3886
+ let lastWorstNode = -1;
3887
+ let lastWorstSign = 0;
3859
3888
  for (let iteration = 0; iteration < iterations; iteration += 1) {
3860
3889
  used = iteration + 1;
3861
3890
  this.limitedIterate = false;
@@ -4004,6 +4033,32 @@ export class ReferenceRuntime {
4004
4033
  }
4005
4034
  }
4006
4035
  }
4036
+ // **The op-amp step limiter damps the whole update, not only its own row's
4037
+ // evaluation (2026-10-11).** A railed op-amp's row is a tangent of slope up to
4038
+ // `alpha * A0` (910 at 7 MHz and 48 kHz); where a loop closes around it with net
4039
+ // positive feedback inside one sample, the Jacobian is singular at the point of the
4040
+ // sigmoid where `slope * beta = 1`, and a Newton step taken near it leaves the physical
4041
+ // domain: measured on `mxr-blue-box` at 4 MHz the solved output node went to 910,
4042
+ // -1424 and 10335 V during one rail switch, every junction downstream then walked back
4043
+ // for hundreds of iterations, and on `boss-mt-2` at os4 the same step put -30 V on an
4044
+ // output node at iteration 4 and 1e88 on the block by iteration 26. The limiter alone
4045
+ // only re-evaluates the op-amp at a capped differential; the rest of the iterate keeps
4046
+ // the explosion. Scaling the whole step by the most limited op-amp's own ratio
4047
+ // `cap / |requested|` keeps the iterate where its tangent was taken (the limited
4048
+ // differential is then the iterate's actual differential), and bounding the output
4049
+ // node's move to one full swing per iteration keeps it on the sigmoid the row is a
4050
+ // tangent of. Both are the step limiter's own numbers; an op-amp that is not limited
4051
+ // scales nothing, so a sample that never limits takes exactly the path it always did.
4052
+ // Transient only: at the operating point `alpha` is 1, the linear width is a hundred
4053
+ // thousandth of the swing, and damping to that cap quenched the DC continuation
4054
+ // (`boss-aw-2` came up with a latched envelope stage and a dead output). The DC walk
4055
+ // has gmin and source stepping as its own safety net and is left exactly as it was.
4056
+ const damping = dc ? 1 : this.opAmpStepDamping(block, blockIndex, current, next, dt, dc);
4057
+ if (damping < 1) {
4058
+ for (let i = 0; i < size; i++) {
4059
+ next[i] = current[i] + damping * (next[i] - current[i]);
4060
+ }
4061
+ }
4007
4062
  if (relaxing) {
4008
4063
  for (let i = 0; i < size; i++) {
4009
4064
  next[i] = current[i] + alpha * (next[i] - current[i]);
@@ -4012,6 +4067,22 @@ export class ReferenceRuntime {
4012
4067
  const delta = maxAbsDifference(next, current);
4013
4068
  worstNode = worstDifferenceIndex(next, current);
4014
4069
  worstDelta = delta;
4070
+ // **Non-contracting means circling, not marching (2026-10-11).** The brake was fitted
4071
+ // for an iterate that circles or stalls, and `delta` failing to fall cannot tell that
4072
+ // from a junction walking monotonically to its solution a thermal voltage at a time,
4073
+ // which is SPICE's normal path out of a large step. Measured on `mxr-blue-box` at
4074
+ // 4 MHz after each rail switch: the brake latched on the switch's transient and then
4075
+ // held a downstream NPN base at 0.2 Vt per iteration for 230 iterations of a 305-
4076
+ // iteration solve, five times the un-damped walk. A circling iterate reverses the
4077
+ // sign of its worst node's step; a marching one does not. So the brake engages, and
4078
+ // tightens, only when the worst node's step has reversed since the last iteration.
4079
+ const worstSign = Math.sign((next[worstNode] ?? 0) - (current[worstNode] ?? 0));
4080
+ // At the operating point the brake keeps its old rule (every non-contracting iteration
4081
+ // counts), so the DC walk every packet was validated on is untouched.
4082
+ const reversed = dc ||
4083
+ (worstNode === lastWorstNode && worstSign !== 0 && lastWorstSign !== 0 && worstSign !== lastWorstSign);
4084
+ lastWorstNode = worstNode;
4085
+ lastWorstSign = worstSign;
4015
4086
  if (delta < bestDelta * 0.999) {
4016
4087
  bestDelta = delta;
4017
4088
  noImprovement = 0;
@@ -4026,7 +4097,7 @@ export class ReferenceRuntime {
4026
4097
  }
4027
4098
  }
4028
4099
  else {
4029
- noImprovement += 1;
4100
+ noImprovement += reversed ? 1 : 0;
4030
4101
  if (!relaxing) {
4031
4102
  if (noImprovement >= NEWTON_NON_CONTRACTING_LIMIT &&
4032
4103
  iteration >= NEWTON_RELAXATION_EARLIEST_ITERATION) {
@@ -4100,15 +4171,37 @@ export class ReferenceRuntime {
4100
4171
  // from the reset above, so it is read through its declared type.
4101
4172
  const limitedOpamp = this.limitedOpamp;
4102
4173
  foldStreak = limitedOpamp?.folded === true ? foldStreak + 1 : 0;
4103
- if (!dc && !foldReseeded && limitedOpamp !== null && foldStreak >= OPAMP_FOLD_STREAK) {
4104
- foldReseeded = true;
4174
+ // **Re-armed, not one-shot (2026-10-11).** The reseed used to fire once per solve. On
4175
+ // `boss-mt-2` section `+=37 -=36 out=38` -- whose non-inverting input is fed from its own
4176
+ // output through 1 uF, so the per-sample problem has net positive feedback -- the first
4177
+ // streak is a transient at iteration ~20 that the reseed spends, and the solve then hunts
4178
+ // rail to rail before pinning at a turning point of the residual (`slope * beta = 1`)
4179
+ // from iteration ~660 to the cap: step requests of -4 / +2.8 widths against a floor cap of
4180
+ // 1/64, the Jacobian's sign flipping across one floor step, limited on 1023 of 1024
4181
+ // iterations. That is the canary's os1 stall with the datasheet product, and main's own
4182
+ // os4 stall at 0.666 s is the same pair of sections in the same two-cycle (the trace is in
4183
+ // `docs/spikes/2026-10-11-opamp-gbw-stall.md`). A turning point is exactly what the
4184
+ // halving cap cannot leave and exactly what a reseed exists for, so each fresh streak of
4185
+ // `OPAMP_FOLD_STREAK` floor-limited iterations earns another. **The first reseed goes to
4186
+ // the rail the sample started on, the second to the opposite one**, and so on: the
4187
+ // start's rail is the physical continuation (a bistable stage holds its state), and a
4188
+ // console that reaches that root directly and one that needs a reseed to reach it then
4189
+ // agree. With the opposite rail first they did not: at os4 on `mxr-blue-box` the TS
4190
+ // console reseeded at sample 76 and flipped rails while the WASM console converged in
4191
+ // four iterations without one, and the two drifted apart from sample 89 (r 0.016 over
4192
+ // the parity window). Each reseed needs its own streak, so the budget bounds the
4193
+ // hopping. A sample that never folds takes exactly the path it always did.
4194
+ if (!dc && limitedOpamp !== null && foldStreak >= OPAMP_FOLD_STREAK) {
4195
+ foldReseeds += 1;
4196
+ this.foldReseedCount += 1;
4105
4197
  foldStreak = 0;
4106
4198
  const wasHigh = (start[limitedOpamp.output] ?? limitedOpamp.centre) >= limitedOpamp.centre;
4107
- current[limitedOpamp.output] = wasHigh
4108
- ? limitedOpamp.railLow
4109
- : limitedOpamp.railHigh;
4199
+ const toHigh = foldReseeds % 2 === 1 ? wasHigh : !wasHigh;
4200
+ current[limitedOpamp.output] = toHigh
4201
+ ? limitedOpamp.railHigh
4202
+ : limitedOpamp.railLow;
4110
4203
  this.opampHistory.set(limitedOpamp.key, {
4111
- differential: wasHigh ? -limitedOpamp.band : limitedOpamp.band,
4204
+ differential: toHigh ? limitedOpamp.band : -limitedOpamp.band,
4112
4205
  step: 0,
4113
4206
  cap: limitedOpamp.maxStep,
4114
4207
  });
@@ -4162,6 +4255,50 @@ export class ReferenceRuntime {
4162
4255
  }
4163
4256
  return { solution: current, converged, used, worstNode, worstDelta };
4164
4257
  }
4258
+ /**
4259
+ * The factor the Newton update is scaled by so that no railed op-amp's differential moves
4260
+ * further than its step cap and no op-amp output node moves further than one full swing:
4261
+ * the smallest `cap / |requested differential step|` and `2 * halfSwing / |requested output
4262
+ * step|` over the block's railed op-amps, or 1. `current` is the iterate the rows were
4263
+ * stamped at and `next` the undamped solve. The history read here is the one the stamps
4264
+ * wrote this iteration, so `differential` is the point each row's tangent was taken at and
4265
+ * `cap` the step the next evaluation will allow; a request inside both bounds scales nothing.
4266
+ * Mirrored in `Engine.cpp` (`opAmpStepDamping`); the two must agree to the operation.
4267
+ */
4268
+ opAmpStepDamping(block, blockIndex, current, next, dt, dc) {
4269
+ let damping = 1;
4270
+ for (const stamp of block.stamps) {
4271
+ if (stamp.kind !== "ideal-opamp" || stamp.railHigh === null || stamp.railLow === null) {
4272
+ continue;
4273
+ }
4274
+ const history = this.opampHistory.get(packHistoryKey3(blockIndex, stamp.plus, stamp.minus, stamp.output));
4275
+ if (history === undefined)
4276
+ continue;
4277
+ // The step the next evaluation will see: the band-clamped differential against the
4278
+ // point the row was taken at. The clamp matters: a section whose real differential
4279
+ // sits beyond the band would otherwise "request" the excess on every iteration and
4280
+ // damp a converged solve forever (measured: `boss-od-3` at os4, every sample at the
4281
+ // cap, when the raw differential was used here).
4282
+ const halfSwing = opAmpHalfSwing(stamp.railHigh, stamp.railLow);
4283
+ const alpha = dc
4284
+ ? 1
4285
+ : opAmpPoleAlpha(stamp.openLoopGain, opAmpGainBandwidthHz(stamp), dt, this.sampleRate);
4286
+ const effectiveGain = alpha * stamp.openLoopGain;
4287
+ const linearWidth = halfSwing / effectiveGain;
4288
+ const band = OPAMP_DIFFERENTIAL_BAND * linearWidth;
4289
+ const nextDifferential = clamp((next[stamp.plus] ?? 0) - (next[stamp.minus] ?? 0), -band, band);
4290
+ const magnitude = Math.abs(nextDifferential - history.differential);
4291
+ if (magnitude > history.cap) {
4292
+ damping = Math.min(damping, history.cap / magnitude);
4293
+ }
4294
+ const swing = 2 * halfSwing;
4295
+ const outputStep = Math.abs((next[stamp.output] ?? 0) - (current[stamp.output] ?? 0));
4296
+ if (outputStep > swing) {
4297
+ damping = Math.min(damping, swing / outputStep);
4298
+ }
4299
+ }
4300
+ return damping;
4301
+ }
4165
4302
  /**
4166
4303
  * Build-order step 6, vertical slice: the part of a block's matrix that is the same for
4167
4304
  * every Newton iteration of this sample -- every stamp `newtonPortRowsOf` calls linear,
@@ -5066,7 +5203,7 @@ export class ReferenceRuntime {
5066
5203
  continue;
5067
5204
  }
5068
5205
  const key = packHistoryKey3(blockIndex, stamp.plus, stamp.minus, stamp.output);
5069
- const alpha = opAmpPoleAlpha(stamp.openLoopGain, OPAMP_GAIN_BANDWIDTH_HZ, dt, this.sampleRate);
5206
+ const alpha = opAmpPoleAlpha(stamp.openLoopGain, opAmpGainBandwidthHz(stamp), dt, this.sampleRate);
5070
5207
  // **Bounded at ±8 halfSwings (shipped 2026-09-14, reverted once 2026-08-21).**
5071
5208
  // The bound is anti-windup: a real op-amp's compensation node cannot exceed its
5072
5209
  // supply, and at ±8 halfSwings `tanh` is `0.99999977` -- indistinguishable from
@@ -6162,14 +6299,25 @@ export class ReferenceRuntime {
6162
6299
  // saturation band and step limiter are stated in.
6163
6300
  const alpha = dc
6164
6301
  ? 1
6165
- : opAmpPoleAlpha(stamp.openLoopGain, OPAMP_GAIN_BANDWIDTH_HZ, dt, this.sampleRate);
6302
+ : opAmpPoleAlpha(stamp.openLoopGain, opAmpGainBandwidthHz(stamp), dt, this.sampleRate);
6166
6303
  const effectiveGain = alpha * stamp.openLoopGain;
6167
6304
  const linearWidth = halfSwing / effectiveGain;
6168
6305
  const previous = this.opampHistory.get(opampKey);
6169
- const previousDifferential = previous?.differential ?? 0;
6170
6306
  const rawDifferential = (solution[stamp.plus] ?? 0) - (solution[stamp.minus] ?? 0);
6171
6307
  const band = OPAMP_DIFFERENTIAL_BAND * linearWidth;
6172
6308
  const bounded = clamp(rawDifferential, -band, band);
6309
+ // **The first iteration measures its step against the seed, not against zero
6310
+ // (2026-10-11).** The history is cleared every sample, so the first iterate used to
6311
+ // compare its differential with 0 and be "limited" whenever a section sits more than
6312
+ // four widths from zero -- which every saturated section does, by the width of its
6313
+ // band. The solve then re-walked that differential from zero at four widths per
6314
+ // iteration on every sample: `electro-harmonix-slapback-echo` at 4 MHz needed exactly
6315
+ // four iterations per sub-sample (its sections sit at the 12-width band), `boss-od-3`
6316
+ // and `boss-pq-4` exactly three, where the predictor had been landing one. SPICE's
6317
+ // rule is that the first iterate of a time point is limited against the previous time
6318
+ // point's solution; that is what the seed is, so its own differential is the point
6319
+ // the first step is measured from, and the first step is zero.
6320
+ const previousDifferential = previous?.differential ?? bounded;
6173
6321
  const step = bounded - previousDifferential;
6174
6322
  const maxStep = OPAMP_MAX_DIFFERENTIAL_STEP * linearWidth;
6175
6323
  const reversing = previous !== undefined &&
@@ -6207,9 +6355,25 @@ export class ReferenceRuntime {
6207
6355
  ? Math.max(previousCap / 2, linearWidth / 64)
6208
6356
  : Math.min(maxStep, previousCap * 1.2);
6209
6357
  const limited = Math.abs(step) > cap;
6358
+ // A fold is the cap pinned at its floor **with the iterate moving at the floor's
6359
+ // scale**, whether or not this particular step overran the cap: once the update is
6360
+ // damped to the cap (see `opAmpStepDamping`) a trapped iterate's steps equal the cap
6361
+ // rather than exceed it, so a streak counted on `limited` alone never forms (measured
6362
+ // 2026-10-11: `boss-mt-2` sample 4990, 1024 iterations with the cap at the floor on
6363
+ // 1015 of them and the limiter flagged on 372). The step-size test is what keeps an
6364
+ // idle section out of it: a section whose differential merely jitters by 1e-6 widths
6365
+ // reverses sign every iteration too, its cap collapses to the floor the same way, and
6366
+ // without the test it was reseeded onto a rail it had no business on (`boss-aw-2`,
6367
+ // sample 1489: 527 iterations and a latched output where the product tree took 4).
6368
+ // A quarter of the floor cap (`linearWidth / 64`) is the scale: a trapped iterate
6369
+ // moves by the cap, or by less when another section's ratio damped the update (the
6370
+ // mt-2 pair s87/s88 fold together), and jitter is four orders below it.
6371
+ const folded = cap <= linearWidth / 8 && Math.abs(step) >= linearWidth / 256;
6210
6372
  if (limited) {
6211
6373
  this.limitedIterate = true;
6212
6374
  this.limitedBy = `opamp +=${stamp.plus} -=${stamp.minus} out=${stamp.output}`;
6375
+ }
6376
+ if (limited || folded) {
6213
6377
  this.limitedOpamp = {
6214
6378
  key: opampKey,
6215
6379
  output: stamp.output,
@@ -6218,7 +6382,7 @@ export class ReferenceRuntime {
6218
6382
  railLow: stamp.railLow,
6219
6383
  band,
6220
6384
  maxStep,
6221
- folded: cap <= linearWidth / 8,
6385
+ folded,
6222
6386
  };
6223
6387
  }
6224
6388
  const differential = limited
@@ -6254,11 +6418,26 @@ export class ReferenceRuntime {
6254
6418
  // advance's comment and `docs/troubleshootings/...saturated-opamp-row...md`).
6255
6419
  const derivativeShape = Math.tanh(clamp(scaled, -OPAMP_SATURATION_BAND, OPAMP_SATURATION_BAND));
6256
6420
  const slope = effectiveGain * (1 - derivativeShape * derivativeShape);
6257
- // Linearised: Vout - slope * Vdiff = Vout0 - slope * Vdiff0.
6421
+ // Linearised: Vout - slope * Vdiff = Vout0 - slope * Vdiff0, with Vdiff0 the point the
6422
+ // tangent is taken at. While the step limiter is active that point is the limited
6423
+ // differential (SPICE's rule: evaluate at the damped step, let the unknown be free).
6424
+ // When it is not, the point is the **actual previous differential**, even when that
6425
+ // lies beyond the band `differential` was clamped to -- the value `output` is still
6426
+ // the band's, which is the model, but the tangent must pass through the iterate or the
6427
+ // fixed point is not the model: with `Vdiff0 = bounded` the row converges to
6428
+ // `f(band) + slope * (Vdiff - band)`, an output off its rail by the leak
6429
+ // `slope * excess`, and `slope` grows with the gain-bandwidth product. Measured
6430
+ // 2026-10-11 on `mxr-blue-box` at 4 MHz: the op-amp's own output 0.003 V against a
6431
+ // 0 V rail while the solved node sat at -0.290 V, and the two NPN stages it drives
6432
+ // spent 300 iterations walking out of the junction state that sub-rail voltage put
6433
+ // them in (`docs/spikes/2026-10-11-opamp-gbw-stall.md`). At the fixed point
6434
+ // `Vdiff == rawDifferential`, so the row reads `Vout = output` exactly, on or beyond
6435
+ // the band; inside the band `rawDifferential == bounded` and nothing changes.
6436
+ const linearisedAt = limited ? differential : rawDifferential;
6258
6437
  matrix[row][stamp.output] += 1;
6259
6438
  matrix[row][stamp.plus] -= slope;
6260
6439
  matrix[row][stamp.minus] += slope;
6261
- rhs[row] = output - slope * differential;
6440
+ rhs[row] = output - slope * linearisedAt;
6262
6441
  break;
6263
6442
  }
6264
6443
  case "vccs": {