M0-03
Cargo workspace, zoen-sim step interface, golden vectors
Evidence
From logs/evidence/M0-03/. Click a thumbnail for the full image.
Logs and data (2)
build-log.txt · 3 kB · open
# M0-03 build and test log excerpts (full logs: logs/test-output/M0-03-*.log)
== logs/test-output/M0-03-06.log
$ cargo test --workspace
# cwd /Users/king/Desktop/Workspace/SRO/zoen
# exit 0
test tests::config_converts_data_to_integer_units ... ok
test tests::fnv1a64_known_answers ... ok
test tests::a_full_event_buffer_counts_instead_of_growing ... ok
test tests::movement_stays_inside_the_region ... ok
test tests::only_the_direction_counts ... ok
test tests::sequence_rules ... ok
test tests::replaying_the_same_inputs_gives_the_same_hashes ... ok
test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test step_allocates_nothing_per_tick ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.40s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test reader_and_exact_decimals ... ok
test committed_vectors_have_the_expected_shape ... ok
test committed_vectors_are_byte_identical_to_a_fresh_export ... ok
test same_inputs_twice_give_identical_hashes ... ok
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.38s
== logs/test-output/M0-03-07.log
$ pnpm sim:test
# cwd /Users/king/Desktop/Workspace/SRO/zoen
# exit 0
> cargo test --workspace --quiet && cargo clippy --workspace --all-targets --quiet -- -D warnings
test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.23s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
…step-bench.json · 869 B · open
{
"what": "zoen-sim step micro-benchmark: input ingest and movement of every actor each tick, one thread",
"profile": "release",
"os": "macos",
"arch": "aarch64",
"config": {"tickHz": 20, "moveSpeedMmPerTick": 310},
"budgetReference": "docs/tech/NETCODE_1000.md: ingest 0.5 ms + movement 0.6 ms per 20 Hz tick (~1,000 command packets, ~5,000 movers, 8-vCPU server)",
"allocationsInTimedLoops": 0,
"runs": [
{"actors": 1, "inputsPerTick": 1, "ticks": 200000, "seconds": 0.0022, "ticksPerSecond": 92972791, "nsPerTick": 10.8, "msPerTick": 0.0000, "nsPerActorTick": 10.76, "allocations": 0, "finalHash": "3427fa5d1ec7bd3c"},
{"actors": 5000, "inputsPerTick": 5000, "ticks": 2000, "seconds": 0.0887, "ticksPerSecond": 22537, "nsPerTick": 44371.6, "msPerTick": 0.0444, "nsPerActorTick": 8.87, "allocations": 0, "finalHash": "2b1e98365b00eb0b"}
]
}
Tests
$ cargo test --workspace$ cargo clippy --workspace --all-targets -- -D warnings$ cargo run --quiet -p zoen-sim-tools --bin export-golden -- --check$ node --test packages/game-data/tests/sim-golden.test.mjs$ cargo run --quiet --release -p zoen-sim-tools --bin bench-step -- --out logs/evidence/M0-03/step-bench.json$ cargo test --workspace$ pnpm --filter @zoen/wiki exec playwright test --only-changedNotes
2026-10-08 00:18 UTC · Layout: Cargo workspace at the repo root (Cargo.toml, members crates/*, resolver 3, edition 2024, no external crates so it builds offline; services/ join from M1-03). crates/zoen-sim = no_std+alloc pure step (forbid unsafe, deny unwrap/expect/indexing/panic); crates/zoen-sim-tools = std tooling (export-golden, bench-step, mini JSON reader). Determinism rule (data: packages/game-data/data/sim.json, new): integer fixed-point only (i32 mm, u32 ticks), no floats/clock/IO/threads in the step, inputs in slice order, actors in index order, division truncates toward zero, no heap allocation per tick (fixed-capacity SoA + event buffer that counts drops), FNV-1a 64 state hash per tick over a declared little-endian layout. Behaviour: own-actor movement only (the part the C# prediction subset needs): seq rules (stale/duplicate/unknown rejected as events, intent persists), speed 6.2 m/s from attributes.json = 310 mm/tick at tickHz 20, direction-only Q16 normalisation, clamp to world.json region.sizeM. Data values are converted exactly from decimal text (no floats). Proposed values added: none (tickHz 20 is documented in NETCODE_1000 and the glossary). Reed Rush dash not built: data has no authored mana cost or travel time and development-standards input.movementCost forbids a gem before they exist -> M2-02. Golden vectors: packages/sim-golden/vectors.json (4 scenarios, 60 ticks) + vectors.schema.json; node test packages/game-data/tests/sim-golden.test.mjs (schema, data drift, JS hash re-computation). Evidence: logs/evidence/M0-03/step-bench.json (release: 5,000 actors+inputs 0.044 ms/tick, 1 actor 10.8 ns/tick, 0 allocations), logs/evidence/M0-03/build-log.txt. First cargo test run failed on a test-only i16 overflow in the replay test input (fixed). pnpm sim:test added to verify.mjs and CI.
