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:
@@ -4,9 +4,11 @@ using Xunit;
|
||||
namespace Theriapolis.Tests.Architecture;
|
||||
|
||||
/// <summary>
|
||||
/// Hard rule #1: Theriapolis.Core must not reference MonoGame or Microsoft.Xna.
|
||||
/// Hard rule #1: Theriapolis.Core must not reference any rendering engine.
|
||||
/// This test reflects over Core.dll and fails the build if any forbidden assembly
|
||||
/// is referenced.
|
||||
/// is referenced. Both MonoGame/XNA (legacy) and Godot (M1+ port) are banned —
|
||||
/// keep both bans for the duration of the port so the in-flight branch can't
|
||||
/// regress either way.
|
||||
/// </summary>
|
||||
public sealed class CoreNoDependencyTests
|
||||
{
|
||||
@@ -14,10 +16,12 @@ public sealed class CoreNoDependencyTests
|
||||
{
|
||||
"Microsoft.Xna",
|
||||
"MonoGame",
|
||||
"Godot",
|
||||
"GodotSharp",
|
||||
};
|
||||
|
||||
[Fact]
|
||||
public void Core_DoesNotReference_MonoGame()
|
||||
public void Core_DoesNotReference_RenderingEngines()
|
||||
{
|
||||
var coreAssembly = typeof(Theriapolis.Core.C).Assembly;
|
||||
var referenced = coreAssembly.GetReferencedAssemblies();
|
||||
@@ -28,7 +32,8 @@ public sealed class CoreNoDependencyTests
|
||||
.ToList();
|
||||
|
||||
Assert.True(violations.Count == 0,
|
||||
$"Theriapolis.Core must not reference MonoGame/XNA. Violations: {string.Join(", ", violations)}");
|
||||
$"Theriapolis.Core must not reference any rendering engine (MonoGame/XNA/Godot). " +
|
||||
$"Violations: {string.Join(", ", violations)}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user