test(gate): stress repro judges terrain penetration -- gate on 10/10 clear, gate off 3/3 falls through
The old criteria (travel distance) could not tell a working gate from a broken one: every run,
gate on or off, ended at (455.7, 0, -58.1). That spot is measured air ~1.2 m above a real floor
(density zero-crossing at world Z ~ -275.7 cm), so it is a terrain trap, not a fall-through.
The stress test now drops the pawn fast onto an unready support tile (0,0,-1) and samples the
density at the capsule feet every frame, sweeping at <= half a voxel between positions. PASS =
no measured clearance below -5 cm.
Owner config (radius 3, max level 6, distance 768, sheets off):
- gate on: 10/10 PASS, min clearance +120.5..+120.9 cm, one hold of 0.43-0.47 s each,
support submitted in ~0.7 ms, collision ready in 0.43-0.47 s
- gate off: 3/3 FAIL terrain_penetration, clearance -5.7..-8.1 cm
Edit-ghost, clipmap no-overlap sweep: pass. Test-harness code only; no production path changed.
This validates a49725d.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MmSoF64BbRFmk9C3p1VsBJ
This commit is contained in:
1 parent
a49725d365
commit
6ee433efa5
4 files changed
+657
-68
No files matched your search
@@ -994,7 +994,12 @@ function Get-CollisionGateStressMetrics([string]$LogPath) {
|
||||
'gate_holds', 'gate_total_s', 'max_gate_s', 'full_stops',
|
||||
'full_stop_total_s', 'collision_gate', 'gate_progress_m', 'support_tile',
|
||||
'support_first_check_to_submit_s',
|
||||
'support_first_check_to_collision_ready_s')) {
|
||||
'support_first_check_to_collision_ready_s', 'test_support_tile',
|
||||
'test_support_first_check_to_submit_s',
|
||||
'test_support_first_check_to_collision_ready_s', 'landed', 'terrain_samples',
|
||||
'terrain_measurement_missing', 'start_height_crossed',
|
||||
'min_clearance_cm', 'min_clearance_position', 'min_feet_density',
|
||||
'min_surface_vox_z', 'final_position')) {
|
||||
$match = [regex]::Match($line, ('{0}=(?<v>[^ ]+)' -f $key))
|
||||
if ($match.Success) { $metrics[$key] = $match.Groups['v'].Value }
|
||||
}
|
||||
@@ -1451,7 +1456,6 @@ try {
|
||||
'gate-stress' {
|
||||
$baseCvars['voxel.TestCollisionGateStress'] = 1
|
||||
$baseCvars['voxel.TestCollisionGateStressSpeedCmPerSecond'] = 6000
|
||||
$baseCvars['voxel.TestCollisionGateStressStartDelaySeconds'] = 0.1
|
||||
$baseCvars['voxel.TestCollisionGateStressDurationSeconds'] = 2
|
||||
$baseCvars['voxel.TestCollisionGateStressTimeoutSeconds'] = 30
|
||||
$args = New-CommonArguments 'game' (Join-Path $RunRoot 'Logs\gate-stress.log') (Merge-Cvars $baseCvars)
|
||||
@@ -1506,7 +1510,6 @@ try {
|
||||
$stressBaseCvars = [ordered]@{
|
||||
'voxel.TestCollisionGateStress' = 1
|
||||
'voxel.TestCollisionGateStressSpeedCmPerSecond' = 6000
|
||||
'voxel.TestCollisionGateStressStartDelaySeconds' = 0.1
|
||||
'voxel.TestCollisionGateStressDurationSeconds' = 2
|
||||
'voxel.TestCollisionGateStressTimeoutSeconds' = 30
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user