acdream/src/AcDream.Core/Physics
Erik fb5fba6229 test(phys): A6.P3 #98 — live ResolveWithTransition capture apparatus
Apparatus only — no fix attempt. Per the systematic-debugging skill's
"3+ failures = question architecture" rule, the 6 hypotheses we
tested speculatively on the harness's airborne-at-tick-1 bug all
failed because we kept guessing what state the harness lacks. This
commit ships the evidence-driven path: capture the EXACT player
ResolveWithTransition call (every input + body-before + body-after +
result) into a JSON Lines fixture, then a comparison test loads the
fixture and replays it against the test engine. The first per-field
divergence pinpoints the missing apparatus state — no more guessing.

Adds:
- src/AcDream.Core/Physics/PhysicsResolveCapture.cs — new static module
  with CapturePath (env var ACDREAM_CAPTURE_RESOLVE), PhysicsBodySnapshot
  record, JSON Lines writer (thread-safe, flushes per record), process-
  exit hook for clean shutdown.

- PhysicsEngine.ResolveWithTransition probe wiring: snapshot body at
  method entry, snapshot again before return, refactor the two returns
  into one path so the capture call site is single. Filtered to
  IsPlayer mover flag so NPC/remote DR calls don't pollute.

- CellarUpTrajectoryReplayTests.cs:
  • Capture_WritesJsonLinesRecordsWhenIsPlayerAndEnabled — drives 3
    ticks with capture on, reads file back, verifies round-trip of
    inputs + body-before/after snapshots.
  • Capture_SkipsNonPlayerCalls — drives 3 NPC-style ticks (no
    IsPlayer flag), confirms the file is not created.

Off by default. Set ACDREAM_CAPTURE_RESOLVE=<path> to a writable file
path; capture starts on the next player ResolveWithTransition call.

Test baseline: 1172 + 8 pre-existing failures + 2 new smoke tests
that pass = 1174 + 8. Verified by stashed-baseline comparison.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 19:41:11 +02:00
..
AnimationCommandRouter.cs fix(anim): Phase L.1b route motion commands 2026-04-28 10:46:22 +02:00
AnimationHookRouter.cs feat(anim): Phase E.1 hook router + GameWindow wiring 2026-04-18 16:30:23 +02:00
AnimationSequencer.cs fix(animation): close #61 + smooth stop from backward/sidestep-left/turn-left 2026-05-18 15:16:20 +02:00
BSPQuery.cs Revert "fix(phys): A6.P3 #98 — gate ContactPlane assignment by Normal.Z (Shape 1)" 2026-05-23 16:54:19 +02:00
BuildingPhysics.cs refactor(physics): Phase 2 — code-review polish on BuildingPhysics commit 2026-05-19 18:01:44 +02:00
CellDump.cs feat(phys): A6.P3 #98 Step 2 — cell-dump probe + roundtrip test 2026-05-23 15:16:56 +02:00
CellSurface.cs feat(core): Phase B.3 — CellSurface (indoor floor polygon projection) 2026-04-12 09:51:22 +02:00
CellTransit.cs chore(phys): A6.P3 #98 triage — revert neg-poly + bldg-check experiments 2026-05-23 15:11:49 +02:00
CollisionExemption.cs fix(phys L.2g slice 1b): widen CollisionExemption to ETHEREAL alone 2026-05-13 18:27:06 +02:00
CollisionPrimitives.cs feat(physics): port 9 collision primitives from acclient.exe (chunk_00530000.c) 2026-04-12 23:53:47 +02:00
EntityCollisionFlags.cs feat(physics): live-entity collision plumbing (Commit A) 2026-04-29 13:12:56 +02:00
IAnimationHookSink.cs feat(anim): Phase E.1 hook router + GameWindow wiring 2026-04-18 16:30:23 +02:00
InterpolationManager.cs feat(motion): L.3 M1 — fresh InterpolationManager port + retail spec 2026-05-05 14:56:42 +02:00
MotionCommandResolver.cs feat(anim): Phase L.1c select combat maneuvers 2026-04-28 11:44:17 +02:00
MotionInterpreter.cs fix(motion): retail-faithful remote tick — clear body.Velocity, drive via seqVel 2026-05-03 16:23:57 +02:00
PhysicsBody.cs docs(physics): L.3c attempt — friction threshold investigation, deferred 2026-04-30 09:46:42 +02:00
PhysicsDataCache.cs feat(phys): A6.P3 #98 Step 2 — cell-dump probe + roundtrip test 2026-05-23 15:16:56 +02:00
PhysicsDiagnostics.cs diag(phys): A6.P3 #98 — [step-walk-adjust] probe inside AdjustOffset 2026-05-23 16:16:42 +02:00
PhysicsEngine.cs test(phys): A6.P3 #98 — live ResolveWithTransition capture apparatus 2026-05-23 19:41:11 +02:00
PhysicsResolveCapture.cs test(phys): A6.P3 #98 — live ResolveWithTransition capture apparatus 2026-05-23 19:41:11 +02:00
PlayerWeenie.cs feat(physics): PlayerWeenie with retail Run/Jump formulas 2026-04-13 23:15:25 +02:00
PortalInfo.cs feat(physics): Phase 2 — wire CellBSP + Portals into CellPhysics 2026-05-19 16:52:20 +02:00
PortalPlane.cs fix(core): Phase B.3 — add centroid + radius bounds to PortalPlane crossing test 2026-04-12 19:08:46 +02:00
PositionManager.cs fix(motion): project anim root motion onto terrain plane (slope staircase) 2026-05-05 21:37:42 +02:00
RemoteMoveToDriver.cs fix(retail): rotation rate, useability gate, retail toast strings 2026-05-16 12:17:54 +02:00
ResolveResult.cs feat(physics): L.3a — wall-bounce velocity reflection on airborne hits 2026-04-30 09:41:04 +02:00
ServerControlledLocomotion.cs fix(anim): Phase L.1c match MoveTo run speed 2026-04-28 20:58:22 +02:00
ShadowObjectRegistry.cs fix(physics): #91 — query indoor cell shadows in FindObjCollisions 2026-05-21 09:03:51 +02:00
TerrainSurface.cs fix(scenery): #49 9×9 loop, per-spawn building check, triangle slope 2026-05-07 21:15:11 +02:00
TransitionTypes.cs Revert "fix(phys): A6.P3 #98 — gate ContactPlane assignment by Normal.Z (Shape 1)" 2026-05-23 16:54:19 +02:00
WalkMissDiagnostic.cs feat(physics): WalkMissDiagnostic aggregator for ISSUES #83 probe spike 2026-05-20 10:31:39 +02:00