Tighten layer graph tests and document npm test typecheck.

Content and People/Schedule/Ai now fail the same way if they grow a game-layer edge the projects.md graph forbids; README matches the tsc-then-vitest script from phase 57.
This commit is contained in:
Leonid Pershin committed 2026-08-20 14:04:35 +03:00
1 parent f381475566
commit e2e7d30701
3 files changed
+24 -3

No files matched your search

@@ -40,11 +40,14 @@ public class LayerBoundaryTests
}
[Fact]
public void Content_DoesNotReferenceArchAspNetSocketsProtocolOrSimulation()
public void Content_DoesNotReferenceArchAspNetSocketsProtocolPeopleScheduleAiOrSimulation()
{
var names = References(typeof(MapLayout));
AssertNoArchAspNetOrSockets(names);
Assert.DoesNotContain("HSchool.Protocol", names, StringComparer.Ordinal);
Assert.DoesNotContain("HSchool.People", names, StringComparer.Ordinal);
Assert.DoesNotContain("HSchool.Schedule", names, StringComparer.Ordinal);
Assert.DoesNotContain("HSchool.Ai", names, StringComparer.Ordinal);
Assert.DoesNotContain("HSchool.Simulation", names, StringComparer.Ordinal);
}
@@ -54,7 +57,10 @@ public class LayerBoundaryTests
[InlineData(typeof(WalkGraph))]
public void PeopleScheduleAi_DoNotReferenceArchAspNetOrSockets(Type marker)
{
AssertNoArchAspNetOrSockets(References(marker));
var names = References(marker);
AssertNoArchAspNetOrSockets(names);
Assert.DoesNotContain("HSchool.Protocol", names, StringComparer.Ordinal);
Assert.DoesNotContain("HSchool.Simulation", names, StringComparer.Ordinal);
}
[Fact]
@@ -83,6 +89,16 @@ public class LayerBoundaryTests
}
}
[Fact]
public void ArchitectureTests_DoNotReferenceHostOrNetArchTest()
{
var csproj = File.ReadAllText(
Path.Combine(RepoRoot(), "tests", "HSchool.Architecture.Tests", "HSchool.Architecture.Tests.csproj"));
Assert.DoesNotContain("HSchool.Server", csproj, StringComparison.Ordinal);
Assert.DoesNotContain("HSchool.AppHost", csproj, StringComparison.Ordinal);
Assert.DoesNotContain("NetArchTest", csproj, StringComparison.OrdinalIgnoreCase);
}
[Fact]
public void PeopleAiScheduleSimulationTests_NoLongerCarryLayerBans()
{