packages/clock & packages/auth
Deterministic fake/wall Clock trait and keyed HMAC-SHA256 token verification with explicit trusted-clock expiry and subject normalization.
Selûne exercises its toolchain on two multi-package MoonBit 1.0 RC1 fixtures: SelûneCraft (a browser WebGL2 voxel fixture verified against DrWatt/OpenSpec requirements SC-001..SC-006) and Ledgerflow (a 7-package double-entry accounting workspace exercising semantic replay, formal arithmetic proofs, and all 8 fault-injection scenarios).
SC-001..SC-006).SC-001..SC-006)World generation (7×7 chunks = 602,112 voxels, SC-001), neighbor face culling and 4-corner smooth ambient occlusion (SC-002), swept AABB physics and Amanatides–Woo 3D DDA raycasting (SC-003), JS ESM bridge exports (SC-004), collapsible telemetry drawer (SC-005), and interactive micro-benchmark kernel (SC-006) compiled directly from MoonBit 1.0 RC1 into a zero-dependency WebGL2 + Web Audio experience.
Browser note: Use the interactive HTML launcher to configure seed, time of day, movement mode, and benchmark drawer before entering the world. Playable SelûneCraft requires a desktop browser with WebGL2, a keyboard, and a mouse.
Compiled MoonBit 1.0 RC1 release Wasm-GC engine bundle.
Measured LiveZero-dependency JavaScript ESM bridge deployed directly to site/play/.
49/49 chunks meshed into 60,576 quads with smooth 4-corner ambient occlusion.
Measured LiveMeasured live via mc_bench_tick(2000) (6.20 ms) in headless Chromium WebGL2.
| Package | Path | Requirement & Measured Output |
|---|---|---|
hoskinson/selunecraft/src/world |
games/selunecraft/src/world/ |
SC-001 — Deterministic 64-bit seeded 7×7 chunk grid (112×48×112 voxels), sandy shores, water lakes (WATER_LEVEL = 14), underground caverns, trees, and the House of the Moon marble shrine. |
hoskinson/selunecraft/src/mesher |
games/selunecraft/src/mesher/ |
SC-002 — Neighbor face culling (98.40% culled across 49 chunks / 60,576 quads), 4-corner smooth AO with diagonal anisotropy flip, separate solid & translucent water buffers, packed 9-float stride [x,y,z,u,v,tile,shade,ao,emissive]. |
hoskinson/selunecraft/src/physics |
games/selunecraft/src/physics/ |
SC-003 — Per-axis swept AABB collision, gravity, swimming/buoyancy, creative flight, Amanatides–Woo 3D DDA voxel raycasting (up to 7.0 blocks), and break/place player-AABB overlap protection. |
hoskinson/selunecraft/src/web |
games/selunecraft/src/web/ |
SC-004, SC-006 — MoonBit 1.0 RC1 JS ESM + Wasm-GC bridge exporting all 9 kernel functions (mc_init, mc_step, mc_set_slot, mc_set_time, mc_break, mc_place, mc_dirty_count, mc_pop_chunk_mesh, mc_bench_tick). |
| WebGL2 Browser Host | games/selunecraft/web/ (deployed at site/play/) |
SC-005 — Procedural 64×64 16-tile pixel-art atlas (gl.NEAREST), GLSL ES 3.00 chunk + sky dome shaders, Web Audio synth, and collapsible [B] real-time telemetry drawer. |
[B])Press B while playing SelûneCraft to toggle the collapsible live benchmark drawer (SC-005): monitor a 10 Hz frame-time sparkline, MoonBit mc_step and mesher timings, culling ratio, and run an interactive 2,000-iteration MoonBit micro-benchmark (SC-006).
| Input | Action |
|---|---|
| W A S D / Arrows | Move horizontally across the voxel terrain |
| Mouse (Pointer Lock / Drag) | Look around |
| Space / Shift | Jump, swim up, or ascend / descend in Creative Flight |
| Left Click / Right Click (E) | Break targeted voxel / Place active hotbar block |
| 1–9 or Wheel | Select block (Grass, Dirt, Stone, Moon Marble, Timber, Leaves, Starlight Glass, Silverfire Lantern, Tears Crystal) |
| T / F / B / R / M | Toggle Day / Astral Midnight · Creative Flight · Benchmark Drawer · New Seed · Audio Mute |
# Run SelûneCraft locally from the repository
cd games/selunecraft && ./play.sh
# Rebuild both JS ESM and Wasm-GC bundles from MoonBit 1.0 RC1 source
export PATH="$HOME/.moon/bin:$PATH"
moon test --target js --deny-warn && moon build --target js --release && moon build --target wasm-gc --release
beta-app/ledgerflow — 7-Package Double-Entry Accounting Fixturebeta-app/ledgerflow is a 7-package MoonBit 1.0 RC1 application (clock, auth, ledger, ledger/kernel, ratelimit, api, cli) with an isolated held-out acceptance module (held_out_tests/) and non-code design documentation (docs/), exercising every Selûne commit-queue, identity, sandbox, and integrity gate end-to-end.
packages/clock & packages/authDeterministic fake/wall Clock trait and keyed HMAC-SHA256 token verification with explicit trusted-clock expiry and subject normalization.
packages/ledger + kernel/Double-entry accounting journal with immutable copied posting arrays, conservation-of-value invariants, QuickCheck properties, and 6/6 live moon prove checked Int64 overflow-safe goals (both default & prelude_proof_machine_int, 0 timeouts).
packages/ratelimit, api & cliFractional-remainder token bucket rate limiter (with explicit permanent denial when cost > capacity), authenticated request router, and runnable CLI demo verifying conservation and zero trial balance.
The refreshed paired benchmark suite (reports/BENCHMARK-REPORT.md, 810 raw trials across all 7 Ledgerflow packages + 4 design docs, task-clustered 95% CIs) separates live measurements from analytical sensitivity models and offline-omitted services:
| Benchmark Surface | Reported Finding | Provenance |
|---|---|---|
| Blinded Live Retrieval (Arms A–E, G) | SQLite fact store (Arm C) achieves 0.95 ms wall & 87.59% recall vs moon ide (319.40 ms, 56.02%) and rg (24.79 ms, 79.26%). Context Packs split 2,389 tokens into shared_prefix; Graphify lifts recall to 95.00% at +2,613.6 tokens; Full Stack (Arm G) vs rg cuts -2,599.9 tokens & -13.57 ms live (identical retrieval to Arm D; the recall CI crosses zero). |
Measured Live |
| End-to-End Cost & Fleet Scaling | Modeled cost-per-accepted (including Arm G vs Arm D cost gap), retry, human-review, and 10/100/1,000-agent scaling projections are analytical sensitivity outputs over transparent unit weights — never claimed as measured production defaults. | Sensitivity Model |
| Neo4j Bolt Query (Arm F) | OGS Cypher script export is measured live (0.48 ms, 61,380 B); live Neo4j Bolt daemon queries are explicitly excluded offline rather than approximated. |
Not Measured Offline |
Migrates auth.verify(token) to require an explicit Clock parameter and updates every cross-package caller across ratelimit, api, and tests using agentic context build → impact → propose → sandboxed validate → atomic CAS commit.
From the same base commit, Agent 1 renames normalize_subject to canonicalize_subject via compiler-resolved Rename while Agent 2 edits a caller body via ReplaceBody. Raw 3-way git merge-file conflicts; Selûne semantic replay lands both cleanly while reusing evidence cache hits on untouched packages.
Verified via benchmark/e2e_beta_verify.py against isolated scratch copies of beta-app/ledgerflow:
InterfaceDigest unchanged; untouched dependents remain cache hits.moon check catches missing migration and triggers bisection/replay.timeout (non-cacheable, never upgraded to passed).grants_permissions=false.held_out_tests/ stays strictly outside context packs.