acdream/tests/AcDream.Core.Tests/Conformance
Erik b3920d83f6 test(conformance): dat-reader concurrency hammer — concurrent READS exonerated
Settles the long-standing lore that DatCollection is not thread-safe for reads,
for Chorizite.DatReaderWriter 2.1.7: replays acdream''s real four-population
access pattern (render / streamer / decode-pool / raw) against the live dats —
golden FNV-1a fingerprints taken single-threaded, then 8 threads x 25 shuffled
passes over ~2900 files spanning the cell heightmap/LBI/EnvCell set and the
portal texture chain (Environment -> Surface -> SurfaceTexture -> RenderSurface
incl. highres probes). Two layers: raw TryGetFileBytes (BTree + ReadBlock, no
caching) and typed TryGet with FileCachingStrategy.Never (full production
unpack path: ArrayPool + DatBinReader + ObjectFactory).

Result: ~1.1M concurrent reads, ZERO anomalies — byte-identical to golden.
Matches the line-level audit of the release/2.1.7 source (ReadBlock keeps all
cursor state in locals over a stable read-only mmap view; locked LRU BTree
node cache; ConcurrentDictionary file cache; fresh DatBinReader per call).
The real crash bug was dispose-during-read at teardown (fixed in 8fadf77).
Keep this as the regression guard for any future dat-reader version bump.

Skips cleanly when the dats are absent (CI), matching suite convention.
Full evidence: docs/research/2026-06-09-dat-reader-thread-safety-investigation.md

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-09 21:28:32 +02:00
..
Fixtures fix(p1): membership already matches retail — the 0/11 was a cdb capture artifact 2026-06-03 18:54:27 +02:00
ConformanceDats.cs test(p0): threshold-trace golden wiring + PVS scaffold + P1-entry checklist 2026-06-03 14:29:30 +02:00
CottageDoorwayCharacterizationTests.cs test(p0): dat-backed conformance loader + characterized cottage-doorway topology 2026-06-03 14:20:17 +02:00
DatConcurrencyStressTests.cs test(conformance): dat-reader concurrency hammer — concurrent READS exonerated 2026-06-09 21:28:32 +02:00
FindCellListConformanceTests.cs fix(p1): membership already matches retail — the 0/11 was a cdb capture artifact 2026-06-03 18:54:27 +02:00
PvsConformanceTests.cs test(p0): threshold-trace golden wiring + PVS scaffold + P1-entry checklist 2026-06-03 14:29:30 +02:00
RetailTrace.cs test(p0): retail find_cell_list trace parser + cdb value-capture tooling 2026-06-03 14:26:24 +02:00
RetailTraceTests.cs test(p0): retail find_cell_list trace parser + cdb value-capture tooling 2026-06-03 14:26:24 +02:00
ThresholdDivergenceDiagnosticTests.cs test(p0): retail-trace golden captured — membership criterion divergence pinned (P0 GATE MET) 2026-06-03 15:04:51 +02:00
ThresholdPortalCrossingReplayTests.cs fix(p1): membership already matches retail — the 0/11 was a cdb capture artifact 2026-06-03 18:54:27 +02:00