diff --git a/whitepaper/MD5SUMS b/whitepaper/MD5SUMS index d8a57cb17..60256e35d 100644 --- a/whitepaper/MD5SUMS +++ b/whitepaper/MD5SUMS @@ -6,3 +6,4 @@ f076f22e9e70a94f51884562aad6fdc5 undefect-cwe407-2026-03-25.pdf ff52abf9f47a7e6bb25e4519b1325090 undefect-minecraft-enterprise-java-2026-03-24.pdf c7fe499eb004271b384a31ac01b38852 undefect-minecraft-enterprise-java-2026-03-25.pdf 818d29731df88333d29cfdd3eefeb3a2 undefect-minecraft-enterprise-java-2026-03-26.pdf +a10aed2e5e846290cbe61120d8ef7520 undefect-cwe407-2026-03-27.pdf diff --git a/whitepaper/full-paper.md b/whitepaper/full-paper.md index 2747b2375..e6156a416 100644 --- a/whitepaper/full-paper.md +++ b/whitepaper/full-paper.md @@ -2149,6 +2149,85 @@ this entirely via `Float32Array` — no GC-eligible objects in the render path. to Swing requires making the same guarantee explicitly: pre-allocate all scratch buffers as fields, resize only on structural change, never allocate inside the frame loop. +### 19.4 Browser SEW: Two-Manifold Live Demo and Agent Science + +The browser workbench (`~/git/cupPCB`) was extended with a split-viewport experiment +that runs the MOAD and its patch side by side in the same session. The left manifold +runs the unpatched heat model; the right runs the patched model. Both share the same +Sym²(X) geometry. Agents (friends) walk both manifolds simultaneously. + +#### Two-Manifold Heat Model + +| Parameter | Left (MOAD) | Right (patched) | +|-----------|-------------|-----------------| +| Injections per frame | 20 × 0.5 | 1 × 0.4 | +| Diffusion decay | 0.975 | 0.90 | +| Equilibrium heat | ~4.0 | ~0.3 | +| z-displacement scale | 120 | 40 | +| Wireframe color | red | green | + +The left manifold reaches ~4.0 mean heat at equilibrium; the right stays near 0.3. +The z-displacement (vertex distortion) is proportional to local heat. The left manifold +deforms dramatically; the right stays close to the rest shape. This is the defect made +geometric: O(n²) heat accumulation vs. O(1) constant throughput. + +#### Clock Drift Observation + +The two renderers run in **separate `requestAnimationFrame` loops**: the kernel's loop +drives the left renderer and increments the global `tick` counter; `two-manifolds.js` +runs its own loop for the right renderer. A HUD overlay shows both frame counters live. +In practice, the two loops run within 1–2 frames of each other on a single-core browser +tab (they share the same event loop and are both rAF-scheduled). Drift appears when +the left manifold's heat diffusion pass (O(n) over all vertices) takes long enough to +push past the 16ms frame budget — the kernel loop falls behind the twin loop by 1 frame +per heavy frame. This is a direct measurement of the MOAD's compute tax in the renderer. + +#### Friend Temperature Differential + +Each agent (friend) has a current vertex index `vIdx`. The HUD reads `heat1[vIdx]` +(MOAD) and `heat2[vIdx]` (patched) for every live agent and displays both +simultaneously. At equilibrium, MOAD-side temperatures per agent are 10–15× higher +than patched-side temperatures at the same vertex. This is the individual-agent view +of the defect: an agent traversing the MOAD manifold accumulates heat both because +the manifold itself is hotter and because the agent's own `injectGrowth()` call +compounds the chaos (+1.0 to `heat[v]` per visit on the MOAD side vs. visit-count-only +on the patched side). + +#### kcjones Agent — Comparative Traversal Science + +A special agent, kcjones, was deployed on both manifolds simultaneously with identical +navigation logic. Its `chooseNext()` scores neighbors by three terms: + +``` +score = guide(friends) + heatScore(heat[v] × 2.0) + novelty(unvisited ? 3.0 : 0) +``` + +On the MOAD manifold, heat is high everywhere after ~200 frames. The heat term +dominates; kcjones clusters in already-hot zones, reinforcing them, reducing coverage. +On the patched manifold, heat is near zero; novelty and friend proximity dominate; +kcjones spreads broadly, covering new vertices each step. + +The `kcjones.locker` command reports the divergence live: +- `visited` set size: patched side accumulates unique vertices faster +- `heatLedger`: MOAD side shows top nodes visited hundreds of times (clustering) +- `heatLedger2`: patched side shows flat visit distribution (broad coverage) +- `discoveries`: events where kcjones first reached a vertex above heat threshold 2.5 — + on the MOAD side these are rare (high threshold, clustered), on the patched side they + don't fire at all (heat never reaches 2.5) + +The science summary: **the MOAD makes agents cluster where heat already exists, creating +a positive feedback loop. The patch breaks the feedback: agents explore freely, heat +dissipates, the manifold stays navigable.** + +#### PCB Language — KNOT Container + +The PCB NON LINEAR LANGUAGE was extended with a `KNOT`/`TONK` container backed by +`Set` instead of `Array`. All `contains`/`sniatnoc` operations are O(1) `Set.has()` +instead of O(n) `Array.includes()`. This fixes the MOAD at the language level: any +PCB program using a visited-set should use `KNOT`, not `POCKET`. The container +fix is a one-line substitution — the same one-line substitution documented across +every ecosystem in this paper. + --- ## 20. MOADS: The Universal Bottleneck Across the Complete Manifold diff --git a/whitepaper/undefect-cwe407-2026-03-27.pdf b/whitepaper/undefect-cwe407-2026-03-27.pdf new file mode 100644 index 000000000..ec88960ff Binary files /dev/null and b/whitepaper/undefect-cwe407-2026-03-27.pdf differ