@vessel-dsp/runtime 0.4.1 → 0.5.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.5.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"}
@@ -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
  /**
@@ -3855,7 +3871,9 @@ export class ReferenceRuntime {
3855
3871
  let bestDelta = Number.POSITIVE_INFINITY;
3856
3872
  let noImprovement = 0;
3857
3873
  let foldStreak = 0;
3858
- let foldReseeded = false;
3874
+ let foldReseeds = 0;
3875
+ let lastWorstNode = -1;
3876
+ let lastWorstSign = 0;
3859
3877
  for (let iteration = 0; iteration < iterations; iteration += 1) {
3860
3878
  used = iteration + 1;
3861
3879
  this.limitedIterate = false;
@@ -4004,6 +4022,32 @@ export class ReferenceRuntime {
4004
4022
  }
4005
4023
  }
4006
4024
  }
4025
+ // **The op-amp step limiter damps the whole update, not only its own row's
4026
+ // evaluation (2026-10-11).** A railed op-amp's row is a tangent of slope up to
4027
+ // `alpha * A0` (910 at 7 MHz and 48 kHz); where a loop closes around it with net
4028
+ // positive feedback inside one sample, the Jacobian is singular at the point of the
4029
+ // sigmoid where `slope * beta = 1`, and a Newton step taken near it leaves the physical
4030
+ // domain: measured on `mxr-blue-box` at 4 MHz the solved output node went to 910,
4031
+ // -1424 and 10335 V during one rail switch, every junction downstream then walked back
4032
+ // for hundreds of iterations, and on `boss-mt-2` at os4 the same step put -30 V on an
4033
+ // output node at iteration 4 and 1e88 on the block by iteration 26. The limiter alone
4034
+ // only re-evaluates the op-amp at a capped differential; the rest of the iterate keeps
4035
+ // the explosion. Scaling the whole step by the most limited op-amp's own ratio
4036
+ // `cap / |requested|` keeps the iterate where its tangent was taken (the limited
4037
+ // differential is then the iterate's actual differential), and bounding the output
4038
+ // node's move to one full swing per iteration keeps it on the sigmoid the row is a
4039
+ // tangent of. Both are the step limiter's own numbers; an op-amp that is not limited
4040
+ // scales nothing, so a sample that never limits takes exactly the path it always did.
4041
+ // Transient only: at the operating point `alpha` is 1, the linear width is a hundred
4042
+ // thousandth of the swing, and damping to that cap quenched the DC continuation
4043
+ // (`boss-aw-2` came up with a latched envelope stage and a dead output). The DC walk
4044
+ // has gmin and source stepping as its own safety net and is left exactly as it was.
4045
+ const damping = dc ? 1 : this.opAmpStepDamping(block, blockIndex, current, next, dt, dc);
4046
+ if (damping < 1) {
4047
+ for (let i = 0; i < size; i++) {
4048
+ next[i] = current[i] + damping * (next[i] - current[i]);
4049
+ }
4050
+ }
4007
4051
  if (relaxing) {
4008
4052
  for (let i = 0; i < size; i++) {
4009
4053
  next[i] = current[i] + alpha * (next[i] - current[i]);
@@ -4012,6 +4056,22 @@ export class ReferenceRuntime {
4012
4056
  const delta = maxAbsDifference(next, current);
4013
4057
  worstNode = worstDifferenceIndex(next, current);
4014
4058
  worstDelta = delta;
4059
+ // **Non-contracting means circling, not marching (2026-10-11).** The brake was fitted
4060
+ // for an iterate that circles or stalls, and `delta` failing to fall cannot tell that
4061
+ // from a junction walking monotonically to its solution a thermal voltage at a time,
4062
+ // which is SPICE's normal path out of a large step. Measured on `mxr-blue-box` at
4063
+ // 4 MHz after each rail switch: the brake latched on the switch's transient and then
4064
+ // held a downstream NPN base at 0.2 Vt per iteration for 230 iterations of a 305-
4065
+ // iteration solve, five times the un-damped walk. A circling iterate reverses the
4066
+ // sign of its worst node's step; a marching one does not. So the brake engages, and
4067
+ // tightens, only when the worst node's step has reversed since the last iteration.
4068
+ const worstSign = Math.sign((next[worstNode] ?? 0) - (current[worstNode] ?? 0));
4069
+ // At the operating point the brake keeps its old rule (every non-contracting iteration
4070
+ // counts), so the DC walk every packet was validated on is untouched.
4071
+ const reversed = dc ||
4072
+ (worstNode === lastWorstNode && worstSign !== 0 && lastWorstSign !== 0 && worstSign !== lastWorstSign);
4073
+ lastWorstNode = worstNode;
4074
+ lastWorstSign = worstSign;
4015
4075
  if (delta < bestDelta * 0.999) {
4016
4076
  bestDelta = delta;
4017
4077
  noImprovement = 0;
@@ -4026,7 +4086,7 @@ export class ReferenceRuntime {
4026
4086
  }
4027
4087
  }
4028
4088
  else {
4029
- noImprovement += 1;
4089
+ noImprovement += reversed ? 1 : 0;
4030
4090
  if (!relaxing) {
4031
4091
  if (noImprovement >= NEWTON_NON_CONTRACTING_LIMIT &&
4032
4092
  iteration >= NEWTON_RELAXATION_EARLIEST_ITERATION) {
@@ -4100,15 +4160,37 @@ export class ReferenceRuntime {
4100
4160
  // from the reset above, so it is read through its declared type.
4101
4161
  const limitedOpamp = this.limitedOpamp;
4102
4162
  foldStreak = limitedOpamp?.folded === true ? foldStreak + 1 : 0;
4103
- if (!dc && !foldReseeded && limitedOpamp !== null && foldStreak >= OPAMP_FOLD_STREAK) {
4104
- foldReseeded = true;
4163
+ // **Re-armed, not one-shot (2026-10-11).** The reseed used to fire once per solve. On
4164
+ // `boss-mt-2` section `+=37 -=36 out=38` -- whose non-inverting input is fed from its own
4165
+ // output through 1 uF, so the per-sample problem has net positive feedback -- the first
4166
+ // streak is a transient at iteration ~20 that the reseed spends, and the solve then hunts
4167
+ // rail to rail before pinning at a turning point of the residual (`slope * beta = 1`)
4168
+ // from iteration ~660 to the cap: step requests of -4 / +2.8 widths against a floor cap of
4169
+ // 1/64, the Jacobian's sign flipping across one floor step, limited on 1023 of 1024
4170
+ // iterations. That is the canary's os1 stall with the datasheet product, and main's own
4171
+ // os4 stall at 0.666 s is the same pair of sections in the same two-cycle (the trace is in
4172
+ // `docs/spikes/2026-10-11-opamp-gbw-stall.md`). A turning point is exactly what the
4173
+ // halving cap cannot leave and exactly what a reseed exists for, so each fresh streak of
4174
+ // `OPAMP_FOLD_STREAK` floor-limited iterations earns another. **The first reseed goes to
4175
+ // the rail the sample started on, the second to the opposite one**, and so on: the
4176
+ // start's rail is the physical continuation (a bistable stage holds its state), and a
4177
+ // console that reaches that root directly and one that needs a reseed to reach it then
4178
+ // agree. With the opposite rail first they did not: at os4 on `mxr-blue-box` the TS
4179
+ // console reseeded at sample 76 and flipped rails while the WASM console converged in
4180
+ // four iterations without one, and the two drifted apart from sample 89 (r 0.016 over
4181
+ // the parity window). Each reseed needs its own streak, so the budget bounds the
4182
+ // hopping. A sample that never folds takes exactly the path it always did.
4183
+ if (!dc && limitedOpamp !== null && foldStreak >= OPAMP_FOLD_STREAK) {
4184
+ foldReseeds += 1;
4185
+ this.foldReseedCount += 1;
4105
4186
  foldStreak = 0;
4106
4187
  const wasHigh = (start[limitedOpamp.output] ?? limitedOpamp.centre) >= limitedOpamp.centre;
4107
- current[limitedOpamp.output] = wasHigh
4108
- ? limitedOpamp.railLow
4109
- : limitedOpamp.railHigh;
4188
+ const toHigh = foldReseeds % 2 === 1 ? wasHigh : !wasHigh;
4189
+ current[limitedOpamp.output] = toHigh
4190
+ ? limitedOpamp.railHigh
4191
+ : limitedOpamp.railLow;
4110
4192
  this.opampHistory.set(limitedOpamp.key, {
4111
- differential: wasHigh ? -limitedOpamp.band : limitedOpamp.band,
4193
+ differential: toHigh ? limitedOpamp.band : -limitedOpamp.band,
4112
4194
  step: 0,
4113
4195
  cap: limitedOpamp.maxStep,
4114
4196
  });
@@ -4162,6 +4244,50 @@ export class ReferenceRuntime {
4162
4244
  }
4163
4245
  return { solution: current, converged, used, worstNode, worstDelta };
4164
4246
  }
4247
+ /**
4248
+ * The factor the Newton update is scaled by so that no railed op-amp's differential moves
4249
+ * further than its step cap and no op-amp output node moves further than one full swing:
4250
+ * the smallest `cap / |requested differential step|` and `2 * halfSwing / |requested output
4251
+ * step|` over the block's railed op-amps, or 1. `current` is the iterate the rows were
4252
+ * stamped at and `next` the undamped solve. The history read here is the one the stamps
4253
+ * wrote this iteration, so `differential` is the point each row's tangent was taken at and
4254
+ * `cap` the step the next evaluation will allow; a request inside both bounds scales nothing.
4255
+ * Mirrored in `Engine.cpp` (`opAmpStepDamping`); the two must agree to the operation.
4256
+ */
4257
+ opAmpStepDamping(block, blockIndex, current, next, dt, dc) {
4258
+ let damping = 1;
4259
+ for (const stamp of block.stamps) {
4260
+ if (stamp.kind !== "ideal-opamp" || stamp.railHigh === null || stamp.railLow === null) {
4261
+ continue;
4262
+ }
4263
+ const history = this.opampHistory.get(packHistoryKey3(blockIndex, stamp.plus, stamp.minus, stamp.output));
4264
+ if (history === undefined)
4265
+ continue;
4266
+ // The step the next evaluation will see: the band-clamped differential against the
4267
+ // point the row was taken at. The clamp matters: a section whose real differential
4268
+ // sits beyond the band would otherwise "request" the excess on every iteration and
4269
+ // damp a converged solve forever (measured: `boss-od-3` at os4, every sample at the
4270
+ // cap, when the raw differential was used here).
4271
+ const halfSwing = opAmpHalfSwing(stamp.railHigh, stamp.railLow);
4272
+ const alpha = dc
4273
+ ? 1
4274
+ : opAmpPoleAlpha(stamp.openLoopGain, opAmpGainBandwidthHz(stamp), dt, this.sampleRate);
4275
+ const effectiveGain = alpha * stamp.openLoopGain;
4276
+ const linearWidth = halfSwing / effectiveGain;
4277
+ const band = OPAMP_DIFFERENTIAL_BAND * linearWidth;
4278
+ const nextDifferential = clamp((next[stamp.plus] ?? 0) - (next[stamp.minus] ?? 0), -band, band);
4279
+ const magnitude = Math.abs(nextDifferential - history.differential);
4280
+ if (magnitude > history.cap) {
4281
+ damping = Math.min(damping, history.cap / magnitude);
4282
+ }
4283
+ const swing = 2 * halfSwing;
4284
+ const outputStep = Math.abs((next[stamp.output] ?? 0) - (current[stamp.output] ?? 0));
4285
+ if (outputStep > swing) {
4286
+ damping = Math.min(damping, swing / outputStep);
4287
+ }
4288
+ }
4289
+ return damping;
4290
+ }
4165
4291
  /**
4166
4292
  * Build-order step 6, vertical slice: the part of a block's matrix that is the same for
4167
4293
  * every Newton iteration of this sample -- every stamp `newtonPortRowsOf` calls linear,
@@ -5066,7 +5192,7 @@ export class ReferenceRuntime {
5066
5192
  continue;
5067
5193
  }
5068
5194
  const key = packHistoryKey3(blockIndex, stamp.plus, stamp.minus, stamp.output);
5069
- const alpha = opAmpPoleAlpha(stamp.openLoopGain, OPAMP_GAIN_BANDWIDTH_HZ, dt, this.sampleRate);
5195
+ const alpha = opAmpPoleAlpha(stamp.openLoopGain, opAmpGainBandwidthHz(stamp), dt, this.sampleRate);
5070
5196
  // **Bounded at ±8 halfSwings (shipped 2026-09-14, reverted once 2026-08-21).**
5071
5197
  // The bound is anti-windup: a real op-amp's compensation node cannot exceed its
5072
5198
  // supply, and at ±8 halfSwings `tanh` is `0.99999977` -- indistinguishable from
@@ -6162,14 +6288,25 @@ export class ReferenceRuntime {
6162
6288
  // saturation band and step limiter are stated in.
6163
6289
  const alpha = dc
6164
6290
  ? 1
6165
- : opAmpPoleAlpha(stamp.openLoopGain, OPAMP_GAIN_BANDWIDTH_HZ, dt, this.sampleRate);
6291
+ : opAmpPoleAlpha(stamp.openLoopGain, opAmpGainBandwidthHz(stamp), dt, this.sampleRate);
6166
6292
  const effectiveGain = alpha * stamp.openLoopGain;
6167
6293
  const linearWidth = halfSwing / effectiveGain;
6168
6294
  const previous = this.opampHistory.get(opampKey);
6169
- const previousDifferential = previous?.differential ?? 0;
6170
6295
  const rawDifferential = (solution[stamp.plus] ?? 0) - (solution[stamp.minus] ?? 0);
6171
6296
  const band = OPAMP_DIFFERENTIAL_BAND * linearWidth;
6172
6297
  const bounded = clamp(rawDifferential, -band, band);
6298
+ // **The first iteration measures its step against the seed, not against zero
6299
+ // (2026-10-11).** The history is cleared every sample, so the first iterate used to
6300
+ // compare its differential with 0 and be "limited" whenever a section sits more than
6301
+ // four widths from zero -- which every saturated section does, by the width of its
6302
+ // band. The solve then re-walked that differential from zero at four widths per
6303
+ // iteration on every sample: `electro-harmonix-slapback-echo` at 4 MHz needed exactly
6304
+ // four iterations per sub-sample (its sections sit at the 12-width band), `boss-od-3`
6305
+ // and `boss-pq-4` exactly three, where the predictor had been landing one. SPICE's
6306
+ // rule is that the first iterate of a time point is limited against the previous time
6307
+ // point's solution; that is what the seed is, so its own differential is the point
6308
+ // the first step is measured from, and the first step is zero.
6309
+ const previousDifferential = previous?.differential ?? bounded;
6173
6310
  const step = bounded - previousDifferential;
6174
6311
  const maxStep = OPAMP_MAX_DIFFERENTIAL_STEP * linearWidth;
6175
6312
  const reversing = previous !== undefined &&
@@ -6207,9 +6344,25 @@ export class ReferenceRuntime {
6207
6344
  ? Math.max(previousCap / 2, linearWidth / 64)
6208
6345
  : Math.min(maxStep, previousCap * 1.2);
6209
6346
  const limited = Math.abs(step) > cap;
6347
+ // A fold is the cap pinned at its floor **with the iterate moving at the floor's
6348
+ // scale**, whether or not this particular step overran the cap: once the update is
6349
+ // damped to the cap (see `opAmpStepDamping`) a trapped iterate's steps equal the cap
6350
+ // rather than exceed it, so a streak counted on `limited` alone never forms (measured
6351
+ // 2026-10-11: `boss-mt-2` sample 4990, 1024 iterations with the cap at the floor on
6352
+ // 1015 of them and the limiter flagged on 372). The step-size test is what keeps an
6353
+ // idle section out of it: a section whose differential merely jitters by 1e-6 widths
6354
+ // reverses sign every iteration too, its cap collapses to the floor the same way, and
6355
+ // without the test it was reseeded onto a rail it had no business on (`boss-aw-2`,
6356
+ // sample 1489: 527 iterations and a latched output where the product tree took 4).
6357
+ // A quarter of the floor cap (`linearWidth / 64`) is the scale: a trapped iterate
6358
+ // moves by the cap, or by less when another section's ratio damped the update (the
6359
+ // mt-2 pair s87/s88 fold together), and jitter is four orders below it.
6360
+ const folded = cap <= linearWidth / 8 && Math.abs(step) >= linearWidth / 256;
6210
6361
  if (limited) {
6211
6362
  this.limitedIterate = true;
6212
6363
  this.limitedBy = `opamp +=${stamp.plus} -=${stamp.minus} out=${stamp.output}`;
6364
+ }
6365
+ if (limited || folded) {
6213
6366
  this.limitedOpamp = {
6214
6367
  key: opampKey,
6215
6368
  output: stamp.output,
@@ -6218,7 +6371,7 @@ export class ReferenceRuntime {
6218
6371
  railLow: stamp.railLow,
6219
6372
  band,
6220
6373
  maxStep,
6221
- folded: cap <= linearWidth / 8,
6374
+ folded,
6222
6375
  };
6223
6376
  }
6224
6377
  const differential = limited
@@ -6254,11 +6407,26 @@ export class ReferenceRuntime {
6254
6407
  // advance's comment and `docs/troubleshootings/...saturated-opamp-row...md`).
6255
6408
  const derivativeShape = Math.tanh(clamp(scaled, -OPAMP_SATURATION_BAND, OPAMP_SATURATION_BAND));
6256
6409
  const slope = effectiveGain * (1 - derivativeShape * derivativeShape);
6257
- // Linearised: Vout - slope * Vdiff = Vout0 - slope * Vdiff0.
6410
+ // Linearised: Vout - slope * Vdiff = Vout0 - slope * Vdiff0, with Vdiff0 the point the
6411
+ // tangent is taken at. While the step limiter is active that point is the limited
6412
+ // differential (SPICE's rule: evaluate at the damped step, let the unknown be free).
6413
+ // When it is not, the point is the **actual previous differential**, even when that
6414
+ // lies beyond the band `differential` was clamped to -- the value `output` is still
6415
+ // the band's, which is the model, but the tangent must pass through the iterate or the
6416
+ // fixed point is not the model: with `Vdiff0 = bounded` the row converges to
6417
+ // `f(band) + slope * (Vdiff - band)`, an output off its rail by the leak
6418
+ // `slope * excess`, and `slope` grows with the gain-bandwidth product. Measured
6419
+ // 2026-10-11 on `mxr-blue-box` at 4 MHz: the op-amp's own output 0.003 V against a
6420
+ // 0 V rail while the solved node sat at -0.290 V, and the two NPN stages it drives
6421
+ // spent 300 iterations walking out of the junction state that sub-rail voltage put
6422
+ // them in (`docs/spikes/2026-10-11-opamp-gbw-stall.md`). At the fixed point
6423
+ // `Vdiff == rawDifferential`, so the row reads `Vout = output` exactly, on or beyond
6424
+ // the band; inside the band `rawDifferential == bounded` and nothing changes.
6425
+ const linearisedAt = limited ? differential : rawDifferential;
6258
6426
  matrix[row][stamp.output] += 1;
6259
6427
  matrix[row][stamp.plus] -= slope;
6260
6428
  matrix[row][stamp.minus] += slope;
6261
- rhs[row] = output - slope * differential;
6429
+ rhs[row] = output - slope * linearisedAt;
6262
6430
  break;
6263
6431
  }
6264
6432
  case "vccs": {