test: replace input and physics source freezes

This commit is contained in:
Erik 2026-08-18 15:31:57 +02:00
parent 0ad2ee1cdf
commit caa5eb8b2b
6 changed files with 313 additions and 238 deletions

View file

@ -1,13 +1,15 @@
using System.Text.RegularExpressions;
using AcDream.App.Tests.Architecture;
using AcDream.App.Physics;
using AcDream.Runtime.Gameplay;
namespace AcDream.App.Tests.Physics;
/// <summary>
/// C3c-F1 (2026-08-02): source pins for the App-side halves of the
/// movement-owner application seams whose production graphs have no
/// C3c-F1 (2026-08-02): compiled architecture checks for the App-side halves
/// of the movement-owner application seams whose production graphs have no
/// focused harness (the inbound network-update controller's dependency
/// set is composition-only). The Runtime lifecycle matrices carry the
/// behavioral coverage; these pins keep the App wiring routed through the
/// behavioral coverage; these checks keep the App wiring routed through the
/// owner's typed entries instead of the throwing direct mutations that
/// crashed the connected lifecycle gate twice
/// (logs/connected-world-gate-20260802-122749 — SetCharacterSkills;
@ -18,36 +20,17 @@ public sealed class C3cF1ProductionWiringTests
[Fact]
public void LocalPlayerInboundSetState_RoutesThroughTheTypedOwnerEntry()
{
string source = ReadSource(
"Physics",
"LiveEntityNetworkUpdateController.cs");
IReadOnlyList<CompiledCall> calls = CompiledCallGraph.ReadDeclared(
typeof(LiveEntityNetworkUpdateController));
Assert.Single(
Regex.Matches(source, @"ApplyServerPhysicsState\(")
.Cast<Match>());
calls,
call =>
call.Target.DeclaringType == typeof(PlayerMovementController)
&& call.Target.Name == "ApplyServerPhysicsState");
Assert.DoesNotContain(
".ApplyPhysicsState(",
source,
StringComparison.Ordinal);
}
private static string ReadSource(params string[] relativePath)
{
DirectoryInfo? directory = new(AppContext.BaseDirectory);
while (directory is not null)
{
if (File.Exists(Path.Combine(directory.FullName, "AcDream.slnx")))
{
return File.ReadAllText(Path.Combine(
directory.FullName,
"src",
"AcDream.App",
Path.Combine(relativePath)));
}
directory = directory.Parent;
}
throw new DirectoryNotFoundException("Could not find AcDream.slnx.");
calls,
call => call.Target.DeclaringType == typeof(PlayerMovementController)
&& call.Target.Name == nameof(PlayerMovementController.ApplyPhysicsState));
}
}