diag: bounded passage carve reach rejected (L93); R43 Unreal SW startup notes

Explicit carve reach R (diagnostic, default unbounded): R=2.5 m -> 1.56 cm max displacement,
106 deg max normal change; R=4 m -> 0.63 cm but 53 deg normals. Fails the bar; readiness gain
small and inconsistent (TN -5%, VS +6-7%). No world change (v214). Fast tier PASS.
R43: Unreal SW bReady 2.16 s = serial sign-edge repair (1.94 s, 10.9M corrections;
parallelSignEdgeRepair exists but off); ~0.45 s of SerializeResolvedWorld = adapter SW route search.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016dhxM43dnWvUu2B5Ph1iG1
This commit is contained in:
Fr0zkaandClaude Opus 5.5 committed 2026-10-28 07:33:53 +01:00
1 parent 70c37aaab3
commit 1e111cc042
9 files changed
+545 -55

No files matched your search

@@ -60,6 +60,7 @@ namespace
bool AuditBasePageEquivalence=false;
bool AuditRouteParity=false;
bool AuditPassageSourceClamp=false;
bool AuditPassageCarveReach=false;
bool RegionCrossing=false;
bool AuditTileShapeReadiness=false;
int DiagnosticSlowShapeCompileMs=0;
@@ -1462,6 +1463,7 @@ namespace
" --audit-base-page-equivalence (hash one tile through both shape routes)\n"
" --audit-route-parity (compare page, native-only, exact-query and mesh routes)\n"
" --audit-passage-source-clamp (compare passage source floors 2,3,4,6 over all near tiles)\n"
" --audit-passage-carve-reach (compare post-composer reaches 1.5,2,2.5,4 m over all near tiles)\n"
" --audit-tile-shape-readiness (run a deliberately mis-marked tile against the native-only guard)\n"
" --diagnostic-slow-shape-compile-ms=N (diagnostic overlap control; default 0)\n"
" --render-distance-chunks=N (0 disables the extra far ring)\n"
@@ -1539,6 +1541,7 @@ namespace
else if(arg=="--audit-base-page-equivalence")options.AuditBasePageEquivalence=true;
else if(arg=="--audit-route-parity")options.AuditRouteParity=true;
else if(arg=="--audit-passage-source-clamp")options.AuditPassageSourceClamp=true;
else if(arg=="--audit-passage-carve-reach")options.AuditPassageCarveReach=true;
else if(arg=="--region-crossing")options.RegionCrossing=true;
else if(arg=="--audit-tile-shape-readiness")options.AuditTileShapeReadiness=true;
else if(arg=="--auto-surface-camera")options.AutoSurfaceCamera=true;
@@ -2280,5 +2283,5 @@ int main(int argc,char** argv)
options.StreamingSchedulerPolicy,options.MovingCameraTrace,
options.MovingCameraSpeedMetersPerSecond,options.MovingCameraDurationSeconds,
options.MovingCameraDwellSeconds,options.ColdWorkerTimeline,
options.AuditPassageSourceClamp);
options.AuditPassageSourceClamp,options.AuditPassageCarveReach);
}
+57 -29
View File
@@ -386,9 +386,22 @@ namespace StandaloneStreamBenchmark
inline int AuditPassageSourceClamp(VoxelForgeCore::World& Shape,
const FStandaloneDesiredTileSet& Desired,
const VoxelForgeCore::ResolvedLayoutSnapshotV3* Layout,
std::uint32_t CoreVoxelSizeMicrons)
std::uint32_t CoreVoxelSizeMicrons,bool bAuditCarveReach=false)
{
constexpr std::array<double,4> Floors={2.0,3.0,4.0,6.0};
constexpr std::array<double,4> SourceFloors={2.0,3.0,4.0,6.0};
constexpr std::array<double,4> CarveReaches={1.5,2.0,2.5,4.0};
const auto& Candidates=bAuditCarveReach?CarveReaches:SourceFloors;
const char* const valueName=bAuditCarveReach?"reach_m":"floor_vox";
const char* const coverageTag=bAuditCarveReach
?"L93PassageReachCoverage":"L91PassageClampCoverage";
const char* const tileTag=bAuditCarveReach
?"L93PassageReachTile":"L91PassageClampTile";
const char* const tileFailureTag=bAuditCarveReach
?"L93PassageReachTileFailure":"L91PassageClampTileFailure";
const char* const summaryTag=bAuditCarveReach
?"L93PassageReachSummary":"L91PassageClampSummary";
const char* const auditTag=bAuditCarveReach
?"L93PassageReachAudit":"L91PassageClampAudit";
std::vector<VoxelForgeCore::TileKey> keys;
std::array<std::uint64_t,3> expectedByLod{};
for(const FVoxelTileKey& tile:Desired.Tiles)
@@ -399,10 +412,11 @@ namespace StandaloneStreamBenchmark
}
if(keys.empty())
{
std::printf("[L91PassageClampAudit] status=FAIL reason=no_lod0_2_tiles\n");
std::printf("[%s] status=FAIL reason=no_lod0_2_tiles\n",auditTag);
return 14;
}
std::printf("[L91PassageClampCoverage] tiles=%zu lod0=%llu lod1=%llu lod2=%llu mode=full_desired_near_set\n",
std::printf("[%s] tiles=%zu lod0=%llu lod1=%llu lod2=%llu mode=full_desired_near_set\n",
coverageTag,
keys.size(),static_cast<unsigned long long>(expectedByLod[0]),
static_cast<unsigned long long>(expectedByLod[1]),
static_cast<unsigned long long>(expectedByLod[2]));
@@ -412,6 +426,8 @@ namespace StandaloneStreamBenchmark
baseOptions.forceFullDensityCapture=true;
baseOptions.skipUvAndColors=true;
baseOptions.skipMaterialGroups=true;
baseOptions.diagnosticPassageSourceFloorVoxels=0.0;
baseOptions.diagnosticPassageCarveReachMetres=0.0;
VoxelForgeCore::TileGenerationOptions candidateOptions=baseOptions;
candidateOptions.profilePassageComposer=true;
std::array<std::uint64_t,4> tileCount{},sampleCount{},changedSamples{},signFlips{},
@@ -429,22 +445,27 @@ namespace StandaloneStreamBenchmark
if(!base)
{
++generationFailures;
std::printf("[L91PassageClampTileFailure] mode=base key=(%d,%d,%d,lod%d) error=%s\n",
key.coordinate.x,key.coordinate.y,key.coordinate.z,key.lod,error.c_str());
std::printf("[%s] mode=base key=(%d,%d,%d,lod%d) error=%s\n",
tileFailureTag,key.coordinate.x,key.coordinate.y,key.coordinate.z,
key.lod,error.c_str());
continue;
}
GatherPassageSourceGradients(Shape,*base,Layout,gradientStats);
for(std::size_t floorIndex=0;floorIndex<Floors.size();++floorIndex)
if(!bAuditCarveReach)
GatherPassageSourceGradients(Shape,*base,Layout,gradientStats);
for(std::size_t floorIndex=0;floorIndex<Candidates.size();++floorIndex)
{
candidateOptions.diagnosticPassageSourceFloorVoxels=Floors[floorIndex];
if(bAuditCarveReach)
candidateOptions.diagnosticPassageCarveReachMetres=Candidates[floorIndex];
else
candidateOptions.diagnosticPassageSourceFloorVoxels=Candidates[floorIndex];
error.clear();
const auto candidate=Shape.generateTile(key,candidateOptions,error);
if(!candidate)
{
++generationFailures;
std::printf("[L91PassageClampTileFailure] floor_vox=%.0f key=(%d,%d,%d,lod%d) error=%s\n",
Floors[floorIndex],key.coordinate.x,key.coordinate.y,key.coordinate.z,
key.lod,error.c_str());
std::printf("[%s] %s=%.2f key=(%d,%d,%d,lod%d) error=%s\n",
tileFailureTag,valueName,Candidates[floorIndex],key.coordinate.x,
key.coordinate.y,key.coordinate.z,key.lod,error.c_str());
continue;
}
const FPassageClampComparison comparison=ComparePassageClampMeshes(
@@ -476,8 +497,9 @@ namespace StandaloneStreamBenchmark
movedRegions[floorIndex][region]+=comparison.movedEdgeRegions[region];
normalRegions[floorIndex][region]+=comparison.normalVertexRegions[region];
}
std::printf("[L91PassageClampTile] floor_vox=%.0f key=(%d,%d,%d,lod%d) samples=%llu changed=%llu sign_flips=%llu moved_edges=%llu max_displacement_cm=%.6g normal_vertices=%llu max_normal_degrees=%.6g changed_mesh=%d\n",
Floors[floorIndex],key.coordinate.x,key.coordinate.y,key.coordinate.z,key.lod,
std::printf("[%s] %s=%.2f key=(%d,%d,%d,lod%d) samples=%llu changed=%llu sign_flips=%llu moved_edges=%llu max_displacement_cm=%.6g normal_vertices=%llu max_normal_degrees=%.6g changed_mesh=%d\n",
tileTag,valueName,Candidates[floorIndex],key.coordinate.x,
key.coordinate.y,key.coordinate.z,key.lod,
static_cast<unsigned long long>(comparison.samples),
static_cast<unsigned long long>(comparison.changedSamples),
static_cast<unsigned long long>(comparison.signFlips),
@@ -489,7 +511,7 @@ namespace StandaloneStreamBenchmark
}
bool acceptedAtAllFloors=generationFailures==0&&invalidComparisons==0
&&keys.size()>0;
for(std::size_t floorIndex=0;floorIndex<Floors.size();++floorIndex)
for(std::size_t floorIndex=0;floorIndex<Candidates.size();++floorIndex)
{
const double meanDisplacement=sharedCrossings[floorIndex]
?sumDisplacementCm[floorIndex]/sharedCrossings[floorIndex]:0.0;
@@ -501,8 +523,9 @@ namespace StandaloneStreamBenchmark
&&maxNormalAngle[floorIndex]<=2.0
&&normalPairingFailures[floorIndex]==0;
acceptedAtAllFloors=acceptedAtAllFloors&&accepted;
std::printf("[L91PassageClampSummary] floor_vox=%.0f tiles=%llu/%zu samples=%llu changed_samples=%llu sign_flips=%llu edge_crossing_mismatches=%llu shared_crossings=%llu moved_crossings=%llu max_displacement_cm=%.6g mean_displacement_cm=%.6g changed_mesh_tiles=%llu normal_vertices=%llu changed_normal_vertices=%llu max_normal_degrees=%.6g mean_normal_degrees=%.6g normal_pairing_failures=%llu moved_regions=(wall:%llu,floor:%llu,mouth:%llu,other:%llu) normal_regions=(wall:%llu,floor:%llu,mouth:%llu,other:%llu) status=%s\n",
Floors[floorIndex],static_cast<unsigned long long>(tileCount[floorIndex]),
std::printf("[%s] %s=%.2f tiles=%llu/%zu samples=%llu changed_samples=%llu sign_flips=%llu edge_crossing_mismatches=%llu shared_crossings=%llu moved_crossings=%llu max_displacement_cm=%.6g mean_displacement_cm=%.6g changed_mesh_tiles=%llu normal_vertices=%llu changed_normal_vertices=%llu max_normal_degrees=%.6g mean_normal_degrees=%.6g normal_pairing_failures=%llu moved_regions=(wall:%llu,floor:%llu,mouth:%llu,other:%llu) normal_regions=(wall:%llu,floor:%llu,mouth:%llu,other:%llu) status=%s\n",
summaryTag,valueName,Candidates[floorIndex],
static_cast<unsigned long long>(tileCount[floorIndex]),
keys.size(),static_cast<unsigned long long>(sampleCount[floorIndex]),
static_cast<unsigned long long>(changedSamples[floorIndex]),
static_cast<unsigned long long>(signFlips[floorIndex]),
@@ -538,14 +561,18 @@ namespace StandaloneStreamBenchmark
std::accumulate(gradientStats.gradientMagnitudes.begin(),
gradientStats.gradientMagnitudes.end(),0.0)
/gradientStats.gradientMagnitudes.size();
std::printf("[L91PassageSourceGradient] surface_source_crossings=%llu sampled_near_zero=%llu gradient_samples=%zu step_vox=1 source_abs_limit_vox=2 p50=%.6g p90=%.6g max=%.6g mean=%.6g status=%s\n",
static_cast<unsigned long long>(gradientStats.candidateCrossings),
static_cast<unsigned long long>(gradientStats.sourceNearZeroSamples),
gradientStats.gradientMagnitudes.size(),percentile(gradientStats.gradientMagnitudes,0.5),
percentile(gradientStats.gradientMagnitudes,0.9),
gradientStats.gradientMagnitudes.empty()?0.0:gradientStats.gradientMagnitudes.back(),
gradientMean,gradientStats.gradientMagnitudes.size()>=64?"MEASURED":"LOW_SAMPLE");
std::printf("[L91PassageClampAudit] tiles=%zu generation_failures=%llu invalid_comparisons=%llu status=%s\n",
if(!bAuditCarveReach)
std::printf("[L91PassageSourceGradient] surface_source_crossings=%llu sampled_near_zero=%llu gradient_samples=%zu step_vox=1 source_abs_limit_vox=2 p50=%.6g p90=%.6g max=%.6g mean=%.6g status=%s\n",
static_cast<unsigned long long>(gradientStats.candidateCrossings),
static_cast<unsigned long long>(gradientStats.sourceNearZeroSamples),
gradientStats.gradientMagnitudes.size(),percentile(gradientStats.gradientMagnitudes,0.5),
percentile(gradientStats.gradientMagnitudes,0.9),
gradientStats.gradientMagnitudes.empty()?0.0:gradientStats.gradientMagnitudes.back(),
gradientMean,gradientStats.gradientMagnitudes.size()>=64?"MEASURED":"LOW_SAMPLE");
if(bAuditCarveReach)
std::printf("[L93PassageReachInstrument] path=GenerateTile_to_ApplyResolvedStrateComposition_to_ApplyResolvedStratePassageCarves stage=post_rough_sdf_max blend=0.5m transition=identity_outside_reach support_mouth_deferred=unchanged comparison=paired_density_mesh_edges_normals\n");
std::printf("[%s] tiles=%zu generation_failures=%llu invalid_comparisons=%llu bar=sign_flips_0_displacement_cm_le_1_normal_degrees_le_2 status=%s\n",
auditTag,
keys.size(),static_cast<unsigned long long>(generationFailures),
static_cast<unsigned long long>(invalidComparisons),
acceptedAtAllFloors?"PASS":"FAIL");
@@ -2305,7 +2332,8 @@ namespace StandaloneStreamBenchmark
bool bLinux77Profile=false,int32 SchedulerPolicy=-1,
bool bMovingCameraTrace=false,double MovingCameraSpeedMetersPerSecond=0.0,
double MovingCameraDurationSeconds=12.0,double MovingCameraDwellSeconds=5.0,
bool bColdWorkerTimeline=false,bool bAuditPassageSourceClamp=false)
bool bColdWorkerTimeline=false,bool bAuditPassageSourceClamp=false,
bool bAuditPassageCarveReach=false)
{
using Clock=std::chrono::steady_clock;
const std::clock_t ColdCpuOrigin=std::clock();
@@ -2475,7 +2503,7 @@ namespace StandaloneStreamBenchmark
||bAuditOreVeinYield||bAuditLandmarkReachability||bAuditStrateTransitions
||bAuditResolvedLayoutPassages||bAuditResolvedLayoutBoundaries
||bAuditTileShapeReadiness||bAuditBasePageEquivalence||bAuditRouteParity
||bAuditPassageSourceClamp;
||bAuditPassageSourceClamp||bAuditPassageCarveReach;
const bool bDeferFarWorld=bIncludeFarWorld&&!bMovingCameraTrace&&!bFarWorldAudit;
VoxelForgeCore::ShapeBuildRequest ShapeRequest;
ShapeRequest.minVoxel={FineMin.X,FineMin.Y,FineMin.Z};
@@ -2555,11 +2583,11 @@ namespace StandaloneStreamBenchmark
Streamer.Stop();
std::fprintf(stderr,"[StreamPipeline] full shape build failed: %s\n",BuildError.c_str());return 2;
}
if(bAuditPassageSourceClamp)
if(bAuditPassageSourceClamp||bAuditPassageCarveReach)
{
Streamer.Stop();
return AuditPassageSourceClamp(Shape,Desired,ResolvedLayout,
World.CoreVoxelSizeMicrons);
World.CoreVoxelSizeMicrons,bAuditPassageCarveReach);
}
if(bAuditNativeCaves)
{