wip(l59): open helix shaft (ledge open to the core) -- PARKED: jagged inner ramp edge, audit ROI missed it

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-25 20:27:04 +01:00
1 parent 6c6cc37e1d
commit 54ba1b49ab
17 files changed
+1167 -172

No files matched your search

+31 -5
View File
@@ -1452,7 +1452,10 @@ namespace StandaloneStreamBenchmark
}
std::sort(mazeEdges.begin(),mazeEdges.end(),[](const auto* a,const auto* b)
{return a->stableId<b->stableId;});
const auto shaftCore=std::find_if(layout.cavernRooms.begin(),layout.cavernRooms.end(),
[](const auto& room){return room.stableId=="lattice/spine/shaft-core-v2";});
if(!arrivalPortal||!helix||!departurePortal||mazeEdges.size()<4
||shaftCore==layout.cavernRooms.end()
||layout.cavernRooms.size()<mazeEdges.size()+1)return false;
std::vector<const ResolvedCavernEdgeV1*> ordered={arrivalPortal,helix};
ordered.insert(ordered.end(),mazeEdges.begin(),mazeEdges.end());
@@ -1641,6 +1644,17 @@ namespace StandaloneStreamBenchmark
struct FIntervalCheck {const char* name;std::array<double,3> p;};
const auto mazeA=metres(mazeEdges.front()->polylineMicrometres.front());
const auto mazeB=metres(mazeEdges.front()->polylineMicrometres.back());
const auto helixFirst=metres(helix->polylineMicrometres.front());
const double helixCenterlineRadius=std::hypot(
helixFirst[0]-shaftCore->centerMicrometres[0]/1.0e6,
helixFirst[1]-shaftCore->centerMicrometres[1]/1.0e6);
const double helixBoreRadius=helix->boreRadiusMicrometres/1.0e6;
const double outerWallRadius=helixCenterlineRadius+helixBoreRadius;
const double wallScale=outerWallRadius/std::max(1.0e-9,helixCenterlineRadius);
const double outerWallX=shaftCore->centerMicrometres[0]/1.0e6
+(helixFirst[0]-shaftCore->centerMicrometres[0]/1.0e6)*wallScale;
const double outerWallY=shaftCore->centerMicrometres[1]/1.0e6
+(helixFirst[1]-shaftCore->centerMicrometres[1]/1.0e6)*wallScale;
const std::array<double,3> mazeMid={(mazeA[0]+mazeB[0])*0.5,
(mazeA[1]+mazeB[1])*0.5,(mazeA[2]+mazeB[2])*0.5};
const double mazeLength=std::hypot(mazeB[0]-mazeA[0],mazeB[1]-mazeA[1]);
@@ -1653,17 +1667,23 @@ namespace StandaloneStreamBenchmark
for(const auto& edge:layout.cavernEdges)if(edge.strateIndex==lattice->strateIndex)
for(const auto& point:edge.polylineMicrometres)
{const auto p=metres(point);maxX=std::max(maxX,p[0]);minY=std::min(minY,p[1]);maxY=std::max(maxY,p[1]);}
const std::array<FIntervalCheck,4> checks={{{"host-rock",{maxX+8.0,
const std::array<FIntervalCheck,6> checks={{{"host-rock",{maxX+8.0,
(minY+maxY)*0.5,midZ+1.2}},
{"maze-air",{mazeMid[0],mazeMid[1],mazeMid[2]+1.25}},
{"maze-wall-foot",{mazeMid[0]+wallX*1.30,mazeMid[1]+wallY*1.30,
mazeMid[2]+0.25}},
{"helix-air",{helix->polylineMicrometres[helix->polylineMicrometres.size()/2][0]/1.0e6,
helix->polylineMicrometres[helix->polylineMicrometres.size()/2][1]/1.0e6,
helix->polylineMicrometres[helix->polylineMicrometres.size()/2][2]/1.0e6+1.25}}}};
helix->polylineMicrometres[helix->polylineMicrometres.size()/2][2]/1.0e6+1.25}},
{"shaft-core-air",{shaftCore->centerMicrometres[0]/1.0e6,
shaftCore->centerMicrometres[1]/1.0e6,
shaftCore->centerMicrometres[2]/1.0e6}},
{"shaft-outer-wall",{outerWallX,outerWallY,
helixFirst[2]+1.25}}}};
std::uint64_t boxes=0,samples=0,misses=0,allAir=0,allSolid=0,mixed=0;
bool falseAllAirRejected=false,falseAllSolidRejected=false,wallMixed=false;
bool isTileShapeFreeAware=false,latticeTileFree=false;
bool shaftCoreAirProved=false,shaftCoreWallMixed=false;
for(const auto& check:checks)
{
const Vec3i origin{static_cast<int>(std::llround(check.p[0]/vm)),
@@ -1684,6 +1704,10 @@ namespace StandaloneStreamBenchmark
falseAllAirRejected|=bruteSolid&&verdict!=TileClass::allAir;
falseAllSolidRejected|=bruteAir&&verdict!=TileClass::allSolid;
if(std::string_view(check.name)=="maze-wall-foot")wallMixed=verdict==TileClass::mixed;
if(std::string_view(check.name)=="shaft-core-air")
shaftCoreAirProved=verdict==TileClass::allAir&&bruteAir;
if(std::string_view(check.name)=="shaft-outer-wall")
shaftCoreWallMixed=verdict==TileClass::mixed&&!bruteAir&&!bruteSolid;
if(std::string_view(check.name)=="maze-air")
{
const int32 tileWidth=CoreTileVoxelCount;
@@ -1701,9 +1725,9 @@ namespace StandaloneStreamBenchmark
(verdict==TileClass::allAir?!bruteAir:
verdict==TileClass::allSolid?!bruteSolid:false)?"yes":"no");
}
const bool intervalOk=boxes>=4&&allSolid>=1&&mixed>=1
const bool intervalOk=boxes>=6&&allAir>=1&&allSolid>=1&&mixed>=2
&&misses==0&&falseAllAirRejected&&falseAllSolidRejected&&wallMixed
&&isTileShapeFreeAware;
&&shaftCoreAirProved&&shaftCoreWallMixed&&isTileShapeFreeAware;
const bool pathOk=continuous&&capsuleClear&&allSupported&&headroomClear
&&maximumGrade<=15.0&&minimumHeadroom>=2.2;
std::printf("[LatticeCapsuleReachability] arrival=%s departure=%s edges=%zu path_points=%zu stations=%llu capsule_samples=%llu capsule_failures=%llu first_capsule_failure_m=(%.3f,%.3f,%.3f) support_samples=%llu support_failures=%llu first_support_failure_m=(%.3f,%.3f,%.3f) head_samples=%llu head_failures=%llu first_head_failure_m=(%.3f,%.3f,%.3f) max_grade_deg=%.3f min_headroom_m=%.3f required_headroom_m=2.200 support=every-station reachable=%s status=%s\n",
@@ -1721,10 +1745,12 @@ namespace StandaloneStreamBenchmark
minimumHeadroom, pathOk?"yes":"no",pathOk?"PASS":"FAIL");
std::printf("[LatticeFilletAudit] smooth_max=cubic width_m=%.6f measured_radius_m=%.6f ideal_radius_m=%.6f status=%s\n",
width,measuredFillet,idealFillet,measuredFillet>=0.5?"PASS":"FAIL");
std::printf("[LatticeIntervalOracle] boxes=%llu all_air=%llu all_solid=%llu mixed=%llu samples=%llu misses=%llu false_all_air=%s false_all_solid=%s wall_foot=%s isTileShapeFree=%s tile_free=%s status=%s\n",
std::printf("[LatticeIntervalOracle] boxes=%llu all_air=%llu all_solid=%llu mixed=%llu samples=%llu misses=%llu shaft_core_air=%s shaft_core_wall=%s false_all_air=%s false_all_solid=%s wall_foot=%s isTileShapeFree=%s tile_free=%s status=%s\n",
static_cast<unsigned long long>(boxes),static_cast<unsigned long long>(allAir),
static_cast<unsigned long long>(allSolid),static_cast<unsigned long long>(mixed),
static_cast<unsigned long long>(samples),static_cast<unsigned long long>(misses),
shaftCoreAirProved?"PROVED":"FAILED",
shaftCoreWallMixed?"mixed":"not-mixed",
falseAllAirRejected?"REJECTED":"FAILED",
falseAllSolidRejected?"REJECTED":"FAILED",wallMixed?"mixed":"not-mixed",
isTileShapeFreeAware?"BLOCKED":"FAILED",latticeTileFree?"yes":"no",