test(phys): A6.P5 RED — BFS from indoor cell doesn't reach door outdoor cell
Adds CellTransitTests with two A6P5_* unit tests: A6P5_BuildCellSetFromIndoorStart_ReachesDoorOutdoorCell (RED — the bug) A6P5_BuildCellSetFromAlcove_AlsoReachesDoorOutdoorCell (passes today) The RED test reproduces the over-penetration tick's cellSet build: sphere at (132.594, 16.350) in cell 0xA9B4013F, BFS portal-walks to 0xA9B40150 (alcove) but does NOT add the door's outdoor cell 0xA9B40029. Pre-fix cellSet: 0xA9B4013F, 0xA9B40150, 0xA9B4014C — no outdoor cells. Sphere wasn't straddling 0xA9B40150's exit portal so exitOutside stayed false. Also removes the 3 A6P5_* replay tests added to DoorBugTrajectoryReplayTests in the previous commit (3253d84's follow-up). Those tests didn't reproduce the bug — the harness's BuildFaithfulDoorEngine has no cell fixtures, so cellSet returned empty and GetNearbyObjects treated it as "no filter" → door always visible → over-penetration test trivially passed for the wrong reason. The CellTransitTests version pins the bug at the BFS layer directly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
82781c272b
commit
2a890e6bde
2 changed files with 187 additions and 0 deletions
|
|
@ -1073,6 +1073,32 @@ public class DoorBugTrajectoryReplayTests
|
|||
"No captured record matched the predicate. Update the fixture.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A6.P5 (2026-05-25) — loads one of the three fixed records from
|
||||
/// <c>over-penetration-capture.jsonl</c> by index:
|
||||
/// <list type="bullet">
|
||||
/// <item>0 — the over-penetration tick (cell-crossing 0xA9B4013F → 0xA9B40150)</item>
|
||||
/// <item>1 — stuck-position hit=yes variant (door fired)</item>
|
||||
/// <item>2 — stuck-position hit=no variant (door invisible — bug case)</item>
|
||||
/// </list>
|
||||
/// </summary>
|
||||
private static ResolveCaptureRecord LoadOverPenRecord(int index)
|
||||
{
|
||||
var path = Path.Combine(FixtureDir, "over-penetration-capture.jsonl");
|
||||
Assert.True(File.Exists(path),
|
||||
$"A6.P5 over-penetration fixture missing: {path}. " +
|
||||
$"Run tools/jsonl/extract-records.ps1 to rebuild.");
|
||||
|
||||
var lines = File.ReadAllLines(path);
|
||||
Assert.True(lines.Length >= 3,
|
||||
$"Expected >= 3 records in {path}; got {lines.Length}");
|
||||
|
||||
var raw = lines[index];
|
||||
return System.Text.Json.JsonSerializer
|
||||
.Deserialize<ResolveCaptureRecord>(raw,
|
||||
CellarUpTrajectoryReplayTests.CaptureJsonOptions)!;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replays one captured ResolveWithTransition call against
|
||||
/// <paramref name="engine"/>, seeded with bodyBefore, and reports
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue