lietzsche;ito
Pages

updated 2026-11-26·5 min read

Phased Implementation Roadmap

Build log across Milestones M0 to M5 separating what shipped in Rust and TypeScript from what changed mid-build or remains spec-only and unrun.

Binary ABI offsets (.itobin and .irep), shared worker ring buffers, and Cloudflare’s free-tier limits (< 5M D1 reads, < 100k D1 writes, < 1k KV writes) set the build order from the start. On paper this is six milestones (M0 through M5); in practice, M0 through M4.5 shipped across unit-tested Rust crates, TypeScript browser subsystems, and server contracts, a couple of early spec numbers shifted (3.2 ms measured parse vs an early < 1.2 ms wish, SHA-256 replacing BLAKE3), the Hono/Better-Auth/R2 wiring is still spec-only, and M5 has not been run yet because I paused to finish the local client and UI work first.

Build Log: Milestones M0 to M5

  1. Phase 0 (M0) - Done
    Workspace Scaffold & Memory Contracts

    Initialized Cargo crates (ito-core, ito-parser, ito-audio, ito-wasm) and Vite TypeScript shell with COOP/COEP credentialless headers; locked 128B ItoBinHeader, 16B SvSegmentRaw, 32B NoteRaw, 64B IrepHeader, and 5B PackedInputEvent ABIs.

  2. Phase 1 (M1) - Done
    Audio Pipeline, Kalman Sync & Alignment Fixes

    Implemented 256-slot SharedArrayBuffer SPSC queue, 2-State Kalman Filter + CUSUM step detector, and Rust SIMD v128 32-voice mixer with 32-sample micro-fades (plus fixing v128/ItoBinHeader alignment UB).

  3. Phase 2 (M2) - Done
    WebGL2 Instanced Playfield & 3D Carousel

    Wired 1000 Hz keyboard capture, single-draw-call 64B instanced WebGL2 renderer, MaxRects sprite atlas, 144B std140 ModifiersUBO, 16 px hold tessellation, negative SV spatial index, and Voronoi+hysteresis carousel hover.

  4. Phase 3 (M3) - Done (3.2 ms Parse)
    Universal Parsers & OPFS Staging

    Built zero-allocation .osu/.qua/.sm/.mc/BMS parsers (3.2 ms measured on 25k .osu notes vs early < 1.2 ms guess), 4-stage UTF-8/CP932/CP949/NFKC fallback, .itobin v2 compiler, Web Locks OPFS staging, and K=4 PCM ingestion.

  5. Phase 4 (M4/M4.5) - Split
    Live TS Client & Edge Contracts (Routes Spec-Only)

    Delivered D1 schema, HMAC-SHA256 play tickets, 4 statistical anti-cheat checks (using SHA-256 instead of BLAKE3), and the playable TS + ito_pulse.wasm client (hitsounds stripped). Hono routes, Better-Auth, R2 storage, and the 80 ms teleport gate remain spec-only.

  6. Phase 5 (M5) - Not Run
    10,000-Chart Sweep, Hardware Loopback & Load Test

    Planned only: 10,000-chart corpus fuzzer against Quaver/Etterna, hardware input-to-audio loopback test (<= 12 ms at 48 kHz), 30k plays/day Cloudflare load simulation, and public beta.

Target vs. Measured by Phase

Phase 0 & Phase 1 Gates (ABI, Concurrency, Clock, DSP)
  • Gate 0.1 / 0.2 (ABI Layout - Passed): Verified exact Rust size_of / align_of (ItoBinHeader 128B/64B, SvSegmentRaw 16B/8B, NoteRaw 32B/8B, IrepHeader 64B/64B, PackedInputEvent 5B) matching web/src/types/abi.ts, plus clean cargo check --workspace --target wasm32-unknown-unknown and tsc --noEmit.
  • Gate 1.1 (SPSC Wrap Fuzzer - Passed): 100k events pushed across the 2322^{32} counter wrap boundary with (w - r) >>> 0 modular distance, zero deadlocks, and zero drops across 16 tests.
  • Gate 1.2 (Clock Monotonicity - Passed): 1,000 simulated frames under σ=1.2 ms\sigma = 1.2\text{ ms} WASAPI jitter produced 0 regressions and 0 false alarms; ±150 ms\pm 150\text{ ms} step jumps tripped CUSUM (h = 10.0 ms in ClockSynchronizer.ts) and hard-reset in 0.0 ms.
  • Gate 1.3 / 1.4 (Voice Steal & Quantum CPU - Passed in Rust Tests): Stolen-voice step discontinuity measured 0.03125 (< 0.05); 32-voice SIMD mix across 128 samples ran in 0.031 us in release mode (< 8.0 us budget). Not yet driving live browser gameplay audio.
Phase 2 & Phase 3 Gates (Graphics, Parsers, OPFS, Audio Heap)
  • Gate 2.1 / 2.2 (WebGL2 & Tessellation - Passed): Zero WebGL2 ModifiersUBO alignment warnings; < 0.5 px shearing error under Drunk (100 px) and Wave modcharts (> 98% reduction from 80 px).
  • Gate 2.3 / 2.4 (Negative SV & Frame CPU - Passed): 100% visible note retention across scroll reversals via render_indices_by_y; < 0.15 ms main-thread frame CPU staging.
  • Gate 3.1 / 3.2 (Parser Speed & Audit - Adjusted): Early spec wished for < 1.2 ms on 25,000 .osu notes; release mode measured 3.2 ms (passing the < 10.0 ms gate). Six deterministic .itobin v2 audit checks pass on valid and corrupted buffers.
  • Gate 3.3 / 3.4 (OPFS & Audio Memory - Passed): 10 concurrent workers sustained simultaneous reads/writes with zero unhandled NoModificationAllowedError; K = 4 semaphore + 16-bit PCM cut a 2,000-keysound heap from 659.2 MB to 329.6 MB (< 350 MB ceiling).
Phase 4 & Phase 5 Gates (Edge Contracts & Unrun Corpus Tests)
  • Gate 4.1 / 4.2 (Edge Contracts - Unit-Tested Only): tickets.ts signs/verifies HMAC-SHA256 tickets in < 0.04 ms with 0 KV writes and 0 D1 reads; statistical.ts rejects relax hacks (σ<3.2 ms\sigma < 3.2\text{ ms}), uniform macros (K≈1.80K \approx 1.80), and Box-Muller bots (∣ρ(1)∣<0.03|\rho(1)| < 0.03). Hono routes, Better-Auth, R2 storage, and the 80 ms teleport gate remain spec-only.
  • Gate 4.3 / 4.4 (Upsert & Replay Parity - Unit-Tested Only): D1 ON CONFLICT monotonic upserts and UNIQUE(chart_id, judgement_fingerprint) using SHA-256 (replacing BLAKE3) pass in server/ tests; crates/ito-core .irep v1 simulation enforces ∑Nj=Nnotes\sum N_j = N_{\text{notes}} (<= 8 keys due to the 3-bit lane mask).
  • Gate 5.1 to 5.3 (10,000-Chart Parity & Load - Not Run Yet): The 10,000-chart corpus sweep, hardware loopback latency test (<= 12 ms), and 24-hour 30,000 plays/day Cloudflare load simulation have not been executed yet.

Return to Itô Overview or review Engine Architecture & Anti-Cheat.

Search wiki and portfolio

type to search across all entries.