M1: Headless parity verified between Tools and Godot

Proves Theriapolis.Core works untouched under Godot's csproj — the worldgen
pipeline produces byte-identical output whether invoked from the Tools CLI
or from inside the Godot process. This is the determinism contract surviving
the port.

Architecture test:
  CoreNoDependencyTests now forbids Godot.* and GodotSharp in addition to
  Microsoft.Xna and MonoGame. Both bans stay in force for the duration of
  the port so neither engine can leak into Core.

Determinism oracle:
  New worldgen-hash Tools command runs the full pipeline and prints FNV-1a
  hashes for every channel (elevation, moisture, temperature, biomes,
  settlements, polylines) plus per-stage hashes. Pairs with the Godot
  smoke-test for cross-process verification.

Godot-side smoke test:
  SmokeTest.cs runs WorldGenerator.RunAll inside the Godot process; Main.cs
  fires it on --smoke-test <seed>. Resolves Content/Data via res:// walk-up.
  M0 hello-world behaviour preserved when launched without the flag.

Verification (seed 12345):
  - dotnet run -- worldgen-hash and Godot --headless --smoke-test agree on
    all 6 channels and all 14 per-stage hashes (diff produces zero output)
  - 10-run sweeps stable on both sides post-determinism-fix
  - dotnet test: 708/708 pass

Closes M1 of theriapolis-rpg-implementation-plan-godot-port.md.
Next: M2 (world map render).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Christopher Wiebe
2026-04-30 21:38:15 -07:00
parent b3da447673
commit 57fe6bf173
5 changed files with 175 additions and 4 deletions
+5
View File
@@ -10,6 +10,7 @@ return args[0].ToLowerInvariant() switch
{
"hello" => Hello(),
"worldgen-dump" => WorldgenDump.Run(args[1..]),
"worldgen-hash" => WorldgenHash.Run(args[1..]),
"settlement-report" => SettlementReport.Run(args[1..]),
"tile-inspect" => TileInspect.Run(args[1..]),
"tactical-dump" => TacticalDump.Run(args[1..]),
@@ -49,6 +50,10 @@ static void PrintHelp()
Console.WriteLine(" --out <file.png>");
Console.WriteLine(" [--data-dir <dir>]");
Console.WriteLine(" [--show-violations]");
Console.WriteLine(" worldgen-hash --seed <n> Run full pipeline and print FNV-1a hashes (elevation,");
Console.WriteLine(" [--data-dir <dir>] moisture, temperature, biomes, settlements, polylines)");
Console.WriteLine(" plus per-stage hashes. Determinism oracle for the");
Console.WriteLine(" Godot port (compare to Godot host's smoke-test output).");
Console.WriteLine(" settlement-report --seed <n> Run full pipeline and print settlement report.");
Console.WriteLine(" [--data-dir <dir>]");
Console.WriteLine(" tile-inspect --seed <n> Print polylines/bridges near a reported tile.");