Repository navigation
WS-D2 and WS-STAB: seeded sim RNG and green debug CI - #211
Conversation
Audit of the 133-package workspace at a3fe3ec: completeness, benchmarks, security gaps outside PR #207, modding, CI, and a replay-hash determinism bar for every workstream. Local test run of the AI, foundation, physics, and veilweaver suites is recorded in the doc (6676 passed, 14 failed). Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
Replace unseeded sim randomness with SimRng streams mixed from (world_seed, tick, system_id). Craft and harvest go through the seeded entry points. Anchor particles, patrol targets, and wave spawns use dyadic draws and disk rejection, with no sin/cos. Solver::new takes a u64 seed. Terrain save timestamps are ticks. Editor play records the fixed step count for replay. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
AudioEngine keeps mixer state on a null backend when no output device is present. Caustics sampling uses an integer hash and a series pow so the golden bits do not depend on libm. Schedule::add_system returns Result in every profile. The remaining edits clear the Code Quality job's -D warnings, including the phi3 compile failure that hid the rest of the workspace. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
cbindgen 0.29 defaults to C++ and emitted cstdarg, which the C harness cannot include. Generate the SDK header as C. Gate CpuImage on gltf-assets so default-feature clippy is clean. P0 library call sites go through add_system_known_stage so a missing stage still fails the process without each crate spelling expect. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
The C harness linked but could not load libastraweave_sdk.so, and Windows had no cl on PATH. Point the loader at target/release and import the MSVC environment. Save-slot tests use a private temp directory so a leftover cwd does not fill every slot. Editor and PBR jobs install libudev, which libudev-sys requires. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
| - uses: dtolnay/rust-toolchain@1.89.0 | ||
| - name: MSVC developer environment | ||
| if: matrix.os == 'windows-latest' | ||
| uses: ilammy/msvc-dev-cmd@v1 |
CMake ignored link_directories placed after add_executable, so the example could not find libastraweave_sdk. Attach the library directory to the target. The editor job also needs ALSA and the rest of the native packages the engine build scripts probe. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
PR #211 added astraweave_core::SimRng and no Fixed64. Combat re-exports the RNG, keeps the Q32.32 type, and leaves both golden hashes unchanged. combat_resolve is a required case of determinism-replay.yml. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
3 open findings
What changed in this PR
Implements WS-D2 (seeded RNG + removal of wall-clock seeds) and WS-STAB (fail-fast schedule stage registration + headless-friendly debug CI), plus associated docs/examples/test updates to lock determinism and reduce release-silent failures.
Changes:
- Introduces deterministic
SimRngstreams (core + weaving) and migrates gameplay crafting/harvesting + weaving particles/spawns/patrols to seeded draws; removes wall-clock seeding from terrain solver/persistence. - Makes
Schedule::add_systemreturnResult<(), UnknownStage>in all profiles and updates call sites to register stages orexpectexplicitly. - Improves debug CI robustness: audio null backend when no device, caustics sampling made bit-stable, and multiple test/doc adjustments + CI workflow fixes.
| File | Description |
|---|---|
| veilweaver_slice_runtime/src/lib.rs | Ensures veilweaver_post_setup stage exists and surfaces stage-registration errors immediately. |
| tools/aw_plugin_template/src/lib.rs | Updates template to handle add_system now returning Result. |
| tools/aw_editor/src/runtime.rs | Records fixed-step counts for replay and adds coverage validating the sequence/clearing. |
| tools/astraweave-assets/tests/lib_api_tests.rs | Updates TextureAsset construction for new fields. |
| examples/veilweaver_demo/src/main.rs | Adjusts feature gating and modernizes Option checks. |
| examples/veilweaver_demo/Cargo.toml | Makes slice runtime + gameplay/scene deps optional under veilweaver_slice. |
| examples/profiling_demo/src/main.rs | Updates system registration to handle Result from add_system. |
| examples/hello_companion/src/visual_demo.rs | Minor cleanup (format usage) and simplifies follow-up logic. |
| examples/hello_companion/src/main.rs | Clippy allow for acronym enum variant; small refactors and imports. |
| examples/hello_companion/src/llm_worker.rs | Avoids double lookup by using get_mut when updating cache entries. |
| examples/hello_companion/src/dialogue_bank.rs | Uses array-based split for clarity. |
| examples/ecs_ai_showcase/src/main.rs | Updates system registration to handle Result. |
| examples/ecs_ai_demo/src/main.rs | Updates system registration to handle Result. |
| examples/crafting_combat_demo/src/main.rs | Migrates crafting demo to explicit seeded crafting API. |
| docs/current/ENGINE_PRODUCTION_ROADMAP.md | Adds/updates roadmap and acceptance criteria for determinism/stability workstreams. |
| docs/architecture/weaving.md | Updates trace version and documents new seeded RNG invariants for weaving. |
| docs/architecture/terrain.md | Updates trace version and documents seeded solver + timestamp changes. |
| docs/architecture/gameplay.md | Updates trace version and documents seeded crafting/harvesting invariants. |
| docs/architecture/fluids.md | Updates trace version and records caustics determinism change + golden bits. |
| docs/architecture/ecs_math_core_sdk_foundation.md | Updates trace for add_system error semantics and sim RNG contract. |
| docs/architecture/aw_editor.md | Updates trace for editor fixed-step recording invariant. |
| docs/architecture/audio.md | Updates trace for null audio backend behavior in headless environments. |
| crates/astraweave-persistence-player/src/save_slots.rs | Makes tests use per-process temp dirs to avoid shared-cwd flakiness. |
| crates/astraweave-blend/tests/mutation_resistant_comprehensive_tests.rs | Small modernizations (is_some_and) and clearer timestamp replacement comment. |
| crates/astraweave-blend/tests/heightmap_raster_e2e.rs | Replaces magic radians constant with FRAC_PI_2. |
| crates/astraweave-blend/src/test_utils.rs | Updates generators for new options fields and cleans up hashing helper usage. |
| astraweave-weaving/tests/mutation_tests.rs | Updates particle tests to pass seeded RNG and new system constructor signature. |
| astraweave-weaving/src/spawner.rs | Makes spawn positions/archetypes deterministic via SimRng and stable spawn-id ordering. |
| astraweave-weaving/src/sim_rng.rs | Adds weaving-local deterministic RNG + seed mixer contract tests. |
| astraweave-weaving/src/particles/mod.rs | Re-exports SimRng for particle modules/tests. |
| astraweave-weaving/src/particles/anchor_particle.rs | Removes rand::random/trig; uses seeded dyadic draws and sqrt-based normalization. |
| astraweave-weaving/src/lib.rs | Exposes sim_rng module and re-exports RNG APIs/constants. |
| astraweave-weaving/src/enemy.rs | Makes patrol retargeting deterministic via SimRng and adds bit-locked test. |
| astraweave-ui/tests/mutation_hardening_tests.rs | Updates imports to match API changes. |
| astraweave-ui/src/panels.rs | Switches UI crafting preview to craft_with_seed with deterministic recipe-based seed. |
| astraweave-terrain/tests/wave2_modifier_persistence_diagnostics_remediation.rs | Updates persistence header expectations (timestamp now defaults to 0). |
| astraweave-terrain/src/terrain_persistence.rs | Removes wall-clock timestamps/filenames; adds at_tick and deterministic default filename. |
| astraweave-terrain/src/spline_types.rs | Adds a targeted clippy allow for complex test type. |
| astraweave-terrain/src/solver.rs | Requires explicit seed in TerrainSolver::new; updates tests accordingly. |
| astraweave-stress-test/src/lib.rs | Updates system registration to handle Result. |
| astraweave-security/src/lib.rs | Updates system registration to handle Result. |
| astraweave-sdk/cbindgen.toml | Pins cbindgen output to C mode to keep C harness compiling. |
| astraweave-scripting/src/lib.rs | Updates system registration to handle Result. |
| astraweave-scripting/benches/script_performance.rs | Updates system registration in benches to handle Result. |
| astraweave-render/tests/wave3_mutation_remediation.rs | Adds file-level lint suppression attributes. |
| astraweave-render/tests/wave2_weather_remediation.rs | Uses struct update syntax instead of mutating defaults. |
| astraweave-render/tests/wave2_vertex_shadow_culling_error_remediation.rs | Adds file-level lint suppression attributes. |
| astraweave-render/tests/wave2_vertex_compression_remediation.rs | Simplifies assertions to avoid redundant range checks. |
| astraweave-render/tests/wave2_types_culling_primitives_remediation.rs | Adds file-level lint suppression attributes. |
| astraweave-render/tests/wave2_scene_env_material_remediation.rs | Adds file-level lint suppression attributes. |
| astraweave-render/tests/wave2_scene_clustered_instancing_tests.rs | Adds file-level lint suppression attributes. |
| astraweave-render/tests/wave2_primitives_mesh_ssao_error_tests.rs | Adds file-level lint suppression attributes. |
| astraweave-render/tests/wave2_primitives_golden.rs | Adds file-level lint suppression attributes. |
| astraweave-render/tests/wave2_nanite_camera_lod_remediation.rs | Adds file-level lint suppression attributes. |
| astraweave-render/tests/wave2_material_extended_golden.rs | Uses struct update syntax for flag initialization. |
| astraweave-render/tests/wave2_material_biome_advpost_error.rs | Adds file-level lint suppression attributes. |
| astraweave-render/tests/wave2_lod_golden_values.rs | Adds file-level lint suppression attributes. |
| astraweave-render/tests/wave2_gpumem_transparency_audio_terrain_decals.rs | Adds file-level lint suppression attributes. |
| astraweave-render/tests/wave2_extended_coverage_tests.rs | Adds file-level lint suppression attributes. |
| astraweave-render/tests/wave2_clustered_transition_remediation.rs | Adds file-level lint suppression attributes. |
| astraweave-render/tests/wave2_clustered_golden_projection_remediation.rs | Adds file-level lint suppression attributes. |
| astraweave-render/tests/wave2_camera_remediation.rs | Adds file-level lint suppression attributes and trims unused imports. |
| astraweave-render/tests/wave2_camera_decals_hdri_types_remediation.rs | Adds file-level lint suppression attributes. |
| astraweave-render/tests/terrain_splat_pipeline.rs | Adds file-level lint suppression attributes. |
| astraweave-render/tests/mutation_resistant_comprehensive_tests.rs | Adds file-level lint suppression attributes. |
| astraweave-render/src/water.rs | Adds targeted clippy allow for constant-assertion test. |
| astraweave-render/src/virtual_texture.rs | Uses struct update syntax for invalid config test case. |
| astraweave-render/src/vegetation_interaction.rs | Adds targeted clippy allow for constant-assertion test. |
| astraweave-render/src/vegetation_gpu.rs | Makes range assert more idiomatic. |
| astraweave-render/src/temporal_upscale.rs | Uses struct update syntax for config test case. |
| astraweave-render/src/taa.rs | Makes jitter range asserts more idiomatic. |
| astraweave-render/src/subgroup_ops.rs | Adds targeted clippy allow for const_is_empty-style checks. |
| astraweave-render/src/snow_accumulation.rs | Uses struct update syntax for config test cases. |
| astraweave-render/src/shadow_quality.rs | Iterates splits with .iter().enumerate() to avoid indexing. |
| astraweave-render/src/renderer.rs | Adds targeted clippy allow for constant-assertion test. |
| astraweave-render/src/particle_sort.rs | Avoids allocating a Vec for static test data. |
| astraweave-render/src/particle_forces.rs | Makes numeric range asserts more idiomatic. |
| astraweave-render/src/mutation_tests.rs | Avoids unused variable warning by naming _pos. |
| astraweave-render/src/mesh_gltf.rs | Reorders/merges imports for clarity under feature gates. |
| astraweave-render/src/ltc_area_lights.rs | Simplifies indexing expression. |
| astraweave-render/src/impostor_pass.rs | Adds targeted clippy allow for many-args constructor. |
| astraweave-render/src/impostor_bake.rs | Uses div_ceil for padding computation. |
| astraweave-render/src/hiz_pyramid.rs | Simplifies mip-count tests using constants directly. |
| astraweave-render/src/grass_blade.rs | Makes numeric range assert more idiomatic. |
| astraweave-render/src/disney_material.rs | Adds targeted clippy allows and uses struct update syntax in tests. |
| astraweave-render/src/brdf_lut.rs | Uses rotate_right and range contains asserts. |
| astraweave-render/examples/water_budget_probe.rs | Adds file-level lint suppression attributes. |
| astraweave-render/examples/tonemap_probe.rs | Adds file-level lint suppression attributes. |
| astraweave-render/Cargo.toml | Adds unexpected_cfgs lint config for feature-gated cfg values. |
| astraweave-profiling/tests/profiling_tests.rs | Replaces placeholder assert with feature-based expectation. |
| astraweave-profiling/src/lib.rs | Makes alloc/free macros no-op-compatible with tracy-client 0.18 behavior. |
| astraweave-physics/tests/determinism.rs | Avoids unused variable binding in iteration. |
| astraweave-physics/src/ecs.rs | Routes stage registration through add_system_known_stage. |
| astraweave-physics/src/async_scheduler.rs | Small iterator refactors and minor cleanup in tests. |
| astraweave-physics/benches/physics_async.rs | Updates telemetry types/validation and modernizes RNG calls. |
| astraweave-physics/Cargo.toml | Extends serde feature to include serde_json for telemetry export. |
| astraweave-persistence-ecs/src/lib.rs | Updates system registration to handle Result. |
| astraweave-observability/src/lib.rs | Updates system registration to handle Result. |
| astraweave-net/Cargo.toml | Adds unexpected_cfgs lint config for dangerous-testing. |
| astraweave-net-ecs/src/lib_temp.rs | Updates system registration to handle Result (single-line formatting). |
| astraweave-net-ecs/src/lib.rs | Updates system registration to handle Result (formatted). |
| astraweave-memory/tests/mutation_tests.rs | Adds file-level lint suppression attributes. |
| astraweave-memory/src/components.rs | Uses clamp instead of max/min chains. |
| astraweave-llm/tests/latency_comparison_bench.rs | Adds targeted dead_code allow for debug-inspected field. |
| astraweave-llm/src/phi3.rs | Stabilizes prompt hashing seed, fixes candle API usage, and improves device auto-selection. |
| astraweave-gameplay/src/harvesting.rs | Removes legacy unseeded tick; adds tick_with_seed and updates determinism tests. |
| astraweave-gameplay/src/ecs.rs | Updates system registration to handle Result. |
| astraweave-gameplay/src/crafting.rs | Removes legacy unseeded craft; adds craft_with_seed and seed-locked tests. |
| astraweave-fluids/src/caustics.rs | Replaces libm-dependent hash/powf with deterministic integer hash + software pow; locks golden bits. |
| astraweave-embeddings/src/client.rs | Parks ONNX/candle clients as explicit “not wired” stubs for current dep APIs. |
| astraweave-ecs/tests/zero_alloc_tests.rs | Updates system registration to handle Result. |
| astraweave-ecs/tests/world_app_tests.rs | Updates schedule/app tests for add_system -> Result and asserts unknown-stage error. |
| astraweave-ecs/src/mutation_resistance_tests.rs | Updates alloc counter assertions and schedule tests for new error behavior. |
| astraweave-ecs/src/lib.rs | Adds UnknownStage, add_stage, and returns Result from add_system; adds add_system_known_stage. |
| astraweave-core/tests/cross_crate_stability_tests.rs | Updates cross-crate API test to register stage and handle Result. |
| astraweave-core/src/sim.rs | Introduces core SimRng + mix_sim_seed and locks contract tests. |
| astraweave-core/src/ecs_adapter.rs | Uses add_system_known_stage to keep adapter call sites simple/consistent. |
| astraweave-core/benches/full_game_loop.rs | Updates test fixture transform struct initialization for new fields. |
| astraweave-behavior/src/ecs.rs | Updates system registration to handle Result. |
| astraweave-audio/src/engine.rs | Adds null backend fallback (no-device), makes sinks optional, and adds coverage. |
| astraweave-ai/tests/rag_integration_test.rs | Disables non-buildable integration test via cfg(any()) with explanatory comment. |
| astraweave-ai/tests/goap_hierarchical_planning.rs | Minor cleanup (unnecessary mut and unused imports). |
| astraweave-ai/tests/behavioral_correctness_tests.rs | Uses PI constant and adds missing loose-tolerance assertion. |
| astraweave-ai/src/goap/shadow_mode.rs | Simplifies comparisons construction. |
| astraweave-ai/src/goap/plan_visualizer.rs | Adds targeted clippy allows for recursion-only helpers; improves test message. |
| astraweave-ai/src/goap/persistence.rs | Simplifies “future version” JSON string creation. |
| astraweave-ai/src/goap/orchestrator.rs | Makes MoveTo expectation explicit in test. |
| astraweave-ai/src/goap/goal_validator.rs | Uses is_some_and and adds recursion clippy allows. |
| astraweave-ai/src/goap/goal_scheduler.rs | Marks urgency helper as test-only via cfg(test). |
| astraweave-ai/src/goap/adapter.rs | Migrates stance representation in tests to enum. |
| astraweave-ai/src/ecs_ai_plugin.rs | Uses add_system_known_stage and updates tests for Result. |
| astraweave-ai/benches/goap_vs_rule_bench.rs | Fixes imports/types to benchmark the intended GOAP module under feature gates. |
| astraweave-ai/benches/goap_performance_bench.rs | Fixes imports and makes learning manager mutable for bench setup. |
| .github/workflows/sdk-ci.yml | Ensures MSVC env on Windows, forces cbindgen --lang c, and fixes loader/linker paths. |
| .github/workflows/pbr-pipeline-ci.yml | Adds missing Linux packages for build/test. |
| .github/workflows/editor-ci.yml | Expands Linux deps for editor build/test in CI. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| /// Craft with the sim stream for `(world_seed, tick, SIM_SYSTEM_CRAFT)`. | ||
| /// | ||
| /// Item ids are a pure function of that triple and of how many `u32` draws | ||
| /// this call consumes (one). | ||
| pub fn craft_with_seed( | ||
| &self, | ||
| name: &str, | ||
| inv: &mut Inventory, | ||
| world_seed: u64, | ||
| tick: u64, | ||
| ) -> Option<Item> { | ||
| let mut rng = | ||
| astraweave_core::SimRng::new(world_seed, tick, astraweave_core::SIM_SYSTEM_CRAFT); | ||
| self.craft_seeded(name, inv, &mut rng) | ||
| } |
| @@ -1413,20 +1461,18 @@ mod tests { | |||
| #[test] | |||
| fn test_add_system_with_unknown_stage_is_still_dropped() { | |||
| let missing = app.add_system("definitely_not_a_stage", never_runs); | ||
| assert!( | ||
| missing.is_err(), | ||
| "unknown stages are an error in every profile" | ||
| ); |
Rebased onto main (85d09a2), which already has the cross-OS replay workflow from #210 and #211. Pull requests keep one gate, affected-crate tests, Windows nextest partitions, MSRV, and determinism-replay with no path filter. compare now requires planner_pure, perception_world, and gameplay_rng. Benchmarks, the toolchain matrix, sanitizers, coverage, and CodeQL stay on main and the nightly schedule. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
PR #211 added astraweave_core::SimRng and no Fixed64. Combat re-exports the RNG, keeps the Q32.32 type, and leaves both golden hashes unchanged. combat_resolve is a required case of determinism-replay.yml. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
* ci: tier pull-request checks and require gameplay_rng Rebased onto main (85d09a2), which already has the cross-OS replay workflow from #210 and #211. Pull requests keep one gate, affected-crate tests, Windows nextest partitions, MSRV, and determinism-replay with no path filter. compare now requires planner_pure, perception_world, and gameplay_rng. Benchmarks, the toolchain matrix, sanitizers, coverage, and CodeQL stay on main and the nightly schedule. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com> * ci: archive Windows nextest and gate allocation counts Build the Windows test archive once and partition that archive, so the three pull-request partitions no longer each compile the workspace into the 45 minute cap. Pull-request profile ci-pr excludes the issue #254 tests; nightly profile ci still runs them. PBR, editor, and AW Editor workflows no longer start on pull_request. Allocation Measurement runs on main and nightly without continue-on-error. Ceilings are the April counts plus 50%. One sim tick and one physics.step assert zero allocations. The sim tick is clean. physics.step still allocates 8 times and stays asserted at 0 (issue #262). Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com> * ci: run archive-hostile tests on the Windows build job Partition 3 of 0a8ffce passed. Partitions 1 and 2 failed on a Windows render crash, two fluids GPU slow-timeouts, and aw-net-client tests whose CARGO_BIN_EXE path exists only on the build runner. Those skips are archive-only. The build job runs the client-binary targets itself. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com> * docs: record the passing Windows archive timings 7512c86 ran the archive in 36.3 minutes and all three partitions succeeded. Wall to PR Rust checks was 51.7 minutes, of which 49.3 was execution and 2.5 was queue. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
PR #211 added astraweave_core::SimRng and no Fixed64. Combat re-exports the RNG, keeps the Q32.32 type, and leaves both golden hashes unchanged. combat_resolve is a required case of determinism-replay.yml. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
* docs(combat): specify a deterministic Q32.32 damage resolver Design only. Locks an integer hyperbola, modifier floors, SimRng hit streams, and golden stage hashes for a future astraweave-combat crate. No engine code. Gate is Needs-human at r3. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com> * feat(combat): add the Q32.32 damage resolver The approved design is now a crate: resolve_hit, resolve_heal, expected damage, effective health, RON tables with ceilings, an ECS tick, and save meta for sub-unit HP, poise, and the unused thread-strain hook. Fixed64 and SimRng are local seams until those types are on main. The default schools are physical, weave, and mundane hazards. AI estimates refuse hidden stats. The canonical hit hash is unchanged. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com> * docs(combat): point the trace at the resolver commit Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com> * test(combat): lock properties, replay hash, and the timer walk Property tests use proptest seed 0xC0BA7E57. A three-OS workflow compares the seeded battle digest. The timer walk reuses a scratch buffer. The benchmark shard map includes astraweave-combat, which was why every shard failed validation. Legacy damage paths stay. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com> * feat(combat): use core SimRng and join the replay gate PR #211 added astraweave_core::SimRng and no Fixed64. Combat re-exports the RNG, keeps the Q32.32 type, and leaves both golden hashes unchanged. combat_resolve is a required case of determinism-replay.yml. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com> * docs(combat): point the trace at the SimRng rebase The verified commit is 9f75e24. Fixed64 remains local; combat_resolve is a required determinism-replay case. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com> * fix(ci): expect 49 benchmark packages and log uncovered failures astraweave-combat's bench made the aggregate count 49. The workflow still required 48, so the merge was incomplete before the pre-existing shard timeouts. Section 23 records CI failures that PR #217's ledger does not cover. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com> * refactor(combat): re-export astraweave-math Fixed64 PR #245 owns the Q32.32 type. Combat keeps whole_raw because it returns CombatError. The stage hash and the battle digest are unchanged. fixed64 and combat_resolve are both required replay cases. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com> * docs(combat): point the trace at the math Fixed64 rebase The verified commit is be41362. Combat re-exports astraweave-math's type. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com> * fix(ci): compare the full SDK version on Windows The harness prints 0.4.0. PowerShell indexed that string with [0] and compared the character 0, so the job failed after the socket libs linked. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com> * fix(ci): link the Windows SDK CMake example The cl harness already links ws2_32, userenv, and ntdll. The CMake example did not, so it failed LNK2019 after the version gate passed. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com> * feat(combat): send cover impulses through destruction and weaving A landed hit on CCover enqueues an Impact on DestructionWorld. Weave schools are data in astraweave-weaving, sorted by school id. The Aravath slice deals sword 25, a weave rating of 15, and breaks the cover bond. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com> * docs(combat): point the trace at the cover impulse commit The verified commit is df4b07b. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com> * docs(destruction): mark the crate copy to drop when #243 lands This tree is the feat/destruction crate so combat can enqueue impacts. Delete it from this branch once PR #243 is the single copy. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com> * docs(combat): record the rebase onto main b7ffb35 Fixed64 is the math type. The destruction crate stays until PR #243. Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>


Description
Implements workstreams WS-D2 and WS-STAB from
docs/current/ENGINE_PRODUCTION_ROADMAP.md.WS-D2 — seeded RNG and clocks. Sim draws come from
SimRng(StdRng/ ChaCha12) mixed from(world_seed, tick, system_id).mix_sim_seed(1, 2, 3)is locked at0x5991_344E_4904_5002.craft_with_seed/tick_with_seed(and the existing*_seededhelpers). The unseededcraft/tickbodies are gone.craft_with_seed("Blade", world_seed 0xA11C, tick 3)item id2_289_146_845;tick_with_seed(1.5, 0xA11C, 3)harvest amount4.f32draws. Disk samples are rejection in the unit square. Nosin/cos.Solver::newrequires au64seed. TheSystemTimedefault is gone. Terrain save header timestamps default to0and are set withat_tick.0, onEditorRuntime::recorded_fixed_steps.rand::randomandrand::rng()underastraweave-gameplay/src,astraweave-weaving/src, andastraweave-terrain/src/solver.rsare zero.meshing.rsis untouched.gameplay_rngis not marked required in a replay workflow. WS-D0 ownsdeterminism-replay.yml, and that file does not exist yet.WS-STAB — debug CI and release-silent failures.
AudioEngine::newfalls back to a null mixer when no output device is present. Music decode still returnsErrfor a missing file. Mixer duck state still advances.powso the golden test comparesto_bits(1_050_907_696, 1_041_034_631, 1_050_301_147).Schedule::add_systemreturnsResult<(), UnknownStage>in every profile. P0 library call sites go throughApp::add_system_known_stageso the unwrap-prevention job does not seeexpectin those crates. The veilweaver slice registersveilweaver_post_setupbefore adding those systems.cbindgen --lang c. The Linux harness loadslibastraweave_sdk.soviaLD_LIBRARY_PATHand an rpath, and the CMake example links withtarget_link_directories.astraweave-render/src/renderer.rshas one#[allow(clippy::assertions_on_constants)]onc3_prev_layer_index_matches_shader. No other renderer, physicslib.rs, camera, or terrain meshing edits.CI on
05c2bff0gh pr checks 211 --watchfinished: 70 passed, 30 failed, 8 skipped.Passed, and these were the WS-STAB targets that did go green:
Debug Test failed on all three OS:
astraweave-terraintests. Temperature at (300,300) is0.34865436against golden0.640202.mountains_amplitudebits are1106247680(30.0) against1139802112(480.0). Lacunarity and persistence samples collapse to the same temperature.noise_gen.rsand the golden tests were not edited;spline_types.rsonly gained a clippy allow. The same numbers fail on this machine. Retuning the goldens would track libm, which the determinism gate forbids.Failed to find adapter(active_backendsempty).astraweave-assetslib tests.Other red checks that are outside this diff's behavior: Cargo Deny (
openssl/openssl-sysare banned and were already in the lock), editoregui-winitmissingaccesskit_update, PBR Windowsos error 206(path too long), benchmark shards, and toolchain jobs that hit the same missing-GPU and terrain golden failures.Type of change
Solver::newnow takes a seed. Unseededcraft/tickare removed.Schedule::add_systemreturns aResult.Security Considerations
No new third-party crates.
astraweave-physicsenables the existing workspaceserde_jsonon itsserdefeature.examples/veilweaver_demogains optionalastraweave-gameplayandastraweave-scenedeps so--all-featurestypechecks.astraweave-netexpects the already-declareddangerous-testingcfg. The SDK Windows job usesilammy/msvc-dev-cmdsoclis on PATH.Checklist