03.4 · Walkthrough
Status: Companion / teaching document — non-normative (Docs 03.1–03.3 define behavior; this document animates them). If this walkthrough and a normative doc ever disagree, the normative doc wins.
Live version: the simulator (epochsketch-simulator.html) runs this exact machinery; its eviction schedule selector switches between M3 / M1 / M2(deprecated) / Option C so the Chip Inspector can replay this document interactively.
The scene
Section titled “The scene”Telemetry sampling, epoch 512. An incident begins: template payment retry queue full — key X — goes from nonexistent to hot (hundreds of arrivals/second). X is hashed once at the door; the 64 bits fund everything:
h = 0x7C3A91B4_52E6_0D28 └─ spare ─┘└tag┘└bkt┘ bucket #3368 · tag 0x52E6 · spare 0x7C3A91B4Bucket #3368 (all fresh, so raw = eff):
slot: 0 1 2 3 4 5 6 7tag: 11AA 2B0C 9F10 6D77 8123 E0E4 30C2 77F0eff: 4810 977 310 155 96 78 52 40 ← minimum: slot 7X arrives: 8 tag comparisons — no 52E6; no empty slot. Lockout. Eviction machinery engages.
Phase 1 — Nomination (shared by both options; Doc 03.1)
Section titled “Phase 1 — Nomination (shared by both options; Doc 03.1)”Fold decay per slot, take the minimum: slot 7, eff 40. Deterministic — the weakest is the weakest; elephants are protected here by arithmetic, not luck. (Had slot 7 been raw 96 / silent 5 epochs, Adaptation 1 nominates it at eff 3 — fading ghosts compete as who they are now.)
Phase 2 — Option C (the measuring stick; Doc 03.1)
Section titled “Phase 2 — Option C (the measuring stick; Doc 03.1)”p = 1.08⁻⁴⁰ ≈ 0.046 (≈ 1 in 22). The seeded deck deals:
- Attempt 1: draw 0.4137 ≥ 0.046 → BOUNCE. Structure untouched; X reported up as
(estimate 1, first=true)— untracked ⇒ rare ⇒ keep. Consumers never suffer during a lockout; only the sketch is blind. - Attempt 2: draw 0.0291 < 0.046 → CHIP. Slot 7 →
(tag 77F0, ts 512, ct 39)— same occupant, one tally weaker, clock restamped (Adaptation 2). X still walks away untracked.
Naive pace: ~22 attempts/chip × 40 chips ≈ 900 attempts. But watch decay and eviction cooperate: epoch 513 folds the idle victim to eff ~19 ⇒ p ≈ 0.23; epoch 514 ⇒ eff ~9 ⇒ p ≈ 0.5. The fading occupant softens while the hot challenger keeps swinging — takeover lands within an epoch or two. X enters at count 1 (🌱 newborn, the new minimum, maximally fragile), refills to hundreds within the epoch because it is genuinely hot, and takes root. The traffic performed the audition.
Phase 2′ — Option A, same scene (Docs 03.2 + 03.3)
Section titled “Phase 2′ — Option A, same scene (Docs 03.2 + 03.3)”Difficulty (0.2): k = (40 × 227) >> 11 = 9080 >> 11 = 4 zero-bits ⇒ p = 1/16 = 0.0625 — C’s neighborhood, half a staircase-step permissive. No pow, no float, no RNG: one multiply, one shift.
Ticket printing (0.3): global attempt salt at 90,211.
attempt 1: salt = 90212 ing1 spare = 0x7C3A91B4 (X's leftover hash bits — frozen per key) ing2 victimWord = 0x77F0_000200_000028 (tag|ts|count — frozen while victim idle) ing3 salt × ODD = 90212 × 0x9E3779B97F4A7C15 (never repeats — freshness by arithmetic) draw = finalize(ing1 ⊕ ing2 ⊕ ing3) (the tumbling cage launders habit-ridden low bits) low 4 bits: 1010 → not all zero → BOUNCE
attempt 2: salt = 90213 ← ONLY ingredient 3 changed — and that is ENOUGH draw = finalize(new mixture) low 4 bits: 0000 → WIN → CHIP → slot 7 becomes (77F0, ts 512, ct 39)Freeze on attempt 2 — it is the whole of Doc 03.3 in one frame. Ingredients 1 and 2 were bit-for-bit identical to attempt 1 (same key, unmoved victim). Under the original two-ingredient design, attempt 2 would have replayed attempt 1’s 1010 — and attempt 10,000 would too: deterministic lockout during an incident (the static-pairing bug, Doc 03.3 §2.1). The salt is the only thing making “1/16” true rather than a lie. And the finalizer is why reading the low bits is legitimate at all: victimWord’s low bits are literally the count …28 — the most patterned bits in the building — shaken clean before we look.
From here A’s movie matches C’s plot: bounce/chip at ~1/16; decay softens the victim each tick (eff 19 ⇒ k=2, p=¼; eff 9 ⇒ k=0, p=1, every attempt chips); takeover; newborn; audition; root. Same story, different dice.
Split-screen summary
Section titled “Split-screen summary”| Beat | Option C | Option A |
|---|---|---|
| Nomination | slot 7, eff 40 | slot 7, eff 40 — identical |
| Difficulty | p = 1.08⁻⁴⁰ = 0.046 (float pow) | k = 4 ⇒ p = 0.0625 (mul + shift) |
| The dice | rng.Float64() — fresh by definition |
finalize(spare ⊕ victimWord ⊕ salt×ODD) — fresh by construction |
| Outcomes | BOUNCE / CHIP / TAKEOVER | same three, same semantics |
One line differs. Everything else — nomination, folding, outcome semantics, reporting — is shared. That isolation is the D2 experiment’s entire validity: when the error CDFs come back, any difference between the columns can only be the dice’s fault.
Things this walkthrough quietly demonstrated (checklist for re-readers)
Section titled “Things this walkthrough quietly demonstrated (checklist for re-readers)”- Untracked challengers are always reported
(1, first=true)— fail-open (Spec §2-A); lockouts starve the sketch, never the consumer. - Decay and eviction are teammates: folding serves ever-softer victims to the chipping process; stale occupants need little grinding.
- Adaptation 2 in action: every chip restamps
ts = now— the count and its clock travel together. - Newborns enter at count 1 as the next nominee — flukes are chipped out, genuine elephants outgrow chipping within an epoch. No judge exists; traffic audits.
- The salt’s freshness is arithmetic (90212 ≠ 90213), not hoped-for state churn — the permanent fix for the static-pairing bug.