<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Graeme Boy</title>
  <subtitle>Writing by Graeme Boy.</subtitle>
  <link href="https://strangechances.com/feed.xml" rel="self" type="application/atom+xml"/>
  <link href="https://strangechances.com/writings/" rel="alternate" type="text/html"/>
  <id>https://strangechances.com/writings/</id>
  <updated>2026-11-25T00:00:00Z</updated>
  <author><name>Graeme Boy</name><uri>https://strangechances.com/</uri></author>
  <entry>
    <title>furniture music in swift and metal</title>
    <link href="https://strangechances.com/writings/satie/" rel="alternate" type="text/html"/>
    <id>https://strangechances.com/writings/satie/</id>
    <published>2026-11-25T00:00:00Z</published>
    <updated>2026-11-25T00:00:00Z</updated>
    <summary>Turning a 3.6 KB browser sketch into a 10 MB native Apple Silicon instrument: Factor Oracles, Velvet-Noise FDNs, circadian James Turrell shaders, TLA+ verification, and the MetalKit bug my formal proof missed.</summary>
    <content type="html">&lt;p&gt;Four days ago I wrote about &lt;a href=&quot;/writings/soft-light/&quot;&gt;music without audio files&lt;/a&gt;, a 3.6 KB Web Audio synthesizer that writes hold music one bar at a time inside an Ando Jam. Once that engine worked, a harder question followed: what happens if you pull the same idea out of a browser tab and build a dedicated desktop instrument for working, reading, and resting, with no Electron shell, no cloud streams, and no subscription?&lt;/p&gt;
&lt;p&gt;The first Mac build was 2.4 MB of pure synthesis. Once I added 46 public-domain studio samples, a Factor Oracle, a Velvet-Noise reverb chamber, six 120 Hz Metal shaders, and native 8-language Apple localization, &lt;a href=&quot;/satie/&quot;&gt;Satie&lt;/a&gt; (v4.1.1, MIT licensed, Apple notarized) landed at 10 MB on macOS—and the same shared &lt;code&gt;AcousticCore&lt;/code&gt; engine now runs natively on iPhone and iPad on the &lt;a href=&quot;https://apps.apple.com/app/satie-focus-soundscapes/id6837572453&quot; rel=&quot;noopener&quot;&gt;App Store&lt;/a&gt;. Both apps ask for zero permissions, make zero network requests, and compile in Swift 6 and Metal with zero third-party packages.&lt;/p&gt;
&lt;p&gt;The interactive exhibits below synthesize audio in your browser with the Web Audio API so you can hear the Factor Oracle jumps, the Velvet-Noise diffuser, the 14.40 Hz shimmer fix, the rain field, and the circadian bronze bowls right in this page.&lt;/p&gt;

&lt;dl class=&quot;essay-stats&quot; aria-label=&quot;Measured Satie v4.1.1 engineering metrics&quot;&gt;
  &lt;div&gt;&lt;dt&gt;notarized macOS app (.dmg)&lt;/dt&gt;&lt;dd&gt;10 MB&lt;/dd&gt;&lt;/div&gt;
  &lt;div&gt;&lt;dt&gt;unique 32-bar passes (256 bars)&lt;/dt&gt;&lt;dd class=&quot;is-ok&quot;&gt;7 / 7&lt;/dd&gt;&lt;/div&gt;
  &lt;div&gt;&lt;dt&gt;nocturnal blue reduction&lt;/dt&gt;&lt;dd class=&quot;is-ok&quot;&gt;−90.4%&lt;/dd&gt;&lt;/div&gt;
  &lt;div&gt;&lt;dt&gt;third-party packages / permissions&lt;/dt&gt;&lt;dd class=&quot;is-ok&quot;&gt;0 / 0&lt;/dd&gt;&lt;/div&gt;
&lt;/dl&gt;

&lt;aside class=&quot;etymology&quot; aria-label=&quot;Etymology of musique d&#x27;ameublement&quot;&gt;
  &lt;div class=&quot;etym-head&quot;&gt;
    &lt;span class=&quot;etym-kicker&quot;&gt;Origin&lt;/span&gt;
    &lt;span class=&quot;etym-lemma&quot;&gt;musique d&#x27;ameublement&lt;/span&gt;
    &lt;span class=&quot;etym-ipa&quot;&gt;/my.zik da.mœ.blə.mɑ̃/&lt;/span&gt;
  &lt;/div&gt;
  &lt;ol class=&quot;etym-chain&quot; aria-label=&quot;Phrase lineage&quot;&gt;
    &lt;li&gt;&lt;span class=&quot;etym-stem&quot;&gt;musique&lt;/span&gt;&lt;span class=&quot;etym-gloss&quot;&gt;French · music&lt;/span&gt;&lt;/li&gt;
    &lt;li class=&quot;etym-op&quot; aria-hidden=&quot;true&quot;&gt;+&lt;/li&gt;
    &lt;li&gt;&lt;span class=&quot;etym-stem&quot;&gt;d&#x27;&lt;/span&gt;&lt;span class=&quot;etym-gloss&quot;&gt;of&lt;/span&gt;&lt;/li&gt;
    &lt;li class=&quot;etym-op&quot; aria-hidden=&quot;true&quot;&gt;+&lt;/li&gt;
    &lt;li&gt;&lt;span class=&quot;etym-stem etym-stem--accent&quot;&gt;ameublement&lt;/span&gt;&lt;span class=&quot;etym-gloss&quot;&gt;furnishing&lt;/span&gt;&lt;/li&gt;
    &lt;li class=&quot;etym-op&quot; aria-hidden=&quot;true&quot;&gt;→&lt;/li&gt;
    &lt;li&gt;&lt;span class=&quot;etym-stem&quot;&gt;furniture music&lt;/span&gt;&lt;span class=&quot;etym-gloss&quot;&gt;Erik Satie · Paris, 1917&lt;/span&gt;&lt;/li&gt;
  &lt;/ol&gt;
  &lt;p&gt;In 1917, Erik Satie coined &lt;em&gt;musique d&#x27;ameublement&lt;/em&gt; for pieces meant to sit in a room the way a lamp or wallpaper sits in a room. At a 1920 intermission performance in Paris, the audience hushed and sat down to listen, and Satie walked through the crowd urging people to keep talking and ignore the musicians. Focus audio fails the moment it asks for the front of your attention. Every design choice in Satie, from zero vocals to slow harmonic pacing and quiet menus, comes from that one rule.&lt;/p&gt;
&lt;/aside&gt;

&lt;h2&gt;The inspirations&lt;/h2&gt;
&lt;p&gt;Four traditions shaped Satie, two in sound and two in sight.&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Japanese &lt;em&gt;kankyo ongaku&lt;/em&gt; (1980s environmental music).&lt;/strong&gt; Hiroshi Yoshimura&#x27;s &lt;em&gt;Green&lt;/em&gt; and &lt;em&gt;Music for Nine Post Cards&lt;/em&gt;, alongside Midori Takada&#x27;s percussion studies, proved that sparse acoustic timbres spaced with &lt;em&gt;ma&lt;/em&gt; (negative space) hold a room together better than dense pads. That lineage drives &lt;em&gt;Soft Light&lt;/em&gt;, &lt;em&gt;Rain &amp;amp; Glass&lt;/em&gt;, and &lt;em&gt;Gymnopédie&lt;/em&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Brian Eno&#x27;s asynchronous tape loops.&lt;/strong&gt; In &lt;em&gt;Music for Airports&lt;/em&gt; (1978), Eno cut tape loops of incommensurate lengths so phrases drifted in and out of alignment over hours. Satie borrows that structure with prime-length macro cycles (5, 7, 11, and 13 bars) layered underneath a Factor Oracle automaton.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;James Turrell&#x27;s skyspaces and Hiroshi Sugimoto&#x27;s seascapes.&lt;/strong&gt; Most audio visualizers flicker like a nightclub equalizer and wreck concentration. Turrell&#x27;s &lt;em&gt;Aten Reign&lt;/em&gt; strips out hard spatial edges so the eye rests in slow luminous drift (&lt;em&gt;06 Oculus&lt;/em&gt;). Sugimoto&#x27;s long-exposure &lt;em&gt;Seascapes&lt;/em&gt; reduce a room to one calm horizon over dark water (&lt;em&gt;05 Horizon&lt;/em&gt;).&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Dieter Rams&#x27;s Braun instruments and CRT test equipment.&lt;/strong&gt; The menu bar panel holds six monochrome geometric glyphs, one centered play button, and one options drawer. When you expand into Studio view, the technical presets (&lt;em&gt;01 The Circuit&lt;/em&gt;, &lt;em&gt;02 Ecology Wall&lt;/em&gt;, and &lt;em&gt;03 Phosphor Scope&lt;/em&gt;) read like a calibrated Tektronix oscilloscope and spectrum analyzer rather than a media player.&lt;/li&gt;
&lt;/ul&gt;

&lt;figure class=&quot;ac-plate ac-plate--hero&quot;&gt;
  &lt;img src=&quot;/satie/img/hero-menubar.jpg&quot; width=&quot;1600&quot; height=&quot;1000&quot; alt=&quot;Satie macOS menu bar floating panel showing six circular geometric soundscape glyphs with Deep Dive active and 06 Oculus rendered in Metal&quot;&gt;
  &lt;figcaption&gt;
    &lt;span class=&quot;ac-plate-num&quot;&gt;MENU BAR&lt;/span&gt;
    &lt;span class=&quot;ac-plate-title&quot;&gt;Six worlds behind a 22pt meter&lt;/span&gt;
    &lt;span class=&quot;ac-plate-desc&quot;&gt;Each world pairs a sound engine with its own Metal visual: Focus (Soft Light + Circuit), Pulse (Kinetic Pulse + Scope), Rain (Rain &amp;amp; Glass + Ecology), Still (Horizon), Dive (Deep Dive + Oculus), and Night (Gymnopédie + Nocturne Silk).&lt;/span&gt;
  &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2&gt;How Satie compares to other products&lt;/h2&gt;
&lt;p&gt;Focus audio already has strong commercial products, and they are worth judging honestly. &lt;strong&gt;Brain.fm&lt;/strong&gt; funds real academic neuroscience, including the 2024 &lt;em&gt;Communications Biology&lt;/em&gt; fMRI and EEG study on rapid beta-range modulation. &lt;strong&gt;Endel&lt;/strong&gt; runs a polished cross-platform stem engine with artist collaborations and a broad catalog. &lt;strong&gt;Portal&lt;/strong&gt; records spatial field audio in real national parks. &lt;strong&gt;Spotify&lt;/strong&gt; playlists require no new software if you already keep a tab open.&lt;/p&gt;
&lt;p&gt;Satie makes a different set of bets. It ships as a single 10 MB offline binary with no account, no subscription, no network calls, and zero system permissions. Because it generates sound from 46 public-domain CC0 studio samples and real-time physical DSP instead of streaming pre-mixed tracks, it never hits a loop seam, works in airplane mode indefinitely, and lets you inspect every filter coefficient on GitHub.&lt;/p&gt;

&lt;div class=&quot;piece-table-wrap&quot;&gt;
  &lt;table&gt;
    &lt;thead&gt;
      &lt;tr&gt;
        &lt;th&gt;Product&lt;/th&gt;
        &lt;th&gt;Audio engine&lt;/th&gt;
        &lt;th&gt;Offline / Footprint&lt;/th&gt;
        &lt;th&gt;Visuals&lt;/th&gt;
        &lt;th&gt;Price &amp;amp; source&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;Satie&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;46 CC0 studio samples + live physical DSP, Velvet-Noise FDN, Factor Oracle&lt;/td&gt;
        &lt;td&gt;100% offline · 10 MB macOS / 12 MB iOS &amp;amp; iPadOS&lt;/td&gt;
        &lt;td&gt;6 × 120 Hz Apple EDR Metal shaders + circadian night mode&lt;/td&gt;
        &lt;td&gt;Free · MIT open source · 0 permissions&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;Endel&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;Adaptive cloud/local stem assembly (Pacific engine)&lt;/td&gt;
        &lt;td&gt;Web, mobile, desktop (~100–250 MB) · account required&lt;/td&gt;
        &lt;td&gt;Stylized ambient loops (SDR)&lt;/td&gt;
        &lt;td&gt;Subscription · proprietary&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;Brain.fm&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;Pre-composed tracks with patented 14–16 Hz amplitude modulation&lt;/td&gt;
        &lt;td&gt;Streaming / cached downloads · account required&lt;/td&gt;
        &lt;td&gt;Minimal timer UI&lt;/td&gt;
        &lt;td&gt;Subscription · proprietary&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;Portal&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;Spatial field recordings from real locations&lt;/td&gt;
        &lt;td&gt;Large audio packs (hundreds of MB to GB)&lt;/td&gt;
        &lt;td&gt;4K location video loops + Philips Hue&lt;/td&gt;
        &lt;td&gt;Subscription · proprietary&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;Noisli / Spotify&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;Static noise loops or streamed playlists&lt;/td&gt;
        &lt;td&gt;Browser or ~300 MB Electron desktop app&lt;/td&gt;
        &lt;td&gt;Album art or color wash&lt;/td&gt;
        &lt;td&gt;Freemium / subscription&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
&lt;/div&gt;

&lt;h2&gt;What the science supports, and what I cut&lt;/h2&gt;
&lt;p&gt;Before writing the v4 audio and visual upgrades, I audited the 2022 to 2026 peer-reviewed literature across psychoacoustics, slow-paced breathing, and display photobiology. Half of wellness audio marketing collapses under a quick PubMed check. Separating replicated results from hype drove five concrete engineering calls in Satie.&lt;/p&gt;

&lt;div class=&quot;piece-table-wrap&quot;&gt;
  &lt;table&gt;
    &lt;thead&gt;
      &lt;tr&gt;
        &lt;th&gt;Mechanism&lt;/th&gt;
        &lt;th&gt;Peer-reviewed evidence&lt;/th&gt;
        &lt;th&gt;Decision in Satie&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;14–16 Hz beta AM&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;https://doi.org/10.1038/s42003-024-07026-3&quot; rel=&quot;noopener&quot;&gt;Woods et al. (&lt;em&gt;Communications Biology&lt;/em&gt;, 2024)&lt;/a&gt; found stronger fMRI executive/salience activation, EEG phase-locking, and sustained attention gains, largest in listeners with attentional difficulties.&lt;/td&gt;
        &lt;td&gt;Built into &lt;em&gt;Kinetic Pulse&lt;/em&gt; at 14.40 Hz, phase-locked 8:1 to 108 BPM on harmonic pads and wet tails so it shimmers without chopping dry hits.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;0.1 Hz slow breathing&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;Extended-exhale respiration trials (&lt;a href=&quot;https://doi.org/10.1016/j.xcrm.2022.100895&quot; rel=&quot;noopener&quot;&gt;Balban et al., &lt;em&gt;Cell Reports Medicine&lt;/em&gt;, 2023&lt;/a&gt;) and 2024–2025 ~0.1 Hz RSA RCTs confirm ~5.5–6 bpm extended-exhale breathing maximizes baroreflex synchrony, with fixed 0.1 Hz matching individualized calibration.&lt;/td&gt;
        &lt;td&gt;Drives &lt;em&gt;Deep Dive&lt;/em&gt;&#x27;s 8.5 to 5.5 bpm descent (42% inhale, 58% exhale), coupled to bowed cello, cedar wind, and &lt;em&gt;06 Oculus&lt;/em&gt;, with optional Apple Watch HRV closing the loop.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;Lyrics &amp;amp; colored noise&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;Lyrics hurt reading and verbal working memory (&lt;em&gt;d&lt;/em&gt; ≈ −0.3; &lt;a href=&quot;https://doi.org/10.5334/joc.273&quot; rel=&quot;noopener&quot;&gt;Souza &amp;amp; Barbosa, 2023&lt;/a&gt;). White/pink noise helps ADHD (&lt;em&gt;g&lt;/em&gt; ≈ +0.25) but slightly hurts neurotypicals (&lt;em&gt;g&lt;/em&gt; ≈ −0.21; &lt;a href=&quot;https://doi.org/10.1016/j.jaac.2023.12.014&quot; rel=&quot;noopener&quot;&gt;Nigg et al., &lt;em&gt;JAACAP&lt;/em&gt;, 2024&lt;/a&gt;). Brown noise has zero clinical RCTs.&lt;/td&gt;
        &lt;td&gt;Zero vocals everywhere. Rain and Brown Noise stay &lt;strong&gt;off by default&lt;/strong&gt; so broadband noise is never forced on listeners it slows down.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;Melanopic screen light&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;460–480 nm blue light hits retinal ipRGCs and suppresses melatonin; the CIE expert consensus (&lt;a href=&quot;https://doi.org/10.1371/journal.pbio.3001571&quot; rel=&quot;noopener&quot;&gt;Brown et al., &lt;em&gt;PLOS Biology&lt;/em&gt;, 2022&lt;/a&gt;) sets evening targets below 10 melanopic EDI lux.&lt;/td&gt;
        &lt;td&gt;Post-20:00 shader shift strips 90.4% of blue emission in &lt;em&gt;06 Oculus&lt;/em&gt; and warms all six presets into 2200 K ember.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;Binaural beats&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a href=&quot;https://doi.org/10.1371/journal.pone.0286023&quot; rel=&quot;noopener&quot;&gt;Ingendoh, Posny &amp;amp; Heine (&lt;em&gt;PLOS ONE&lt;/em&gt;, 2023)&lt;/a&gt; reviewed 14 strict EEG studies: 8 contradicted brainwave entrainment, 5 supported, 1 mixed.&lt;/td&gt;
        &lt;td&gt;I refuse to market brainwave entrainment. &lt;em&gt;Deep Dive&lt;/em&gt; keeps a slight post-matrix stereo micro-detune only as a warm spatial width cue.&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
&lt;/div&gt;

&lt;h2&gt;One audio thread, zero allocations&lt;/h2&gt;
&lt;p&gt;Real-time audio has one unforgiving rule: the Core Audio render callback can never allocate heap memory, never acquire a mutex, and never block on Swift or Objective-C runtime locks. Drop a single 10 millisecond buffer on a 48 kHz stream and the listener hears an instant crackle.&lt;/p&gt;
&lt;p&gt;Satie enforces a hard wall between composition, synthesis, and GPU rendering. A background producer composes harmonic bars ahead of time and writes note structs into a fixed-capacity 16-bar lock-free single-producer single-consumer queue (&lt;code&gt;LockFreeBarQueue&lt;/code&gt;). UI controls cross threads through Swift 6 &lt;code&gt;Synchronization.Atomic&lt;/code&gt; scalars. Inside the Core Audio render block, &lt;code&gt;FocusSoundEngine&lt;/code&gt; drains pre-built events, reads 46 decoded CC0 samples with 4-point Hermite cubic interpolation, sums physical modal voices, runs the Velvet-Noise FDN chamber and mastering bus, and mirrors output samples into a second lock-free stereo ring buffer for the visualizer.&lt;/p&gt;
&lt;p&gt;When you switch soundscapes mid-session, Satie never cuts the audio buffer. &lt;code&gt;softModeTransition()&lt;/code&gt; dips only the dry instrument excitation over 220 ms while keeping the 8×8 FDN chamber and 14-grain Beads cloud alive, so the decaying hall tail of one world dissolves into the next.&lt;/p&gt;

&lt;figure id=&quot;exhibit-arch&quot; class=&quot;diagram&quot; aria-label=&quot;Interactive lock-free signal architecture across background producer, Core Audio RT thread, and 120 Hz Metal EDR GPU&quot;&gt;
  &lt;svg viewBox=&quot;0 0 640 276&quot; role=&quot;img&quot; aria-labelledby=&quot;sa-arch-title&quot;&gt;
    &lt;title id=&quot;sa-arch-title&quot;&gt;Satie lock-free signal graph across three isolated execution domains&lt;/title&gt;
    &lt;defs&gt;
      &lt;pattern id=&quot;sa-dots-1&quot; width=&quot;16&quot; height=&quot;16&quot; patternUnits=&quot;userSpaceOnUse&quot;&gt;
        &lt;circle class=&quot;dg-grid-dot&quot; cx=&quot;2&quot; cy=&quot;2&quot; r=&quot;0.8&quot;/&gt;
      &lt;/pattern&gt;
      &lt;marker id=&quot;sa-arr-ink&quot; viewBox=&quot;0 0 8 8&quot; refX=&quot;7&quot; refY=&quot;4&quot; markerWidth=&quot;5.5&quot; markerHeight=&quot;5.5&quot; orient=&quot;auto&quot;&gt;
        &lt;path class=&quot;dg-arrow&quot; d=&quot;M0 1 L7 4 L0 7 Z&quot;/&gt;
      &lt;/marker&gt;
      &lt;marker id=&quot;sa-arr-ok&quot; viewBox=&quot;0 0 8 8&quot; refX=&quot;7&quot; refY=&quot;4&quot; markerWidth=&quot;5.5&quot; markerHeight=&quot;5.5&quot; orient=&quot;auto&quot;&gt;
        &lt;path class=&quot;dg-arrow--ok&quot; d=&quot;M0 1 L7 4 L0 7 Z&quot;/&gt;
      &lt;/marker&gt;
      &lt;marker id=&quot;sa-arr-audit&quot; viewBox=&quot;0 0 8 8&quot; refX=&quot;7&quot; refY=&quot;4&quot; markerWidth=&quot;5.5&quot; markerHeight=&quot;5.5&quot; orient=&quot;auto&quot;&gt;
        &lt;path class=&quot;dg-arrow--audit&quot; d=&quot;M0 1 L7 4 L0 7 Z&quot;/&gt;
      &lt;/marker&gt;
    &lt;/defs&gt;

    &lt;rect x=&quot;0&quot; y=&quot;22&quot; width=&quot;640&quot; height=&quot;248&quot; fill=&quot;url(#sa-dots-1)&quot; rx=&quot;4&quot;/&gt;

    &lt;text class=&quot;dg-title&quot; x=&quot;12&quot; y=&quot;14&quot;&gt;PRODUCER THREAD&lt;/text&gt;
    &lt;text class=&quot;dg-mono--ok&quot; x=&quot;288&quot; y=&quot;14&quot; text-anchor=&quot;middle&quot;&gt;CORE AUDIO RT THREAD (48 KHZ · 0 ALLOCS)&lt;/text&gt;
    &lt;text class=&quot;dg-title&quot; x=&quot;628&quot; y=&quot;14&quot; text-anchor=&quot;end&quot;&gt;APPLE EDR GPU (120 HZ)&lt;/text&gt;

    &lt;!-- Thread boundaries --&gt;
    &lt;line class=&quot;dg-line--dash&quot; x1=&quot;158&quot; y1=&quot;26&quot; x2=&quot;158&quot; y2=&quot;262&quot;/&gt;
    &lt;line class=&quot;dg-line--dash&quot; x1=&quot;454&quot; y1=&quot;26&quot; x2=&quot;454&quot; y2=&quot;262&quot;/&gt;

    &lt;!-- Producer box --&gt;
    &lt;rect class=&quot;dg-box&quot; x=&quot;12&quot; y=&quot;48&quot; width=&quot;132&quot; height=&quot;92&quot; rx=&quot;5&quot;/&gt;
    &lt;rect class=&quot;dg-accent-bar--audit&quot; x=&quot;12&quot; y=&quot;48&quot; width=&quot;3.5&quot; height=&quot;92&quot; rx=&quot;2&quot;/&gt;
    &lt;text class=&quot;dg-label&quot; x=&quot;23&quot; y=&quot;69&quot;&gt;Factor Oracle&lt;/text&gt;
    &lt;text class=&quot;dg-sub&quot; x=&quot;23&quot; y=&quot;85&quot;&gt;O(m) suffix jumps&lt;/text&gt;
    &lt;text class=&quot;dg-sub&quot; x=&quot;23&quot; y=&quot;99&quot;&gt;Constraint grammar&lt;/text&gt;
    &lt;text class=&quot;dg-sub&quot; x=&quot;23&quot; y=&quot;113&quot;&gt;Eno 5/7/11/13 bars&lt;/text&gt;
    &lt;rect class=&quot;dg-pill--audit&quot; x=&quot;22&quot; y=&quot;121&quot; width=&quot;110&quot; height=&quot;14&quot; rx=&quot;7&quot;/&gt;
    &lt;text class=&quot;dg-mono--audit&quot; x=&quot;77&quot; y=&quot;131&quot; text-anchor=&quot;middle&quot;&gt;16-bar SPSC queue&lt;/text&gt;

    &lt;!-- Atomic params pill --&gt;
    &lt;rect class=&quot;dg-box--soft&quot; x=&quot;12&quot; y=&quot;168&quot; width=&quot;132&quot; height=&quot;58&quot; rx=&quot;5&quot;/&gt;
    &lt;text class=&quot;dg-label&quot; x=&quot;23&quot; y=&quot;189&quot;&gt;Swift 6 Atomics&lt;/text&gt;
    &lt;text class=&quot;dg-sub&quot; x=&quot;23&quot; y=&quot;205&quot;&gt;volume · mode · phase&lt;/text&gt;
    &lt;text class=&quot;dg-sub&quot; x=&quot;23&quot; y=&quot;218&quot;&gt;0 locks on UI change&lt;/text&gt;

    &lt;!-- Dry voices box --&gt;
    &lt;g id=&quot;arch-dry-box&quot;&gt;
      &lt;rect class=&quot;dg-box&quot; x=&quot;174&quot; y=&quot;42&quot; width=&quot;126&quot; height=&quot;94&quot; rx=&quot;5&quot;/&gt;
      &lt;rect id=&quot;arch-dry-bar&quot; class=&quot;dg-accent-bar--ink&quot; x=&quot;174&quot; y=&quot;42&quot; width=&quot;3.5&quot; height=&quot;94&quot; rx=&quot;2&quot;/&gt;
      &lt;text class=&quot;dg-label&quot; x=&quot;185&quot; y=&quot;63&quot;&gt;Voices &amp;amp; Rain&lt;/text&gt;
      &lt;text class=&quot;dg-sub&quot; x=&quot;185&quot; y=&quot;79&quot;&gt;46 CC0 Hermite&lt;/text&gt;
      &lt;text class=&quot;dg-sub&quot; x=&quot;185&quot; y=&quot;93&quot;&gt;56-mode resonators&lt;/text&gt;
      &lt;text class=&quot;dg-sub&quot; x=&quot;185&quot; y=&quot;107&quot;&gt;StochasticRainField&lt;/text&gt;
      &lt;rect id=&quot;arch-dry-pill&quot; class=&quot;dg-pill&quot; x=&quot;184&quot; y=&quot;115&quot; width=&quot;106&quot; height=&quot;15&quot; rx=&quot;7.5&quot;/&gt;
      &lt;text id=&quot;arch-dry-status&quot; class=&quot;dg-mono&quot; x=&quot;237&quot; y=&quot;125&quot; text-anchor=&quot;middle&quot;&gt;dry excitation 100%&lt;/text&gt;
    &lt;/g&gt;

    &lt;!-- Velvet-Noise FDN + Mastering box --&gt;
    &lt;g id=&quot;arch-fdn-box&quot;&gt;
      &lt;rect class=&quot;dg-box--accent&quot; x=&quot;316&quot; y=&quot;42&quot; width=&quot;124&quot; height=&quot;114&quot; rx=&quot;5&quot;/&gt;
      &lt;rect class=&quot;dg-accent-bar--ok&quot; x=&quot;316&quot; y=&quot;42&quot; width=&quot;3.5&quot; height=&quot;114&quot; rx=&quot;2&quot;/&gt;
      &lt;text class=&quot;dg-label&quot; x=&quot;327&quot; y=&quot;63&quot;&gt;Acoustic Space&lt;/text&gt;
      &lt;text class=&quot;dg-sub&quot; x=&quot;327&quot; y=&quot;79&quot;&gt;32-tap Velvet ER&lt;/text&gt;
      &lt;text class=&quot;dg-sub&quot; x=&quot;327&quot; y=&quot;93&quot;&gt;8×8 orthogonal FDN&lt;/text&gt;
      &lt;text class=&quot;dg-sub&quot; x=&quot;327&quot; y=&quot;107&quot;&gt;14-grain Beads&lt;/text&gt;
      &lt;text class=&quot;dg-sub&quot; x=&quot;327&quot; y=&quot;121&quot;&gt;Mono sub &amp;lt; 185 Hz&lt;/text&gt;
      &lt;rect class=&quot;dg-pill--ok&quot; x=&quot;326&quot; y=&quot;132&quot; width=&quot;102&quot; height=&quot;16&quot; rx=&quot;8&quot;/&gt;
      &lt;text class=&quot;dg-mono--ok&quot; x=&quot;377&quot; y=&quot;143&quot; text-anchor=&quot;middle&quot;&gt;tail carries over&lt;/text&gt;
    &lt;/g&gt;

    &lt;!-- Stereo ring buffer --&gt;
    &lt;rect class=&quot;dg-box--ok&quot; x=&quot;236&quot; y=&quot;182&quot; width=&quot;204&quot; height=&quot;48&quot; rx=&quot;5&quot;/&gt;
    &lt;text class=&quot;dg-label--ok&quot; x=&quot;248&quot; y=&quot;203&quot;&gt;StereoRingBuffer (SPSC)&lt;/text&gt;
    &lt;text class=&quot;dg-mono--ok&quot; x=&quot;248&quot; y=&quot;219&quot;&gt;48 kHz PCM → 4096-pt vDSP FFT&lt;/text&gt;

    &lt;!-- GPU Box --&gt;
    &lt;g id=&quot;arch-gpu-box&quot;&gt;
      &lt;rect class=&quot;dg-box--accent&quot; x=&quot;470&quot; y=&quot;48&quot; width=&quot;158&quot; height=&quot;186&quot; rx=&quot;5&quot;/&gt;
      &lt;rect id=&quot;arch-gpu-bar&quot; class=&quot;dg-accent-bar--ok&quot; x=&quot;470&quot; y=&quot;48&quot; width=&quot;3.5&quot; height=&quot;186&quot; rx=&quot;2&quot;/&gt;
      &lt;text class=&quot;dg-label&quot; x=&quot;482&quot; y=&quot;70&quot;&gt;CAMetalDisplayLink&lt;/text&gt;
      &lt;text class=&quot;dg-sub&quot; x=&quot;482&quot; y=&quot;88&quot;&gt;Unified .storageShared&lt;/text&gt;
      &lt;text class=&quot;dg-sub&quot; x=&quot;482&quot; y=&quot;103&quot;&gt;11 Metal pipelines&lt;/text&gt;
      &lt;text class=&quot;dg-sub&quot; x=&quot;482&quot; y=&quot;118&quot;&gt;rgba16Float linear P3&lt;/text&gt;
      &lt;text class=&quot;dg-sub&quot; x=&quot;482&quot; y=&quot;133&quot;&gt;64×64 blue-noise dither&lt;/text&gt;
      &lt;text class=&quot;dg-sub&quot; x=&quot;482&quot; y=&quot;148&quot;&gt;−90.4% night blue shift&lt;/text&gt;
      &lt;rect id=&quot;arch-gpu-pill&quot; class=&quot;dg-pill--ok&quot; x=&quot;482&quot; y=&quot;164&quot; width=&quot;134&quot; height=&quot;18&quot; rx=&quot;9&quot;/&gt;
      &lt;text id=&quot;arch-gpu-status&quot; class=&quot;dg-mono--ok&quot; x=&quot;549&quot; y=&quot;176&quot; text-anchor=&quot;middle&quot;&gt;120 Hz ProMotion VRR&lt;/text&gt;
      &lt;!-- Hairline 120 Hz frame-tick strip well clear of text --&gt;
      &lt;g id=&quot;arch-gpu-ticks&quot; aria-hidden=&quot;true&quot;&gt;&lt;/g&gt;
      &lt;text class=&quot;dg-mono&quot; x=&quot;549&quot; y=&quot;224&quot; text-anchor=&quot;middle&quot;&gt;Rebuilt on Studio open&lt;/text&gt;
    &lt;/g&gt;

    &lt;!-- Flow paths --&gt;
    &lt;path id=&quot;arch-path-prod&quot; class=&quot;dg-line--audit&quot; d=&quot;M 144 86 L 172 86&quot; marker-end=&quot;url(#sa-arr-audit)&quot;/&gt;
    &lt;path class=&quot;dg-line--dash&quot; d=&quot;M 144 196 L 200 196 L 200 138&quot; marker-end=&quot;url(#sa-arr-ink)&quot;/&gt;
    &lt;path id=&quot;arch-path-dry&quot; class=&quot;dg-line--ink&quot; d=&quot;M 300 84 L 314 84&quot; marker-end=&quot;url(#sa-arr-ink)&quot;/&gt;
    &lt;path id=&quot;arch-path-fdn&quot; class=&quot;dg-line--ok&quot; d=&quot;M 378 156 L 378 180&quot; marker-end=&quot;url(#sa-arr-ok)&quot;/&gt;
    &lt;path id=&quot;arch-path-ring&quot; class=&quot;dg-line--ok&quot; d=&quot;M 440 206 L 468 206&quot; marker-end=&quot;url(#sa-arr-ok)&quot;/&gt;

    &lt;g id=&quot;arch-particles&quot; aria-hidden=&quot;true&quot;&gt;&lt;/g&gt;
  &lt;/svg&gt;
  &lt;div class=&quot;exhibit-bar&quot;&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-arch-steady&quot; class=&quot;exhibit-btn exhibit-btn--ok&quot; aria-pressed=&quot;true&quot;&gt;Normal flow&lt;/button&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-arch-switch&quot; class=&quot;exhibit-btn&quot; aria-pressed=&quot;false&quot;&gt;Mode switch (220 ms)&lt;/button&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-arch-reopen&quot; class=&quot;exhibit-btn&quot; aria-pressed=&quot;false&quot;&gt;Close &amp;amp; reopen Studio&lt;/button&gt;
    &lt;span id=&quot;arch-readout&quot; class=&quot;exhibit-readout&quot;&gt;STEADY · 48 kHz lock-free RT thread · 0 heap allocs · 120 Hz CAMetalDisplayLink&lt;/span&gt;
  &lt;/div&gt;
  &lt;figcaption&gt;Figure 1. Satie&#x27;s three isolated execution domains. Toggle Mode switch to watch dry excitation dip for 220 ms while the Velvet-Noise FDN chamber carries the ringing tail into the next world, or Close &amp;amp; reopen Studio to see CAMetalDisplayLink tear down and rebuild while Core Audio runs unbroken.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2&gt;Infinite form with a Factor Oracle&lt;/h2&gt;
&lt;p&gt;In the first version of &lt;em&gt;Soft Light&lt;/em&gt;, a 32-bar harmonic progression repeated with local note swaps. That holds up for ten minutes in a lobby, yet over a three-hour coding session your ear predicts bar 17 before it arrives. Unconstrained Markov chains solve repetition by wrecking form: the music wanders and loses its sense of home.&lt;/p&gt;
&lt;p&gt;The fix comes from IRCAM&#x27;s OMax and Somax2 research: a linear-time &lt;em&gt;O(m)&lt;/em&gt; &lt;strong&gt;Factor Oracle&lt;/strong&gt; (&lt;a href=&quot;https://doi.org/10.1007/3-540-47849-3_18&quot; rel=&quot;noopener&quot;&gt;Allauzen, Crochemore, and Raffinot, 1999&lt;/a&gt;) built over a curated multi-climate harmonic corpus. Forward edges play written bars in order, preserving human voice-leading. Suffix links connect states that share the same harmonic history, acting as recombination portals. A lightweight Symbolic Constraint Grammar guards every jump so the oracle enforces tonic gravity, caps repeated chords (&lt;code&gt;maxHold&lt;/code&gt;), and balances home phrases (Climate A) against open expansions (Climate B).&lt;/p&gt;

&lt;div class=&quot;code-plate&quot;&gt;
  &lt;div class=&quot;code-plate-head&quot;&gt;
    &lt;span&gt;HarmonicFactorOracle.swift&lt;/span&gt;
    &lt;span&gt;Linear-time O(m) suffix link construction&lt;/span&gt;
  &lt;/div&gt;
&lt;pre&gt;&lt;code class=&quot;language-swift&quot;&gt;for i in 0..&amp;lt;m {
    let sym = symbols[i]
    let nextState = i + 1
    trans[i][sym] = nextState

    var k = sLink[i]
    while k &amp;gt;= 0 &amp;amp;&amp;amp; trans[k][sym] == nil {
        trans[k][sym] = nextState
        k = sLink[k]
    }

    let targetSuffix = k &amp;lt; 0 ? 0 : trans[k][sym]!
    sLink[nextState] = targetSuffix
    rev[targetSuffix].append(nextState)
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Across 256-bar stress tests (around 14 minutes of continuous generation per mode), every scored world produces &lt;strong&gt;7 out of 7 unique 32-bar passes&lt;/strong&gt;, &lt;strong&gt;64 to 72 grammar-checked suffix jumps&lt;/strong&gt;, &lt;strong&gt;50% to 65% Climate B occupancy&lt;/strong&gt;, and &lt;strong&gt;100% key purity&lt;/strong&gt;. Phrases you heard in minute five return reframed in hour two.&lt;/p&gt;

&lt;figure id=&quot;exhibit-oracle&quot; class=&quot;diagram&quot; aria-label=&quot;Interactive audible IRCAM Factor Oracle suffix link traversal over a 16-bar harmonic corpus&quot;&gt;
  &lt;svg viewBox=&quot;0 0 640 218&quot; role=&quot;img&quot; aria-labelledby=&quot;sa-ora-title&quot;&gt;
    &lt;title id=&quot;sa-ora-title&quot;&gt;Interactive Factor Oracle showing forward harmonic motion and suffix link recombination jumps&lt;/title&gt;
    &lt;text class=&quot;dg-title&quot; x=&quot;12&quot; y=&quot;14&quot;&gt;FACTOR ORACLE AUTOMATON · FORWARD EDGES &amp;amp; SUFFIX JUMP PORTALS&lt;/text&gt;
    &lt;text class=&quot;dg-mono--ok&quot; x=&quot;628&quot; y=&quot;14&quot; text-anchor=&quot;end&quot;&gt;green arcs = suffix recombination&lt;/text&gt;
    &lt;g id=&quot;oracle-dynamic&quot;&gt;&lt;/g&gt;
  &lt;/svg&gt;
  &lt;div class=&quot;exhibit-bar&quot;&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-oracle-play&quot; class=&quot;exhibit-btn exhibit-btn--ok&quot; aria-pressed=&quot;false&quot;&gt;Listen&lt;/button&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-oracle-step&quot; class=&quot;exhibit-btn&quot;&gt;Step bar&lt;/button&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-oracle-run&quot; class=&quot;exhibit-btn&quot;&gt;Run 16 bars&lt;/button&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-oracle-loop&quot; class=&quot;exhibit-btn exhibit-btn--err&quot; aria-pressed=&quot;false&quot;&gt;Fixed loop&lt;/button&gt;
    &lt;span id=&quot;oracle-readout&quot; class=&quot;exhibit-readout&quot;&gt;FACTOR ORACLE · 7/7 unique passes · KeyPurity 100%&lt;/span&gt;
  &lt;/div&gt;
  &lt;figcaption&gt;Figure 2. Press Listen (or Step bar) to hear each A-major voicing synthesized in Web Audio as the cursor leaps across green suffix links between Climate A and Climate B. Toggle Fixed loop to hear the mechanical reset of a static 16-bar cycle.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2&gt;Three acoustic fixes measured in tests&lt;/h2&gt;
&lt;p&gt;It is easy to fool yourself on laptop speakers. Satie ships with 22 automated release tests in &lt;code&gt;AcousticCoreTests.swift&lt;/code&gt; that render multi-second stereo audio offline and assert exact spectral, phase, and CPU invariants. Three concrete bugs showed up in headphones or tests and forced DSP rewrites. You can audition before and after for all three in Figure 3.&lt;/p&gt;

&lt;h3&gt;1. Replacing a metallic reverb with a zero-DC Velvet-Noise FDN&lt;/h3&gt;
&lt;p&gt;Early versions used a hand-tuned 8×8 Walsh-Hadamard feedback delay network (FDN). On felt piano transients, the first 40 milliseconds sounded sparse and metallic because eight delay lines take time to build echo density. Following &lt;a href=&quot;https://www.dafx.de/paper-archive/2020/proceedings/papers/DAFx2020_paper_23.pdf&quot; rel=&quot;noopener&quot;&gt;Fagerström, Alary, Schlecht, and Välimäki (DAFx-2020)&lt;/a&gt;, I placed a &lt;strong&gt;32-tap zero-DC Optimal Velvet-Noise early-reflection diffuser&lt;/strong&gt; ahead of a delay-proportional colorless 8×8 orthogonal FDN. Each of the four distance bands sums four &lt;code&gt;+1&lt;/code&gt; and four &lt;code&gt;−1&lt;/code&gt; prime-jittered taps: exact DC cancellation and zero inner multiplications.&lt;/p&gt;

&lt;div class=&quot;code-plate&quot;&gt;
  &lt;div class=&quot;code-plate-head&quot;&gt;
    &lt;span&gt;DSPPrimitives.swift&lt;/span&gt;
    &lt;span&gt;Zero-DC Velvet-Noise early reflections (4.4 to 13.8 ms band)&lt;/span&gt;
  &lt;/div&gt;
&lt;pre&gt;&lt;code class=&quot;language-swift&quot;&gt;// Exact 4 (+1) and 4 (-1) prime-jittered taps per band: zero DC, zero inner multiplies.
let vnL0 = erBufL[(w - 211) &amp;amp; m] - erBufR[(w - 281) &amp;amp; m]
         + erBufL[(w - 359) &amp;amp; m] - erBufR[(w - 431) &amp;amp; m]
         - erBufL[(w - 503) &amp;amp; m] + erBufR[(w - 571) &amp;amp; m]
         - erBufL[(w - 619) &amp;amp; m] + erBufR[(w - 661) &amp;amp; m]&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Measured on the impulse response in release tests: early Dirac echo density jumped to &lt;strong&gt;19.5%&lt;/strong&gt;, early stereo correlation dropped to &lt;strong&gt;−0.014&lt;/strong&gt; (wide, diffuse imaging), late tail spectral flatness reached &lt;strong&gt;0.761&lt;/strong&gt;, and DC offset settled to &lt;strong&gt;0.000003&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;2. Fixing the headphone buzz in Kinetic Pulse&lt;/h3&gt;
&lt;p&gt;After reading &lt;a href=&quot;https://doi.org/10.1038/s42003-024-07026-3&quot; rel=&quot;noopener&quot;&gt;Woods and Loui&#x27;s 2024 paper&lt;/a&gt; on rapid beta-range modulation, my first implementation put a 15.0 Hz sine modulator at 34% to 42% depth across dry instruments in &lt;em&gt;Kinetic Pulse&lt;/em&gt; at 104 BPM. In headphones, it felt awful. Because 15.0 Hz is irrational against 104 BPM (1.733 Hz), the modulation beat asynchronously against the groove, vibrating hard in the ear canal like a broken tremolo pedal.&lt;/p&gt;
&lt;p&gt;The fix took three changes. First, I nudged the tempo to &lt;strong&gt;108 BPM&lt;/strong&gt; and locked the shimmer frequency to &lt;strong&gt;14.40 Hz&lt;/strong&gt; (an exact 8:1 beat subdivision: &lt;code&gt;108 / 60 × 8 = 14.40 Hz&lt;/code&gt;). Second, I moved the modulation off dry attacks and onto the harmonic pad and reverb halo with a 36° stereo phase soften. Third, I softened the kick to a round 60 Hz felt thump, smoothed the optical sidechain attack to 16 ms at −1.4 dB, and capped the synth filter below 2.75 kHz fused with CC0 vibraphone. Broadband roughness dropped &lt;strong&gt;12×&lt;/strong&gt; from 34% down to &lt;strong&gt;2.82%&lt;/strong&gt; while preserving &lt;strong&gt;+11.26 dB&lt;/strong&gt; SNR right at 14.40 Hz.&lt;/p&gt;

&lt;h3&gt;3. Killing the subliminal rain loop&lt;/h3&gt;
&lt;p&gt;Even a 3-second crossfaded studio rain recording gives itself away after five minutes. Your ear locks onto one drop cadence and hears it return every 18.5 seconds. Measuring autocorrelation across lags from 2 to 22 seconds showed a sharp peak at &lt;code&gt;r = 0.6023&lt;/code&gt;. Replacing the loop with &lt;code&gt;StochasticRainField&lt;/code&gt; (three asynchronous random-offset windows layered with synthetic micro-drop transients) dropped peak autocorrelation &lt;strong&gt;8.2×&lt;/strong&gt; to &lt;strong&gt;&lt;code&gt;r = 0.0738&lt;/code&gt;&lt;/strong&gt;, flat against the noise floor while keeping organic droplet kurtosis.&lt;/p&gt;

&lt;figure id=&quot;exhibit-dsp&quot; class=&quot;diagram&quot; aria-label=&quot;Interactive audible acoustic measurements for Velvet-Noise FDN, Pulse 14.40 Hz shimmer, and StochasticRainField&quot;&gt;
  &lt;svg viewBox=&quot;0 0 640 212&quot; role=&quot;img&quot; aria-labelledby=&quot;sa-dsp-title&quot;&gt;
    &lt;title id=&quot;sa-dsp-title&quot;&gt;Measured acoustic test outputs across Velvet-Noise FDN, beat-locked beta shimmer, and stochastic rain autocorrelation&lt;/title&gt;
    &lt;g id=&quot;dsp-dynamic&quot;&gt;&lt;/g&gt;
  &lt;/svg&gt;
  &lt;div class=&quot;exhibit-bar&quot;&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-dsp-fdn&quot; class=&quot;exhibit-btn exhibit-btn--ok&quot; aria-pressed=&quot;true&quot;&gt;Velvet-Noise FDN&lt;/button&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-dsp-pulse&quot; class=&quot;exhibit-btn&quot; aria-pressed=&quot;false&quot;&gt;Pulse 14.40 Hz AM&lt;/button&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-dsp-rain&quot; class=&quot;exhibit-btn&quot; aria-pressed=&quot;false&quot;&gt;Stochastic Rain&lt;/button&gt;
    &lt;span class=&quot;exhibit-pair&quot;&gt;
      &lt;button type=&quot;button&quot; id=&quot;btn-dsp-hear-old&quot; class=&quot;exhibit-btn exhibit-btn--err&quot; aria-pressed=&quot;false&quot;&gt;Hear raw FDN&lt;/button&gt;
      &lt;button type=&quot;button&quot; id=&quot;btn-dsp-hear-new&quot; class=&quot;exhibit-btn exhibit-btn--ok&quot; aria-pressed=&quot;false&quot;&gt;Hear Velvet FDN&lt;/button&gt;
    &lt;/span&gt;
    &lt;span id=&quot;dsp-readout&quot; class=&quot;exhibit-readout&quot;&gt;Measured IR: EarlyDensity = 19.5% · EarlyStereoCorr = −0.014 · TailFlatness = 0.761&lt;/span&gt;
  &lt;/div&gt;
  &lt;figcaption&gt;Figure 3. Measured outputs from Satie&#x27;s release DSP test suite, paired with live Web Audio A/B demos. On Velvet-Noise FDN, compare a sparse metallic early comb against the exact 32-tap prime diffuser; on Pulse, hear the v3.2 15 Hz ear-canal buzz against v4.0&#x27;s 14.40 Hz pad shimmer; on Rain, hear a repeating loop against asynchronous micro-drops.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2&gt;James Turrell, Apple EDR, and 480 nm light&lt;/h2&gt;
&lt;p&gt;When I added &lt;em&gt;Deep Dive&lt;/em&gt; (a breath-paced meditation mode descending from 8.5 to 5.5 bpm over bowed cello and bronze singing bowls), the first visual draft was an iridescent prism. It looked flashy in a screenshot and felt exhausting after thirty seconds of breathing. Attention Restoration Theory calls the target state &lt;em&gt;soft fascination&lt;/em&gt;: slow luminous fields with no sharp edges for the visual cortex to parse.&lt;/p&gt;
&lt;p&gt;That led to &lt;strong&gt;06 Oculus&lt;/strong&gt;, modeled on James Turrell&#x27;s &lt;em&gt;Aten Reign&lt;/em&gt; skyspace at the Guggenheim. Four recessed plaster-like elliptical tiers dilate (+3%) on your inhale and settle on your exhale. Struck singing bowls cast pitch-locked Faraday standing-wave caustics across the central skylight aperture, then return to silence during &lt;em&gt;ma&lt;/em&gt; gaps.&lt;/p&gt;
&lt;p&gt;Two graphics choices matter on MacBook Pro XDR and iPhone OLED displays:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;16-bit Apple EDR + 64×64 Ulichney blue noise.&lt;/strong&gt; Standard 8-bit SDR shaders clamp at 1.0 and leave concentric banding across dark vignettes on high-contrast OLEDs. Satie renders all 11 Metal pipelines into &lt;code&gt;rgba16Float&lt;/code&gt; with &lt;code&gt;extendedLinearDisplayP3&lt;/code&gt;, lifting only small emissive peaks (the skylight center, CRT electron beam core, candlelight ink rims) up to &lt;code&gt;1.40×&lt;/code&gt; SDR white while keeping 68.6% of the canvas near true black. Before output, every shader samples a bundled 64×64 &lt;a href=&quot;https://doi.org/10.1117/12.152707&quot; rel=&quot;noopener&quot;&gt;Ulichney Void-and-Cluster&lt;/a&gt; spatiotemporal blue-noise tile (&lt;code&gt;+44.44 dB&lt;/code&gt; high-pass 2D DFT ratio), erasing gradient stair-stepping with zero visible grain.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Fixing my own melanopic bug.&lt;/strong&gt; The first daytime &lt;em&gt;Oculus&lt;/em&gt; drifted into cool cyan (470 to 490 nm) as meditation deepened, sitting right on top of the retinal ipRGC melanopsin peak that suppresses evening melatonin. After 20:00 local time, Satie shifts every shader into a 2200 K ember palette, cutting blue emission by &lt;strong&gt;90.4%&lt;/strong&gt; to bring evening sessions closer to the &lt;a href=&quot;https://doi.org/10.1371/journal.pbio.3001571&quot; rel=&quot;noopener&quot;&gt;CIE 10 melanopic EDI lux&lt;/a&gt; threshold. Actual exposure depends on screen brightness and distance.&lt;/li&gt;
&lt;/ul&gt;

&lt;figure id=&quot;exhibit-oculus&quot; class=&quot;diagram&quot; aria-label=&quot;Interactive 06 Oculus circadian photobiology and 5.5 bpm breath dilation lab&quot;&gt;
  &lt;div class=&quot;sa-oculus-wrap&quot;&gt;
    &lt;canvas id=&quot;oculus-lab-canvas&quot; aria-label=&quot;Live four-tier James Turrell Oculus light field breathing at 5.5 breaths per minute&quot;&gt;&lt;/canvas&gt;
  &lt;/div&gt;
  &lt;div class=&quot;exhibit-bar&quot;&gt;
    &lt;span class=&quot;exhibit-control&quot;&gt;
      &lt;label for=&quot;oculus-hour&quot;&gt;Local hour&lt;/label&gt;
      &lt;input id=&quot;oculus-hour&quot; type=&quot;range&quot; min=&quot;6&quot; max=&quot;23.5&quot; step=&quot;0.5&quot; value=&quot;18&quot;&gt;
      &lt;output id=&quot;oculus-hour-out&quot; for=&quot;oculus-hour&quot;&gt;18:00&lt;/output&gt;
    &lt;/span&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-oculus-day&quot; class=&quot;exhibit-btn&quot; aria-pressed=&quot;false&quot;&gt;Day&lt;/button&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-oculus-night&quot; class=&quot;exhibit-btn exhibit-btn--ok&quot; aria-pressed=&quot;false&quot;&gt;Night&lt;/button&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-oculus-bowl&quot; class=&quot;exhibit-btn&quot;&gt;Strike bowl&lt;/button&gt;
    &lt;span id=&quot;oculus-readout&quot; class=&quot;exhibit-readout&quot;&gt;DAYLIGHT SKYSPACE · 460–490 nm blue: 100%&lt;/span&gt;
  &lt;/div&gt;
  &lt;figcaption&gt;Figure 4. Interactive circadian photobiology and 5.5 bpm breathing model of 06 Oculus. Drag Local hour past 20:00 to watch the 460–490 nm melanopic band drop 90.4% into 2200 K ember without changing the four-tier geometry. Press Strike bowl to trigger Faraday ripples and a Web Audio singing bowl (1.0 / 2.76 / 5.38 partials).&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure class=&quot;ac-plate&quot;&gt;
  &lt;img src=&quot;/satie/img/vis-oculus-circadian.jpg&quot; width=&quot;1600&quot; height=&quot;1000&quot; alt=&quot;06 Oculus circadian photobiology split: Daytime dusk violet and alabaster skyspace on the left, Nighttime low-melanopic 2200 K ember with 90.4 percent less blue emission on the right&quot; loading=&quot;lazy&quot;&gt;
  &lt;figcaption&gt;
    &lt;span class=&quot;ac-plate-num&quot;&gt;06 OCULUS · METAL 2× RETINA&lt;/span&gt;
    &lt;span class=&quot;ac-plate-title&quot;&gt;Actual Shaders.metal output: daytime vs. post-20:00 ember&lt;/span&gt;
    &lt;span class=&quot;ac-plate-desc&quot;&gt;Captured from &lt;code&gt;oculusFragment&lt;/code&gt; at 2× Retina in &lt;code&gt;rgba16Float&lt;/code&gt; extended linear P3. Left: 06:00 to 20:00 dusk violet and alabaster. Right: after 20:00, blue channel energy drops 90.4% while keeping the same four-tier depth geometry and breath dilation.&lt;/span&gt;
  &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;The other five Metal presets share the same linear-P3 EDR pipeline, blue-noise dither, and post-20:00 warmth shift, each tuned to its paired world. Select a plate below (or click the image) to inspect all five Retina Metal captures:&lt;/p&gt;

&lt;figure id=&quot;exhibit-plates&quot; class=&quot;sw-viewer&quot; aria-label=&quot;Tabbed gallery of the five remaining Satie Metal visualizations&quot;&gt;
  &lt;button type=&quot;button&quot; id=&quot;sa-plate-frame&quot; class=&quot;sw-frame&quot; aria-label=&quot;Next Satie Metal visual plate&quot;&gt;
    &lt;img class=&quot;sw-slide is-active&quot; data-plate=&quot;circuit&quot; data-num=&quot;01&quot; data-title=&quot;The Circuit (Soft Light)&quot; data-desc=&quot;240 instanced 3D curl-turbulence optical fibers and 3,200 additive spikes, framed in Studio view by a Retina CoreGraphics overlay: 24-band sensor mosaic, curved Bézier impulse wires, 4096-point Circle of Fifths chromagram, and Krumhansl-Schmuckler key detector.&quot; src=&quot;/satie/img/vis-circuit.jpg&quot; width=&quot;1600&quot; height=&quot;1000&quot; alt=&quot;01 The Circuit: 240-strand 3D optical-fiber curl connectome framed by a 24-band sensor mosaic, curved Bezier impulse routing, Circle of Fifths chromagram, and 24 dB bars&quot; loading=&quot;lazy&quot;&gt;
    &lt;img class=&quot;sw-slide&quot; data-plate=&quot;ecology&quot; data-num=&quot;02&quot; data-title=&quot;Ecology Wall (Rain &amp;amp; Glass)&quot; data-desc=&quot;Concentric courtyard rain ripples and 5,000 stippled GPU agents across five frequency territories, framed in Studio by a full-view minimap, acoustic analytics, scrolling thermal spectrogram, and signal log.&quot; src=&quot;/satie/img/vis-ecology.jpg&quot; width=&quot;1600&quot; height=&quot;1000&quot; alt=&quot;02 Ecology Wall: Kyoto courtyard concentric water ripples and 5,000 stippled GPU colony agents surrounded by a minimap, acoustic analytics, scrolling thermal spectrogram, and signal event log&quot; loading=&quot;lazy&quot;&gt;
    &lt;img class=&quot;sw-slide&quot; data-plate=&quot;scope&quot; data-num=&quot;03&quot; data-title=&quot;Phosphor Scope (Kinetic Pulse)&quot; data-desc=&quot;16-bit half-float ping-pong CRT Lissajous electron beam tracing all 255 stride-1 stereo L/R segments with velocity-modulated dwell glow and P31 Emerald or P39 Amber phosphor selection.&quot; src=&quot;/satie/img/vis-scope.jpg&quot; width=&quot;1600&quot; height=&quot;1000&quot; alt=&quot;03 Phosphor Scope: smooth 255-segment RGBA16Float ping-pong CRT Lissajous electron beam in P31 Emerald phosphor over a hairline calibration graticule&quot; loading=&quot;lazy&quot;&gt;
    &lt;img class=&quot;sw-slide&quot; data-plate=&quot;nocturne&quot; data-num=&quot;04&quot; data-title=&quot;Nocturne Silk (Gymnopédie)&quot; data-desc=&quot;Calligraphic sumi-e ink rings in candlelit gold and moon-silver triggered by live felt piano and cello note events over a mirrored obsidian water surface.&quot; src=&quot;/satie/img/vis-nocturne.jpg&quot; width=&quot;1600&quot; height=&quot;1000&quot; alt=&quot;04 Nocturne Silk: candlelit amber gold and moon-silver sumi-e ink rings drifting over obsidian water with soft vertical reflection&quot; loading=&quot;lazy&quot;&gt;
    &lt;img class=&quot;sw-slide&quot; data-plate=&quot;horizon&quot; data-num=&quot;05&quot; data-title=&quot;Horizon (Still)&quot; data-desc=&quot;A single calm horizon line, a quiet lunar dome breathing with sub-bass energy, and perspective moonlight caustics moving across dark water.&quot; src=&quot;/satie/img/vis-horizon.jpg&quot; width=&quot;1600&quot; height=&quot;1000&quot; alt=&quot;05 Horizon: Hiroshi Sugimoto and Mark Rothko inspired nocturnal sea with luminous rising lunar dome and perspective water caustics&quot; loading=&quot;lazy&quot;&gt;
  &lt;/button&gt;
  &lt;div class=&quot;sw-bar&quot;&gt;
    &lt;div class=&quot;sw-tabs&quot; role=&quot;tablist&quot; aria-label=&quot;Satie Metal preset plates&quot;&gt;
      &lt;button type=&quot;button&quot; class=&quot;sw-tab&quot; role=&quot;tab&quot; data-plate-tab=&quot;circuit&quot; aria-selected=&quot;true&quot;&gt;01 Circuit&lt;/button&gt;
      &lt;button type=&quot;button&quot; class=&quot;sw-tab&quot; role=&quot;tab&quot; data-plate-tab=&quot;ecology&quot; aria-selected=&quot;false&quot;&gt;02 Ecology&lt;/button&gt;
      &lt;button type=&quot;button&quot; class=&quot;sw-tab&quot; role=&quot;tab&quot; data-plate-tab=&quot;scope&quot; aria-selected=&quot;false&quot;&gt;03 Scope&lt;/button&gt;
      &lt;button type=&quot;button&quot; class=&quot;sw-tab&quot; role=&quot;tab&quot; data-plate-tab=&quot;nocturne&quot; aria-selected=&quot;false&quot;&gt;04 Nocturne&lt;/button&gt;
      &lt;button type=&quot;button&quot; class=&quot;sw-tab&quot; role=&quot;tab&quot; data-plate-tab=&quot;horizon&quot; aria-selected=&quot;false&quot;&gt;05 Horizon&lt;/button&gt;
    &lt;/div&gt;
    &lt;span id=&quot;sa-plate-counter&quot; class=&quot;sw-caption&quot;&gt;1 / 5 · click image or tab&lt;/span&gt;
  &lt;/div&gt;
  &lt;figcaption class=&quot;sa-plate-cap&quot;&gt;
    &lt;span id=&quot;sa-plate-num&quot; class=&quot;ac-plate-num&quot;&gt;01&lt;/span&gt;
    &lt;span id=&quot;sa-plate-title&quot; class=&quot;ac-plate-title&quot;&gt;The Circuit (Soft Light)&lt;/span&gt;
    &lt;span id=&quot;sa-plate-desc&quot; class=&quot;ac-plate-desc&quot;&gt;240 instanced 3D curl-turbulence optical fibers and 3,200 additive spikes, framed in Studio view by a Retina CoreGraphics overlay: 24-band sensor mosaic, curved Bézier impulse wires, 4096-point Circle of Fifths chromagram, and Krumhansl-Schmuckler key detector.&lt;/span&gt;
  &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2&gt;The formal proof that missed a MetalKit bug&lt;/h2&gt;
&lt;p&gt;This was the sharpest lesson of the build. Early on, clicking Expand from the menu bar occasionally opened a Studio window whose Metal canvas sat frozen.&lt;/p&gt;
&lt;p&gt;Instead of adding random timers, I wrote a formal &lt;strong&gt;TLA+&lt;/strong&gt; specification of the Studio window and display-link lifecycle and ran the &lt;strong&gt;TLC&lt;/strong&gt; model checker across all reachable states. TLC caught four real bugs: SwiftUI 250 ms telemetry refreshes thrashing &lt;code&gt;updateNSView&lt;/code&gt;, synchronous &lt;code&gt;orderOut&lt;/code&gt; during fullscreen exit creating a zombie Space, reopening a minimized window without &lt;code&gt;deminiaturize&lt;/code&gt;, and post-sleep wake leaving a dead display link. I fixed all four, compiled the verified transition table into &lt;code&gt;StudioLifecycleMachine.swift&lt;/code&gt; (0 violations across 6 safety and liveness invariants), and shipped v4.0.0.&lt;/p&gt;
&lt;p&gt;Ten minutes later, clicking Expand still froze the Studio window.&lt;/p&gt;

&lt;aside class=&quot;essay-callout essay-callout--err&quot;&gt;
  &lt;span class=&quot;callout-kicker&quot;&gt;What the formal model assumed (and why it was wrong)&lt;/span&gt;
  &lt;p&gt;A formal proof only proves what your axioms say about the world. My TLA+ model assumed that &lt;code&gt;MTKView.isPaused == false&lt;/code&gt; implied frames were being drawn. On macOS 15 and 26, that axiom is false.&lt;/p&gt;
&lt;/aside&gt;

&lt;p&gt;To isolate the freeze, I wrote a 90-line macOS reproducer cycling a single cached window (&lt;code&gt;isReleasedWhenClosed = false&lt;/code&gt;) through three states: first open, hide with &lt;code&gt;orderOut&lt;/code&gt; then reopen, and close with &lt;code&gt;NSWindow.close()&lt;/code&gt; (what happens when you press &lt;code&gt;⌘W&lt;/code&gt; or click the red button) then reopen. The output on macOS 26.5.1 settled it in two seconds:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Cycle 1 (first open):&lt;/strong&gt; &lt;code&gt;MTKView&lt;/code&gt; drew 32 frames.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Cycle 2 (&lt;code&gt;orderOut&lt;/code&gt; → reopen):&lt;/strong&gt; &lt;code&gt;MTKView&lt;/code&gt; drew +75 frames.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Cycle 3 (&lt;code&gt;win.close()&lt;/code&gt; → reopen):&lt;/strong&gt; &lt;code&gt;MTKView.isPaused&lt;/code&gt; reported &lt;code&gt;false&lt;/code&gt;, the window was visible and unoccluded, and &lt;code&gt;MTKView&lt;/code&gt; drew &lt;strong&gt;+0 frames forever&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Inside MetalKit, &lt;code&gt;MTKView&lt;/code&gt; still uses the deprecated &lt;code&gt;CVDisplayLink&lt;/code&gt;. When AppKit posts &lt;code&gt;NSWindow.willCloseNotification&lt;/code&gt;, &lt;code&gt;MTKView&lt;/code&gt; tears down that internal display link and never recreates it if the same cached window is later ordered back on screen. Worse, my effect list called &lt;code&gt;setActive(true)&lt;/code&gt; one line before &lt;code&gt;orderFront&lt;/code&gt; while &lt;code&gt;win.isVisible&lt;/code&gt; was still &lt;code&gt;false&lt;/code&gt;.&lt;/p&gt;

&lt;figure id=&quot;exhibit-lifecycle&quot; class=&quot;diagram&quot; aria-label=&quot;Measured frame delivery comparison between MTKView and CAMetalDisplayLink across close and reopen&quot;&gt;
  &lt;svg viewBox=&quot;0 0 640 206&quot; role=&quot;img&quot; aria-labelledby=&quot;sa-life-title&quot;&gt;
    &lt;title id=&quot;sa-life-title&quot;&gt;MTKView freezing at 0 frames after NSWindow.close compared with CAMetalDisplayLink running at 120 Hz&lt;/title&gt;
    &lt;text class=&quot;dg-title&quot; x=&quot;12&quot; y=&quot;14&quot;&gt;MEASURED ON MACOS 26.5.1 · REUSED STUDIO WINDOW (isReleasedWhenClosed = false)&lt;/text&gt;
    &lt;g id=&quot;life-dynamic&quot;&gt;&lt;/g&gt;
  &lt;/svg&gt;
  &lt;div class=&quot;exhibit-bar&quot;&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-life-bug&quot; class=&quot;exhibit-btn exhibit-btn--err&quot; aria-pressed=&quot;true&quot;&gt;MTKView (v4.0.0 bug)&lt;/button&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-life-fix&quot; class=&quot;exhibit-btn exhibit-btn--ok&quot; aria-pressed=&quot;false&quot;&gt;CAMetalDisplayLink (v4.0.1 fix)&lt;/button&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-life-replay&quot; class=&quot;exhibit-btn&quot;&gt;Replay trace&lt;/button&gt;
    &lt;span id=&quot;life-readout&quot; class=&quot;exhibit-readout is-err&quot;&gt;MTKView on macOS 26.5.1: NSWindow.close() kills internal CVDisplayLink; reopen draws 0 frames&lt;/span&gt;
  &lt;/div&gt;
  &lt;figcaption&gt;Figure 5. Actual frame counts measured on macOS 26.5.1 across three open cycles. Toggle between MTKView and CAMetalDisplayLink (or click Replay trace) to watch how the legacy display link dies silently after NSWindow.close() while reporting isPaused = false.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;In v4.0.1, I deleted &lt;code&gt;MTKView&lt;/code&gt;. &lt;code&gt;AcousticMetalView&lt;/code&gt; is now a plain &lt;code&gt;NSView&lt;/code&gt; that owns its &lt;code&gt;CAMetalLayer&lt;/code&gt; and drives frames with Apple&#x27;s &lt;strong&gt;&lt;code&gt;CAMetalDisplayLink&lt;/code&gt;&lt;/strong&gt; (attached to &lt;code&gt;.main&lt;/code&gt; in &lt;code&gt;.common&lt;/code&gt; runloop mode through a weak proxy to prevent retain cycles). On &lt;code&gt;willClose&lt;/code&gt;, &lt;code&gt;didMiniaturize&lt;/code&gt;, or system sleep, it invalidates the display link. On every open or wake, it builds a fresh one after ordering the window onto the active Space (&lt;code&gt;.moveToActiveSpace&lt;/code&gt;).&lt;/p&gt;

&lt;div class=&quot;code-plate&quot;&gt;
  &lt;div class=&quot;code-plate-head&quot;&gt;
    &lt;span&gt;MetalVisualizerView.swift&lt;/span&gt;
    &lt;span&gt;Native CAMetalDisplayLink lifecycle&lt;/span&gt;
  &lt;/div&gt;
&lt;pre&gt;&lt;code class=&quot;language-swift&quot;&gt;private func syncDisplayLink(forceRecreate: Bool) {
    guard desiredActive, let win = window, !isHidden, !win.isMiniaturized, win.isVisible else {
        teardownDisplayLink()
        return
    }
    if forceRecreate { teardownDisplayLink() }
    configureEDRLayer()
    updateDrawableSize()
    if displayLink == nil {
        let proxy = MetalDisplayLinkProxy(owner: self)
        let link = CAMetalDisplayLink(metalLayer: metalLayer)
        link.delegate = proxy
        link.add(to: .main, forMode: .common)
        self.displayLinkProxy = proxy
        self.displayLink = link
    }
    displayLink?.isPaused = false
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;In the same stress harness across eight consecutive cycles of &lt;code&gt;win.close()&lt;/code&gt;, &lt;code&gt;orderOut()&lt;/code&gt;, and live window resizes, &lt;code&gt;CAMetalDisplayLink&lt;/code&gt; rendered &lt;strong&gt;271 frames with 0 failures&lt;/strong&gt;. Removing three dead &lt;code&gt;@Published&lt;/code&gt; properties that had been firing inside the render callback also cut four unnecessary SwiftUI layout passes per second.&lt;/p&gt;

&lt;h2&gt;Satie on iPhone, iPad, and the rest of Apple Silicon&lt;/h2&gt;
&lt;p&gt;Because the synthesis, DSP, Factor Oracle, and formal state machine live in a single zero-UI Swift package (&lt;code&gt;AcousticCore&lt;/code&gt;), the macOS menu bar app is only one shell around the engine. &lt;strong&gt;Satie for iPhone and iPad&lt;/strong&gt; is now live on the &lt;a href=&quot;https://apps.apple.com/app/satie-focus-soundscapes/id6837572453&quot; rel=&quot;noopener&quot;&gt;App Store&lt;/a&gt; (12.0 MB universal binary for iOS 18+ and iPadOS 18+), compiling the exact same 48 kHz Core Audio render thread, 46 CC0 samples, and all 11 Metal shader pipelines without duplicating a line of DSP. The App Store currently carries version 3.1.0, with five worlds in English; the rest of this section describes the iPhone build in the repository, which adds &lt;em&gt;Deep Dive&lt;/em&gt; and the features below.&lt;/p&gt;

&lt;figure class=&quot;ac-plate ac-plate--hero&quot;&gt;
  &lt;img src=&quot;/satie/img/vis-ios.jpg&quot; width=&quot;1600&quot; height=&quot;1000&quot; alt=&quot;Satie running natively on three iPhones showing Kinetic Pulse with Phosphor Scope, Deep Dive with James Turrell 06 Oculus, and Gymnopédie with Nocturne Silk&quot; loading=&quot;lazy&quot;&gt;
  &lt;figcaption&gt;
    &lt;span class=&quot;ac-plate-num&quot;&gt;IOS &amp;amp; IPADOS&lt;/span&gt;
    &lt;span class=&quot;ac-plate-title&quot;&gt;Six worlds, 120 Hz EDR, and zero tracking on iPhone&lt;/span&gt;
    &lt;span class=&quot;ac-plate-desc&quot;&gt;Tap the open canvas for borderless Immersion Mode, swipe horizontally to pair any visual with any soundscape, rotate into a horizontal desk-stand dock with Keep Screen Awake, or route to AirPlay from the top-right picker.&lt;/span&gt;
  &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Shipping a real-time Metal and Core Audio instrument on a phone brings constraints that do not exist on a plugged-in MacBook, so I engineered the iOS shell around battery, ergonomics, and system integration:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Zero-GPU background playback and audio etiquette.&lt;/strong&gt; With &lt;code&gt;UIBackgroundModes: audio&lt;/code&gt;, synthesis continues uninterrupted when the screen locks, while &lt;code&gt;iOSAcousticMetalView&lt;/code&gt; pauses rendering to 0% GPU the instant &lt;code&gt;scenePhase&lt;/code&gt; leaves &lt;code&gt;.active&lt;/code&gt;. Foreground ProMotion scales automatically from 120 Hz down to 60, 30, or 15 Hz under thermal pressure, Low Power Mode, or Reduce Motion. An opt-in &lt;strong&gt;Mix with Other Audio&lt;/strong&gt; switch (&lt;code&gt;AVAudioSession.CategoryOptions.mixWithOthers&lt;/code&gt;) lets Satie sit quietly underneath podcasts or audiobooks, and the audio session handles phone-call interruptions, &lt;code&gt;mediaServicesWereReset&lt;/code&gt; recovery, and AirPods disconnect pauses cleanly.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Dynamic Island, StandBy, and Lock Screen widgets.&lt;/strong&gt; The embedded &lt;code&gt;SatieWidgets&lt;/code&gt; extension pairs a pure-OLED bedside StandBy and Home Screen widget (synced with the main app through a local App Group, &lt;code&gt;group.com.strangechances.Satie&lt;/code&gt;) with ActivityKit Dynamic Island Live Activities that tick countdowns via Apple&#x27;s native &lt;code&gt;timerInterval&lt;/code&gt; rendering at zero background CPU cost.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Action Button, Siri Shortcuts, and Focus Filters.&lt;/strong&gt; Native &lt;code&gt;AppIntents&lt;/code&gt; bind any soundscape or session timer directly to the iPhone Action Button, Shortcuts, Spotlight, and Apple Focus Filters—so Work Focus can start &lt;em&gt;Soft Light&lt;/em&gt; automatically, and Sleep or Wind Down Focus can start &lt;em&gt;Deep Dive&lt;/em&gt; with nocturnal low-melanopic mode (2200 K ember) engaged on both audio and &lt;em&gt;06 Oculus&lt;/em&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;8 languages and companion targets.&lt;/strong&gt; Both the macOS and iOS builds match the device language automatically across English, Japanese, French, Simplified Chinese, Taiwanese Traditional Chinese, Spanish, German, and Korean (including localized App Shortcuts and widgets). In the open-source repository, the same &lt;code&gt;AcousticCore&lt;/code&gt; package also powers &lt;strong&gt;Apple Watch&lt;/strong&gt; (&lt;code&gt;SatieWatch&lt;/code&gt; with silent Taptic Breath wrist taps and an optional on-device HealthKit HRV resonance controller that settles pace from 6.97 toward 5.21 bpm without ever sending data off the device), &lt;strong&gt;Apple TV&lt;/strong&gt; (&lt;code&gt;SatieTV&lt;/code&gt; in 4K EDR), and &lt;strong&gt;Apple Vision Pro&lt;/strong&gt; (&lt;code&gt;SatieVision&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;What it costs, and where it stops&lt;/h2&gt;
&lt;p&gt;Every number below is measured on Apple Silicon from &lt;code&gt;swift test -c release&lt;/code&gt;, the notarized macOS v4.1.1 build, and the universal iOS App Store build:&lt;/p&gt;

&lt;div class=&quot;piece-table-wrap&quot;&gt;
  &lt;table&gt;
    &lt;thead&gt;
      &lt;tr&gt;
        &lt;th&gt;Dimension&lt;/th&gt;
        &lt;th&gt;Measured result&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
      &lt;tr&gt;
        &lt;td&gt;Installed footprint&lt;/td&gt;
        &lt;td&gt;10.0 MB notarized macOS &lt;code&gt;.dmg&lt;/code&gt; (10,509,214 bytes) · 12.0 MB iOS &amp;amp; iPadOS App Store · 46 CC0 files · 8 Apple locales&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Single-core 48 kHz audio CPU&lt;/td&gt;
        &lt;td&gt;1.4% to 5.3% in &lt;em&gt;Deep Dive&lt;/em&gt; · 6.6% in &lt;em&gt;Soft Light&lt;/em&gt; · 7.7% in &lt;em&gt;Kinetic Pulse&lt;/em&gt; · 0% when paused&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Release invariants (22 tests)&lt;/td&gt;
        &lt;td&gt;Sub-bass mono correlation &amp;gt; +0.970 · Velvet-Noise FDN DC = 0.000003 · tail flatness = 0.761 · 8-language key parity · 0 dBFS clips&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;GPU &amp;amp; photobiology&lt;/td&gt;
        &lt;td&gt;11 Metal pipelines · &lt;code&gt;rgba16Float&lt;/code&gt; linear P3 · 68.6% OLED dark area · +44.44 dB blue-noise dither · −90.4% night blue&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Privacy &amp;amp; permissions&lt;/td&gt;
        &lt;td&gt;App Sandbox only · 0 macOS privacy prompts · 0 network requests · 0 third-party dependencies&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
&lt;/div&gt;

&lt;p&gt;The tradeoffs are real too, and worth stating plainly:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Apple platforms only.&lt;/strong&gt; Satie bets on Core Audio, Swift 6 atomics, &lt;code&gt;CAMetalDisplayLink&lt;/code&gt;, and 16-bit Apple EDR. Porting to Windows or Linux would mean giving up most of what makes the binary 10 MB and zero-allocation.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Six instruments, not a streaming catalog.&lt;/strong&gt; If you want artist collaborations or real field recordings from Yosemite, Endel and Portal exist for a reason. Satie trades breadth for six quiet rooms you can run offline forever.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;No clinical claims.&lt;/strong&gt; The 14.40 Hz shimmer and 0.1 Hz breath pacer follow peer-reviewed work, yet Satie is a software instrument, not a medical device. One open empirical question remains unverified locally: whether audio breath pacing alone entrains eyes-closed breathing reliably without watching &lt;em&gt;06 Oculus&lt;/em&gt;, which is why the Watch companion uses HealthKit HRV to close the loop on-device.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can audition all six soundscapes and the Day/Night visual shift on the &lt;a href=&quot;/satie/&quot;&gt;Satie page&lt;/a&gt;, get it for iPhone &amp;amp; iPad on the &lt;a href=&quot;https://apps.apple.com/app/satie-focus-soundscapes/id6837572453&quot; rel=&quot;noopener&quot;&gt;App Store&lt;/a&gt;, download the notarized macOS build (&lt;a href=&quot;https://github.com/graemecode/satie/releases/latest/download/Satie-4.1.1.dmg&quot;&gt;Satie-4.1.1.dmg&lt;/a&gt;), install it via Homebrew (&lt;code&gt;brew install --cask graemecode/tap/satie&lt;/code&gt;), or read the full Swift and Metal source on &lt;a href=&quot;https://github.com/graemecode/satie&quot; rel=&quot;noopener&quot;&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote class=&quot;piece-capstone&quot;&gt;
  &lt;p&gt;Ambient music must be able to accommodate many levels of listening attention without enforcing one in particular; it must be as ignorable as it is interesting.&lt;/p&gt;
  &lt;footer&gt;Brian Eno, liner notes to &lt;em&gt;Ambient 1: Music for Airports&lt;/em&gt; (1978)&lt;/footer&gt;
&lt;/blockquote&gt;</content>
  </entry>
  <entry>
    <title>conformal gates</title>
    <link href="https://strangechances.com/writings/conformal-gate/" rel="alternate" type="text/html"/>
    <id>https://strangechances.com/writings/conformal-gate/</id>
    <published>2026-11-23T00:00:00Z</published>
    <updated>2026-11-23T00:00:00Z</updated>
    <summary>Distilling hosted AI decisions into a 9µs local model, proving when to trust it, and what actually broke in live production.</summary>
    <content type="html">&lt;p&gt;Suppose someone in a team channel writes: &quot;Looks good to me, let&#x27;s ship it tomorrow.&quot; Before an AI teammate ever writes a word back, it has to answer a chain of tiny, invisible questions. Should it speak, react, or stay silent? Did that message commit to a task, or was it casual chatter? Is the request easy, medium, or hard? If the agent replies &quot;Want me to open the PR now?&quot;, should the interface attach quick Yes and No buttons?&lt;/p&gt;
&lt;p&gt;In an active team workspace at Ando, those small routing checks add up to tens of thousands of hosted classifier calls every day. The same pattern shows up across almost every AI product: routing prompts between a fast and frontier model, triaging incoming support tickets, or pre-filtering prompt injection and abuse. Every network hop adds 250 to 1,000+ milliseconds of latency and timeout risk on the hot path, yet nobody wants to train, deploy, and maintain a bespoke PyTorch model for every yes/no gate.&lt;/p&gt;
&lt;p&gt;We built &lt;code&gt;conformal-gate&lt;/code&gt; (Rust compiled to a single zero-dependency WebAssembly binary, plus a pure-TypeScript zero-WASM serving runtime) so a tiny local model inside our backend or edge isolate can answer clear-cut, repetitive calls in microseconds while sending every uncertain call to the hosted model. The rule is strict: it only skips the network call when finite-sample math proves its error rate stays inside your budget. Once certified, the serving state strips down to a &lt;strong&gt;6.3 KB gzipped&lt;/strong&gt; snapshot that runs identically in browsers, V8 isolates, Electron, and Cloudflare Workers.&lt;/p&gt;

&lt;dl class=&quot;essay-stats&quot; aria-label=&quot;Key live production and benchmark metrics&quot;&gt;
  &lt;div&gt;&lt;dt&gt;warm tenant SC (shadow · 2% α)&lt;/dt&gt;&lt;dd class=&quot;is-ok&quot;&gt;62.7%&lt;/dd&gt;&lt;/div&gt;
  &lt;div&gt;&lt;dt&gt;24h error on SC (target 2% α)&lt;/dt&gt;&lt;dd class=&quot;is-ok&quot;&gt;0.23%&lt;/dd&gt;&lt;/div&gt;
  &lt;div&gt;&lt;dt&gt;local p50 (Rust / V8 prod)&lt;/dt&gt;&lt;dd class=&quot;is-ok&quot;&gt;9 µs / 0.14 ms&lt;/dd&gt;&lt;/div&gt;
  &lt;div&gt;&lt;dt&gt;zero-WASM ServingSnapshot&lt;/dt&gt;&lt;dd&gt;6.3 KB&lt;/dd&gt;&lt;/div&gt;
&lt;/dl&gt;

&lt;aside class=&quot;etymology&quot; aria-label=&quot;Etymology of conformal gate&quot;&gt;
  &lt;div class=&quot;etym-head&quot;&gt;
    &lt;span class=&quot;etym-kicker&quot;&gt;Etymology&lt;/span&gt;
    &lt;span class=&quot;etym-lemma&quot;&gt;con·for·mal gate&lt;/span&gt;
    &lt;span class=&quot;etym-ipa&quot;&gt;/kənˈfɔːr.məl ɡeɪt/&lt;/span&gt;
  &lt;/div&gt;
  &lt;ol class=&quot;etym-chain&quot; aria-label=&quot;Word lineage&quot;&gt;
    &lt;li&gt;&lt;span class=&quot;etym-stem&quot;&gt;con-&lt;/span&gt;&lt;span class=&quot;etym-gloss&quot;&gt;Latin · together&lt;/span&gt;&lt;/li&gt;
    &lt;li class=&quot;etym-op&quot; aria-hidden=&quot;true&quot;&gt;+&lt;/li&gt;
    &lt;li&gt;&lt;span class=&quot;etym-stem&quot;&gt;forma&lt;/span&gt;&lt;span class=&quot;etym-gloss&quot;&gt;Latin · shape&lt;/span&gt;&lt;/li&gt;
    &lt;li class=&quot;etym-op&quot; aria-hidden=&quot;true&quot;&gt;→&lt;/li&gt;
    &lt;li&gt;&lt;span class=&quot;etym-stem etym-stem--accent&quot;&gt;conformis&lt;/span&gt;&lt;span class=&quot;etym-gloss&quot;&gt;of the same shape&lt;/span&gt;&lt;/li&gt;
    &lt;li class=&quot;etym-op&quot; aria-hidden=&quot;true&quot;&gt;+&lt;/li&gt;
    &lt;li&gt;&lt;span class=&quot;etym-stem&quot;&gt;geat&lt;/span&gt;&lt;span class=&quot;etym-gloss&quot;&gt;Old English · gate&lt;/span&gt;&lt;/li&gt;
  &lt;/ol&gt;
  &lt;p&gt;In 19th-century geometry, a &lt;em&gt;conformal map&lt;/em&gt; preserves local shapes and angles. Between 1998 and 2005, Vladimir Vovk, Alexander Gammerman, and Glenn Shafer borrowed the word for &lt;em&gt;conformal prediction&lt;/em&gt;: testing how closely a new observation conforms to the shape of past examples so you can bound errors without assuming a bell curve. We chose the name (also used in model-cascading, neural-database, and guardrail papers) because conformity is the exact condition a fast path needs. A tiny local model is only safe on inputs whose shape matches traffic it has already proven itself on; the gate opens the microsecond lane for inputs that conform, and closes it whenever an unfamiliar shape arrives so the hosted model takes over.&lt;/p&gt;
&lt;/aside&gt;

&lt;h2&gt;From chat models to dedicated decision engines&lt;/h2&gt;
&lt;p&gt;The way software teams run small AI decisions has gone through three stages.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;First, chat models playing classifier (2023 to 2025).&lt;/strong&gt; Teams asked small generative models like Haiku, Flash-Lite, or GPT-mini to print a JSON object, parsed the string, retried whenever a brace was missing, and paid for output tokens. Latency sat between 300 and 2,500 milliseconds, and each extra check added another network timeout to user-facing replies.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Second, dedicated single-pass decision engines (2026).&lt;/strong&gt; Instead of writing text one token at a time, a dedicated decision engine reads the context once and scores a fixed set of choices in a single forward pass, returning calibrated probabilities directly. At Ando we run Typesafe&#x27;s &lt;strong&gt;Jev&lt;/strong&gt; across our agent routing checks. In November 2026, Google launched the &lt;strong&gt;Gemini Decisions API&lt;/strong&gt; (&lt;code&gt;gemini-decision-1&lt;/code&gt;) along the same lines: read a shared payload once (up to 262,144 tokens of text or media), score up to 1,000 independent yes/no (&lt;code&gt;noul&lt;/code&gt;), multiple-choice (&lt;code&gt;choice&lt;/code&gt;), or rubric (&lt;code&gt;score&lt;/code&gt;) questions in one pass, bill zero output tokens, and respond in 150 to 250 milliseconds.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Third, a local certified fast path in front of the decision engine.&lt;/strong&gt; Dedicated decision engines solved broken JSON and output-token billing, yet they still cannot beat the speed of light. Every check leaves your server, crosses the network to a GPU cluster, and returns 150 to 560 milliseconds later. Meanwhile, real products and workspaces repeat themselves constantly. Once Jev or Gemini has labeled a few hundred inputs for a tenant, the obvious cases do not need a datacenter anymore. &lt;code&gt;conformal-gate&lt;/code&gt; sits directly in front of those hosted decision engines as Stage 0.&lt;/p&gt;

&lt;figure id=&quot;exhibit-eras&quot; class=&quot;diagram&quot; aria-label=&quot;Small-multiples diagram comparing three stages of AI decision infrastructure&quot;&gt;
  &lt;svg viewBox=&quot;0 0 640 282&quot; role=&quot;img&quot; aria-labelledby=&quot;dg0-title&quot;&gt;
    &lt;title id=&quot;dg0-title&quot;&gt;Three eras of AI decision gates compared across the network boundary&lt;/title&gt;
    &lt;defs&gt;
      &lt;marker id=&quot;arr0-ink&quot; viewBox=&quot;0 0 8 8&quot; refX=&quot;7&quot; refY=&quot;4&quot; markerWidth=&quot;5&quot; markerHeight=&quot;5&quot; orient=&quot;auto&quot;&gt;
        &lt;path class=&quot;dg-arrow&quot; d=&quot;M0 1 L7 4 L0 7 Z&quot;/&gt;
      &lt;/marker&gt;
      &lt;marker id=&quot;arr0-ok&quot; viewBox=&quot;0 0 8 8&quot; refX=&quot;7&quot; refY=&quot;4&quot; markerWidth=&quot;5&quot; markerHeight=&quot;5&quot; orient=&quot;auto&quot;&gt;
        &lt;path class=&quot;dg-arrow--ok&quot; d=&quot;M0 1 L7 4 L0 7 Z&quot;/&gt;
      &lt;/marker&gt;
    &lt;/defs&gt;

    &lt;!-- Tufte column headers --&gt;
    &lt;text class=&quot;dg-title&quot; x=&quot;12&quot; y=&quot;14&quot;&gt;ERA &amp;amp; MECHANISM&lt;/text&gt;
    &lt;text class=&quot;dg-mono--ok&quot; x=&quot;217&quot; y=&quot;14&quot; text-anchor=&quot;middle&quot;&gt;LOCAL RAM&lt;/text&gt;
    &lt;text class=&quot;dg-title&quot; x=&quot;392&quot; y=&quot;14&quot; text-anchor=&quot;middle&quot;&gt;REMOTE GPU DATACENTER&lt;/text&gt;
    &lt;text class=&quot;dg-title&quot; x=&quot;628&quot; y=&quot;14&quot; text-anchor=&quot;end&quot;&gt;LATENCY · COST&lt;/text&gt;

    &lt;!-- Local RAM soft architectural zone --&gt;
    &lt;rect class=&quot;dg-area--ok&quot; x=&quot;166&quot; y=&quot;24&quot; width=&quot;102&quot; height=&quot;236&quot; rx=&quot;3&quot;/&gt;

    &lt;!-- Single vertical Network Boundary hairline spanning all 3 small multiples --&gt;
    &lt;line class=&quot;dg-line--err&quot; x1=&quot;268&quot; y1=&quot;24&quot; x2=&quot;268&quot; y2=&quot;264&quot;/&gt;
    &lt;text class=&quot;dg-mono--err&quot; x=&quot;274&quot; y=&quot;275&quot;&gt;network boundary (speed-of-light floor)&lt;/text&gt;

    &lt;!-- Shared log-scale legend under latency column --&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;532&quot; y=&quot;275&quot;&gt;10 µs&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;628&quot; y=&quot;275&quot; text-anchor=&quot;end&quot;&gt;3 s (log)&lt;/text&gt;

    &lt;!-- Horizontal hairlines separating the 3 small multiples --&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;12&quot; y1=&quot;100&quot; x2=&quot;628&quot; y2=&quot;100&quot;/&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;12&quot; y1=&quot;180&quot; x2=&quot;628&quot; y2=&quot;180&quot;/&gt;

    &lt;!-- ROW 1: 2023-2025 Chat model decoding JSON token-by-token --&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;12&quot; y=&quot;44&quot;&gt;STAGE 1 · 2023–25&lt;/text&gt;
    &lt;text class=&quot;dg-label&quot; x=&quot;12&quot; y=&quot;60&quot;&gt;Chat LLM as classifier&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;12&quot; y=&quot;75&quot;&gt;Haiku, Flash, GPT-mini&lt;/text&gt;

    &lt;circle class=&quot;dg-dot--hollow&quot; cx=&quot;180&quot; cy=&quot;58&quot; r=&quot;3.5&quot;/&gt;
    &lt;line class=&quot;dg-line--axis&quot; x1=&quot;184&quot; y1=&quot;58&quot; x2=&quot;282&quot; y2=&quot;58&quot; marker-end=&quot;url(#arr0-ink)&quot;/&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;224&quot; y=&quot;51&quot; text-anchor=&quot;middle&quot;&gt;HTTP&lt;/text&gt;

    &lt;!-- Token-by-token sequential JSON decode blocks --&gt;
    &lt;g class=&quot;era-tok&quot;&gt;&lt;rect class=&quot;dg-box&quot; x=&quot;286&quot; y=&quot;47&quot; width=&quot;16&quot; height=&quot;22&quot; rx=&quot;2&quot;/&gt;&lt;text class=&quot;dg-mono--ink&quot; x=&quot;294&quot; y=&quot;61&quot; text-anchor=&quot;middle&quot;&gt;{&lt;/text&gt;&lt;/g&gt;
    &lt;g class=&quot;era-tok&quot;&gt;&lt;rect class=&quot;dg-box&quot; x=&quot;306&quot; y=&quot;47&quot; width=&quot;36&quot; height=&quot;22&quot; rx=&quot;2&quot;/&gt;&lt;text class=&quot;dg-mono--ink&quot; x=&quot;324&quot; y=&quot;61&quot; text-anchor=&quot;middle&quot;&gt;&quot;kind&quot;&lt;/text&gt;&lt;/g&gt;
    &lt;g class=&quot;era-tok&quot;&gt;&lt;rect class=&quot;dg-box&quot; x=&quot;346&quot; y=&quot;47&quot; width=&quot;12&quot; height=&quot;22&quot; rx=&quot;2&quot;/&gt;&lt;text class=&quot;dg-mono--ink&quot; x=&quot;352&quot; y=&quot;61&quot; text-anchor=&quot;middle&quot;&gt;:&lt;/text&gt;&lt;/g&gt;
    &lt;g class=&quot;era-tok&quot;&gt;&lt;rect class=&quot;dg-box&quot; x=&quot;362&quot; y=&quot;47&quot; width=&quot;44&quot; height=&quot;22&quot; rx=&quot;2&quot;/&gt;&lt;text class=&quot;dg-mono--ink&quot; x=&quot;384&quot; y=&quot;61&quot; text-anchor=&quot;middle&quot;&gt;&quot;yes_no&quot;&lt;/text&gt;&lt;/g&gt;
    &lt;g class=&quot;era-tok&quot;&gt;&lt;rect class=&quot;dg-box&quot; x=&quot;410&quot; y=&quot;47&quot; width=&quot;16&quot; height=&quot;22&quot; rx=&quot;2&quot;/&gt;&lt;text class=&quot;dg-mono--ink&quot; x=&quot;418&quot; y=&quot;61&quot; text-anchor=&quot;middle&quot;&gt;}&lt;/text&gt;&lt;/g&gt;
    &lt;g class=&quot;era-tok&quot;&gt;&lt;rect class=&quot;dg-pill--err&quot; x=&quot;432&quot; y=&quot;48&quot; width=&quot;50&quot; height=&quot;20&quot; rx=&quot;10&quot;/&gt;&lt;text class=&quot;dg-mono--err&quot; x=&quot;457&quot; y=&quot;61&quot; text-anchor=&quot;middle&quot;&gt;parse?&lt;/text&gt;&lt;/g&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;286&quot; y=&quot;85&quot;&gt;token-by-token decode · retries&lt;/text&gt;

    &lt;text class=&quot;dg-label&quot; x=&quot;628&quot; y=&quot;52&quot; text-anchor=&quot;end&quot;&gt;300–2,500 ms&lt;/text&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;532&quot; y1=&quot;63&quot; x2=&quot;628&quot; y2=&quot;63&quot;/&gt;
    &lt;rect class=&quot;dg-bar--muted&quot; x=&quot;610.5&quot; y=&quot;60.5&quot; width=&quot;16&quot; height=&quot;5&quot; rx=&quot;1.5&quot;/&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;628&quot; y=&quot;79&quot; text-anchor=&quot;end&quot;&gt;paid output tokens&lt;/text&gt;

    &lt;!-- ROW 2: 2026 Single-pass decision engine (Jev &amp; Gemini Decisions API) --&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;12&quot; y=&quot;122&quot;&gt;STAGE 2 · 2026&lt;/text&gt;
    &lt;text class=&quot;dg-label&quot; x=&quot;12&quot; y=&quot;138&quot;&gt;Decision engine&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;12&quot; y=&quot;153&quot;&gt;Jev · Gemini Decisions&lt;/text&gt;

    &lt;circle class=&quot;dg-dot--hollow&quot; cx=&quot;180&quot; cy=&quot;138&quot; r=&quot;3.5&quot;/&gt;
    &lt;line class=&quot;dg-line--ink&quot; x1=&quot;184&quot; y1=&quot;138&quot; x2=&quot;286&quot; y2=&quot;138&quot; marker-end=&quot;url(#arr0-ink)&quot;/&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;224&quot; y=&quot;131&quot; text-anchor=&quot;middle&quot;&gt;HTTP&lt;/text&gt;

    &lt;!-- Single forward pass fanning cleanly to simultaneous calibrated probabilities --&gt;
    &lt;circle class=&quot;dg-dot--hollow&quot; cx=&quot;294&quot; cy=&quot;138&quot; r=&quot;4.5&quot;/&gt;
    &lt;path class=&quot;dg-line--axis&quot; d=&quot;M 299 138 C 314 138, 316 118, 330 118&quot;/&gt;
    &lt;path class=&quot;dg-line--axis&quot; d=&quot;M 299 138 L 330 138&quot;/&gt;
    &lt;path class=&quot;dg-line--axis&quot; d=&quot;M 299 138 C 314 138, 316 158, 330 158&quot;/&gt;

    &lt;g class=&quot;era-pass&quot;&gt;
      &lt;text class=&quot;dg-mono--ink&quot; x=&quot;336&quot; y=&quot;121&quot;&gt;yes_no&lt;/text&gt;
      &lt;rect class=&quot;dg-bar--muted&quot; x=&quot;380&quot; y=&quot;113&quot; width=&quot;82&quot; height=&quot;8&quot; rx=&quot;2&quot;/&gt;
      &lt;text class=&quot;dg-mono--ink&quot; x=&quot;468&quot; y=&quot;121&quot;&gt;0.94&lt;/text&gt;
    &lt;/g&gt;
    &lt;g class=&quot;era-pass&quot;&gt;
      &lt;text class=&quot;dg-mono&quot; x=&quot;336&quot; y=&quot;141&quot;&gt;pick&lt;/text&gt;
      &lt;rect class=&quot;dg-bar--muted&quot; x=&quot;380&quot; y=&quot;133&quot; width=&quot;9&quot; height=&quot;8&quot; rx=&quot;2&quot;/&gt;
      &lt;text class=&quot;dg-mono&quot; x=&quot;395&quot; y=&quot;141&quot;&gt;0.04&lt;/text&gt;
    &lt;/g&gt;
    &lt;g class=&quot;era-pass&quot;&gt;
      &lt;text class=&quot;dg-mono&quot; x=&quot;336&quot; y=&quot;161&quot;&gt;none&lt;/text&gt;
      &lt;rect class=&quot;dg-bar--muted&quot; x=&quot;380&quot; y=&quot;153&quot; width=&quot;5&quot; height=&quot;8&quot; rx=&quot;2&quot;/&gt;
      &lt;text class=&quot;dg-mono&quot; x=&quot;391&quot; y=&quot;161&quot;&gt;0.02&lt;/text&gt;
    &lt;/g&gt;

    &lt;text class=&quot;dg-label&quot; x=&quot;628&quot; y=&quot;132&quot; text-anchor=&quot;end&quot;&gt;150–560 ms&lt;/text&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;532&quot; y1=&quot;143&quot; x2=&quot;628&quot; y2=&quot;143&quot;/&gt;
    &lt;rect class=&quot;dg-bar--muted&quot; x=&quot;605&quot; y=&quot;140.5&quot; width=&quot;10.5&quot; height=&quot;5&quot; rx=&quot;1.5&quot;/&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;628&quot; y=&quot;159&quot; text-anchor=&quot;end&quot;&gt;$0 output · 1 pass&lt;/text&gt;

    &lt;!-- ROW 3: Stage 0 Local certified conformal gate (never crosses network boundary) --&gt;
    &lt;text class=&quot;dg-mono--ok&quot; x=&quot;12&quot; y=&quot;202&quot;&gt;STAGE 0 · LOCAL&lt;/text&gt;
    &lt;text class=&quot;dg-label--ok&quot; x=&quot;12&quot; y=&quot;218&quot;&gt;conformal-gate&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;12&quot; y=&quot;233&quot;&gt;WASM · Pure V8 TS&lt;/text&gt;

    &lt;circle class=&quot;dg-dot&quot; cx=&quot;180&quot; cy=&quot;216&quot; r=&quot;3.5&quot;/&gt;
    &lt;line class=&quot;dg-line--ok&quot; x1=&quot;184&quot; y1=&quot;216&quot; x2=&quot;206&quot; y2=&quot;216&quot; marker-end=&quot;url(#arr0-ok)&quot;/&gt;
    &lt;g id=&quot;era-local-done&quot;&gt;
      &lt;rect class=&quot;dg-pill--ok&quot; x=&quot;208&quot; y=&quot;205&quot; width=&quot;52&quot; height=&quot;22&quot; rx=&quot;11&quot;/&gt;
      &lt;text class=&quot;dg-mono--ok&quot; x=&quot;234&quot; y=&quot;219&quot; text-anchor=&quot;middle&quot;&gt;yes_no&lt;/text&gt;
    &lt;/g&gt;
    &lt;circle id=&quot;era-local-pulse&quot; class=&quot;dg-pulse&quot; cx=&quot;234&quot; cy=&quot;216&quot; r=&quot;14&quot;/&gt;

    &lt;!-- Subtle dotted escalation only when uncertain --&gt;
    &lt;path class=&quot;dg-line--dash&quot; d=&quot;M 260 216 L 296 216 C 310 216, 310 204, 310 190&quot;/&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;276&quot; y=&quot;233&quot;&gt;escalates only when&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;276&quot; y=&quot;245&quot;&gt;uncertain or audited&lt;/text&gt;

    &lt;text class=&quot;dg-label--ok&quot; x=&quot;628&quot; y=&quot;212&quot; text-anchor=&quot;end&quot;&gt;9 µs–0.14 ms&lt;/text&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;532&quot; y1=&quot;223&quot; x2=&quot;628&quot; y2=&quot;223&quot;/&gt;
    &lt;circle class=&quot;dg-dot&quot; cx=&quot;536&quot; cy=&quot;223&quot; r=&quot;3&quot;/&gt;
    &lt;text class=&quot;dg-mono--ok&quot; x=&quot;628&quot; y=&quot;239&quot; text-anchor=&quot;end&quot;&gt;$0 · stays in RAM&lt;/text&gt;
  &lt;/svg&gt;
  &lt;div class=&quot;exhibit-bar&quot;&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-eras-replay&quot; class=&quot;exhibit-btn exhibit-btn--ok&quot;&gt;Replay 3 eras&lt;/button&gt;
    &lt;span id=&quot;eras-readout&quot; class=&quot;exhibit-readout&quot;&gt;Click to watch all three stages execute in real time&lt;/span&gt;
  &lt;/div&gt;
  &lt;figcaption&gt;Figure 1. Three generations of AI decision gates aligned against the network boundary and a shared log-scale latency axis. Dedicated decision engines collapsed multi-token JSON decoding into one pass; conformal-gate moves the certified majority back to the left of the network line entirely.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2&gt;How the local fast path works&lt;/h2&gt;
&lt;p&gt;Every incoming event hits the local gate first, inside the same backend process or edge isolate. Clear-cut calls short-circuit in memory at zero network cost; uncertain calls escalate to the hosted teacher as usual; and 5% of traffic rides a blind spot-check rail to the teacher regardless of confidence so an e-CUSUM drift monitor can prove the local model has not gone stale.&lt;/p&gt;

&lt;figure id=&quot;exhibit-cascade&quot; class=&quot;diagram&quot; aria-label=&quot;Interactive three-stage AI decision cascade&quot;&gt;
  &lt;svg viewBox=&quot;0 0 640 318&quot; role=&quot;img&quot; aria-labelledby=&quot;dg1-title&quot;&gt;
    &lt;title id=&quot;dg1-title&quot;&gt;Living cascade diagram showing conformal-gate in front of Typesafe Jev and Google Gemini Decisions API&lt;/title&gt;
    &lt;defs&gt;
      &lt;pattern id=&quot;bp-dots-1&quot; width=&quot;16&quot; height=&quot;16&quot; patternUnits=&quot;userSpaceOnUse&quot;&gt;
        &lt;circle class=&quot;dg-grid-dot&quot; cx=&quot;2&quot; cy=&quot;2&quot; r=&quot;0.8&quot;/&gt;
      &lt;/pattern&gt;
      &lt;marker id=&quot;arr-ink&quot; viewBox=&quot;0 0 8 8&quot; refX=&quot;7&quot; refY=&quot;4&quot; markerWidth=&quot;5.5&quot; markerHeight=&quot;5.5&quot; orient=&quot;auto&quot;&gt;
        &lt;path class=&quot;dg-arrow&quot; d=&quot;M0 1 L7 4 L0 7 Z&quot;/&gt;
      &lt;/marker&gt;
      &lt;marker id=&quot;arr-ok&quot; viewBox=&quot;0 0 8 8&quot; refX=&quot;7&quot; refY=&quot;4&quot; markerWidth=&quot;5.5&quot; markerHeight=&quot;5.5&quot; orient=&quot;auto&quot;&gt;
        &lt;path class=&quot;dg-arrow--ok&quot; d=&quot;M0 1 L7 4 L0 7 Z&quot;/&gt;
      &lt;/marker&gt;
      &lt;marker id=&quot;arr-audit&quot; viewBox=&quot;0 0 8 8&quot; refX=&quot;7&quot; refY=&quot;4&quot; markerWidth=&quot;5.5&quot; markerHeight=&quot;5.5&quot; orient=&quot;auto&quot;&gt;
        &lt;path class=&quot;dg-arrow--audit&quot; d=&quot;M0 1 L7 4 L0 7 Z&quot;/&gt;
      &lt;/marker&gt;
      &lt;marker id=&quot;arr-muted&quot; viewBox=&quot;0 0 8 8&quot; refX=&quot;7&quot; refY=&quot;4&quot; markerWidth=&quot;5.5&quot; markerHeight=&quot;5.5&quot; orient=&quot;auto&quot;&gt;
        &lt;path class=&quot;dg-arrow--muted&quot; d=&quot;M0 1 L7 4 L0 7 Z&quot;/&gt;
      &lt;/marker&gt;
    &lt;/defs&gt;

    &lt;rect x=&quot;0&quot; y=&quot;22&quot; width=&quot;640&quot; height=&quot;290&quot; fill=&quot;url(#bp-dots-1)&quot; rx=&quot;4&quot;/&gt;

    &lt;text class=&quot;dg-title&quot; x=&quot;10&quot; y=&quot;14&quot;&gt;STAGE 0 · IN-PROCESS / EDGE (9 µs–0.14 ms · $0)&lt;/text&gt;
    &lt;text class=&quot;dg-title&quot; x=&quot;382&quot; y=&quot;14&quot;&gt;STAGE 1 · TEACHER ENGINE (254–850 ms)&lt;/text&gt;

    &lt;!-- Incoming input --&gt;
    &lt;rect class=&quot;dg-box&quot; x=&quot;10&quot; y=&quot;48&quot; width=&quot;96&quot; height=&quot;60&quot; rx=&quot;5&quot;/&gt;
    &lt;text class=&quot;dg-label&quot; x=&quot;20&quot; y=&quot;70&quot;&gt;Event / input&lt;/text&gt;
    &lt;text class=&quot;dg-sub&quot; x=&quot;20&quot; y=&quot;86&quot;&gt;after simple&lt;/text&gt;
    &lt;text class=&quot;dg-sub&quot; x=&quot;20&quot; y=&quot;98&quot;&gt;rules run&lt;/text&gt;

    &lt;!-- Flow paths (used by kinetic particles) --&gt;
    &lt;path id=&quot;path-in&quot; class=&quot;dg-line--ink&quot; d=&quot;M 106 78 L 136 78&quot; marker-end=&quot;url(#arr-ink)&quot;/&gt;
    &lt;path id=&quot;path-local&quot; class=&quot;dg-line--ok&quot; d=&quot;M 224 142 C 224 162, 224 168, 224 188&quot; marker-end=&quot;url(#arr-ok)&quot;/&gt;
    &lt;path id=&quot;path-escalate&quot; class=&quot;dg-line--ink&quot; d=&quot;M 310 74 L 382 74&quot; marker-end=&quot;url(#arr-ink)&quot;/&gt;
    &lt;path id=&quot;path-audit&quot; class=&quot;dg-line--audit&quot; d=&quot;M 310 108 L 382 108&quot; marker-end=&quot;url(#arr-audit)&quot;/&gt;
    &lt;path id=&quot;path-observe&quot; class=&quot;dg-line--axis&quot; d=&quot;M 506 142 L 506 188&quot; marker-end=&quot;url(#arr-muted)&quot;/&gt;

    &lt;!-- Generation swap feedback loop --&gt;
    &lt;path class=&quot;dg-line--dash&quot; d=&quot;M 382 256 L 60 256 C 48 256, 48 250, 48 240 L 48 122 C 48 112, 54 108, 66 108 L 136 108&quot; marker-end=&quot;url(#arr-muted)&quot;/&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;140&quot; y=&quot;274&quot;&gt;paired promotion · beats incumbent&lt;/text&gt;

    &lt;!-- Stage 0: conformal-gate --&gt;
    &lt;rect id=&quot;cascade-stage0-box&quot; class=&quot;dg-box--accent&quot; x=&quot;138&quot; y=&quot;38&quot; width=&quot;172&quot; height=&quot;104&quot; rx=&quot;5&quot;/&gt;
    &lt;rect class=&quot;dg-accent-bar--ok&quot; x=&quot;138&quot; y=&quot;38&quot; width=&quot;3.5&quot; height=&quot;104&quot; rx=&quot;2&quot;/&gt;
    &lt;text class=&quot;dg-label&quot; x=&quot;150&quot; y=&quot;59&quot;&gt;conformal-gate&lt;/text&gt;
    &lt;text class=&quot;dg-sub&quot; x=&quot;150&quot; y=&quot;75&quot;&gt;FNV-1a hashing (8,192)&lt;/text&gt;
    &lt;text class=&quot;dg-sub&quot; x=&quot;150&quot; y=&quot;89&quot;&gt;Frozen serving_model&lt;/text&gt;
    &lt;text class=&quot;dg-sub&quot; x=&quot;150&quot; y=&quot;103&quot;&gt;Anytime-valid LTT gate&lt;/text&gt;
    &lt;rect class=&quot;dg-pill--ok&quot; x=&quot;150&quot; y=&quot;114&quot; width=&quot;146&quot; height=&quot;18&quot; rx=&quot;9&quot;/&gt;
    &lt;text class=&quot;dg-mono--ok&quot; x=&quot;223&quot; y=&quot;126&quot; text-anchor=&quot;middle&quot;&gt;p &amp;gt;= tau_c* &amp;amp;&amp;amp; !audit&lt;/text&gt;

    &lt;!-- Escalate &amp; audit labels --&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;346&quot; y=&quot;65&quot; text-anchor=&quot;middle&quot;&gt;uncertain&lt;/text&gt;
    &lt;text class=&quot;dg-mono--audit&quot; x=&quot;346&quot; y=&quot;100&quot; text-anchor=&quot;middle&quot;&gt;5% audit&lt;/text&gt;

    &lt;!-- Stage 1: Decision Engine --&gt;
    &lt;rect class=&quot;dg-box&quot; x=&quot;384&quot; y=&quot;38&quot; width=&quot;246&quot; height=&quot;104&quot; rx=&quot;5&quot;/&gt;
    &lt;rect class=&quot;dg-accent-bar--ink&quot; x=&quot;384&quot; y=&quot;38&quot; width=&quot;3.5&quot; height=&quot;104&quot; rx=&quot;2&quot;/&gt;
    &lt;text class=&quot;dg-label&quot; x=&quot;396&quot; y=&quot;59&quot;&gt;Hosted teacher engine&lt;/text&gt;
    &lt;text class=&quot;dg-sub&quot; x=&quot;396&quot; y=&quot;76&quot;&gt;Typesafe Jev · Gemini Decisions&lt;/text&gt;
    &lt;text class=&quot;dg-sub&quot; x=&quot;396&quot; y=&quot;90&quot;&gt;or any LLM classifier / router&lt;/text&gt;
    &lt;rect class=&quot;dg-pill&quot; x=&quot;396&quot; y=&quot;110&quot; width=&quot;218&quot; height=&quot;20&quot; rx=&quot;10&quot;/&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;505&quot; y=&quot;123&quot; text-anchor=&quot;middle&quot;&gt;Jev ~254 ms · Flash-Lite ~849 ms&lt;/text&gt;

    &lt;!-- Local fast return --&gt;
    &lt;rect class=&quot;dg-box--ok&quot; x=&quot;138&quot; y=&quot;190&quot; width=&quot;172&quot; height=&quot;54&quot; rx=&quot;5&quot;/&gt;
    &lt;text class=&quot;dg-label--ok&quot; x=&quot;150&quot; y=&quot;212&quot;&gt;Local short-circuit&lt;/text&gt;
    &lt;text class=&quot;dg-mono--ok&quot; x=&quot;150&quot; y=&quot;229&quot;&gt;0.14 ms V8 · $0 · 6.3 KB&lt;/text&gt;

    &lt;text class=&quot;dg-mono--ok&quot; x=&quot;212&quot; y=&quot;170&quot; text-anchor=&quot;end&quot;&gt;certified&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;234&quot; y=&quot;170&quot;&gt;up to 63% SC&lt;/text&gt;

    &lt;!-- Online calibration &amp; distillation --&gt;
    &lt;rect class=&quot;dg-box&quot; x=&quot;384&quot; y=&quot;190&quot; width=&quot;246&quot; height=&quot;100&quot; rx=&quot;5&quot;/&gt;
    &lt;rect class=&quot;dg-accent-bar--audit&quot; x=&quot;384&quot; y=&quot;190&quot; width=&quot;3.5&quot; height=&quot;100&quot; rx=&quot;2&quot;/&gt;
    &lt;text class=&quot;dg-label&quot; x=&quot;396&quot; y=&quot;211&quot;&gt;Calibration, drift &amp;amp; storage&lt;/text&gt;
    &lt;text class=&quot;dg-sub&quot; x=&quot;396&quot; y=&quot;228&quot;&gt;1. Frozen LTT + scaled ACI + e-CUSUM&lt;/text&gt;
    &lt;text class=&quot;dg-sub&quot; x=&quot;396&quot; y=&quot;242&quot;&gt;2. Unweighted KL + global L2 decay&lt;/text&gt;
    &lt;text class=&quot;dg-sub&quot; x=&quot;396&quot; y=&quot;256&quot;&gt;3. 6.3 KB serving / compressed trainer&lt;/text&gt;
    &lt;text class=&quot;dg-mono--audit&quot; x=&quot;396&quot; y=&quot;276&quot;&gt;Fail-closed + futility retirement&lt;/text&gt;

    &lt;!-- Kinetic particle overlay --&gt;
    &lt;g id=&quot;cascade-particles&quot; aria-hidden=&quot;true&quot;&gt;&lt;/g&gt;
  &lt;/svg&gt;
  &lt;div class=&quot;exhibit-bar&quot;&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-cascade-pause&quot; class=&quot;exhibit-btn&quot; aria-pressed=&quot;false&quot;&gt;Pause&lt;/button&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-cascade-drift&quot; class=&quot;exhibit-btn exhibit-btn--err&quot; aria-pressed=&quot;false&quot;&gt;Simulate drift&lt;/button&gt;
    &lt;span id=&quot;cascade-readout&quot; class=&quot;exhibit-readout&quot;&gt;STEADY · up to 63% local (0.14 ms V8) · 5% audit · 6.3 KB snapshot&lt;/span&gt;
  &lt;/div&gt;
  &lt;figcaption&gt;Figure 2. Events enter on the left. Certified calls drop down the green fast path in memory; uncertain calls escalate to the hosted teacher; 5% ride the amber audit rail regardless of confidence. Click Simulate drift to watch e-CUSUM fail closed immediately and wipe stale trainer weights.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2&gt;Why standard conformal prediction broke&lt;/h2&gt;
&lt;p&gt;Before jumping into formulas, consider a simple example. Imagine a gate inspects 1,000 messages and promises your team: &quot;At most 5% errors.&quot; Because the gate is cautious, it only handles 100 of those messages locally and passes the other 900 to the hosted model. On the 100 messages it answered locally, it gets 20 wrong.&lt;/p&gt;
&lt;p&gt;If you divide 20 mistakes by all 1,000 messages, the overall error rate is 2%. On paper, 2% beats your 5% goal. Yet on the 100 messages the local gate actually decided, it was wrong 20% of the time, or one in five.&lt;/p&gt;
&lt;p&gt;That exact failure happened to us in our first prototype. We built a standard Mondrian conformal predictor targeting 5% error and replayed it chronologically against 1,966 real agent-participation decisions from Ando. Across all 1,966 messages, overall error was just 1.9%. Because those messages were hard (simple rules for direct mentions and DMs had already filtered out easy cases), the gate only short-circuited 8.2% of them (161 messages), and 38 of those 161 disagreed with the teacher: a &lt;strong&gt;23.6% error rate&lt;/strong&gt; on the traffic we actually skipped. On our deterministic stress suites at 5% target, marginal Mondrian CP broke even harder: &lt;strong&gt;10.9%&lt;/strong&gt; conditional error on clean separable data, &lt;strong&gt;49.9%&lt;/strong&gt; on pure noise, and &lt;strong&gt;82.9%&lt;/strong&gt; on diurnal bursts.&lt;/p&gt;

&lt;aside class=&quot;essay-callout essay-callout--err&quot;&gt;
  &lt;span class=&quot;callout-kicker&quot;&gt;The denominator trap&lt;/span&gt;
  &lt;p&gt;Standard (marginal) conformal prediction bounds &lt;code&gt;errors / all inputs&lt;/code&gt;, written &lt;code&gt;P(error and accepted) &amp;lt;= alpha&lt;/code&gt;. A fast path actually needs to bound &lt;code&gt;errors / skipped inputs&lt;/code&gt;, written &lt;code&gt;P(error | accepted) &amp;lt;= alpha&lt;/code&gt;. Divide 1.9% by an 8.2% skip rate and a &quot;safe&quot; model becomes 23.6% wrong.&lt;/p&gt;
&lt;/aside&gt;

&lt;figure id=&quot;exhibit-trap&quot; class=&quot;diagram&quot; aria-label=&quot;Interactive denominator trap visualization&quot;&gt;
  &lt;svg viewBox=&quot;0 0 640 282&quot; role=&quot;img&quot; aria-labelledby=&quot;dg2-title&quot;&gt;
    &lt;title id=&quot;dg2-title&quot;&gt;Interactive comparison showing how low acceptance inflates conditional error under marginal conformal prediction&lt;/title&gt;
    &lt;defs&gt;
      &lt;pattern id=&quot;bp-dots-2&quot; width=&quot;16&quot; height=&quot;16&quot; patternUnits=&quot;userSpaceOnUse&quot;&gt;
        &lt;circle class=&quot;dg-grid-dot&quot; cx=&quot;2&quot; cy=&quot;2&quot; r=&quot;0.8&quot;/&gt;
      &lt;/pattern&gt;
    &lt;/defs&gt;

    &lt;rect x=&quot;0&quot; y=&quot;22&quot; width=&quot;640&quot; height=&quot;252&quot; fill=&quot;url(#bp-dots-2)&quot; rx=&quot;4&quot;/&gt;
    &lt;text class=&quot;dg-title&quot; x=&quot;14&quot; y=&quot;14&quot;&gt;INTERACTIVE · OVERALL ERROR VS. ERROR ON SKIPPED CALLS (1,966 MESSAGES)&lt;/text&gt;

    &lt;!-- Chart area: y=196 is 0%, 5px per 1% --&gt;
    &lt;line class=&quot;dg-line--axis&quot; x1=&quot;50&quot; y1=&quot;196&quot; x2=&quot;618&quot; y2=&quot;196&quot;/&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;14&quot; y=&quot;199&quot;&gt;0%&lt;/text&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;50&quot; y1=&quot;146&quot; x2=&quot;618&quot; y2=&quot;146&quot;/&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;14&quot; y=&quot;149&quot;&gt;10%&lt;/text&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;50&quot; y1=&quot;96&quot; x2=&quot;618&quot; y2=&quot;96&quot;/&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;14&quot; y=&quot;99&quot;&gt;20%&lt;/text&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;50&quot; y1=&quot;46&quot; x2=&quot;618&quot; y2=&quot;46&quot;/&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;14&quot; y=&quot;49&quot;&gt;30%&lt;/text&gt;

    &lt;!-- Dynamic target ceiling --&gt;
    &lt;line id=&quot;trap-target-line&quot; class=&quot;dg-line--err&quot; x1=&quot;50&quot; y1=&quot;171&quot; x2=&quot;618&quot; y2=&quot;171&quot;/&gt;
    &lt;text id=&quot;trap-target-lbl&quot; class=&quot;dg-mono--err&quot; x=&quot;616&quot; y=&quot;166&quot; text-anchor=&quot;end&quot;&gt;target ceiling α = 5.0%&lt;/text&gt;

    &lt;!-- Naive Mondrian CP bar --&gt;
    &lt;rect id=&quot;trap-naive-bar&quot; class=&quot;dg-bar--fail&quot; x=&quot;116&quot; y=&quot;78&quot; width=&quot;112&quot; height=&quot;118&quot; rx=&quot;3&quot;/&gt;
    &lt;text id=&quot;trap-naive-lbl&quot; class=&quot;dg-label--err&quot; x=&quot;172&quot; y=&quot;70&quot; text-anchor=&quot;middle&quot;&gt;23.6%&lt;/text&gt;
    &lt;text class=&quot;dg-label&quot; x=&quot;172&quot; y=&quot;214&quot; text-anchor=&quot;middle&quot;&gt;Naive Mondrian CP&lt;/text&gt;
    &lt;text id=&quot;trap-naive-sub&quot; class=&quot;dg-mono&quot; x=&quot;172&quot; y=&quot;228&quot; text-anchor=&quot;middle&quot;&gt;marginal 1.9% ÷ 8.2%&lt;/text&gt;

    &lt;!-- conformal-gate LTT bar --&gt;
    &lt;rect id=&quot;trap-cg-bar&quot; class=&quot;dg-bar&quot; x=&quot;344&quot; y=&quot;179&quot; width=&quot;112&quot; height=&quot;17&quot; rx=&quot;3&quot;/&gt;
    &lt;text id=&quot;trap-cg-lbl&quot; class=&quot;dg-label--ok&quot; x=&quot;400&quot; y=&quot;171&quot; text-anchor=&quot;middle&quot;&gt;3.40%&lt;/text&gt;
    &lt;text class=&quot;dg-label&quot; x=&quot;400&quot; y=&quot;214&quot; text-anchor=&quot;middle&quot;&gt;conformal-gate (LTT)&lt;/text&gt;
    &lt;text id=&quot;trap-cg-sub&quot; class=&quot;dg-mono--ok&quot; x=&quot;400&quot; y=&quot;228&quot; text-anchor=&quot;middle&quot;&gt;certified &amp;lt;= 5.0%&lt;/text&gt;

    &lt;!-- Bottom proportional strip of 1,966 calls --&gt;
    &lt;rect class=&quot;dg-bar--bg&quot; x=&quot;50&quot; y=&quot;244&quot; width=&quot;560&quot; height=&quot;12&quot; rx=&quot;6&quot;/&gt;
    &lt;rect id=&quot;trap-strip-acc&quot; class=&quot;dg-bar--muted&quot; x=&quot;50&quot; y=&quot;244&quot; width=&quot;46&quot; height=&quot;12&quot; rx=&quot;6&quot;/&gt;
    &lt;rect id=&quot;trap-strip-err&quot; class=&quot;dg-bar--fail&quot; x=&quot;50&quot; y=&quot;244&quot; width=&quot;11&quot; height=&quot;12&quot; rx=&quot;6&quot;/&gt;
    &lt;text id=&quot;trap-strip-cap&quot; class=&quot;dg-mono&quot; x=&quot;50&quot; y=&quot;270&quot;&gt;38 errors inside 161 accepted calls (of 1,966 total) → 23.6% conditional&lt;/text&gt;
  &lt;/svg&gt;
  &lt;div class=&quot;exhibit-bar&quot;&gt;
    &lt;span class=&quot;exhibit-control&quot;&gt;
      &lt;label for=&quot;trap-acc&quot;&gt;Acceptance&lt;/label&gt;
      &lt;input id=&quot;trap-acc&quot; type=&quot;range&quot; min=&quot;5&quot; max=&quot;85&quot; step=&quot;0.2&quot; value=&quot;8.2&quot;&gt;
      &lt;output id=&quot;trap-acc-out&quot;&gt;8.2%&lt;/output&gt;
    &lt;/span&gt;
    &lt;span class=&quot;exhibit-control&quot;&gt;
      &lt;label for=&quot;trap-alpha&quot;&gt;Target α&lt;/label&gt;
      &lt;input id=&quot;trap-alpha&quot; type=&quot;range&quot; min=&quot;1&quot; max=&quot;10&quot; step=&quot;0.5&quot; value=&quot;5&quot;&gt;
      &lt;output id=&quot;trap-alpha-out&quot;&gt;5.0%&lt;/output&gt;
    &lt;/span&gt;
    &lt;button type=&quot;button&quot; class=&quot;exhibit-btn&quot; data-preset=&quot;8.2,5&quot;&gt;Hard stream 5%&lt;/button&gt;
    &lt;button type=&quot;button&quot; class=&quot;exhibit-btn&quot; data-preset=&quot;19.5,2&quot;&gt;Hard stream 2%&lt;/button&gt;
    &lt;button type=&quot;button&quot; class=&quot;exhibit-btn&quot; data-preset=&quot;75,5&quot;&gt;75% accept&lt;/button&gt;
    &lt;span id=&quot;trap-readout&quot; class=&quot;exhibit-readout is-err&quot;&gt;Naive CP violates bound by 4.7×&lt;/span&gt;
  &lt;/div&gt;
  &lt;figcaption&gt;Figure 3. Try dragging Acceptance from 75% down to 8.2%. The red bar on the bottom strip stays tiny compared to all 1,966 messages, yet it swallows nearly a quarter of the grey accepted slice.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2&gt;How a tiny local model reads inputs in microseconds&lt;/h2&gt;
&lt;p&gt;A common instinct here is to train a small neural network in PyTorch and deploy it behind a GPU or CPU endpoint. The catch is operational weight: maintaining a separate training pipeline, model registry, serving cluster, and drift dashboard for every tiny yes/no gate costs more engineering time than the latency it saves.&lt;/p&gt;
&lt;p&gt;Instead, &lt;code&gt;conformal-gate&lt;/code&gt; is written in pure Rust and compiled to a single zero-dependency WebAssembly binary (~256 KB gzipped for the full crate — single-gate trainer, multi-predicate bundles, k-NN OOD guard, and &lt;code&gt;ConformalSemanticCache&lt;/code&gt;). It loads directly inside an existing Node or edge backend, with no Python runtime and no external service to manage. How does a tiny binary classify text in 9 to 35 microseconds?&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Text fingerprints instead of a giant vocabulary.&lt;/strong&gt; Rather than maintaining a dictionary of every word ever seen, the extractor chops text into individual words, two-word pairs (like &lt;code&gt;&quot;want me&quot;&lt;/code&gt;), short four-letter chunks (like &lt;code&gt;^ship&lt;/code&gt; and &lt;code&gt;ping$&lt;/code&gt; so &quot;shipped&quot; and &quot;shipping&quot; share overlap), and simple structural clues like message length, punctuation, URLs, and code blocks. Each clue hashes via 64-bit FNV-1a into one of 8,192 fixed numeric buckets. Different input fields get different hash seeds, so the word &quot;saved&quot; in a user&#x27;s question never collides with &quot;saved&quot; in an agent&#x27;s reply. If the caller already has a dense embedding vector, the model accepts that too.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Learning from probabilities, not just yes or no.&lt;/strong&gt; When a decision engine scores an input, it does not just say &quot;skip.&quot; It returns calibrated soft probabilities like &lt;code&gt;0.94 skip, 0.06 speak&lt;/code&gt;. Those probabilities carry far more signal than a bare label. A fast online linear model (multinomial logistic regression) adjusts its weights to match them via KL divergence, keeping a bounded replay buffer so memory stays flat.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Zero-WASM V8 serving (&lt;code&gt;PureServingGate&lt;/code&gt;).&lt;/strong&gt; Strict V8 isolates (serverless V8 runtimes, locked-down edge workers, and strict CSP environments) often disallow dynamic WebAssembly instantiation altogether. Because a certified &lt;code&gt;ServingSnapshot&lt;/code&gt; is just sparse non-zero weights plus per-class thresholds (~&lt;strong&gt;6.3 KB gzipped&lt;/strong&gt;), our &lt;code&gt;conformal-gate/serving&lt;/code&gt; entry point reproduces the exact 64-bit FNV-1a feature hashing, sparse dot-product, softmax, and LTT checks in pure TypeScript with zero WASM and zero &lt;code&gt;node:*&lt;/code&gt; imports — serving live production traffic in &lt;strong&gt;0.14 ms p50&lt;/strong&gt; with bit-for-bit identical probabilities.&lt;/li&gt;
&lt;/ul&gt;

&lt;figure id=&quot;exhibit-playground&quot; class=&quot;diagram&quot; aria-label=&quot;Live in-browser PureServingGate playground running a real Rust-certified ServingSnapshot&quot;&gt;
  &lt;div class=&quot;pg-row&quot;&gt;
    &lt;label for=&quot;pg-input&quot;&gt;PROMPT&lt;/label&gt;
    &lt;input id=&quot;pg-input&quot; class=&quot;pg-input&quot; type=&quot;text&quot; value=&quot;Convert this CSV to JSON with camelCase keys&quot; autocomplete=&quot;off&quot; spellcheck=&quot;false&quot; aria-label=&quot;Test prompt for live in-browser conformal gate&quot;&gt;
  &lt;/div&gt;
  &lt;svg viewBox=&quot;0 0 640 198&quot; role=&quot;img&quot; aria-labelledby=&quot;dg-pg-title&quot;&gt;
    &lt;title id=&quot;dg-pg-title&quot;&gt;Live in-browser PureServingGate running real 64-bit FNV-1a feature hashing, softmax probabilities against certified thresholds, and live feature attribution&lt;/title&gt;
    &lt;defs&gt;
      &lt;pattern id=&quot;bp-dots-pg&quot; width=&quot;16&quot; height=&quot;16&quot; patternUnits=&quot;userSpaceOnUse&quot;&gt;
        &lt;circle class=&quot;dg-grid-dot&quot; cx=&quot;2&quot; cy=&quot;2&quot; r=&quot;0.8&quot;/&gt;
      &lt;/pattern&gt;
    &lt;/defs&gt;

    &lt;rect x=&quot;0&quot; y=&quot;22&quot; width=&quot;640&quot; height=&quot;170&quot; fill=&quot;url(#bp-dots-pg)&quot; rx=&quot;4&quot;/&gt;
    &lt;text class=&quot;dg-title&quot; x=&quot;14&quot; y=&quot;14&quot;&gt;LIVE IN-BROWSER PureServingGate · REAL 7.3 KB GZIP SNAPSHOT (ZERO WASM)&lt;/text&gt;
    &lt;text id=&quot;pg-latency&quot; class=&quot;dg-mono--ok&quot; x=&quot;626&quot; y=&quot;14&quot; text-anchor=&quot;end&quot;&gt;0.08 ms · 0 network hops&lt;/text&gt;

    &lt;!-- Vertical hairline divider --&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;322&quot; y1=&quot;30&quot; x2=&quot;322&quot; y2=&quot;184&quot;/&gt;

    &lt;!-- LEFT PANEL: Calibrated probabilities vs exact certified thresholds --&gt;
    &lt;text class=&quot;dg-title&quot; x=&quot;14&quot; y=&quot;42&quot;&gt;POSTERIOR VS. CERTIFIED τ_c*&lt;/text&gt;

    &lt;!-- Row 0: fast_model --&gt;
    &lt;text class=&quot;dg-mono--ink&quot; x=&quot;14&quot; y=&quot;64&quot;&gt;fast_model&lt;/text&gt;
    &lt;text id=&quot;pg-tau-0&quot; class=&quot;dg-mono&quot; x=&quot;140&quot; y=&quot;64&quot;&gt;τ* 0.64&lt;/text&gt;
    &lt;text id=&quot;pg-prob-0&quot; class=&quot;dg-mono--ok&quot; x=&quot;304&quot; y=&quot;64&quot; text-anchor=&quot;end&quot;&gt;88.6%&lt;/text&gt;
    &lt;rect class=&quot;dg-bar--bg&quot; x=&quot;14&quot; y=&quot;70&quot; width=&quot;290&quot; height=&quot;12&quot; rx=&quot;2&quot;/&gt;
    &lt;rect id=&quot;pg-bar-0&quot; class=&quot;dg-bar&quot; x=&quot;14&quot; y=&quot;70&quot; width=&quot;256.9&quot; height=&quot;12&quot; rx=&quot;2&quot;/&gt;
    &lt;line id=&quot;pg-tick-0&quot; class=&quot;dg-line--err&quot; x1=&quot;200.5&quot; y1=&quot;66&quot; x2=&quot;200.5&quot; y2=&quot;86&quot;/&gt;

    &lt;!-- Row 1: frontier_model --&gt;
    &lt;text class=&quot;dg-mono--ink&quot; x=&quot;14&quot; y=&quot;108&quot;&gt;frontier_model&lt;/text&gt;
    &lt;text id=&quot;pg-tau-1&quot; class=&quot;dg-mono&quot; x=&quot;140&quot; y=&quot;108&quot;&gt;τ* 0.94&lt;/text&gt;
    &lt;text id=&quot;pg-prob-1&quot; class=&quot;dg-mono&quot; x=&quot;304&quot; y=&quot;108&quot; text-anchor=&quot;end&quot;&gt;11.4%&lt;/text&gt;
    &lt;rect class=&quot;dg-bar--bg&quot; x=&quot;14&quot; y=&quot;114&quot; width=&quot;290&quot; height=&quot;12&quot; rx=&quot;2&quot;/&gt;
    &lt;rect id=&quot;pg-bar-1&quot; class=&quot;dg-bar--muted&quot; x=&quot;14&quot; y=&quot;114&quot; width=&quot;33.1&quot; height=&quot;12&quot; rx=&quot;2&quot;/&gt;
    &lt;line id=&quot;pg-tick-1&quot; class=&quot;dg-line--err&quot; x1=&quot;286.1&quot; y1=&quot;110&quot; x2=&quot;286.1&quot; y2=&quot;130&quot;/&gt;

    &lt;!-- Live route verdict box --&gt;
    &lt;rect id=&quot;pg-verdict-box&quot; class=&quot;dg-box--ok&quot; x=&quot;14&quot; y=&quot;140&quot; width=&quot;290&quot; height=&quot;42&quot; rx=&quot;4&quot;/&gt;
    &lt;text id=&quot;pg-verdict-title&quot; class=&quot;dg-label--ok&quot; x=&quot;26&quot; y=&quot;158&quot;&gt;LOCAL SHORT-CIRCUIT → fast_model&lt;/text&gt;
    &lt;text id=&quot;pg-verdict-sub&quot; class=&quot;dg-sub&quot; x=&quot;26&quot; y=&quot;173&quot;&gt;p = 0.886 &amp;gt;= τ* 0.643 · skipped teacher&lt;/text&gt;

    &lt;!-- RIGHT PANEL: Live FNV-1a feature attribution (diverging bars around center x=520) --&gt;
    &lt;text class=&quot;dg-title&quot; x=&quot;338&quot; y=&quot;42&quot;&gt;TOP FNV-1a HASHED SIGNALS&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;520&quot; y=&quot;56&quot; text-anchor=&quot;middle&quot;&gt;← frontier · fast →&lt;/text&gt;
    &lt;line class=&quot;dg-line--axis&quot; x1=&quot;520&quot; y1=&quot;62&quot; x2=&quot;520&quot; y2=&quot;178&quot;/&gt;

    &lt;!-- 4 dynamic attribution rows --&gt;
    &lt;text id=&quot;pg-feat-lbl-0&quot; class=&quot;dg-mono--ink&quot; x=&quot;338&quot; y=&quot;80&quot;&gt;json&lt;/text&gt;
    &lt;rect id=&quot;pg-feat-bar-0&quot; class=&quot;dg-bar&quot; x=&quot;520&quot; y=&quot;71&quot; width=&quot;54&quot; height=&quot;10&quot; rx=&quot;2&quot;/&gt;
    &lt;text id=&quot;pg-feat-val-0&quot; class=&quot;dg-mono--ok&quot; x=&quot;626&quot; y=&quot;80&quot; text-anchor=&quot;end&quot;&gt;+0.42&lt;/text&gt;

    &lt;text id=&quot;pg-feat-lbl-1&quot; class=&quot;dg-mono--ink&quot; x=&quot;338&quot; y=&quot;108&quot;&gt;csv&lt;/text&gt;
    &lt;rect id=&quot;pg-feat-bar-1&quot; class=&quot;dg-bar&quot; x=&quot;520&quot; y=&quot;99&quot; width=&quot;46&quot; height=&quot;10&quot; rx=&quot;2&quot;/&gt;
    &lt;text id=&quot;pg-feat-val-1&quot; class=&quot;dg-mono--ok&quot; x=&quot;626&quot; y=&quot;108&quot; text-anchor=&quot;end&quot;&gt;+0.36&lt;/text&gt;

    &lt;text id=&quot;pg-feat-lbl-2&quot; class=&quot;dg-mono--ink&quot; x=&quot;338&quot; y=&quot;136&quot;&gt;convert&lt;/text&gt;
    &lt;rect id=&quot;pg-feat-bar-2&quot; class=&quot;dg-bar&quot; x=&quot;520&quot; y=&quot;127&quot; width=&quot;38&quot; height=&quot;10&quot; rx=&quot;2&quot;/&gt;
    &lt;text id=&quot;pg-feat-val-2&quot; class=&quot;dg-mono--ok&quot; x=&quot;626&quot; y=&quot;136&quot; text-anchor=&quot;end&quot;&gt;+0.29&lt;/text&gt;

    &lt;text id=&quot;pg-feat-lbl-3&quot; class=&quot;dg-mono--ink&quot; x=&quot;338&quot; y=&quot;164&quot;&gt;camelcase&lt;/text&gt;
    &lt;rect id=&quot;pg-feat-bar-3&quot; class=&quot;dg-bar&quot; x=&quot;520&quot; y=&quot;155&quot; width=&quot;28&quot; height=&quot;10&quot; rx=&quot;2&quot;/&gt;
    &lt;text id=&quot;pg-feat-val-3&quot; class=&quot;dg-mono--ok&quot; x=&quot;626&quot; y=&quot;164&quot; text-anchor=&quot;end&quot;&gt;+0.21&lt;/text&gt;
  &lt;/svg&gt;
  &lt;div class=&quot;exhibit-bar&quot;&gt;
    &lt;button type=&quot;button&quot; class=&quot;exhibit-btn&quot; data-pg=&quot;Convert this CSV to JSON with camelCase keys&quot; aria-pressed=&quot;true&quot;&gt;Format JSON&lt;/button&gt;
    &lt;button type=&quot;button&quot; class=&quot;exhibit-btn&quot; data-pg=&quot;Write a regex to extract ISO dates from a log line&quot; aria-pressed=&quot;false&quot;&gt;Regex date&lt;/button&gt;
    &lt;button type=&quot;button&quot; class=&quot;exhibit-btn&quot; data-pg=&quot;Debug a flaky deadlock between V8 isolate cache invalidation and background compactor&quot; aria-pressed=&quot;false&quot;&gt;Deadlock&lt;/button&gt;
    &lt;button type=&quot;button&quot; class=&quot;exhibit-btn&quot; data-pg=&quot;Can you look at this code and tell me if it seems okay?&quot; aria-pressed=&quot;false&quot;&gt;Ambiguous&lt;/button&gt;
    &lt;button type=&quot;button&quot; class=&quot;exhibit-btn&quot; data-pg=&quot;Write a haiku about rainy afternoons in Kyoto&quot; aria-pressed=&quot;false&quot;&gt;Out-of-dist&lt;/button&gt;
    &lt;span id=&quot;pg-readout&quot; class=&quot;exhibit-readout&quot;&gt;Type anything above to test live FNV-1a routing &amp;amp; honest abstention&lt;/span&gt;
  &lt;/div&gt;
  &lt;figcaption&gt;Figure 4. A real Rust-certified LLM tiering gate (7.3 KB gzipped ServingSnapshot, zero WASM) executing directly in your browser on every keystroke. Clear formatting or systems-debugging prompts cross their dashed red τ_c* line and short-circuit locally; ambiguous or unfamiliar prompts fall short and escalate honestly to the teacher.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2&gt;How we prove the local model is safe to trust&lt;/h2&gt;
&lt;p&gt;Getting a fast local prediction is the easy half. The hard half is deciding when to trust it. Two quiet traps ruin naive accuracy checks in production:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;First, you cannot grade a student while they are still editing the exam.&lt;/strong&gt; If you measure accuracy on examples a model already trained on, or while its weights keep moving, its score looks better than reality. To prevent that leak, &lt;code&gt;conformal-gate&lt;/code&gt; runs two models side by side. One model (&lt;code&gt;serving_model&lt;/code&gt;) stays completely frozen while we grade it on brand-new teacher answers. Meanwhile, a second model (&lt;code&gt;trainer_model&lt;/code&gt;) keeps learning in the background. When a fresh candidate freezes, it only replaces a healthy serving model via &lt;strong&gt;scale-invariant paired promotion&lt;/strong&gt;: it has to beat the incumbent&#x27;s empirical acceptance on the exact same pre-update out-of-sample rows, regardless of confidence-scale shifts.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Second, checking your score after every input breaks ordinary statistics.&lt;/strong&gt; Imagine flipping a coin and checking after every single flip whether it looks biased, stopping the moment you hit a lucky streak. Textbook confidence intervals assume you chose your sample size in advance. When an online gate checks its accuracy on every request, continuous peeking lets unsafe thresholds slip through.&lt;/p&gt;
&lt;p&gt;To make continuous peeking mathematically honest, &lt;code&gt;conformal-gate&lt;/code&gt; uses a betting test (a one-sided mixture supermartingale governed by Ville&#x27;s inequality). Picture starting with $1 and betting against the skeptic&#x27;s claim: &quot;this gate&#x27;s true error rate is worse than my target α.&quot; Under a fair game, if the gate really is worse than α, no betting strategy can turn $1 into $40 more than 1 time in 40, no matter how often you check your balance.&lt;/p&gt;
&lt;p&gt;We run that betting test at 32 descending geometric confidence levels from &lt;code&gt;0.999&lt;/code&gt; down to &lt;code&gt;0.25&lt;/code&gt; per predicted class (extending below &lt;code&gt;0.50&lt;/code&gt; lets 50- to 150-class tasks certify confident predictions well above uniform &lt;code&gt;1/K&lt;/code&gt; without paying any multiple-testing penalty under fixed-sequence Learn-then-Test; Figure 5 zooms into the binary &lt;code&gt;0.995 → 0.50&lt;/code&gt; band). Every newer model generation &lt;code&gt;g&lt;/code&gt; gets a telescoping slice of a lifetime error budget (&lt;code&gt;δ / (g * (g + 1))&lt;/code&gt;, which sums to at most &lt;code&gt;δ&lt;/code&gt; even across infinite future generations). Cached per-class quantiles and thresholds keep hot-path &lt;code&gt;predict()&lt;/code&gt; strictly &lt;code&gt;O(1)&lt;/code&gt;. If local features cannot separate the classes, no level crosses the line and the gate stays quietly at 0% short-circuit rather than guessing.&lt;/p&gt;

&lt;figure id=&quot;exhibit-martingale&quot; class=&quot;diagram&quot; aria-label=&quot;Interactive anytime-valid mixture supermartingale explorer&quot;&gt;
  &lt;svg viewBox=&quot;0 0 640 238&quot; role=&quot;img&quot; aria-labelledby=&quot;dg3-title&quot;&gt;
    &lt;title id=&quot;dg3-title&quot;&gt;Interactive mixture supermartingale curve computed across the 16-level descending probability grid&lt;/title&gt;
    &lt;defs&gt;
      &lt;pattern id=&quot;bp-dots-3&quot; width=&quot;16&quot; height=&quot;16&quot; patternUnits=&quot;userSpaceOnUse&quot;&gt;
        &lt;circle class=&quot;dg-grid-dot&quot; cx=&quot;2&quot; cy=&quot;2&quot; r=&quot;0.8&quot;/&gt;
      &lt;/pattern&gt;
    &lt;/defs&gt;

    &lt;rect x=&quot;0&quot; y=&quot;22&quot; width=&quot;640&quot; height=&quot;210&quot; fill=&quot;url(#bp-dots-3)&quot; rx=&quot;4&quot;/&gt;
    &lt;text class=&quot;dg-title&quot; x=&quot;14&quot; y=&quot;14&quot;&gt;INTERACTIVE · BETTING EVIDENCE ACROSS CONFIDENCE THRESHOLDS (0.995 → 0.50)&lt;/text&gt;

    &lt;!-- Region labels cleanly above plot area --&gt;
    &lt;text class=&quot;dg-mono--ok&quot; x=&quot;190&quot; y=&quot;38&quot; text-anchor=&quot;middle&quot;&gt;CERTIFIED SHORT-CIRCUIT&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;488&quot; y=&quot;38&quot; text-anchor=&quot;middle&quot;&gt;STOP · ESCALATE TO TEACHER&lt;/text&gt;

    &lt;!-- Certified region wash &amp; area under curve --&gt;
    &lt;rect id=&quot;mart-cert-shade&quot; class=&quot;dg-area--ok&quot; x=&quot;56&quot; y=&quot;48&quot; width=&quot;278&quot; height=&quot;124&quot;/&gt;
    &lt;path id=&quot;mart-area&quot; class=&quot;dg-area--ok&quot; d=&quot;&quot;/&gt;

    &lt;!-- Axes --&gt;
    &lt;line class=&quot;dg-line--axis&quot; x1=&quot;56&quot; y1=&quot;172&quot; x2=&quot;616&quot; y2=&quot;172&quot;/&gt;
    &lt;line class=&quot;dg-line--axis&quot; x1=&quot;56&quot; y1=&quot;48&quot; x2=&quot;56&quot; y2=&quot;172&quot;/&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;10&quot; y=&quot;54&quot;&gt;ln M_n&lt;/text&gt;

    &lt;!-- Dynamic Ville threshold line --&gt;
    &lt;line id=&quot;mart-ville-line&quot; class=&quot;dg-line--err&quot; x1=&quot;56&quot; y1=&quot;104&quot; x2=&quot;616&quot; y2=&quot;104&quot;/&gt;
    &lt;text id=&quot;mart-ville-lbl&quot; class=&quot;dg-mono--err&quot; x=&quot;614&quot; y=&quot;98&quot; text-anchor=&quot;end&quot;&gt;Ville ln(1/δ_1) = 3.69&lt;/text&gt;

    &lt;!-- Stopping divider --&gt;
    &lt;line id=&quot;mart-stop-line&quot; class=&quot;dg-line--ink&quot; x1=&quot;334&quot; y1=&quot;48&quot; x2=&quot;334&quot; y2=&quot;184&quot;/&gt;
    &lt;text id=&quot;mart-stop-lbl&quot; class=&quot;dg-label--ok&quot; x=&quot;334&quot; y=&quot;210&quot; text-anchor=&quot;middle&quot;&gt;τ_c* = 0.95&lt;/text&gt;

    &lt;!-- Dynamic smooth martingale curve &amp; dots --&gt;
    &lt;path id=&quot;mart-curve&quot; class=&quot;dg-curve&quot; d=&quot;M 68 58 L 103.5 62 L 139 67 L 174.5 73 L 210 80 L 245.5 88 L 281 95 L 316.5 101 L 352 122 L 387.5 138 L 423 150 L 458.5 158 L 494 163 L 529.5 167 L 565 169 L 600.5 171&quot;/&gt;
    &lt;g id=&quot;mart-dots&quot;&gt;
      &lt;circle class=&quot;dg-dot&quot; cx=&quot;68&quot; cy=&quot;58&quot; r=&quot;3.2&quot;/&gt;
      &lt;circle class=&quot;dg-dot&quot; cx=&quot;103.5&quot; cy=&quot;62&quot; r=&quot;3.2&quot;/&gt;
      &lt;circle class=&quot;dg-dot&quot; cx=&quot;139&quot; cy=&quot;67&quot; r=&quot;3.2&quot;/&gt;
      &lt;circle class=&quot;dg-dot&quot; cx=&quot;174.5&quot; cy=&quot;73&quot; r=&quot;3.2&quot;/&gt;
      &lt;circle class=&quot;dg-dot&quot; cx=&quot;210&quot; cy=&quot;80&quot; r=&quot;3.2&quot;/&gt;
      &lt;circle class=&quot;dg-dot&quot; cx=&quot;245.5&quot; cy=&quot;88&quot; r=&quot;3.2&quot;/&gt;
      &lt;circle class=&quot;dg-dot&quot; cx=&quot;281&quot; cy=&quot;95&quot; r=&quot;3.2&quot;/&gt;
      &lt;circle class=&quot;dg-dot&quot; cx=&quot;316.5&quot; cy=&quot;101&quot; r=&quot;3.2&quot;/&gt;
      &lt;circle class=&quot;dg-dot--err&quot; cx=&quot;352&quot; cy=&quot;122&quot; r=&quot;3.8&quot;/&gt;
      &lt;circle class=&quot;dg-dot--hollow&quot; cx=&quot;387.5&quot; cy=&quot;138&quot; r=&quot;3.2&quot;/&gt;
      &lt;circle class=&quot;dg-dot--hollow&quot; cx=&quot;423&quot; cy=&quot;150&quot; r=&quot;3.2&quot;/&gt;
      &lt;circle class=&quot;dg-dot--hollow&quot; cx=&quot;458.5&quot; cy=&quot;158&quot; r=&quot;3.2&quot;/&gt;
      &lt;circle class=&quot;dg-dot--hollow&quot; cx=&quot;494&quot; cy=&quot;163&quot; r=&quot;3.2&quot;/&gt;
      &lt;circle class=&quot;dg-dot--hollow&quot; cx=&quot;529.5&quot; cy=&quot;167&quot; r=&quot;3.2&quot;/&gt;
      &lt;circle class=&quot;dg-dot--hollow&quot; cx=&quot;565&quot; cy=&quot;169&quot; r=&quot;3.2&quot;/&gt;
      &lt;circle class=&quot;dg-dot--hollow&quot; cx=&quot;600.5&quot; cy=&quot;171&quot; r=&quot;3.2&quot;/&gt;
    &lt;/g&gt;

    &lt;!-- X-axis ticks --&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;68&quot; y=&quot;190&quot; text-anchor=&quot;middle&quot;&gt;0.995&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;174.5&quot; y=&quot;190&quot; text-anchor=&quot;middle&quot;&gt;0.97&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;281&quot; y=&quot;190&quot; text-anchor=&quot;middle&quot;&gt;0.90&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;458.5&quot; y=&quot;190&quot; text-anchor=&quot;middle&quot;&gt;0.70&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;600.5&quot; y=&quot;190&quot; text-anchor=&quot;middle&quot;&gt;0.50&lt;/text&gt;
  &lt;/svg&gt;
  &lt;div class=&quot;exhibit-bar&quot;&gt;
    &lt;span class=&quot;exhibit-control&quot;&gt;
      &lt;label for=&quot;mart-n&quot;&gt;Samples n&lt;/label&gt;
      &lt;input id=&quot;mart-n&quot; type=&quot;range&quot; min=&quot;40&quot; max=&quot;1500&quot; step=&quot;10&quot; value=&quot;650&quot;&gt;
      &lt;output id=&quot;mart-n-out&quot;&gt;650&lt;/output&gt;
    &lt;/span&gt;
    &lt;span class=&quot;exhibit-control&quot;&gt;
      &lt;label for=&quot;mart-alpha&quot;&gt;α&lt;/label&gt;
      &lt;input id=&quot;mart-alpha&quot; type=&quot;range&quot; min=&quot;1&quot; max=&quot;10&quot; step=&quot;0.5&quot; value=&quot;5&quot;&gt;
      &lt;output id=&quot;mart-alpha-out&quot;&gt;5.0%&lt;/output&gt;
    &lt;/span&gt;
    &lt;span class=&quot;exhibit-control&quot;&gt;
      &lt;label for=&quot;mart-gen&quot;&gt;Gen&lt;/label&gt;
      &lt;input id=&quot;mart-gen&quot; type=&quot;range&quot; min=&quot;1&quot; max=&quot;5&quot; step=&quot;1&quot; value=&quot;1&quot;&gt;
      &lt;output id=&quot;mart-gen-out&quot;&gt;g=1&lt;/output&gt;
    &lt;/span&gt;
    &lt;span id=&quot;mart-readout&quot; class=&quot;exhibit-readout&quot;&gt;Certified τ_c* = 0.95 · ~54% short-circuit&lt;/span&gt;
  &lt;/div&gt;
  &lt;figcaption&gt;Figure 5. The exact betting test from src/conformal.rs running live in your browser. Slide Samples n down below 150 to see the gate refuse to certify and abstain honestly at 0%. Bump Gen g to watch later model generations face a slightly stricter red threshold.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2&gt;What actually broke in live production (and how 0% became 62.7%)&lt;/h2&gt;
&lt;p&gt;The math above looks clean on paper. The most useful part of building &lt;code&gt;conformal-gate&lt;/code&gt; was everything that broke once we deployed it across isolated per-tenant gates in live serverless production — tens of thousands of daily evaluations with real traffic skew, container restarts, and multi-generation promotion races.&lt;/p&gt;

&lt;h3&gt;1. Output-space coarsening + the prior-inverting class-weight bug&lt;/h3&gt;
&lt;p&gt;Our highest-volume classifier at Ando categorizes what each incoming message did to the conversation across eight pragmatic intents (chatter, informs, asks, decides, commits, changes, blocks, resolves). On our first replay, trying to gate all eight classes directly with hashed n-grams produced &lt;strong&gt;0.0% short-circuiting&lt;/strong&gt;. That honest abstention saved us from corrupting live traffic, yet it looked like linear text features had hit a hard ceiling.&lt;/p&gt;
&lt;p&gt;Then we stepped back and asked what the caller actually needed to skip a network hop. Most messages are either ignorable chatter (&lt;code&gt;skip&lt;/code&gt;) or plain updates (&lt;code&gt;informs&lt;/code&gt;); only the minority that mutate team state (&lt;code&gt;action&lt;/code&gt;) need the fine six-way breakdown. Collapsing the Stage 0 gate to three coarse routing buckets — certifying &lt;code&gt;skip&lt;/code&gt; and &lt;code&gt;informs&lt;/code&gt; locally at &lt;code&gt;α = 2%&lt;/code&gt; while &lt;strong&gt;always escalating &lt;code&gt;action&lt;/code&gt; to the teacher&lt;/strong&gt; — changed the learning problem from subtle pragmatics into a clean routing boundary.&lt;/p&gt;
&lt;p&gt;Even after that coarsening, something strange happened in live production: across active tenant snapshots, &lt;strong&gt;zero gates certified&lt;/strong&gt;. Tracing the live weights exposed a subtle calibration bug. Our online SGD trainer had been weighting updates by inverse class frequency — a textbook trick to boost macro-F1 on imbalanced benchmarks. In a real workspace where 75%+ of messages belong to one bucket, inverse weighting distorted predicted posteriors so badly that the model&#x27;s highest-confidence predictions were no longer the cleanest ones, starving LTT of any certifiable threshold. Switching to &lt;strong&gt;unweighted cross-entropy with exact global L2 decay&lt;/strong&gt; unblocked live certification immediately.&lt;/p&gt;

&lt;figure id=&quot;exhibit-coarsening&quot; class=&quot;diagram&quot; aria-label=&quot;Tufte comparison showing how 3-bucket output coarsening and removing inverse class weights lifted live production short-circuiting from 0% to 62.7%&quot;&gt;
  &lt;svg viewBox=&quot;0 0 640 264&quot; role=&quot;img&quot; aria-labelledby=&quot;dg5-title&quot;&gt;
    &lt;title id=&quot;dg5-title&quot;&gt;Before and after live production short-circuit rate and three-bucket routing funnel&lt;/title&gt;
    &lt;defs&gt;
      &lt;pattern id=&quot;bp-dots-5&quot; width=&quot;16&quot; height=&quot;16&quot; patternUnits=&quot;userSpaceOnUse&quot;&gt;
        &lt;circle class=&quot;dg-grid-dot&quot; cx=&quot;2&quot; cy=&quot;2&quot; r=&quot;0.8&quot;/&gt;
      &lt;/pattern&gt;
    &lt;/defs&gt;

    &lt;rect x=&quot;0&quot; y=&quot;22&quot; width=&quot;640&quot; height=&quot;236&quot; fill=&quot;url(#bp-dots-5)&quot; rx=&quot;4&quot;/&gt;
    &lt;text class=&quot;dg-title&quot; x=&quot;14&quot; y=&quot;14&quot;&gt;LIVE PRODUCTION · OUTPUT COARSENING &amp;amp; CALIBRATION FIX&lt;/text&gt;
    &lt;text class=&quot;dg-mono--ok&quot; x=&quot;626&quot; y=&quot;14&quot; text-anchor=&quot;end&quot;&gt;TARGET α = 2.0%&lt;/text&gt;

    &lt;!-- Vertical hairline divider --&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;316&quot; y1=&quot;30&quot; x2=&quot;316&quot; y2=&quot;248&quot;/&gt;

    &lt;!-- LEFT PANEL: Iteration ladder on shared 0-70% scale (x=14..284, 270px = 70%, 3.857px/%) --&gt;
    &lt;text class=&quot;dg-title&quot; x=&quot;14&quot; y=&quot;42&quot;&gt;ITERATION · WARM-TENANT SHORT-CIRCUIT&lt;/text&gt;

    &lt;!-- Row 1: 8-class direct --&gt;
    &lt;text class=&quot;dg-mono--ink&quot; x=&quot;14&quot; y=&quot;64&quot;&gt;1. 8-class pragmatic intent (direct)&lt;/text&gt;
    &lt;rect class=&quot;dg-bar--bg&quot; x=&quot;14&quot; y=&quot;70&quot; width=&quot;270&quot; height=&quot;10&quot; rx=&quot;2&quot;/&gt;
    &lt;rect id=&quot;crs-iter-0&quot; class=&quot;dg-bar--muted&quot; x=&quot;14&quot; y=&quot;70&quot; width=&quot;2&quot; height=&quot;10&quot; rx=&quot;2&quot;/&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;292&quot; y=&quot;79&quot; text-anchor=&quot;end&quot;&gt;0.0%&lt;/text&gt;
    &lt;text class=&quot;dg-sub&quot; x=&quot;14&quot; y=&quot;93&quot;&gt;honest abstention · too fine for n-grams&lt;/text&gt;

    &lt;!-- Row 2: 3-bucket + inverse class weights --&gt;
    &lt;text class=&quot;dg-mono--ink&quot; x=&quot;14&quot; y=&quot;114&quot;&gt;2. 3-bucket + inverse class weights&lt;/text&gt;
    &lt;rect class=&quot;dg-bar--bg&quot; x=&quot;14&quot; y=&quot;120&quot; width=&quot;270&quot; height=&quot;10&quot; rx=&quot;2&quot;/&gt;
    &lt;rect id=&quot;crs-iter-1&quot; class=&quot;dg-bar--fail&quot; x=&quot;14&quot; y=&quot;120&quot; width=&quot;2&quot; height=&quot;10&quot; rx=&quot;2&quot;/&gt;
    &lt;text class=&quot;dg-mono--err&quot; x=&quot;292&quot; y=&quot;129&quot; text-anchor=&quot;end&quot;&gt;0.0%&lt;/text&gt;
    &lt;text class=&quot;dg-sub&quot; x=&quot;14&quot; y=&quot;143&quot;&gt;prior inversion warped confidence · 0 certified&lt;/text&gt;

    &lt;!-- Row 3: 3-bucket + unweighted CE + global L2 --&gt;
    &lt;text class=&quot;dg-mono--ok&quot; x=&quot;14&quot; y=&quot;164&quot;&gt;3. 3-bucket + unweighted CE + global L2&lt;/text&gt;
    &lt;rect class=&quot;dg-bar--bg&quot; x=&quot;14&quot; y=&quot;170&quot; width=&quot;270&quot; height=&quot;10&quot; rx=&quot;2&quot;/&gt;
    &lt;rect id=&quot;crs-iter-2&quot; class=&quot;dg-bar&quot; x=&quot;14&quot; y=&quot;170&quot; width=&quot;241.8&quot; height=&quot;10&quot; rx=&quot;2&quot;/&gt;
    &lt;text class=&quot;dg-mono--ok&quot; x=&quot;292&quot; y=&quot;179&quot; text-anchor=&quot;end&quot;&gt;62.7%&lt;/text&gt;
    &lt;text class=&quot;dg-sub&quot; x=&quot;14&quot; y=&quot;193&quot;&gt;live shadow · 0.14 ms p50 in V8&lt;/text&gt;

    &lt;!-- Bottom-left error gauge (0% to 2.5%, 270px, 108px per 1%, 2.0% ceiling at x=230) --&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;14&quot; y1=&quot;206&quot; x2=&quot;296&quot; y2=&quot;206&quot;/&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;14&quot; y=&quot;220&quot;&gt;24h live error on SC (thousands of calls)&lt;/text&gt;
    &lt;rect class=&quot;dg-bar--bg&quot; x=&quot;14&quot; y=&quot;226&quot; width=&quot;270&quot; height=&quot;9&quot; rx=&quot;2&quot;/&gt;
    &lt;rect id=&quot;crs-err-bar&quot; class=&quot;dg-bar&quot; x=&quot;14&quot; y=&quot;226&quot; width=&quot;24.6&quot; height=&quot;9&quot; rx=&quot;2&quot;/&gt;
    &lt;line class=&quot;dg-line--err&quot; x1=&quot;230&quot; y1=&quot;221&quot; x2=&quot;230&quot; y2=&quot;241&quot;/&gt;
    &lt;text class=&quot;dg-mono--ok&quot; x=&quot;45&quot; y=&quot;234&quot;&gt;0.23%&lt;/text&gt;
    &lt;text class=&quot;dg-mono--err&quot; x=&quot;234&quot; y=&quot;234&quot;&gt;α 2.0%&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;14&quot; y=&quot;249&quot;&gt;9× tighter than target error budget&lt;/text&gt;

    &lt;!-- RIGHT PANEL: Live traffic split (interactive by iteration) --&gt;
    &lt;text class=&quot;dg-title&quot; x=&quot;332&quot; y=&quot;42&quot;&gt;TRAFFIC ROUTING · 100% OF MESSAGES&lt;/text&gt;

    &lt;!-- Strip 1: Local short-circuit --&gt;
    &lt;text id=&quot;crs-lbl-local&quot; class=&quot;dg-mono--ok&quot; x=&quot;332&quot; y=&quot;66&quot;&gt;Local V8: skip + informs (0.14 ms)&lt;/text&gt;
    &lt;rect class=&quot;dg-bar--bg&quot; x=&quot;332&quot; y=&quot;72&quot; width=&quot;236&quot; height=&quot;12&quot; rx=&quot;2&quot;/&gt;
    &lt;rect id=&quot;crs-bar-local&quot; class=&quot;dg-bar&quot; x=&quot;332&quot; y=&quot;72&quot; width=&quot;148.0&quot; height=&quot;12&quot; rx=&quot;2&quot;/&gt;
    &lt;text id=&quot;crs-val-local&quot; class=&quot;dg-mono--ok&quot; x=&quot;626&quot; y=&quot;82&quot; text-anchor=&quot;end&quot;&gt;62.7%&lt;/text&gt;

    &lt;!-- Strip 2: Always-escalated state actions --&gt;
    &lt;text id=&quot;crs-lbl-action&quot; class=&quot;dg-mono--ink&quot; x=&quot;332&quot; y=&quot;114&quot;&gt;Teacher: action → 6 fine labels&lt;/text&gt;
    &lt;rect class=&quot;dg-bar--bg&quot; x=&quot;332&quot; y=&quot;120&quot; width=&quot;236&quot; height=&quot;12&quot; rx=&quot;2&quot;/&gt;
    &lt;rect id=&quot;crs-bar-action&quot; class=&quot;dg-bar--muted&quot; x=&quot;332&quot; y=&quot;120&quot; width=&quot;52.0&quot; height=&quot;12&quot; rx=&quot;2&quot;/&gt;
    &lt;text id=&quot;crs-val-action&quot; class=&quot;dg-mono--ink&quot; x=&quot;626&quot; y=&quot;130&quot; text-anchor=&quot;end&quot;&gt;22.0%&lt;/text&gt;

    &lt;!-- Strip 3: Uncertain + 5% uniform audit --&gt;
    &lt;text id=&quot;crs-lbl-uncert&quot; class=&quot;dg-mono--audit&quot; x=&quot;332&quot; y=&quot;162&quot;&gt;Teacher: uncertain + 5% audit&lt;/text&gt;
    &lt;rect class=&quot;dg-bar--bg&quot; x=&quot;332&quot; y=&quot;168&quot; width=&quot;236&quot; height=&quot;12&quot; rx=&quot;2&quot;/&gt;
    &lt;rect id=&quot;crs-bar-uncert&quot; class=&quot;dg-bar--muted&quot; x=&quot;332&quot; y=&quot;168&quot; width=&quot;36.0&quot; height=&quot;12&quot; rx=&quot;2&quot;/&gt;
    &lt;text id=&quot;crs-val-uncert&quot; class=&quot;dg-mono--audit&quot; x=&quot;626&quot; y=&quot;178&quot; text-anchor=&quot;end&quot;&gt;15.3%&lt;/text&gt;

    &lt;!-- Summary placard --&gt;
    &lt;rect id=&quot;crs-box&quot; class=&quot;dg-box--ok&quot; x=&quot;332&quot; y=&quot;200&quot; width=&quot;294&quot; height=&quot;48&quot; rx=&quot;4&quot;/&gt;
    &lt;text id=&quot;crs-box-title&quot; class=&quot;dg-label--ok&quot; x=&quot;344&quot; y=&quot;220&quot;&gt;62.7% skipped · 0.23% disagreement&lt;/text&gt;
    &lt;text id=&quot;crs-box-sub&quot; class=&quot;dg-sub&quot; x=&quot;344&quot; y=&quot;237&quot;&gt;skip &amp;amp; informs local; action escalated&lt;/text&gt;
  &lt;/svg&gt;
  &lt;div class=&quot;exhibit-bar&quot;&gt;
    &lt;button type=&quot;button&quot; class=&quot;exhibit-btn&quot; data-crs=&quot;coarsened&quot; aria-pressed=&quot;true&quot;&gt;3-bucket + L2 (live)&lt;/button&gt;
    &lt;button type=&quot;button&quot; class=&quot;exhibit-btn&quot; data-crs=&quot;weights&quot; aria-pressed=&quot;false&quot;&gt;Inverse class weights&lt;/button&gt;
    &lt;button type=&quot;button&quot; class=&quot;exhibit-btn&quot; data-crs=&quot;eight&quot; aria-pressed=&quot;false&quot;&gt;8-class direct&lt;/button&gt;
    &lt;span id=&quot;crs-readout&quot; class=&quot;exhibit-readout&quot;&gt;Warm tenant (shadow): 62.7% SC at 0.23% error (24h window)&lt;/span&gt;
  &lt;/div&gt;
  &lt;figcaption&gt;Figure 6. Left: live production short-circuit progression across three iterations at α = 2.0%, plus empirical 24-hour disagreement (0.23% across thousands of short-circuited calls). Right: toggle between iterations to see how output coarsening peels off skip and informs locally while escalating 100% of state-changing actions to the teacher.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h3&gt;2. &quot;Zombie candidates&quot; and exact mathematical futility retirement&lt;/h3&gt;
&lt;p&gt;Once live certification started working, a second failure appeared in the tenant census: several of our highest-volume production gates were stuck at &lt;code&gt;0%&lt;/code&gt; short-circuiting despite thousands of teacher calls. Their background challengers had already frozen and entered the calibration slot — and then sat there indefinitely without promoting or retiring.&lt;/p&gt;
&lt;p&gt;The cause was pure martingale arithmetic. At a strict &lt;code&gt;α = 2%&lt;/code&gt; error budget, Ville&#x27;s supermartingale punishes early errors hard. If a freshly frozen challenger suffers three or four unlucky misses in its first 100 calibration calls, its log-wealth plunges so far that &lt;em&gt;even if every single remaining call in its budget agreed with the teacher&lt;/em&gt;, it could never cross the &lt;code&gt;ln(1/δ)&lt;/code&gt; certification line. Because the gate only rotated candidates when the budget ran out (or never retired an uncertified candidate early), a mathematically dead challenger occupied the slot as a &quot;zombie,&quot; blocking a much better background trainer from ever getting tested.&lt;/p&gt;
&lt;p&gt;The fix requires zero heuristics and preserves exact statistical validity: after each calibration observation &lt;code&gt;t&lt;/code&gt; with &lt;code&gt;e&lt;/code&gt; misses and remaining budget &lt;code&gt;B − t&lt;/code&gt;, evaluate the exact best-case future log-wealth &lt;code&gt;ln M(e, B, α)&lt;/code&gt; assuming zero future errors. The instant &lt;code&gt;ln M(e, B, α) &amp;lt; ln(1/δ)&lt;/code&gt;, the challenger is mathematically incapable of certifying — retire it immediately and promote a fresh candidate from the background trainer.&lt;/p&gt;

&lt;figure id=&quot;exhibit-futility&quot; class=&quot;diagram&quot; aria-label=&quot;Interactive supermartingale futility and zombie-candidate retirement diagram&quot;&gt;
  &lt;svg viewBox=&quot;0 0 640 256&quot; role=&quot;img&quot; aria-labelledby=&quot;dg6-title&quot;&gt;
    &lt;title id=&quot;dg6-title&quot;&gt;Observed supermartingale wealth versus best-case future ceiling showing exact mathematical futility retirement&lt;/title&gt;
    &lt;defs&gt;
      &lt;pattern id=&quot;bp-dots-6&quot; width=&quot;16&quot; height=&quot;16&quot; patternUnits=&quot;userSpaceOnUse&quot;&gt;
        &lt;circle class=&quot;dg-grid-dot&quot; cx=&quot;2&quot; cy=&quot;2&quot; r=&quot;0.8&quot;/&gt;
      &lt;/pattern&gt;
    &lt;/defs&gt;

    &lt;rect x=&quot;0&quot; y=&quot;22&quot; width=&quot;640&quot; height=&quot;228&quot; fill=&quot;url(#bp-dots-6)&quot; rx=&quot;4&quot;/&gt;
    &lt;text class=&quot;dg-title&quot; x=&quot;14&quot; y=&quot;14&quot;&gt;INTERACTIVE · EXACT SUPERMARTINGALE FUTILITY &amp;amp; ZOMBIE RETIREMENT&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;626&quot; y=&quot;14&quot; text-anchor=&quot;end&quot;&gt;α = 2.0% · BUDGET B = 600&lt;/text&gt;

    &lt;!-- Legend cleanly above plot area --&gt;
    &lt;line class=&quot;dg-curve--ok&quot; x1=&quot;56&quot; y1=&quot;36&quot; x2=&quot;74&quot; y2=&quot;36&quot;/&gt;
    &lt;text class=&quot;dg-mono--ink&quot; x=&quot;80&quot; y=&quot;39&quot;&gt;observed ln M_t&lt;/text&gt;
    &lt;line class=&quot;dg-line--audit&quot; x1=&quot;188&quot; y1=&quot;36&quot; x2=&quot;206&quot; y2=&quot;36&quot;/&gt;
    &lt;text class=&quot;dg-mono--audit&quot; x=&quot;212&quot; y=&quot;39&quot;&gt;best-case ceiling ln M(e_t, B)&lt;/text&gt;
    &lt;line class=&quot;dg-line--err&quot; x1=&quot;408&quot; y1=&quot;36&quot; x2=&quot;426&quot; y2=&quot;36&quot;/&gt;
    &lt;text class=&quot;dg-mono--err&quot; x=&quot;432&quot; y=&quot;39&quot;&gt;Ville threshold 4.09&lt;/text&gt;

    &lt;!-- Wasted budget wash (visible when doomed) --&gt;
    &lt;rect id=&quot;fut-waste-shade&quot; class=&quot;dg-area--err&quot; x=&quot;200&quot; y=&quot;48&quot; width=&quot;414&quot; height=&quot;150&quot;/&gt;

    &lt;!-- Plot axes: x=56..614 (558px = 600 samples), y=48..198 (ln M from -2.5 to +8.5) --&gt;
    &lt;line class=&quot;dg-line--axis&quot; x1=&quot;56&quot; y1=&quot;198&quot; x2=&quot;614&quot; y2=&quot;198&quot;/&gt;
    &lt;line class=&quot;dg-line--axis&quot; x1=&quot;56&quot; y1=&quot;48&quot; x2=&quot;56&quot; y2=&quot;198&quot;/&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;12&quot; y=&quot;54&quot;&gt;ln M&lt;/text&gt;

    &lt;!-- Zero wealth baseline (ln M = 0 -&gt; y = 163.9) --&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;56&quot; y1=&quot;163.9&quot; x2=&quot;614&quot; y2=&quot;163.9&quot;/&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;48&quot; y=&quot;167&quot; text-anchor=&quot;end&quot;&gt;0&lt;/text&gt;

    &lt;!-- Ville line (ln M = 4.09 -&gt; y = 108.1) --&gt;
    &lt;line id=&quot;fut-ville-line&quot; class=&quot;dg-line--err&quot; x1=&quot;56&quot; y1=&quot;108.1&quot; x2=&quot;614&quot; y2=&quot;108.1&quot;/&gt;
    &lt;text class=&quot;dg-mono--err&quot; x=&quot;48&quot; y=&quot;111&quot; text-anchor=&quot;end&quot;&gt;4.1&lt;/text&gt;

    &lt;!-- Best-case future ceiling curve + observed wealth curve --&gt;
    &lt;path id=&quot;fut-ceiling-curve&quot; class=&quot;dg-line--audit&quot; d=&quot;&quot;/&gt;
    &lt;path id=&quot;fut-wealth-curve&quot; class=&quot;dg-curve&quot; d=&quot;&quot;/&gt;

    &lt;!-- Retirement / certification vertical hairline + dot + label --&gt;
    &lt;line id=&quot;fut-mark-line&quot; class=&quot;dg-line--ink&quot; x1=&quot;200&quot; y1=&quot;48&quot; x2=&quot;200&quot; y2=&quot;204&quot;/&gt;
    &lt;circle id=&quot;fut-mark-dot&quot; class=&quot;dg-dot--err&quot; cx=&quot;200&quot; cy=&quot;118&quot; r=&quot;4&quot;/&gt;
    &lt;text id=&quot;fut-mark-lbl&quot; class=&quot;dg-label--err&quot; x=&quot;208&quot; y=&quot;64&quot;&gt;Doomed at t = 110 · retire early&lt;/text&gt;
    &lt;text id=&quot;fut-mark-sub&quot; class=&quot;dg-mono--err&quot; x=&quot;208&quot; y=&quot;78&quot;&gt;saves 490 wasted calibration calls&lt;/text&gt;

    &lt;!-- X-axis ticks --&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;56&quot; y=&quot;216&quot; text-anchor=&quot;middle&quot;&gt;0&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;195.5&quot; y=&quot;216&quot; text-anchor=&quot;middle&quot;&gt;150&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;335&quot; y=&quot;216&quot; text-anchor=&quot;middle&quot;&gt;300&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;474.5&quot; y=&quot;216&quot; text-anchor=&quot;middle&quot;&gt;450&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;614&quot; y=&quot;216&quot; text-anchor=&quot;middle&quot;&gt;600&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;335&quot; y=&quot;234&quot; text-anchor=&quot;middle&quot;&gt;calibration samples t&lt;/text&gt;
  &lt;/svg&gt;
  &lt;div class=&quot;exhibit-bar&quot;&gt;
    &lt;span class=&quot;exhibit-control&quot;&gt;
      &lt;label for=&quot;fut-misses&quot;&gt;Early misses e&lt;/label&gt;
      &lt;input id=&quot;fut-misses&quot; type=&quot;range&quot; min=&quot;0&quot; max=&quot;7&quot; step=&quot;1&quot; value=&quot;4&quot;&gt;
      &lt;output id=&quot;fut-misses-out&quot;&gt;4&lt;/output&gt;
    &lt;/span&gt;
    &lt;button type=&quot;button&quot; class=&quot;exhibit-btn&quot; data-fut=&quot;1&quot;&gt;Healthy (1)&lt;/button&gt;
    &lt;button type=&quot;button&quot; class=&quot;exhibit-btn&quot; data-fut=&quot;4&quot;&gt;Zombie (4)&lt;/button&gt;
    &lt;button type=&quot;button&quot; class=&quot;exhibit-btn&quot; data-fut=&quot;6&quot;&gt;Noisy (6)&lt;/button&gt;
    &lt;span id=&quot;fut-readout&quot; class=&quot;exhibit-readout is-err&quot;&gt;Doomed on miss #3 · retire early, save 490 calls&lt;/span&gt;
  &lt;/div&gt;
  &lt;figcaption&gt;Figure 7. Exact Ville supermartingale futility bound at α = 2.0% and budget B = 600. The solid curve is observed log-wealth; the amber dashed curve is the highest wealth still mathematically achievable if every remaining sample agrees. Drag Early misses from 2 to 3 to watch the ceiling cross below 4.09 and trigger zero-false-positive retirement.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h3&gt;3. Minority-class starvation and three drift bugs&lt;/h3&gt;
&lt;p&gt;Before shipping live, our deterministic replay and stress suites caught four more subtle statistical bugs:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;20× minority-class calibration speedup.&lt;/strong&gt; Once a majority class certified and entered active mode, we restricted all calibration updates to the 5% uniform audit slice to avoid selection bias. That quietly threw away 95% of teacher labels for &lt;em&gt;uncertified&lt;/em&gt; minority classes that were still going 100% to the teacher. Updating an uncertified class&#x27;s threshold grid directly from its teacher calls (while keeping global drift detection strictly on unbiased 5% audits) stays valid and jumped post-warmup short-circuiting by +18.6 to +22.7 percentage points at &lt;strong&gt;0.00% error&lt;/strong&gt; across our stress suites (&lt;code&gt;separable&lt;/code&gt; 51.6% → &lt;strong&gt;74.3%&lt;/strong&gt;, &lt;code&gt;diurnal_burst&lt;/code&gt; 48.3% → &lt;strong&gt;66.9%&lt;/strong&gt;, &lt;code&gt;rare_class_starvation&lt;/code&gt; 47.0% → &lt;strong&gt;67.9%&lt;/strong&gt;).&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Unscaled ACI collapse.&lt;/strong&gt; Adaptive Conformal Inference (ACI) tightens the allowed ceiling when a 5% spot-check misses and relaxes it when spot-checks agree. With a raw step size (&lt;code&gt;aci_gamma = 0.05&lt;/code&gt;), a single &lt;em&gt;expected&lt;/em&gt; error at a 5% target slammed the effective ceiling down 10× to its floor, throttling participation short-circuiting from &lt;strong&gt;27.4% down to 2.9%&lt;/strong&gt;. Scaling the step relative to &lt;code&gt;target_alpha&lt;/code&gt; recovered 9.4× coverage at 1.79% error.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;A drift alarm that degraded too softly.&lt;/strong&gt; Our first detector (Page-Hinkley, which merely halved &lt;code&gt;α&lt;/code&gt; on drift) was blind to the target budget and kept short-circuiting 85% of traffic even while drifted. Replacing it with an &lt;strong&gt;e-CUSUM&lt;/strong&gt; likelihood detector tuned directly to &lt;code&gt;α&lt;/code&gt; makes the gate &lt;strong&gt;fail closed immediately&lt;/strong&gt; (100% teacher) the moment spot-checks look worse than budget.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Post-drift weight inertia.&lt;/strong&gt; Even after failing closed, the background trainer still held pre-drift weights and replay rows, fighting the new distribution. Calling &lt;code&gt;reset_for_drift()&lt;/code&gt; when e-CUSUM trips lifted &lt;code&gt;concept_shift&lt;/code&gt; (100% abrupt label inversion) short-circuiting by &lt;strong&gt;+32.9 percentage points&lt;/strong&gt; (29.7% → 62.6%) and recovered with &lt;strong&gt;0/510 post-recovery errors&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;4. Live serverless production: persistence and split V8/Node invariants&lt;/h3&gt;
&lt;p&gt;On day one of live production, our containers ran cleanly with zero errors — yet &lt;strong&gt;100% of calls stayed permanently in &lt;code&gt;cold_start&lt;/code&gt;&lt;/strong&gt; because ephemeral serverless workers recycled before any single process saw 60 consecutive calls for one tenant. Sharing snapshots across containers and splitting fast V8 serving from async Node training surfaced five real systems requirements:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Stripped snapshots and bounded blob storage.&lt;/strong&gt; Raw full snapshots (1.68 MB JSON) exceeded database document limits. Stripping frozen model replay buffers cut snapshot size ~10×, gzipping shrank trainer state to ~122 KB (zero raw text, only hashed weights and quantiles) in blob storage behind a tiny metadata row, and &lt;code&gt;exportServingSnapshot()&lt;/code&gt; stripped serving state down to &lt;strong&gt;6.3 KB gzipped&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Fail-open hydration and async persistence.&lt;/strong&gt; Cold hydration is strictly time-bounded and fails open to the teacher; snapshot uploads drain asynchronously after the response returns so persistence adds &lt;strong&gt;0 ms&lt;/strong&gt; to user-facing latency.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Compare-and-swap eviction for corrupt blobs.&lt;/strong&gt; Monotonic write guards (only higher &lt;code&gt;teacher_calls&lt;/code&gt; overwrite lower ones) can trap a corrupt blob forever; a CAS eviction guard clears broken blobs without clobbering healthy in-memory gates.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Generation fencing on split-process escalations.&lt;/strong&gt; When a lightweight V8 isolate evaluates a frozen &lt;code&gt;ServingSnapshot&lt;/code&gt; and forwards escalations to a separate Node trainer, every non-audit escalation must carry the &lt;code&gt;servingGeneration&lt;/code&gt; that evaluated it. If Node has already promoted to generation &lt;code&gt;g+1&lt;/code&gt;, it must drop generation &lt;code&gt;g&lt;/code&gt;&#x27;s non-audit escalations — otherwise an incomplete sample filtered by an older model can bias calibration for the newer model.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Per-batch drift revocation.&lt;/strong&gt; Long background sweeps cannot cache a serving snapshot for the entire job. Refreshing snapshot metadata per batch guarantees that an e-CUSUM drift trip halts short-circuiting immediately rather than waiting for the sweep to finish.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Lineage fencing, OOD safety nets, and untrusted edge callbacks.&lt;/strong&gt; Three practical guardrails came from studying peer systems and auditing the edge-to-server trust boundary: &lt;code&gt;teacher_version&lt;/code&gt; fencing resets calibration fail-closed whenever a prompt or teacher model changes; &lt;code&gt;confidence_floor&lt;/code&gt; refuses to count low-confidence teacher guesses as ground truth; a training-only k-NN cosine OOD guard (&lt;code&gt;EmbeddingOodGuard&lt;/code&gt;) catches off-manifold dense embeddings before linear softmax overconfidence can short-circuit; and the central trainer re-scores immutable &lt;code&gt;serving_model&lt;/code&gt; on current-generation escalations so an untrusted edge client can never forge calibration scores or sabotage e-CUSUM drift detection.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;piece-table-wrap&quot;&gt;
  &lt;table&gt;
    &lt;thead&gt;
      &lt;tr&gt;
        &lt;th&gt;Live production &amp;amp; trace summary&lt;/th&gt;
        &lt;th&gt;Scope&lt;/th&gt;
        &lt;th class=&quot;num&quot;&gt;Short-circuit&lt;/th&gt;
        &lt;th class=&quot;num&quot;&gt;Error on SC&lt;/th&gt;
        &lt;th class=&quot;num&quot;&gt;Local p50&lt;/th&gt;
        &lt;th&gt;Status&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;Message-act routing&lt;/strong&gt; (3-bucket, warm tenant)&lt;/td&gt;
        &lt;td&gt;Prod shadow · α 2%&lt;/td&gt;
        &lt;td class=&quot;num&quot;&gt;&lt;strong&gt;62.7%&lt;/strong&gt;&lt;/td&gt;
        &lt;td class=&quot;num&quot;&gt;&lt;strong&gt;0.23%&lt;/strong&gt;&lt;/td&gt;
        &lt;td class=&quot;num&quot;&gt;0.14 ms&lt;/td&gt;
        &lt;td&gt;&lt;span class=&quot;badge badge--ok&quot;&gt;Certified&lt;/span&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;Message-act routing&lt;/strong&gt; (fleet-wide incl. cold tenants)&lt;/td&gt;
        &lt;td&gt;Prod shadow · 24h&lt;/td&gt;
        &lt;td class=&quot;num&quot;&gt;~9%&lt;/td&gt;
        &lt;td class=&quot;num&quot;&gt;&lt;strong&gt;0.23%&lt;/strong&gt;&lt;/td&gt;
        &lt;td class=&quot;num&quot;&gt;0.14 ms&lt;/td&gt;
        &lt;td&gt;&lt;span class=&quot;badge badge--ok&quot;&gt;0 errors · 0 drift&lt;/span&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;Task complexity&lt;/strong&gt; (easy / med / hard)&lt;/td&gt;
        &lt;td&gt;Prod shadow · α 2%&lt;/td&gt;
        &lt;td class=&quot;num&quot;&gt;promoted&lt;/td&gt;
        &lt;td class=&quot;num&quot;&gt;0.00%&lt;/td&gt;
        &lt;td class=&quot;num&quot;&gt;0.34 ms&lt;/td&gt;
        &lt;td&gt;&lt;span class=&quot;badge badge--ok&quot;&gt;Certified&lt;/span&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;Agent participation&lt;/strong&gt; (3-class replay, n=2,659)&lt;/td&gt;
        &lt;td&gt;Active replay · α 5%&lt;/td&gt;
        &lt;td class=&quot;num&quot;&gt;39.4% (967)&lt;/td&gt;
        &lt;td class=&quot;num&quot;&gt;2.69% (26/967)&lt;/td&gt;
        &lt;td class=&quot;num&quot;&gt;9.1 µs&lt;/td&gt;
        &lt;td&gt;&lt;span class=&quot;badge badge--ok&quot;&gt;Certified&lt;/span&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;8-class pragmatic intent&lt;/strong&gt; (uncoarsened, n=1,175)&lt;/td&gt;
        &lt;td&gt;Active replay · α 5%&lt;/td&gt;
        &lt;td class=&quot;num&quot;&gt;0.0% (0)&lt;/td&gt;
        &lt;td class=&quot;num&quot;&gt;0.00% (0/0)&lt;/td&gt;
        &lt;td class=&quot;num&quot;&gt;13.3 µs&lt;/td&gt;
        &lt;td&gt;&lt;span class=&quot;badge badge--ok&quot;&gt;Abstained&lt;/span&gt;&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;Notice the split between a warm tenant and the full fleet: &lt;strong&gt;62.7%&lt;/strong&gt; short-circuiting on a warm workspace, versus roughly &lt;strong&gt;9%&lt;/strong&gt; across the full fleet including newly created or quiet workspaces that have not crossed warmup yet — measured in live shadow mode right before flipping active V8 serving on. Across tens of thousands of evaluations in that 24-hour window, the runtime recorded &lt;strong&gt;zero errors&lt;/strong&gt;, &lt;strong&gt;zero drift trips&lt;/strong&gt;, and &lt;strong&gt;0.14–0.34 ms p50&lt;/strong&gt; local inference — roughly 1,800× faster than a 254 ms hosted decision call.&lt;/p&gt;

&lt;figure id=&quot;exhibit-latency&quot; class=&quot;diagram&quot; aria-label=&quot;Interactive latency comparison across five orders of magnitude&quot;&gt;
  &lt;svg viewBox=&quot;0 0 640 248&quot; role=&quot;img&quot; aria-labelledby=&quot;dg4-title&quot;&gt;
    &lt;title id=&quot;dg4-title&quot;&gt;Logarithmic latency scale and real-time latency race between conformal-gate, Typesafe Jev, and a fast chat LLM&lt;/title&gt;

    &lt;text class=&quot;dg-title&quot; x=&quot;14&quot; y=&quot;14&quot;&gt;DECISION LATENCY (LOG SCALE · 10 µs TO 10 s)&lt;/text&gt;

    &lt;!-- Alternating decade bands: 54px per decade from x=196 (10us) to x=520 (10s) --&gt;
    &lt;rect class=&quot;dg-band&quot; x=&quot;196&quot; y=&quot;26&quot; width=&quot;54&quot; height=&quot;128&quot;/&gt;
    &lt;rect class=&quot;dg-band&quot; x=&quot;304&quot; y=&quot;26&quot; width=&quot;54&quot; height=&quot;128&quot;/&gt;
    &lt;rect class=&quot;dg-band&quot; x=&quot;412&quot; y=&quot;26&quot; width=&quot;54&quot; height=&quot;128&quot;/&gt;

    &lt;line class=&quot;dg-line&quot; x1=&quot;196&quot; y1=&quot;26&quot; x2=&quot;196&quot; y2=&quot;154&quot;/&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;250&quot; y1=&quot;26&quot; x2=&quot;250&quot; y2=&quot;154&quot;/&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;304&quot; y1=&quot;26&quot; x2=&quot;304&quot; y2=&quot;154&quot;/&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;358&quot; y1=&quot;26&quot; x2=&quot;358&quot; y2=&quot;154&quot;/&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;412&quot; y1=&quot;26&quot; x2=&quot;412&quot; y2=&quot;154&quot;/&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;466&quot; y1=&quot;26&quot; x2=&quot;466&quot; y2=&quot;154&quot;/&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;520&quot; y1=&quot;26&quot; x2=&quot;520&quot; y2=&quot;154&quot;/&gt;

    &lt;text class=&quot;dg-mono&quot; x=&quot;196&quot; y=&quot;168&quot; text-anchor=&quot;middle&quot;&gt;10 µs&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;250&quot; y=&quot;168&quot; text-anchor=&quot;middle&quot;&gt;100 µs&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;304&quot; y=&quot;168&quot; text-anchor=&quot;middle&quot;&gt;1 ms&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;358&quot; y=&quot;168&quot; text-anchor=&quot;middle&quot;&gt;10 ms&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;412&quot; y=&quot;168&quot; text-anchor=&quot;middle&quot;&gt;100 ms&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;466&quot; y=&quot;168&quot; text-anchor=&quot;middle&quot;&gt;1 s&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;520&quot; y=&quot;168&quot; text-anchor=&quot;middle&quot;&gt;10 s&lt;/text&gt;

    &lt;!-- Bars --&gt;
    &lt;text class=&quot;dg-label&quot; x=&quot;14&quot; y=&quot;45&quot;&gt;Fast chat LLM (0 thinking)&lt;/text&gt;
    &lt;rect class=&quot;dg-bar--muted&quot; x=&quot;196&quot; y=&quot;34&quot; width=&quot;266&quot; height=&quot;14&quot; rx=&quot;3&quot;/&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;626&quot; y=&quot;45&quot; text-anchor=&quot;end&quot;&gt;849 ms (live bench)&lt;/text&gt;

    &lt;text class=&quot;dg-label&quot; x=&quot;14&quot; y=&quot;71&quot;&gt;Typesafe Jev (prod p50)&lt;/text&gt;
    &lt;rect class=&quot;dg-bar--muted&quot; x=&quot;196&quot; y=&quot;60&quot; width=&quot;238&quot; height=&quot;14&quot; rx=&quot;3&quot;/&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;626&quot; y=&quot;71&quot; text-anchor=&quot;end&quot;&gt;254 ms (560 ms part.)&lt;/text&gt;

    &lt;text class=&quot;dg-label&quot; x=&quot;14&quot; y=&quot;97&quot;&gt;Gemini Decisions API&lt;/text&gt;
    &lt;rect class=&quot;dg-bar--muted&quot; x=&quot;196&quot; y=&quot;86&quot; width=&quot;232&quot; height=&quot;14&quot; rx=&quot;3&quot;/&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;626&quot; y=&quot;97&quot; text-anchor=&quot;end&quot;&gt;150–250 ms&lt;/text&gt;

    &lt;text class=&quot;dg-label--ok&quot; x=&quot;14&quot; y=&quot;123&quot;&gt;conformal-gate (V8 prod)&lt;/text&gt;
    &lt;rect class=&quot;dg-bar&quot; x=&quot;196&quot; y=&quot;112&quot; width=&quot;62&quot; height=&quot;14&quot; rx=&quot;3&quot;/&gt;
    &lt;text class=&quot;dg-mono--ok&quot; x=&quot;626&quot; y=&quot;123&quot; text-anchor=&quot;end&quot;&gt;0.14 ms (1,800× vs Jev)&lt;/text&gt;

    &lt;text class=&quot;dg-label--ok&quot; x=&quot;14&quot; y=&quot;147&quot;&gt;conformal-gate (Rust p50)&lt;/text&gt;
    &lt;rect class=&quot;dg-bar&quot; x=&quot;196&quot; y=&quot;136&quot; width=&quot;12&quot; height=&quot;14&quot; rx=&quot;3&quot;/&gt;
    &lt;text class=&quot;dg-mono--ok&quot; x=&quot;626&quot; y=&quot;147&quot; text-anchor=&quot;end&quot;&gt;9.1 µs (~60,000×)&lt;/text&gt;

    &lt;!-- Real-time wall-clock race strip --&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;14&quot; y1=&quot;184&quot; x2=&quot;626&quot; y2=&quot;184&quot;/&gt;
    &lt;text class=&quot;dg-title&quot; x=&quot;14&quot; y=&quot;200&quot;&gt;WALL-CLOCK RACE (REAL TIME)&lt;/text&gt;

    &lt;text class=&quot;dg-mono--ok&quot; x=&quot;14&quot; y=&quot;218&quot;&gt;conformal-gate (0.01–0.14 ms)&lt;/text&gt;
    &lt;rect class=&quot;latency-track&quot; x=&quot;196&quot; y=&quot;210&quot; width=&quot;324&quot; height=&quot;7&quot; rx=&quot;3.5&quot;/&gt;
    &lt;rect id=&quot;race-fill-local&quot; class=&quot;latency-fill--ok&quot; x=&quot;196&quot; y=&quot;210&quot; width=&quot;324&quot; height=&quot;7&quot; rx=&quot;3.5&quot;/&gt;
    &lt;circle id=&quot;race-pulse-local&quot; class=&quot;dg-pulse&quot; cx=&quot;528&quot; cy=&quot;213.5&quot; r=&quot;5&quot;/&gt;

    &lt;text class=&quot;dg-mono&quot; x=&quot;14&quot; y=&quot;232&quot;&gt;Typesafe Jev (254 ms)&lt;/text&gt;
    &lt;rect class=&quot;latency-track&quot; x=&quot;196&quot; y=&quot;224&quot; width=&quot;324&quot; height=&quot;7&quot; rx=&quot;3.5&quot;/&gt;
    &lt;rect id=&quot;race-fill-gemini&quot; class=&quot;latency-fill--muted&quot; x=&quot;196&quot; y=&quot;224&quot; width=&quot;324&quot; height=&quot;7&quot; rx=&quot;3.5&quot;/&gt;

    &lt;text class=&quot;dg-mono&quot; x=&quot;14&quot; y=&quot;246&quot;&gt;Fast chat LLM (849 ms)&lt;/text&gt;
    &lt;rect class=&quot;latency-track&quot; x=&quot;196&quot; y=&quot;238&quot; width=&quot;324&quot; height=&quot;7&quot; rx=&quot;3.5&quot;/&gt;
    &lt;rect id=&quot;race-fill-jev&quot; class=&quot;latency-fill--muted&quot; x=&quot;196&quot; y=&quot;238&quot; width=&quot;324&quot; height=&quot;7&quot; rx=&quot;3.5&quot;/&gt;
  &lt;/svg&gt;
  &lt;div class=&quot;exhibit-bar&quot;&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-latency-race&quot; class=&quot;exhibit-btn exhibit-btn--ok&quot;&gt;Trigger decision&lt;/button&gt;
    &lt;span id=&quot;latency-readout&quot; class=&quot;exhibit-readout&quot;&gt;Click to feel 0.14 ms vs 254 ms vs 849 ms in real time&lt;/span&gt;
  &lt;/div&gt;
  &lt;figcaption&gt;Figure 8. Top: measured latencies on a log scale across five orders of magnitude, from in-process Rust (9.1 µs) and live V8 PureServingGate (0.14 ms) to live Jev (254 ms) and a zero-thinking chat LLM (849 ms). Bottom: press Trigger decision to feel the real wall-clock gap.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2&gt;&quot;Jev does not reason&quot; and gating composed decision trees&lt;/h2&gt;
&lt;p&gt;In November 2026, Nathan Flurry at Rivet published a practical field note titled &lt;a href=&quot;https://x.com/nathanflurry/status/2123108222470959600&quot; rel=&quot;noopener&quot;&gt;Jev Does Not Reason&lt;/a&gt;. When his team asked Jev to assign a ticket directly across a compound rubric like &lt;code&gt;[SEV1, SEV2, SEV3, SEV4]&lt;/code&gt;, accuracy was mediocre because a single-pass decision engine intentionally spends zero reasoning tokens. What worked was splitting every compound decision into 2 to 13 atomic yes/no Jev questions (security vulnerability? data loss? production down? blocked with no workaround? something broken?) and putting the priority logic into ordinary deterministic code.&lt;/p&gt;
&lt;p&gt;That sounded like an obvious win for running five separate conformal gates, one per predicate. Instead of guessing, we built &lt;code&gt;MultiPredicateGate&lt;/code&gt; (single-pass shared feature extraction plus correlated request-level auditing so forced audits stay at 5% instead of compounding to &lt;code&gt;1 - 0.95^m = 40%&lt;/code&gt;) and benchmarked it head-to-head against gating the composed final verdict on a 2,500-ticket Rivet-style Severity tree (&lt;code&gt;α = 5%&lt;/code&gt;):&lt;/p&gt;

&lt;div class=&quot;piece-table-wrap&quot;&gt;
  &lt;table&gt;
    &lt;thead&gt;
      &lt;tr&gt;
        &lt;th&gt;Eval harness (2,500-ticket 5-predicate Severity tree)&lt;/th&gt;
        &lt;th class=&quot;num&quot;&gt;Full-ticket SC&lt;/th&gt;
        &lt;th class=&quot;num&quot;&gt;Predicates saved&lt;/th&gt;
        &lt;th class=&quot;num&quot;&gt;Tree error&lt;/th&gt;
        &lt;th class=&quot;num&quot;&gt;Local p50 / p95&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;1 gate on composed SEV1..SEV4&lt;/strong&gt;&lt;/td&gt;
        &lt;td class=&quot;num&quot;&gt;&lt;strong&gt;66.9%&lt;/strong&gt; (1,673)&lt;/td&gt;
        &lt;td class=&quot;num&quot;&gt;66.9%&lt;/td&gt;
        &lt;td class=&quot;num&quot;&gt;0.00%&lt;/td&gt;
        &lt;td class=&quot;num&quot;&gt;1.8 / 2.2 µs&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;5 separate gates (Bonferroni + 0.5% SEV1 &lt;code&gt;no&lt;/code&gt;)&lt;/td&gt;
        &lt;td class=&quot;num&quot;&gt;35.9% (898)&lt;/td&gt;
        &lt;td class=&quot;num&quot;&gt;55.5%&lt;/td&gt;
        &lt;td class=&quot;num&quot;&gt;0.00%&lt;/td&gt;
        &lt;td class=&quot;num&quot;&gt;3.0 / 4.4 µs&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;5 separate gates (top-to-bottom cascade)&lt;/td&gt;
        &lt;td class=&quot;num&quot;&gt;35.9% (898)&lt;/td&gt;
        &lt;td class=&quot;num&quot;&gt;55.5%&lt;/td&gt;
        &lt;td class=&quot;num&quot;&gt;0.00%&lt;/td&gt;
        &lt;td class=&quot;num&quot;&gt;3.1 / 4.2 µs&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
&lt;/div&gt;

&lt;p&gt;The benchmark exposed two subtle mathematical truths that beat our first intuition:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;The Bonferroni sample-complexity tax.&lt;/strong&gt; To guarantee 5% total error across &lt;code&gt;m = 5&lt;/code&gt; separate gates, each gate has to prove a 5× tighter ceiling (1% each). That multiplies the warmup data each head needs by &lt;code&gt;O(m / α)&lt;/code&gt; (~450 to 900 samples per head versus ~90 for one composed gate), cutting full-ticket short-circuiting nearly in half (35.9% vs. 66.9%, even after early futile-gen-1 retirement lifted 5-gate SC from 30.5% to 35.9%).&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;The intersection trap.&lt;/strong&gt; Bounding each check separately controls overall errors across all tickets, &lt;em&gt;not&lt;/em&gt; the error rate restricted to tickets where all five checks short-circuit at once. Suppose Check 1 makes almost all of its mistakes on one rare kind of billing ticket (just 1% of all traffic), and Check 2 only accepts that exact kind of ticket: each check looks safe on its own, yet tickets where both checks short-circuit together can fail far more often than &lt;code&gt;α&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;The winning hybrid architecture:&lt;/strong&gt; use &lt;strong&gt;decomposed atomic yes/no questions plus deterministic TypeScript code as the teacher&lt;/strong&gt; (for accuracy, inspectability, and Rivet-style backtesting), and wrap the &lt;strong&gt;composed final verdict&lt;/strong&gt; with &lt;strong&gt;one &lt;code&gt;ConformalGate&lt;/code&gt;&lt;/strong&gt; (1.9× higher full-ticket skip rate, 1.7× faster with &lt;code&gt;O(1)&lt;/code&gt; cached thresholds, and directly certified on the composed output). Reserve &lt;code&gt;MultiPredicateGate&lt;/code&gt; for genuinely independent multi-label outputs (such as parallel routing flags or tool-group selections) where no single composed class exists.&lt;/p&gt;

&lt;figure id=&quot;exhibit-waterfall&quot; class=&quot;diagram&quot; aria-label=&quot;Interactive comparison of hybrid composed gating versus separate per-predicate conformal gates on Rivet&#x27;s severity tree&quot;&gt;
  &lt;svg viewBox=&quot;0 0 640 278&quot; role=&quot;img&quot; aria-labelledby=&quot;dg7-title&quot;&gt;
    &lt;title id=&quot;dg7-title&quot;&gt;Rivet five-predicate severity waterfall comparing one composed conformal gate against five separate Bonferroni gates&lt;/title&gt;

    &lt;!-- Tufte column headers --&gt;
    &lt;text class=&quot;dg-title&quot; x=&quot;12&quot; y=&quot;14&quot;&gt;MEASURED WINNER (2,500 TICKETS)&lt;/text&gt;
    &lt;text class=&quot;dg-title&quot; x=&quot;222&quot; y=&quot;14&quot;&gt;RIVET 5-PREDICATE TEACHER WATERFALL&lt;/text&gt;
    &lt;text class=&quot;dg-title&quot; x=&quot;628&quot; y=&quot;14&quot; text-anchor=&quot;end&quot;&gt;GATE ROUTE&lt;/text&gt;

    &lt;!-- Vertical divider --&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;208&quot; y1=&quot;24&quot; x2=&quot;208&quot; y2=&quot;262&quot;/&gt;

    &lt;!-- Left panel: Measured benchmark comparison --&gt;
    &lt;rect id=&quot;wf-card-hybrid&quot; class=&quot;dg-box--ok&quot; x=&quot;12&quot; y=&quot;32&quot; width=&quot;182&quot; height=&quot;84&quot; rx=&quot;4&quot;/&gt;
    &lt;text class=&quot;dg-label--ok&quot; x=&quot;22&quot; y=&quot;51&quot;&gt;Hybrid: 1 composed gate&lt;/text&gt;
    &lt;text class=&quot;dg-mono--ok&quot; x=&quot;22&quot; y=&quot;68&quot;&gt;66.9% full-ticket SC&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;22&quot; y=&quot;83&quot;&gt;1.8 µs p50 · 0.00% err&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;22&quot; y=&quot;98&quot;&gt;~90 samples to certify&lt;/text&gt;

    &lt;rect id=&quot;wf-card-bonf&quot; class=&quot;dg-box--soft&quot; x=&quot;12&quot; y=&quot;128&quot; width=&quot;182&quot; height=&quot;84&quot; rx=&quot;4&quot;/&gt;
    &lt;text class=&quot;dg-label&quot; x=&quot;22&quot; y=&quot;147&quot;&gt;5 separate gates (α / 5)&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;22&quot; y=&quot;164&quot;&gt;35.9% full-ticket SC&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;22&quot; y=&quot;179&quot;&gt;3.1 µs p50 · 0.00% err&lt;/text&gt;
    &lt;text class=&quot;dg-mono--err&quot; x=&quot;22&quot; y=&quot;194&quot;&gt;O(m/α) warmup tax&lt;/text&gt;

    &lt;text class=&quot;dg-mono&quot; x=&quot;14&quot; y=&quot;238&quot;&gt;Teacher: atomic Jev + code&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;14&quot; y=&quot;253&quot;&gt;Rivet / @NathanFlurry&lt;/text&gt;

    &lt;!-- Right panel: Waterfall spine --&gt;
    &lt;line id=&quot;wf-spine&quot; class=&quot;dg-line--axis&quot; x1=&quot;232&quot; y1=&quot;48&quot; x2=&quot;232&quot; y2=&quot;200&quot;/&gt;

    &lt;!-- Row separators --&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;222&quot; y1=&quot;67&quot; x2=&quot;628&quot; y2=&quot;67&quot;/&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;222&quot; y1=&quot;105&quot; x2=&quot;628&quot; y2=&quot;105&quot;/&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;222&quot; y1=&quot;143&quot; x2=&quot;628&quot; y2=&quot;143&quot;/&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;222&quot; y1=&quot;181&quot; x2=&quot;628&quot; y2=&quot;181&quot;/&gt;
    &lt;line class=&quot;dg-line--axis&quot; x1=&quot;222&quot; y1=&quot;222&quot; x2=&quot;628&quot; y2=&quot;222&quot;/&gt;

    &lt;!-- Row 0: security vuln? --&gt;
    &lt;g id=&quot;wf-row-0&quot;&gt;
      &lt;circle id=&quot;wf-dot-0&quot; class=&quot;dg-dot&quot; cx=&quot;232&quot; cy=&quot;48&quot; r=&quot;3.5&quot;/&gt;
      &lt;text class=&quot;dg-mono--ink&quot; x=&quot;246&quot; y=&quot;51&quot;&gt;1. security vuln?&lt;/text&gt;
      &lt;rect class=&quot;dg-bar--bg&quot; x=&quot;382&quot; y=&quot;44&quot; width=&quot;76&quot; height=&quot;8&quot; rx=&quot;2&quot;/&gt;
      &lt;rect id=&quot;wf-bar-0&quot; class=&quot;dg-bar--muted&quot; x=&quot;382&quot; y=&quot;44&quot; width=&quot;2.3&quot; height=&quot;8&quot; rx=&quot;2&quot;/&gt;
      &lt;text id=&quot;wf-pct-0&quot; class=&quot;dg-mono&quot; x=&quot;464&quot; y=&quot;51&quot;&gt;3% NO&lt;/text&gt;
      &lt;text id=&quot;wf-route-0&quot; class=&quot;dg-mono--ok&quot; x=&quot;628&quot; y=&quot;51&quot; text-anchor=&quot;end&quot;&gt;bypassed (1 gate)&lt;/text&gt;
    &lt;/g&gt;

    &lt;!-- Row 1: data loss? --&gt;
    &lt;g id=&quot;wf-row-1&quot;&gt;
      &lt;circle id=&quot;wf-dot-1&quot; class=&quot;dg-dot&quot; cx=&quot;232&quot; cy=&quot;86&quot; r=&quot;3.5&quot;/&gt;
      &lt;text class=&quot;dg-mono--ink&quot; x=&quot;246&quot; y=&quot;89&quot;&gt;2. data loss?&lt;/text&gt;
      &lt;rect class=&quot;dg-bar--bg&quot; x=&quot;382&quot; y=&quot;82&quot; width=&quot;76&quot; height=&quot;8&quot; rx=&quot;2&quot;/&gt;
      &lt;rect id=&quot;wf-bar-1&quot; class=&quot;dg-bar--muted&quot; x=&quot;382&quot; y=&quot;82&quot; width=&quot;1.5&quot; height=&quot;8&quot; rx=&quot;2&quot;/&gt;
      &lt;text id=&quot;wf-pct-1&quot; class=&quot;dg-mono&quot; x=&quot;464&quot; y=&quot;89&quot;&gt;2% NO&lt;/text&gt;
      &lt;text id=&quot;wf-route-1&quot; class=&quot;dg-mono--ok&quot; x=&quot;628&quot; y=&quot;89&quot; text-anchor=&quot;end&quot;&gt;bypassed (1 gate)&lt;/text&gt;
    &lt;/g&gt;

    &lt;!-- Row 2: prod down? --&gt;
    &lt;g id=&quot;wf-row-2&quot;&gt;
      &lt;circle id=&quot;wf-dot-2&quot; class=&quot;dg-dot&quot; cx=&quot;232&quot; cy=&quot;124&quot; r=&quot;3.5&quot;/&gt;
      &lt;text class=&quot;dg-mono--ink&quot; x=&quot;246&quot; y=&quot;127&quot;&gt;3. prod down?&lt;/text&gt;
      &lt;rect class=&quot;dg-bar--bg&quot; x=&quot;382&quot; y=&quot;120&quot; width=&quot;76&quot; height=&quot;8&quot; rx=&quot;2&quot;/&gt;
      &lt;rect id=&quot;wf-bar-2&quot; class=&quot;dg-bar--muted&quot; x=&quot;382&quot; y=&quot;120&quot; width=&quot;6.1&quot; height=&quot;8&quot; rx=&quot;2&quot;/&gt;
      &lt;text id=&quot;wf-pct-2&quot; class=&quot;dg-mono&quot; x=&quot;464&quot; y=&quot;127&quot;&gt;8% NO&lt;/text&gt;
      &lt;text id=&quot;wf-route-2&quot; class=&quot;dg-mono--ok&quot; x=&quot;628&quot; y=&quot;127&quot; text-anchor=&quot;end&quot;&gt;bypassed (1 gate)&lt;/text&gt;
    &lt;/g&gt;

    &lt;!-- Row 3: no workaround? --&gt;
    &lt;g id=&quot;wf-row-3&quot;&gt;
      &lt;circle id=&quot;wf-dot-3&quot; class=&quot;dg-dot&quot; cx=&quot;232&quot; cy=&quot;162&quot; r=&quot;3.5&quot;/&gt;
      &lt;text class=&quot;dg-mono--ink&quot; x=&quot;246&quot; y=&quot;165&quot;&gt;4. no workaround?&lt;/text&gt;
      &lt;rect class=&quot;dg-bar--bg&quot; x=&quot;382&quot; y=&quot;158&quot; width=&quot;76&quot; height=&quot;8&quot; rx=&quot;2&quot;/&gt;
      &lt;rect id=&quot;wf-bar-3&quot; class=&quot;dg-bar--muted&quot; x=&quot;382&quot; y=&quot;158&quot; width=&quot;3.0&quot; height=&quot;8&quot; rx=&quot;2&quot;/&gt;
      &lt;text id=&quot;wf-pct-3&quot; class=&quot;dg-mono&quot; x=&quot;464&quot; y=&quot;165&quot;&gt;4% NO&lt;/text&gt;
      &lt;text id=&quot;wf-route-3&quot; class=&quot;dg-mono--ok&quot; x=&quot;628&quot; y=&quot;165&quot; text-anchor=&quot;end&quot;&gt;bypassed (1 gate)&lt;/text&gt;
    &lt;/g&gt;

    &lt;!-- Row 4: something broken? --&gt;
    &lt;g id=&quot;wf-row-4&quot;&gt;
      &lt;circle id=&quot;wf-dot-4&quot; class=&quot;dg-dot&quot; cx=&quot;232&quot; cy=&quot;200&quot; r=&quot;3.5&quot;/&gt;
      &lt;text class=&quot;dg-mono--ink&quot; x=&quot;246&quot; y=&quot;203&quot;&gt;5. something broken?&lt;/text&gt;
      &lt;rect class=&quot;dg-bar--bg&quot; x=&quot;382&quot; y=&quot;196&quot; width=&quot;76&quot; height=&quot;8&quot; rx=&quot;2&quot;/&gt;
      &lt;rect id=&quot;wf-bar-4&quot; class=&quot;dg-bar&quot; x=&quot;382&quot; y=&quot;196&quot; width=&quot;62.3&quot; height=&quot;8&quot; rx=&quot;2&quot;/&gt;
      &lt;text id=&quot;wf-pct-4&quot; class=&quot;dg-mono--ok&quot; x=&quot;464&quot; y=&quot;203&quot;&gt;82% YES&lt;/text&gt;
      &lt;text id=&quot;wf-route-4&quot; class=&quot;dg-mono--ok&quot; x=&quot;628&quot; y=&quot;203&quot; text-anchor=&quot;end&quot;&gt;certified SEV3&lt;/text&gt;
    &lt;/g&gt;

    &lt;!-- Deterministic outcome footer --&gt;
    &lt;text id=&quot;wf-out-code&quot; class=&quot;dg-label--ok&quot; x=&quot;232&quot; y=&quot;248&quot;&gt;return SEV3 (1.8 µs)&lt;/text&gt;
    &lt;text id=&quot;wf-out-stat&quot; class=&quot;dg-mono&quot; x=&quot;628&quot; y=&quot;248&quot; text-anchor=&quot;end&quot;&gt;66.9% full-ticket SC · 0 Jev calls&lt;/text&gt;
  &lt;/svg&gt;
  &lt;div class=&quot;exhibit-bar&quot;&gt;
    &lt;button type=&quot;button&quot; class=&quot;exhibit-btn&quot; data-wf=&quot;hybrid&quot; aria-pressed=&quot;true&quot;&gt;Hybrid: 1 composed gate&lt;/button&gt;
    &lt;button type=&quot;button&quot; class=&quot;exhibit-btn&quot; data-wf=&quot;bonf&quot; aria-pressed=&quot;false&quot;&gt;5 separate gates (α/5)&lt;/button&gt;
    &lt;button type=&quot;button&quot; class=&quot;exhibit-btn&quot; data-wf=&quot;outage&quot; aria-pressed=&quot;false&quot;&gt;Outage (SEV1 exit)&lt;/button&gt;
    &lt;span id=&quot;wf-readout&quot; class=&quot;exhibit-readout&quot;&gt;Atomic Jev+code teacher · 1 conformal gate on SEV1..SEV4 (1.9× SC)&lt;/span&gt;
  &lt;/div&gt;
  &lt;figcaption&gt;Figure 9. Benchmark comparison on 2,500 Rivet-style severity tickets. Decomposing the teacher into five atomic Jev questions plus deterministic code improves label quality, while wrapping the composed verdict with one ConformalGate avoids the O(m/α) Bonferroni sample tax and runs 1.7× faster.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;One caveat from benchmarking atomic decomposition across both architectures: splitting a rubric into nine yes/no checks works because single-pass decision engines score parallel &lt;code&gt;noul&lt;/code&gt; heads in one forward pass at zero output tokens (~254 ms). When we tried the same nine-boolean JSON rubric on a fast autoregressive chat model (with zero thinking budget), emitting 126 output tokens instead of 6 added +200 ms p50 (849 ms → 1,055 ms) and lowered accuracy (59/64 → 56/64). Atomic binary decomposition is specifically a parallel-probe decision-engine superpower, not an autoregressive JSON win.&lt;/p&gt;

&lt;h2&gt;Beyond chat: three patterns where conformal gates shine&lt;/h2&gt;
&lt;p&gt;Although we built &lt;code&gt;conformal-gate&lt;/code&gt; for team chat agents at Ando, the pattern applies anywhere an AI system sits in front of repetitive, skewed traffic with asymmetric mistake costs:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;LLM model tiering (&lt;code&gt;fast_model&lt;/code&gt; vs. &lt;code&gt;frontier_model&lt;/code&gt;).&lt;/strong&gt; Set a tight per-class bound on &lt;code&gt;fast_model&lt;/code&gt; (&lt;code&gt;α = 0.01&lt;/code&gt;) so complex prompts are never downgraded silently, while letting obvious lookups, format conversions, and short edits bypass the router LLM in microseconds.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Support ticket triage (&lt;code&gt;billing&lt;/code&gt;, &lt;code&gt;bug&lt;/code&gt;, &lt;code&gt;how_to&lt;/code&gt;, &lt;code&gt;human_handoff&lt;/code&gt;).&lt;/strong&gt; Combine free text (subject, body) with structured numeric signals (plan tier, message length, prior ticket count) and serve the certified 6 KB snapshot directly at the edge via &lt;code&gt;PureServingGate&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Prompt-injection and abuse pre-filtering (&lt;code&gt;allow&lt;/code&gt;, &lt;code&gt;flag&lt;/code&gt;, &lt;code&gt;block&lt;/code&gt;).&lt;/strong&gt; Set a strict bound on &lt;code&gt;allow&lt;/code&gt; (&lt;code&gt;α = 0.005&lt;/code&gt;) so novel jailbreaks never slip through; when an attacker shifts phrasing, the 5% blind audit trips e-CUSUM and fails closed to the full moderation model automatically.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In practice, the split between an async trainer (or shadow rollout) and zero-WASM edge serving takes a few dozen lines of TypeScript:&lt;/p&gt;

&lt;div class=&quot;code-plate&quot;&gt;
  &lt;div class=&quot;code-plate-head&quot;&gt;
    &lt;span&gt;model-router-gate.ts&lt;/span&gt;
    &lt;span&gt;asymmetric α · shadow-to-active trainer&lt;/span&gt;
  &lt;/div&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;import { createConformalGate } from &quot;conformal-gate&quot;;

const routerGate = await createConformalGate({
  name: &quot;llm-tier-router&quot;,
  classes: [&quot;fast_model&quot;, &quot;frontier_model&quot;] as const,
  mode: &quot;active&quot;, // Start in &quot;shadow&quot;, verify 24h disagreement, then flip
  maxDisagreement: 0.05,
  classAlphas: {
    fast_model: 0.01,     // Never silently downgrade a hard prompt
    frontier_model: 0.05, // Extra headroom when escalating to frontier
  },
  auditRate: 0.05,
  featurize: (req) =&amp;gt; ({
    fields: {
      prompt: req.prompt.slice(0, 1_200),
      tool_names: req.tools.join(&quot; &quot;),
    },
    numeric: {
      prompt_chars: req.prompt.length,
      has_code_fence: req.prompt.includes(&quot;```&quot;) ? 1 : 0,
      turn_depth: req.historyLength,
      tool_count: req.tools.length,
    },
  }),
  teacher: async (req) =&amp;gt; routeWithDecisionEngine(req),
});&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;div class=&quot;code-plate&quot;&gt;
  &lt;div class=&quot;code-plate-head&quot;&gt;
    &lt;span&gt;edge-worker.ts&lt;/span&gt;
    &lt;span&gt;zero-WASM PureServingGate · 6.3 KB snapshot&lt;/span&gt;
  &lt;/div&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;import { PureServingGate } from &quot;conformal-gate/serving&quot;;

// Runs in Workers, V8 isolates, and strict CSP with zero WASM.
const gate = PureServingGate.fromSnapshot(certifiedSnapshotJson);
const pred = gate.predict(featurize(req));

if (pred.should_short_circuit) {
  return pred.predicted_label; // ~0.14 ms · 0 network hops
}

// Escalate uncertain inputs + 5% audits; fence by generation.
const teacherVerdict = await routeWithDecisionEngine(req);
ctx.waitUntil(reportObservation({
  input: req,
  teacherVerdict,
  wasAudit: pred.is_audit,
  servingGeneration: pred.model_generation,
}));
return teacherVerdict.label;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;h2&gt;How we test it: eval harness and shadow verification&lt;/h2&gt;
&lt;p&gt;Inspired by &lt;a href=&quot;https://parallel.ai/blog/parallel-search-eval-harness&quot; rel=&quot;noopener&quot;&gt;Parallel&#x27;s Search Eval Harness&lt;/a&gt;, we wrapped &lt;code&gt;conformal-gate&lt;/code&gt; in a deterministic binary (&lt;code&gt;conformal-gate-eval&lt;/code&gt;) with eight stress suites (&lt;code&gt;separable&lt;/code&gt;, &lt;code&gt;imbalanced_routing&lt;/code&gt;, &lt;code&gt;pure_noise&lt;/code&gt;, &lt;code&gt;concept_shift&lt;/code&gt;, &lt;code&gt;diurnal_burst&lt;/code&gt;, &lt;code&gt;rare_class_starvation&lt;/code&gt;, &lt;code&gt;boundary_drift&lt;/code&gt;, and &lt;code&gt;cascaded_binary_tree&lt;/code&gt;), head-to-head baselines against &lt;code&gt;always_teacher&lt;/code&gt;, &lt;code&gt;naive_softmax&lt;/code&gt;, and &lt;code&gt;marginal_mondrian_cp&lt;/code&gt;, FNV-1a trace fingerprinting so config mismatches never sneak into diffs, and explicit drift-phase metrics. Every major improvement above — +32.9 pp drift recovery, +22.7 pp minority calibration, unweighted CE + global L2, futility retirement, 15× lower boundary-drift error under adaptive auditing, and the composed-vs-Bonferroni tradeoff — came from running the harness or auditing live shadow telemetry rather than theorizing in a design doc.&lt;/p&gt;

&lt;h2&gt;Formal verification: proving the gate fails closed&lt;/h2&gt;
&lt;p&gt;A bug inside a short-circuit gate does not throw an exception — it silently skips the teacher LLM and breaks the statistical bound you promised. Ordinary unit tests only check the inputs you remembered to write down, so we ran four formal and mechanized checks across the Rust core, unsafe WASM ABI, zero-WASM TypeScript runtime, and multi-container persistence protocol:&lt;/p&gt;

&lt;div class=&quot;piece-table-wrap&quot;&gt;
  &lt;table&gt;
    &lt;thead&gt;
      &lt;tr&gt;
        &lt;th&gt;Verification layer&lt;/th&gt;
        &lt;th&gt;Tool&lt;/th&gt;
        &lt;th&gt;What is proved&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;Rust math &amp;amp; invariants&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;Kani (CBMC)&lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;23 proofs&lt;/strong&gt; across all 7 core Rust modules (&lt;code&gt;ood.rs&lt;/code&gt;, &lt;code&gt;conformal.rs&lt;/code&gt;, &lt;code&gt;model.rs&lt;/code&gt;, &lt;code&gt;gate.rs&lt;/code&gt;, &lt;code&gt;features.rs&lt;/code&gt;, &lt;code&gt;semantic_cache.rs&lt;/code&gt;, &lt;code&gt;bundle.rs&lt;/code&gt;): fail-closed &lt;code&gt;NaN&lt;/code&gt;/&lt;code&gt;±Inf&lt;/code&gt;/&lt;code&gt;f32::MAX&lt;/code&gt; handling, anytime-valid LTT risk bounds, softmax simplex normalization, adaptive-audit propensity conservation, Bonferroni budget division, and OOB panic freedom.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;Unsafe WASM ABI &amp;amp; parser&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;Miri + recursive fuzzer&lt;/td&gt;
        &lt;td&gt;All &lt;strong&gt;25 &lt;code&gt;unsafe extern &quot;C&quot;&lt;/code&gt; entrypoints&lt;/strong&gt; in &lt;code&gt;wasm_abi.rs&lt;/code&gt; verified UB- and leak-free, plus structure-aware recursive JSON fuzzing across populated snapshots of all four persisted formats.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;Rust ↔ TypeScript parity&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;Differential Vitest suite&lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;320+ randomized scenarios&lt;/strong&gt; (including &lt;code&gt;NaN&lt;/code&gt;, &lt;code&gt;±Inf&lt;/code&gt;, &lt;code&gt;±f32::MAX&lt;/code&gt;, overflow logits, OOD embeddings, and teacher-version fencing) proving exact agreement between Rust &lt;code&gt;ServingGate&lt;/code&gt; and zero-WASM &lt;code&gt;PureServingGate&lt;/code&gt;.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;Distributed persistence&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;TLA+ / TLC&lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;19 checks&lt;/strong&gt; (main + 9 negative mutations + 9 reachability witnesses; &lt;strong&gt;25.1M states generated, 3.93M distinct&lt;/strong&gt;) across two concurrent Node containers, a V8 serving reader, numeric warm-start priors, drift shutdown, stale-generation prior fencing, and CAS corrupt-blob eviction.&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
&lt;/div&gt;

&lt;p&gt;This was not theater — the checkers caught &lt;strong&gt;11 real bugs&lt;/strong&gt; across Rust and TypeScript plus one cross-layer protocol trap:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Fail-open &lt;code&gt;NaN&lt;/code&gt; on OOD embeddings (Rust &amp;amp; TS).&lt;/strong&gt; In &lt;code&gt;EmbeddingOodGuard::is_ood&lt;/code&gt;, IEEE-754 makes &lt;code&gt;max_sim &amp;lt; threshold&lt;/code&gt; evaluate to &lt;code&gt;false&lt;/code&gt; whenever &lt;code&gt;threshold&lt;/code&gt; is &lt;code&gt;NaN&lt;/code&gt;, silently accepting an out-of-distribution input instead of escalating. Fixed with &lt;code&gt;!(max_sim &amp;gt;= threshold)&lt;/code&gt; and explicit finiteness checks (and &lt;code&gt;quantile_sorted&lt;/code&gt; clamping).&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;&lt;code&gt;f32::MAX&lt;/code&gt; vector collapse (Rust &amp;amp; TS).&lt;/strong&gt; Squaring a dense embedding with &lt;code&gt;f32::MAX&lt;/code&gt; entries overflowed &lt;code&gt;f32&lt;/code&gt; norm accumulation to &lt;code&gt;Inf&lt;/code&gt; and divided to &lt;code&gt;[0, 0]&lt;/code&gt; instead of preserving unit direction. Fixed across &lt;code&gt;ood.rs&lt;/code&gt;, &lt;code&gt;features.rs&lt;/code&gt;, &lt;code&gt;semantic_cache.rs&lt;/code&gt;, and &lt;code&gt;ts/serving.ts&lt;/code&gt; via &lt;code&gt;f64&lt;/code&gt; max-abs rescaling.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;TypeScript softmax overflow divergence.&lt;/strong&gt; On extreme overflow logits, zero-WASM &lt;code&gt;PureServingGate&lt;/code&gt; returned &lt;code&gt;[NaN, ...]&lt;/code&gt; where Rust fell back to uniform &lt;code&gt;[1/K, ...]&lt;/code&gt;. Randomized differential testing caught it immediately, along with explicit &lt;code&gt;expectedTeacherVersion: null&lt;/code&gt; parity.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Out-of-bounds WASM panics &amp;amp; &lt;code&gt;Inf + (-Inf)&lt;/code&gt; audit &lt;code&gt;NaN&lt;/code&gt;.&lt;/strong&gt; Six class-index accessors in &lt;code&gt;conformal.rs&lt;/code&gt; could panic on an out-of-range class index instead of failing closed, and &lt;code&gt;adaptive_audit_schedule&lt;/code&gt; could produce &lt;code&gt;Inf + (-Inf) = NaN&lt;/code&gt; on non-finite thresholds.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Cross-layer version-bump livelock found by TLA+.&lt;/strong&gt; &lt;code&gt;set_teacher_version()&lt;/code&gt; resets &lt;code&gt;serving_generation = 0&lt;/code&gt;, which collides with monotonic &lt;code&gt;(serving_generation, drift_active, teacher_calls)&lt;/code&gt; storage CAS if a multi-container persistence layer does not also track lineage epoch — caught before wiring teacher-version bumps into our production store.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Prior art, the 2026 landscape, and where this sits&lt;/h2&gt;
&lt;p&gt;None of the statistical primitives inside &lt;code&gt;conformal-gate&lt;/code&gt; were invented in a vacuum. The library sits at the intersection of four active research threads that converged rapidly between 2021 and 2026:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Selective risk control and anytime-valid e-processes.&lt;/strong&gt; &lt;a href=&quot;https://arxiv.org/abs/1705.08500&quot; rel=&quot;noopener&quot;&gt;Geifman &amp;amp; El-Yaniv (2017)&lt;/a&gt; formalized selective classification with guaranteed conditional risk; &lt;a href=&quot;https://arxiv.org/abs/2110.01052&quot; rel=&quot;noopener&quot;&gt;Angelopoulos et al. (2021)&lt;/a&gt; turned non-monotone risk control into finite-sample multiple hypothesis testing in &lt;em&gt;Learn then Test&lt;/em&gt; (the reason selective risk cannot use the tighter monotone &lt;a href=&quot;https://arxiv.org/abs/2208.02814&quot; rel=&quot;noopener&quot;&gt;Conformal Risk Control&lt;/a&gt; bound directly); and &lt;a href=&quot;https://arxiv.org/abs/2405.10301&quot; rel=&quot;noopener&quot;&gt;Gui, Jin, &amp;amp; Ren (2024)&lt;/a&gt; extended distribution-free selection to foundation models in &lt;em&gt;Conformal Alignment&lt;/em&gt;. The closest statistical ancestors to our continuous-peeking loop are &lt;a href=&quot;https://arxiv.org/abs/2406.10490&quot; rel=&quot;noopener&quot;&gt;Xu, Karampatziakis, &amp;amp; Mineiro (NeurIPS 2024)&lt;/a&gt;, who brought testing-by-betting e-processes to active risk-controlling sets, and &lt;a href=&quot;https://arxiv.org/abs/2602.04364&quot; rel=&quot;noopener&quot;&gt;Hultberg, Zachariah, &amp;amp; Ribeiro (2026)&lt;/a&gt; on anytime-valid conformal risk control over growing calibration streams.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Online adaptation and nonparametric risk-drift detectors.&lt;/strong&gt; &lt;a href=&quot;https://arxiv.org/abs/2106.00170&quot; rel=&quot;noopener&quot;&gt;Gibbs &amp;amp; Candès (2021&lt;/a&gt;, &lt;a href=&quot;https://arxiv.org/abs/2208.08401&quot; rel=&quot;noopener&quot;&gt;2024)&lt;/a&gt; introduced Adaptive Conformal Inference (ACI and multi-rate DtACI), and &lt;a href=&quot;https://arxiv.org/abs/2307.16895&quot; rel=&quot;noopener&quot;&gt;Angelopoulos, Candès, &amp;amp; Tibshirani (2023)&lt;/a&gt; reframed online coverage tracking as Conformal PID Control. On drift monitoring, &lt;a href=&quot;https://arxiv.org/abs/2110.06177&quot; rel=&quot;noopener&quot;&gt;Podkopaev &amp;amp; Ramdas (ICLR 2022)&lt;/a&gt; drew the crucial distinction between benign covariate shift and &lt;em&gt;harmful risk shift&lt;/em&gt;, and &lt;a href=&quot;https://arxiv.org/abs/2203.03532&quot; rel=&quot;noopener&quot;&gt;Shin, Ramdas, &amp;amp; Rinaldo (2024)&lt;/a&gt; formalized nonparametric &lt;em&gt;e-detectors&lt;/em&gt; (e-CUSUM and e-SR) — the direct theoretical basis for our &lt;code&gt;α&lt;/code&gt;-aware fail-closed tripwire.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;LLM routing and the 2026 wave of conformal cascades.&lt;/strong&gt; Early routing frameworks like &lt;a href=&quot;https://arxiv.org/abs/2305.05176&quot; rel=&quot;noopener&quot;&gt;FrugalGPT (2023)&lt;/a&gt; and &lt;a href=&quot;https://arxiv.org/abs/2406.18665&quot; rel=&quot;noopener&quot;&gt;RouteLLM (2024)&lt;/a&gt; proved 40–85% API savings with preference-trained routers, while &lt;a href=&quot;https://arxiv.org/abs/2405.19261&quot; rel=&quot;noopener&quot;&gt;Narasimhan et al. (2024)&lt;/a&gt; merged cascades with speculative decoding for generative latency. Between late 2025 and mid-2026 (surveyed in &lt;a href=&quot;https://arxiv.org/abs/2603.04445&quot; rel=&quot;noopener&quot;&gt;Moslem &amp;amp; Kelleher 2026&lt;/a&gt;), several papers converged on formal guarantees for cascades: &lt;a href=&quot;https://arxiv.org/abs/2510.17543&quot; rel=&quot;noopener&quot;&gt;Huang et al. (2025)&lt;/a&gt; framed edge-cloud offloading as conformal alignment; &lt;a href=&quot;https://arxiv.org/abs/2607.25018&quot; rel=&quot;noopener&quot;&gt;Dou, Lian, &amp;amp; Li (2026)&lt;/a&gt; introduced multi-tier &lt;em&gt;Conformal Cascade&lt;/em&gt; via set collapse (explicitly noting that tightening its &lt;code&gt;1 − Kα&lt;/code&gt; union bound to &lt;code&gt;1 − α&lt;/code&gt; requires a selection-preservation condition beyond marginal coverage — the denominator trap in Figure 3); &lt;a href=&quot;https://arxiv.org/abs/2604.23577&quot; rel=&quot;noopener&quot;&gt;Guo, Wu, &amp;amp; Yiu (ACL 2026)&lt;/a&gt; built &lt;em&gt;RouteNLP&lt;/em&gt;, pairing conformal cascading with targeted distillation on clustered escalation failures (reporting 58% cost reduction and &amp;gt;2× the gain of untargeted distillation); and two open-source peers — &lt;a href=&quot;https://arxiv.org/abs/2604.14531&quot; rel=&quot;noopener&quot;&gt;Rida&#x27;s TRACER (2026)&lt;/a&gt; and Tomer Glick&#x27;s &lt;a href=&quot;https://github.com/tomerglick57/Jevstiller&quot; rel=&quot;noopener&quot;&gt;Jevstiller&lt;/a&gt; — proved out practical trace-based local surrogates for LLM and Jev classification, directly inspiring our v0.1.0 embedding OOD guard, &lt;code&gt;teacher_version&lt;/code&gt; fencing, &lt;code&gt;confidence_floor&lt;/code&gt;, and boundary diagnostics.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Non-uniform active auditing.&lt;/strong&gt; &lt;a href=&quot;https://arxiv.org/abs/2403.03208&quot; rel=&quot;noopener&quot;&gt;Zrnic &amp;amp; Candès (ICML 2024)&lt;/a&gt; showed in &lt;em&gt;Active Statistical Inference&lt;/em&gt; that uniform random auditing leaves statistical power on the table: propensity-weighted active sampling concentrates expensive teacher checks near uncertain boundaries while keeping finite-sample and asymptotic validity intact.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;piece-table-wrap&quot;&gt;
  &lt;table&gt;
    &lt;thead&gt;
      &lt;tr&gt;
        &lt;th&gt;System / paper&lt;/th&gt;
        &lt;th&gt;Guarantee&lt;/th&gt;
        &lt;th&gt;Online distillation&lt;/th&gt;
        &lt;th&gt;Drift revocation&lt;/th&gt;
        &lt;th&gt;Runtime &amp;amp; footprint&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;RouteLLM&lt;/strong&gt; (&lt;a href=&quot;https://arxiv.org/abs/2406.18665&quot; rel=&quot;noopener&quot;&gt;2024&lt;/a&gt;)&lt;/td&gt;
        &lt;td&gt;Heuristic scalar threshold&lt;/td&gt;
        &lt;td&gt;Offline Arena preference&lt;/td&gt;
        &lt;td&gt;None&lt;/td&gt;
        &lt;td&gt;Python / PyTorch server&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;Edge-Cloud CAb&lt;/strong&gt; (&lt;a href=&quot;https://arxiv.org/abs/2510.17543&quot; rel=&quot;noopener&quot;&gt;2025&lt;/a&gt;)&lt;/td&gt;
        &lt;td&gt;Cloud-aligned conditional MHT&lt;/td&gt;
        &lt;td&gt;Static student&lt;/td&gt;
        &lt;td&gt;None&lt;/td&gt;
        &lt;td&gt;Research PyTorch&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;Conformal Cascade&lt;/strong&gt; (&lt;a href=&quot;https://arxiv.org/abs/2607.25018&quot; rel=&quot;noopener&quot;&gt;2026&lt;/a&gt;)&lt;/td&gt;
        &lt;td&gt;Multi-tier set collapse (&lt;code&gt;1−Kα&lt;/code&gt;)&lt;/td&gt;
        &lt;td&gt;None (black-box LLMs)&lt;/td&gt;
        &lt;td&gt;None&lt;/td&gt;
        &lt;td&gt;Multi-tier LLM API&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;RouteNLP&lt;/strong&gt; (&lt;a href=&quot;https://arxiv.org/abs/2604.23577&quot; rel=&quot;noopener&quot;&gt;2026&lt;/a&gt;)&lt;/td&gt;
        &lt;td&gt;Conformal threshold init&lt;/td&gt;
        &lt;td&gt;Failure-clustered LoRA/distill&lt;/td&gt;
        &lt;td&gt;Periodic retrain&lt;/td&gt;
        &lt;td&gt;GPU cluster (~387 ms p99)&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;TRACER&lt;/strong&gt; (&lt;a href=&quot;https://arxiv.org/abs/2604.14531&quot; rel=&quot;noopener&quot;&gt;2026&lt;/a&gt;)&lt;/td&gt;
        &lt;td&gt;Parity gate + k-NN OOD&lt;/td&gt;
        &lt;td&gt;Offline trace surrogates&lt;/td&gt;
        &lt;td&gt;Parity monitor&lt;/td&gt;
        &lt;td&gt;Python / scikit-learn&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;conformal-gate&lt;/strong&gt; (v0.1.0)&lt;/td&gt;
        &lt;td&gt;Anytime-valid LTT e-process + futility + warm priors&lt;/td&gt;
        &lt;td&gt;Online soft-KL + paired swap + opt-in hard replay&lt;/td&gt;
        &lt;td&gt;&lt;code&gt;α&lt;/code&gt;-aware global &amp;amp; boundary e-CUSUM + wipe&lt;/td&gt;
        &lt;td&gt;1–9 µs Rust / 0.14 ms V8 · 6.3 KB + semantic cache&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
&lt;/div&gt;

&lt;p&gt;Seeing the full map made our real niche — and the highest-leverage next upgrades — clear. Most conformal cascade papers assume a static pre-trained student with an offline calibration split; most closed-loop distillation routers assume Python and GPU serving stacks. &lt;code&gt;conformal-gate&lt;/code&gt; packages anytime-valid LTT, e-CUSUM fail-closed drift recovery, and online distillation into a 6.3 KB zero-WASM edge artifact. Translating the 2024–2026 literature directly into v0.1.0, we implemented and measured four concrete extensions:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Hierarchical warm-start priors (&lt;code&gt;createWithPrior&lt;/code&gt; / &lt;code&gt;with_prior_model&lt;/code&gt;).&lt;/strong&gt; Export a fleet model&#x27;s weights via &lt;code&gt;exportPriorModel()&lt;/code&gt; — stripping sparse hashed n-gram weights (&lt;code&gt;sparse_entries: []&lt;/code&gt;) when crossing tenant boundaries so zero workspace tokens ever leak — and initialize a new tenant with that numeric prior frozen as generation 1 behind a &lt;strong&gt;brand-new empty per-tenant calibrator&lt;/strong&gt; (zero prior thresholds, zero leakage). Aligned tenants skip cold-start warmup and certify &amp;gt;40 calls earlier at &lt;code&gt;0%&lt;/code&gt; error; 100%-inverted misaligned tenants never certify gen 1, retire it early via futility checks, adapt to &lt;code&gt;gen &amp;gt;= 2&lt;/code&gt;, and hold &lt;code&gt;0&lt;/code&gt; bad short-circuits.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Propensity-weighted two-stratum active auditing (&lt;code&gt;adaptiveAudit: true&lt;/code&gt;).&lt;/strong&gt; Inspired by &lt;a href=&quot;https://arxiv.org/abs/2403.03208&quot; rel=&quot;noopener&quot;&gt;Zrnic &amp;amp; Candès (2024)&lt;/a&gt; and &lt;a href=&quot;https://arxiv.org/abs/2406.10490&quot; rel=&quot;noopener&quot;&gt;Xu et al. (2024)&lt;/a&gt;, opt-in adaptive auditing samples near-threshold accepted predictions (&lt;code&gt;p &amp;lt; τ + 0.25(1 − τ)&lt;/code&gt;) at &lt;code&gt;2.0× audit_rate&lt;/code&gt; into an unthinned boundary-stratum e-CUSUM, while core/deferred traffic audits at &lt;code&gt;0.75× audit_rate&lt;/code&gt; and boundary audits are server-side Bernoulli-thinned back to &lt;code&gt;0.75× audit_rate&lt;/code&gt; before updating global LTT/Mondrian calibration (exact Ville&#x27;s inequality). On our &lt;code&gt;boundary_drift&lt;/code&gt; suite (75% stationary core, 25% boundary flips at row 700), conditional disagreement dropped &lt;strong&gt;15×&lt;/strong&gt; — from &lt;code&gt;3.59%&lt;/code&gt; (45/1,254) to &lt;strong&gt;&lt;code&gt;0.26%&lt;/code&gt;&lt;/strong&gt; (3/1,163) — and &lt;code&gt;imbalanced_routing&lt;/code&gt; short-circuiting jumped from &lt;code&gt;61.3%&lt;/code&gt; to &lt;strong&gt;&lt;code&gt;69.5%&lt;/code&gt;&lt;/strong&gt; (at &lt;code&gt;1.37%&lt;/code&gt; error). We keep it opt-in (&lt;code&gt;default: false&lt;/code&gt;) because quiet-then-noisy diurnal bursts trade ~1 extra daytime audit (&lt;code&gt;0.00%&lt;/code&gt; → &lt;code&gt;3.71%&lt;/code&gt; error, still inside the 5% bound).&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Feature-only hard-boundary replay (&lt;code&gt;hardReplayCapacity&lt;/code&gt;).&lt;/strong&gt; Inspired by &lt;a href=&quot;https://arxiv.org/abs/2604.23577&quot; rel=&quot;noopener&quot;&gt;RouteNLP (2026)&lt;/a&gt;, an opt-in bounded hard-replay buffer retains mispredicted or low-margin examples (&lt;code&gt;p_true &amp;lt; 0.70&lt;/code&gt;) and runs feature-only margin passes with class intercepts anchored to uniform FIFO replay — avoiding the prior-inversion bug we hit with inverse class weights. Measured honestly: zero regression on skewed 93/5.5/1.5% workloads, and kept opt-in because short synthetic streams already fit inside the 512-row uniform FIFO.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Anytime-valid semantic caching (&lt;code&gt;ConformalSemanticCache&lt;/code&gt;).&lt;/strong&gt; Standard LLM semantic caches pick an arbitrary cosine-similarity cutoff like &lt;code&gt;0.92&lt;/code&gt;. Reusing our bounded embedding engine, &lt;code&gt;ConformalSemanticCache&lt;/code&gt; certifies similarity across a 24-point descending grid (&lt;code&gt;0.998 → 0.65&lt;/code&gt;) using pre-insert filtration-safe evaluation + Ville&#x27;s mixture martingale, and trips e-CUSUM to purge stale entries and bump generation automatically on staleness or poisoning drift.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Two genuinely open directions remain for future versions: swapping single-rate ACI for multi-rate DtACI or Conformal PID control under smooth continuous drift, and offline neural distillation for shared semantic tasks where hashed lexical n-grams hit their representational ceiling.&lt;/p&gt;

&lt;h2&gt;What this changes, and where it stops&lt;/h2&gt;
&lt;p&gt;Real multi-tenant production traffic makes both the upside and the boundaries of conformal gating clear:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Sub-millisecond certified routing works in production without a bespoke ML stack.&lt;/strong&gt; On our highest-volume classifier, coarsening the output space and fixing class-weight calibration lifted a live tenant from 0.0% to &lt;strong&gt;62.7% short-circuiting at 0.23% disagreement&lt;/strong&gt; in &lt;strong&gt;0.14 ms p50&lt;/strong&gt; inside V8 isolates — zero runtime errors and zero drift trips across tens of thousands of daily evaluations.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Per-tenant cold start is real — and now has a safe bridge.&lt;/strong&gt; In multi-tenant production, a heavy-tailed share of new or quiet &lt;code&gt;(tenant, gate)&lt;/code&gt; pairs take a long time to cross 300+ calls on their own, sitting honestly at 0% short-circuiting. Warm-starting new tenants from a shared fleet prior via &lt;code&gt;createWithPrior&lt;/code&gt; cuts certification time on aligned workspaces while preserving per-tenant anytime-valid safety on divergent ones.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Lexical features still have a ceiling.&lt;/strong&gt; Nuanced semantic checks, subtle emoji interpretation, and multi-step reasoning over long threads still require dense embeddings (via &lt;code&gt;input.embedding&lt;/code&gt;, &lt;code&gt;EmbeddingOodGuard&lt;/code&gt;, or &lt;code&gt;ConformalSemanticCache&lt;/code&gt;) or the hosted teacher. When local features cannot separate the classes, the gate refuses to certify and abstains at 0%.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Be honest about the immediate ROI.&lt;/strong&gt; When your teacher is already an inexpensive single-pass decision engine, the first payoff is &lt;strong&gt;tail latency (0.14 ms vs. 250–850 ms) and deterministic fail-closed safety&lt;/strong&gt;; raw dollar savings compound mostly at high volume or when gating slower autoregressive LLMs.&lt;/li&gt;
&lt;/ul&gt;

&lt;aside class=&quot;essay-callout essay-callout--ok&quot;&gt;
  &lt;span class=&quot;callout-kicker&quot;&gt;Gate the decision that saves the hop, and prove when you don&#x27;t know&lt;/span&gt;
  &lt;p&gt;The biggest jump in production did not come from a fancier model — it came from shrinking the gate&#x27;s output space to the coarse routing decision that actually skips a network hop, removing class weights that warped probability order, and retiring mathematically doomed candidates early. Capture microsecond speed wherever clear local patterns prove themselves inside your error budget, and keep the hosted engine everywhere else.&lt;/p&gt;
&lt;/aside&gt;</content>
  </entry>
  <entry>
    <title>music without audio files</title>
    <link href="https://strangechances.com/writings/soft-light/" rel="alternate" type="text/html"/>
    <id>https://strangechances.com/writings/soft-light/</id>
    <published>2026-11-20T00:00:00Z</published>
    <updated>2026-11-20T00:00:00Z</updated>
    <summary>Synthesizing non-repeating music in 3.6 KB of Web Audio code, with no samples.</summary>
    <content type="html">&lt;p&gt;When you are the only person in an Ando Jam, Ando plays quiet music until someone joins. The first version was an MP3. The current version has no audio file at all. A small program writes the music and plays it in your browser, one bar at a time.&lt;/p&gt;
&lt;p&gt;This post covers how that works, what we had to get right, and lets you listen to the exact engine live below.&lt;/p&gt;

&lt;dl class=&quot;essay-stats&quot; aria-label=&quot;Soft light metrics&quot;&gt;
  &lt;div&gt;&lt;dt&gt;compressed code vs. 569 KB MP3&lt;/dt&gt;&lt;dd class=&quot;is-ok&quot;&gt;3.6 KB&lt;/dd&gt;&lt;/div&gt;
  &lt;div&gt;&lt;dt&gt;A major form at 72 BPM&lt;/dt&gt;&lt;dd&gt;32 bars&lt;/dd&gt;&lt;/div&gt;
  &lt;div&gt;&lt;dt&gt;Chromium / Firefox / WebKit match&lt;/dt&gt;&lt;dd class=&quot;is-ok&quot;&gt;0.1 dB&lt;/dd&gt;&lt;/div&gt;
  &lt;div&gt;&lt;dt&gt;target level under speech&lt;/dt&gt;&lt;dd&gt;−32 LUFS&lt;/dd&gt;&lt;/div&gt;
&lt;/dl&gt;

&lt;figure id=&quot;exhibit-synth&quot; class=&quot;diagram&quot; aria-label=&quot;Live Web Audio synthesizer for Soft light with real-time oscilloscope&quot;&gt;
  &lt;svg viewBox=&quot;0 0 640 88&quot; role=&quot;img&quot; aria-labelledby=&quot;sl0-title&quot;&gt;
    &lt;title id=&quot;sl0-title&quot;&gt;Live oscilloscope for Soft light synthesized directly in your browser with the Web Audio API&lt;/title&gt;
    &lt;text class=&quot;dg-title&quot; x=&quot;14&quot; y=&quot;14&quot;&gt;LIVE SYNTHESIZER · SOFT LIGHT (NO AUDIO FILE)&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;626&quot; y=&quot;14&quot; text-anchor=&quot;end&quot;&gt;A major · 72 BPM · ~100 oscillators&lt;/text&gt;
    &lt;line class=&quot;scope-base&quot; x1=&quot;14&quot; y1=&quot;44&quot; x2=&quot;626&quot; y2=&quot;44&quot;/&gt;
    &lt;path id=&quot;sl-scope-wave&quot; class=&quot;scope-wave&quot; d=&quot;M 14 44 L 626 44&quot;/&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;14&quot; y=&quot;80&quot;&gt;bells (FM) · strings (3 players, 3 formants) · synthetic 2.6 s room reverb&lt;/text&gt;
  &lt;/svg&gt;
  &lt;div class=&quot;exhibit-bar&quot;&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-sl-play&quot; class=&quot;exhibit-btn exhibit-btn--ok&quot; aria-pressed=&quot;false&quot;&gt;Play Soft light&lt;/button&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-sl-pass1&quot; class=&quot;exhibit-btn&quot; aria-pressed=&quot;true&quot;&gt;Pass 1 (written)&lt;/button&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-sl-pass2&quot; class=&quot;exhibit-btn&quot; aria-pressed=&quot;false&quot;&gt;Pass 2+ (varying)&lt;/button&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-sl-seed&quot; class=&quot;exhibit-btn&quot;&gt;New seed&lt;/button&gt;
    &lt;span id=&quot;sl-readout&quot; class=&quot;exhibit-readout&quot;&gt;READY · seed 42 · 0 KB audio fetched&lt;/span&gt;
  &lt;/div&gt;
  &lt;figcaption&gt;Figure 1. The actual Web Audio synthesizer from Ando Jams running live in this page. Press Play Soft light to hear it synthesized bar by bar; switch to Pass 2+ to hear note swaps and octave lifts without waiting for bar 33.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2&gt;Why not a file&lt;/h2&gt;
&lt;p&gt;A file had three problems.&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Size.&lt;/strong&gt; The MP3 was 569 KB. That is a lot to ship for something most people hear for a few seconds.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;The loop.&lt;/strong&gt; Hold music repeats. After the second pass you start to hear the join, and after the fifth you know every note.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;It is fixed.&lt;/strong&gt; A recording cannot be made a little sparser or held a little longer without rendering it again.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The piece we had chosen, which we call &lt;em&gt;Soft light&lt;/em&gt;, was already an algorithm. We had written about a dozen candidate tunes as Python scripts that synthesized every sound from scratch, then graded them with a meter: loudness, how much of the sound survives a laptop speaker, and how much energy sits in the harsh range above 5 kHz. Since the winner was rules and arithmetic, the browser could run the same rules live.&lt;/p&gt;

&lt;h2&gt;Two files: what to play and how it sounds&lt;/h2&gt;
&lt;p&gt;The code is split in two.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The score&lt;/strong&gt; decides which notes sound and when. It knows nothing about audio. It holds a thirty-two bar form in A major at 72 beats a minute (in the manner of 1980s Japanese environmental music): a chord for each bar, an eight-note bell figure for each chord, a sparse melody, and two curves that say how full each bar is and how present the strings are.&lt;/p&gt;
&lt;p&gt;Some things vary on every pass. Each bell lands a few milliseconds early or late and is struck a little harder or softer than the one before. About half the bars get one very high, very quiet note at a random moment, like light catching water.&lt;/p&gt;
&lt;p&gt;The notes themselves are played as written on the first pass. From the second pass on, they change:&lt;/p&gt;

&lt;div class=&quot;code-plate&quot;&gt;
  &lt;div class=&quot;code-plate-head&quot;&gt;
    &lt;span&gt;score.ts&lt;/span&gt;
    &lt;span&gt;Pass 2+ figure variation&lt;/span&gt;
  &lt;/div&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;// After the first pass, a bar now and then swaps two notes of its figure.
if (pass &amp;gt; 0 &amp;amp;&amp;amp; random() &amp;lt; 0.3) {
  const first = 1 + Math.floor(random() * 7);
  const other = 1 + Math.floor(random() * 7);
  const held = figure[first];
  figure[first] = figure[other];
  figure[other] = held;
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;A melody phrase is left out one time in five, and a melody note sometimes sounds an octave higher.&lt;/p&gt;
&lt;p&gt;None of this changes the harmony. A swap only reorders notes the bar already has, an octave shift keeps the same note, and the high notes come from a five-note scale that sits over every chord in the piece. That is what lets it keep varying without drifting out of key.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The engine&lt;/strong&gt; turns each note into sound with the Web Audio API. There are no samples.&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Bells.&lt;/strong&gt; Each one is a pair of oscillators a few cents apart, with a third oscillator modulating their pitch. The modulation fades as the note rings, so the note starts bright and turns pure. Two or three short overtones give the attack its glassy edge.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Strings.&lt;/strong&gt; Each note is three players. Every player is slightly out of tune with the others and has their own vibrato, which only arrives once the bow has settled. Their waveform is shaped with three resonant peaks (520 Hz, 1,150 Hz, and 2,900 Hz), the way a wooden body colors a string.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;The room.&lt;/strong&gt; This kind of reverb normally uses a recording of a real space. We generate one instead: two and a half seconds of fading, filtered noise, built once when the music starts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A slow chorus, an echo three quarters of a beat long, and a gentle compressor finish it.&lt;/p&gt;

&lt;figure id=&quot;exhibit-form&quot; class=&quot;diagram&quot; aria-label=&quot;Tufte diagram of the 32-bar form, bell figure swapper, and wooden-body string formants&quot;&gt;
  &lt;svg viewBox=&quot;0 0 640 282&quot; role=&quot;img&quot; aria-labelledby=&quot;sl1-title&quot;&gt;
    &lt;title id=&quot;sl1-title&quot;&gt;Thirty-two bar form in A major with fullness and string-swell curves, live bell figure swapper, and three-peak string formant spectrum&lt;/title&gt;

    &lt;!-- TOP BAND: 32-bar form --&gt;
    &lt;text class=&quot;dg-title&quot; x=&quot;12&quot; y=&quot;14&quot;&gt;32-BAR FORM IN A MAJOR · FULLNESS &amp;amp; STRING SWELL&lt;/text&gt;
    &lt;text class=&quot;dg-mono--ok&quot; x=&quot;628&quot; y=&quot;14&quot; text-anchor=&quot;end&quot;&gt;green: strings · ink: fullness&lt;/text&gt;

    &lt;!-- 4 eight-bar sections (x=34 to 620 -&gt; 146.5px per 8-bar section) --&gt;
    &lt;rect class=&quot;dg-band&quot; x=&quot;34&quot; y=&quot;24&quot; width=&quot;146.5&quot; height=&quot;98&quot;/&gt;
    &lt;rect class=&quot;dg-band&quot; x=&quot;327&quot; y=&quot;24&quot; width=&quot;146.5&quot; height=&quot;98&quot;/&gt;

    &lt;line class=&quot;dg-line&quot; x1=&quot;34&quot; y1=&quot;24&quot; x2=&quot;34&quot; y2=&quot;122&quot;/&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;180.5&quot; y1=&quot;24&quot; x2=&quot;180.5&quot; y2=&quot;122&quot;/&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;327&quot; y1=&quot;24&quot; x2=&quot;327&quot; y2=&quot;122&quot;/&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;473.5&quot; y1=&quot;24&quot; x2=&quot;473.5&quot; y2=&quot;122&quot;/&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;620&quot; y1=&quot;24&quot; x2=&quot;620&quot; y2=&quot;122&quot;/&gt;
    &lt;line class=&quot;dg-line--axis&quot; x1=&quot;34&quot; y1=&quot;122&quot; x2=&quot;620&quot; y2=&quot;122&quot;/&gt;

    &lt;text class=&quot;dg-mono&quot; x=&quot;107&quot; y=&quot;36&quot; text-anchor=&quot;middle&quot;&gt;I · FIGURE ALONE&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;254&quot; y=&quot;36&quot; text-anchor=&quot;middle&quot;&gt;II · MELODY JOINS&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;400&quot; y=&quot;36&quot; text-anchor=&quot;middle&quot;&gt;III · BRIGHTEST&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;547&quot; y=&quot;36&quot; text-anchor=&quot;middle&quot;&gt;IV · SETTLING&lt;/text&gt;

    &lt;text class=&quot;dg-mono&quot; x=&quot;12&quot; y=&quot;52&quot;&gt;1.0&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;12&quot; y=&quot;124&quot;&gt;0.0&lt;/text&gt;

    &lt;!-- Computed exact curves populated by soft-light-lab.js --&gt;
    &lt;path id=&quot;sl-swell-area&quot; class=&quot;dg-area--ok&quot; d=&quot;&quot;/&gt;
    &lt;path id=&quot;sl-swell-curve&quot; class=&quot;dg-curve--ok&quot; d=&quot;&quot;/&gt;
    &lt;path id=&quot;sl-fullness-curve&quot; class=&quot;dg-curve&quot; d=&quot;&quot;/&gt;

    &lt;!-- Live bar cursor (glides during playback) --&gt;
    &lt;line id=&quot;sl-form-cursor&quot; class=&quot;dg-line--err&quot; x1=&quot;34&quot; y1=&quot;24&quot; x2=&quot;34&quot; y2=&quot;126&quot; opacity=&quot;0&quot;/&gt;

    &lt;!-- Chord progression ticks along bottom of top band --&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;52&quot; y=&quot;135&quot; text-anchor=&quot;middle&quot;&gt;A&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;89&quot; y=&quot;135&quot; text-anchor=&quot;middle&quot;&gt;F#m&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;126&quot; y=&quot;135&quot; text-anchor=&quot;middle&quot;&gt;D&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;162&quot; y=&quot;135&quot; text-anchor=&quot;middle&quot;&gt;Esus·E&lt;/text&gt;

    &lt;text class=&quot;dg-mono&quot; x=&quot;199&quot; y=&quot;135&quot; text-anchor=&quot;middle&quot;&gt;A&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;235&quot; y=&quot;135&quot; text-anchor=&quot;middle&quot;&gt;F#m&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;272&quot; y=&quot;135&quot; text-anchor=&quot;middle&quot;&gt;D&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;309&quot; y=&quot;135&quot; text-anchor=&quot;middle&quot;&gt;Esus·E&lt;/text&gt;

    &lt;text class=&quot;dg-mono&quot; x=&quot;345&quot; y=&quot;135&quot; text-anchor=&quot;middle&quot;&gt;Bm&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;382&quot; y=&quot;135&quot; text-anchor=&quot;middle&quot;&gt;C#m&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;419&quot; y=&quot;135&quot; text-anchor=&quot;middle&quot;&gt;D&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;455&quot; y=&quot;135&quot; text-anchor=&quot;middle&quot;&gt;E6·Esus&lt;/text&gt;

    &lt;text class=&quot;dg-mono&quot; x=&quot;492&quot; y=&quot;135&quot; text-anchor=&quot;middle&quot;&gt;A&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;529&quot; y=&quot;135&quot; text-anchor=&quot;middle&quot;&gt;F#m&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;565&quot; y=&quot;135&quot; text-anchor=&quot;middle&quot;&gt;D·E&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;602&quot; y=&quot;135&quot; text-anchor=&quot;middle&quot;&gt;A6·A&lt;/text&gt;

    &lt;!-- Horizontal divider between top and bottom bands --&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;12&quot; y1=&quot;148&quot; x2=&quot;628&quot; y2=&quot;148&quot;/&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;316&quot; y1=&quot;158&quot; x2=&quot;316&quot; y2=&quot;262&quot;/&gt;

    &lt;!-- BOTTOM LEFT: 8-note bell figure + Pass 2+ swap --&gt;
    &lt;text class=&quot;dg-title&quot; x=&quot;12&quot; y=&quot;164&quot;&gt;8-NOTE BELL FIGURE (SAME CHORD)&lt;/text&gt;
    &lt;text id=&quot;sl-bell-meta&quot; class=&quot;dg-mono&quot; x=&quot;12&quot; y=&quot;274&quot;&gt;Bar 9 (A) · Pass 2&lt;/text&gt;
    &lt;!-- Faint staff lines --&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;18&quot; y1=&quot;190&quot; x2=&quot;292&quot; y2=&quot;190&quot;/&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;18&quot; y1=&quot;210&quot; x2=&quot;292&quot; y2=&quot;210&quot;/&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;18&quot; y1=&quot;230&quot; x2=&quot;292&quot; y2=&quot;230&quot;/&gt;
    &lt;g id=&quot;sl-bell-figure&quot;&gt;&lt;/g&gt;

    &lt;!-- BOTTOM RIGHT: Wooden-body string formant peaks --&gt;
    &lt;text class=&quot;dg-title&quot; x=&quot;332&quot; y=&quot;164&quot;&gt;STRING BODY FORMANTS (LOG HZ)&lt;/text&gt;
    &lt;line class=&quot;dg-line--axis&quot; x1=&quot;342&quot; y1=&quot;240&quot; x2=&quot;618&quot; y2=&quot;240&quot;/&gt;
    &lt;!-- Vertical reference hairlines at 520, 1150, 2900 Hz --&gt;
    &lt;line class=&quot;dg-line--dash&quot; x1=&quot;414&quot; y1=&quot;178&quot; x2=&quot;414&quot; y2=&quot;240&quot;/&gt;
    &lt;line class=&quot;dg-line--dash&quot; x1=&quot;473&quot; y1=&quot;184&quot; x2=&quot;473&quot; y2=&quot;240&quot;/&gt;
    &lt;line class=&quot;dg-line--dash&quot; x1=&quot;543&quot; y1=&quot;196&quot; x2=&quot;543&quot; y2=&quot;240&quot;/&gt;
    &lt;text class=&quot;dg-mono--ok&quot; x=&quot;414&quot; y=&quot;175&quot; text-anchor=&quot;middle&quot;&gt;520 Hz&lt;/text&gt;
    &lt;text class=&quot;dg-mono--ok&quot; x=&quot;473&quot; y=&quot;182&quot; text-anchor=&quot;middle&quot;&gt;1.15 k&lt;/text&gt;
    &lt;text class=&quot;dg-mono--ok&quot; x=&quot;543&quot; y=&quot;194&quot; text-anchor=&quot;middle&quot;&gt;2.9 k&lt;/text&gt;
    &lt;path id=&quot;sl-formant-curve&quot; class=&quot;dg-curve--ok&quot; d=&quot;&quot;/&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;342&quot; y=&quot;254&quot;&gt;200 Hz&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;462&quot; y=&quot;254&quot; text-anchor=&quot;middle&quot;&gt;1 kHz&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;580&quot; y=&quot;254&quot; text-anchor=&quot;middle&quot;&gt;5 kHz&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;618&quot; y=&quot;254&quot; text-anchor=&quot;end&quot;&gt;8 k&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;332&quot; y=&quot;274&quot;&gt;rolls off gently before harsh &amp;gt;5 kHz band&lt;/text&gt;
  &lt;/svg&gt;
  &lt;div class=&quot;exhibit-bar&quot;&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-sl-swap&quot; class=&quot;exhibit-btn exhibit-btn--ok&quot;&gt;Draw Pass 2+ swap&lt;/button&gt;
    &lt;span id=&quot;sl-form-readout&quot; class=&quot;exhibit-readout&quot;&gt;Swaps reorder notes inside the same bar · golden dot = pentatonic glint&lt;/span&gt;
  &lt;/div&gt;
  &lt;figcaption&gt;Figure 2. Top: the exact thirty-two bar chord progression, fullness curve, and string swell from score.ts (tracks live playback when playing). Bottom left: a Pass 2+ bell swap keeping the harmony intact. Bottom right: the three-peak wooden-body resonance curve from engine.ts.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2&gt;The clock problem&lt;/h2&gt;
&lt;p&gt;A browser&#x27;s timers are not accurate enough to play music. In a background tab they fire about once a second, and a Jam is very often in a background tab.&lt;/p&gt;
&lt;p&gt;So the engine never plays a note &quot;now&quot;. Every 700 milliseconds it asks the score for every bar that starts in the next 4.5 seconds and hands each note to the audio system with an exact start time. The audio system runs on its own clock and plays them precisely, however late the timer was.&lt;/p&gt;

&lt;div class=&quot;code-plate&quot;&gt;
  &lt;div class=&quot;code-plate-head&quot;&gt;
    &lt;span&gt;engine.ts&lt;/span&gt;
    &lt;span&gt;4.5 s audio-clock lookahead&lt;/span&gt;
  &lt;/div&gt;
&lt;pre&gt;&lt;code class=&quot;language-ts&quot;&gt;const keepAhead = () =&amp;gt;
  music.scheduleUntil(context.currentTime + SCHEDULE_AHEAD_SECONDS);
keepAhead();
const timer = setInterval(keepAhead, SCHEDULE_EVERY_MS);&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Code review found the hole in this. If the page freezes for longer than the margin, for example when a laptop sleeps, the engine wakes up several bars behind and schedules all of them at once. Every missed chord sounds together.&lt;/p&gt;
&lt;p&gt;The fix is to check each bar against the clock before scheduling it. A bar that has already ended is skipped. Bell notes whose moment has passed are dropped. A held note that should already be sounding starts now and keeps only the time it had left, and its fade in and fade out shrink to fit, so a shortened note still swells instead of clicking.&lt;/p&gt;

&lt;figure id=&quot;exhibit-clock&quot; class=&quot;diagram&quot; aria-label=&quot;Interactive audio-clock lookahead and laptop-sleep catchup diagram&quot;&gt;
  &lt;svg viewBox=&quot;0 0 640 206&quot; role=&quot;img&quot; aria-labelledby=&quot;sl2-title&quot;&gt;
    &lt;title id=&quot;sl2-title&quot;&gt;Comparison of normal 4.5-second lookahead scheduling against a 6.2-second laptop sleep stall, with and without the stillDue fix&lt;/title&gt;

    &lt;text class=&quot;dg-title&quot; x=&quot;12&quot; y=&quot;14&quot;&gt;AUDIO CLOCK VS. BACKGROUND TIMER (0 s TO 12 s)&lt;/text&gt;

    &lt;!-- Track labels --&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;12&quot; y=&quot;69&quot;&gt;JS timer&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;12&quot; y=&quot;146&quot;&gt;Audio clock&lt;/text&gt;

    &lt;!-- Baseline hairlines --&gt;
    &lt;line class=&quot;dg-line&quot; x1=&quot;76&quot; y1=&quot;66&quot; x2=&quot;616&quot; y2=&quot;66&quot;/&gt;
    &lt;line class=&quot;dg-line--axis&quot; x1=&quot;76&quot; y1=&quot;184&quot; x2=&quot;616&quot; y2=&quot;184&quot;/&gt;

    &lt;!-- Time ticks (76 + s * 45) --&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;76&quot; y=&quot;198&quot; text-anchor=&quot;middle&quot;&gt;0 s&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;211&quot; y=&quot;198&quot; text-anchor=&quot;middle&quot;&gt;3 s&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;346&quot; y=&quot;198&quot; text-anchor=&quot;middle&quot;&gt;6 s&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;481&quot; y=&quot;198&quot; text-anchor=&quot;middle&quot;&gt;9 s&lt;/text&gt;
    &lt;text class=&quot;dg-mono&quot; x=&quot;616&quot; y=&quot;198&quot; text-anchor=&quot;middle&quot;&gt;12 s&lt;/text&gt;

    &lt;g id=&quot;clk-dynamic&quot;&gt;&lt;/g&gt;
  &lt;/svg&gt;
  &lt;div class=&quot;exhibit-bar&quot;&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-clk-normal&quot; class=&quot;exhibit-btn&quot; aria-pressed=&quot;true&quot;&gt;Normal (4.5 s buffer)&lt;/button&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-clk-bug&quot; class=&quot;exhibit-btn exhibit-btn--err&quot; aria-pressed=&quot;false&quot;&gt;Laptop sleep (bug)&lt;/button&gt;
    &lt;button type=&quot;button&quot; id=&quot;btn-clk-fix&quot; class=&quot;exhibit-btn exhibit-btn--ok&quot; aria-pressed=&quot;false&quot;&gt;Laptop sleep (stillDue fix)&lt;/button&gt;
    &lt;span id=&quot;clk-readout&quot; class=&quot;exhibit-readout&quot;&gt;Timers drift in background tabs · audio clock plays every bell on the millisecond&lt;/span&gt;
  &lt;/div&gt;
  &lt;figcaption&gt;Figure 3. Toggle Laptop sleep (bug) to see three missed bars pile up at wake time, then switch to Laptop sleep (stillDue fix) to see ended bars skipped and the active bar swell smoothly over its remaining duration.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2&gt;Testing music&lt;/h2&gt;
&lt;p&gt;The score is easy to test because its only inputs are a bar number and a random source. The random source is seeded, so a test can replay a whole performance. The tests check that the same seed gives the same notes, that later passes differ from the first, and that a varied bar stays inside its chord.&lt;/p&gt;
&lt;p&gt;The engine is harder, because it needs a browser&#x27;s audio system. We wrote a stand-in that plays nothing and records everything it is asked to do. That let us assert, for example, that every change to a volume is scheduled in time order. The click bug above fails that test.&lt;/p&gt;
&lt;p&gt;For the sound itself we used the browser. The engine accepts either a live audio context or an offline one, and an offline context renders the music much faster than it plays. We rendered it in Chromium, Firefox, and WebKit, and the three agreed on loudness to within 0.1 dB. The same render gave us the number that sets its volume: the engine comes out at about −18 LUFS, and we turn it down to −32 so it sits under speaking volume.&lt;/p&gt;

&lt;h2&gt;What it cost&lt;/h2&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Download:&lt;/strong&gt; 9.4 KB of code, 3.6 KB compressed, loaded the first time music plays. Nothing is fetched after that.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Processor:&lt;/strong&gt; about 100 oscillators sound at once. On an M-series Mac it renders eleven times faster than real time, which is roughly 9% of one core. We have not measured a slow laptop yet.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you want to hear it, press Play at the top of this page or start an Ando Jam alone and wait a minute. It will not play the same way twice.&lt;/p&gt;
&lt;p&gt;If you want procedural furniture music that lives in your macOS menu bar instead of a browser tab, I also built &lt;a href=&quot;/satie/&quot;&gt;Satie&lt;/a&gt; (2.4 MB native Swift and Metal, MIT).&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>a meditation on control</title>
    <link href="https://strangechances.com/writings/a-meditation-on-control/" rel="alternate" type="text/html"/>
    <id>https://strangechances.com/writings/a-meditation-on-control/</id>
    <published>2026-10-17T00:00:00Z</published>
    <updated>2026-10-17T00:00:00Z</updated>
    <summary>The urge to control, where it comes from, and how little of it we need.</summary>
    <content type="html">&lt;p&gt;Think of something you’re trying to control. Someone who hasn’t written back, a number you keep checking. Notice what the wanting feels like and where it sits in your body, and the discomfort of not being fully in charge of it.&lt;/p&gt;
&lt;p&gt;Now imagine this thing wasn’t in your life. You never met the person. The number was never yours to check.&lt;/p&gt;
&lt;p&gt;Consider that the feeling of wanting would still be there, attached to something else. A repeating pattern. Another situation to fix, another outcome to hold on to, the same sense that things aren’t in your hands.&lt;/p&gt;
&lt;p&gt;So it isn’t about this particular thing. Underneath is the control program, always reaching for something to hold, and finding it wherever it can.&lt;/p&gt;
&lt;p&gt;Let your attention rest on the feeling in the body, without giving it anything to hold.&lt;/p&gt;
&lt;hr class=&quot;piece-break&quot;&gt;
&lt;p&gt;We can be in control or out of it, and like it or not.&lt;/p&gt;
&lt;figure class=&quot;matrix&quot; aria-label=&quot;Control and comfort, two by two&quot;&gt;
  &lt;span class=&quot;matrix-axis matrix-col&quot;&gt;in control&lt;/span&gt;
  &lt;span class=&quot;matrix-axis matrix-col&quot;&gt;out of control&lt;/span&gt;
  &lt;span class=&quot;matrix-axis matrix-row&quot;&gt;like it&lt;/span&gt;
  &lt;p class=&quot;matrix-cell&quot;&gt;Making your own decisions. Running your own day.&lt;/p&gt;
  &lt;p class=&quot;matrix-cell&quot;&gt;Being looked after when you’re sick. Letting someone else drive.&lt;/p&gt;
  &lt;span class=&quot;matrix-axis matrix-row&quot;&gt;dislike it&lt;/span&gt;
  &lt;p class=&quot;matrix-cell&quot;&gt;Everyone waiting on your decision. Holding the trip together.&lt;/p&gt;
  &lt;p class=&quot;matrix-cell matrix-cell--centre&quot;&gt;An authority you didn’t choose. Being told what to do.&lt;/p&gt;
&lt;/figure&gt;
&lt;p&gt;As children, someone else decided when we ate and when we slept, and when they did it well, it was a relief. Part of us still wants that, and part of us pushes back against any control we didn’t agree to.&lt;/p&gt;
&lt;p&gt;It doesn’t always look like control. Sometimes it’s needing to be right, or fixing someone who didn’t ask. The other side is quieter, saying “I don’t know” so someone else decides.&lt;/p&gt;
&lt;p&gt;Every square is the same program. Sometimes it wants the controls, and sometimes it wants someone else to have them.&lt;/p&gt;
&lt;hr class=&quot;piece-break&quot;&gt;
&lt;p&gt;The program is busiest around other people. We know how their day should go and how they should feel about it. A friend shares good news and we’re already telling them what to do with it. Even good advice, given from that place, lands as pressure.&lt;/p&gt;
&lt;p&gt;Without the program behind them, the same words land differently. People find their own way more easily when nobody is pushing.&lt;/p&gt;
&lt;hr class=&quot;piece-break&quot;&gt;
&lt;p&gt;We can’t guess our next thought. It turns up on its own, and only afterwards does it feel like ours.&lt;/p&gt;
&lt;p&gt;Most of what we do works the same way. We step back from a car before deciding to. We drive home without remembering a single turn. Plans fall through, and things we swore we’d never do, we sometimes do anyway. The past is already finished, however much we argue with it.&lt;/p&gt;
&lt;p&gt;The control the program reaches for may be thinner than it feels. We still make plans and choices, and there’s no other way to live. But we can hold them more loosely, like a guess.&lt;/p&gt;
&lt;p&gt;When the program eases, nothing falls apart. The person writes back or doesn’t. The number moves or it doesn’t. Things go about as well as they would have, with less strain.&lt;/p&gt;
&lt;blockquote class=&quot;piece-capstone&quot;&gt;
  &lt;p&gt;To have without possessing,&lt;br&gt;do without claiming,&lt;br&gt;lead without controlling:&lt;br&gt;this is mysterious power.&lt;/p&gt;
  &lt;footer&gt;Lao Tzu, tr. Ursula K. Le Guin&lt;/footer&gt;
&lt;/blockquote&gt;</content>
  </entry>
</feed>
