chore(engine): server hygiene batch — workers tests, surname dedup, save pin (T-1063, T-1064)

- workers/pool.rs: 5 new tests; catch_unwind keeps worker threads alive on
  handler panic (in-flight request loss unchanged, pinned by test + #843
  docs); stubs.rs no longer falsely claims the pool is tested
- save/load: execute_save_load pinned .after(Storyteller) so the scheduler
  cannot legally save pre-Input state; exclusive-system exception recorded
  in tick_phases.rs rules
- surname corpus extracted to bin/shared/surname_corpus.rs (both economy
  generators import it; byte-identical output verified on 23.6MB+1.45MB
  TOMLs); all three stamp/watch registries updated
- generator_spike gated behind non-default 'generator-spike' feature
- economy.rs: 11 new D-181 signal-derivation tests on the new
  econ_sim Simulation::from_economy in-memory constructor
- perception exemption comments now state the consumer sort contract;
  unused bytemuck removed; rayon comment corrected; the 22 allow(dead_code)
  documented as serde schema enforcement

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-12 16:22:28 +02:00
co-authored by Claude Fable 5
parent c64231e8ee
commit 0bd895fcac
19 changed files with 903 additions and 673 deletions
+3
View File
@@ -6,6 +6,9 @@
//!
//! Note: HashSet is used as a per-frame lookup table (visible tiles/NPCs).
//! Only membership checks — iteration order is irrelevant. Not simulation state.
//! Consumer contract: every consumer must sort (or otherwise impose a
//! deterministic order on) this data before it touches simulation state or
//! the wire.
#![allow(clippy::disallowed_types)]
use bevy_ecs::prelude::*;
+3
View File
@@ -8,6 +8,9 @@
//! Note: HashMap is used for `sector_lookup` — a per-frame scratch buffer
//! looked up only by key. Iteration order is irrelevant here. Not subject to
//! the simulation determinism constraint (see server/.clippy.toml).
//! Consumer contract: every consumer must sort (or otherwise impose a
//! deterministic order on) this data before it touches simulation state or
//! the wire.
#![allow(clippy::disallowed_types)]
use std::collections::{BTreeSet, HashMap};
+3
View File
@@ -14,6 +14,9 @@
//! tile positions during the FOV sweep. Only `insert` and `contains` are used;
//! iteration order never affects the output (results are handed to BTreeSet in
//! query.rs). Not simulation state — exempt from the determinism constraint.
//! Consumer contract: every consumer must sort (or otherwise impose a
//! deterministic order on) this data before it touches simulation state or
//! the wire.
#![allow(clippy::disallowed_types)]
use std::collections::HashSet;