passages: four-strate passage floors supported (L67, evaluator v212); 1-2 wall beat still red

- Shared composer: a passage's restored support is applied after a physically overlapping
  later bore, instead of being carved away by it (0-1: 59 -> 0 unsupported).
- Capsule clearance for support restoration is tested against nearby route segments only
  (1-2: 3 -> 0, 2-3: 2 -> 0 unsupported).
- L66 index switches replaced by a physical criterion (both mouths inside their strata bands,
  neither a SurfaceWorld landing).
- Audit: floor zero-crossing refined by bisection (the 0.2498 m "step" was the gauge);
  wall ripple keeps the authored radius, cubic detrend per 32 m window. Controls detected:
  L35 ribs, beads, synthetic 0.25 m step, L36 washboard, L23 terrace.
- Result: 0-1 and 2-3 pass all audits; 1-2 fails wall ripple 7.27 cm (limit 3.5) from an
  authored-radius beat at 7.06 m. Fast tier was green before the final gauge change and was
  not re-run after 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-27 02:27:40 +01:00
1 parent 5e2fc53d39
commit 087333bf8a
17 files changed
+1439 -43

No files matched your search

+2
View File
@@ -43,8 +43,10 @@ struct FStandalonePassageVoidCrossing
std::int64_t minimumRadiusSubvoxels=0;
std::int64_t nominalRadiusSubvoxels=0;
std::int64_t maximumRadiusSubvoxels=0;
double naturalSurfaceReliefMetres=0.0;
double maximumRouteOffsetMetres=0.0;
double maximumBoreRadiusMetres=0.0;
bool needsRootTaper=false;
};
struct FStandalonePassageVoidCrossingCache
+143 -19
View File
@@ -2357,19 +2357,22 @@ namespace StandaloneStreamBenchmark
{{0.0,-supportProbeRadiusMetres}}}};
std::uint32_t supportedProbes=0;
std::uint32_t nativeSupportedProbes=0;
double firstUnsupportedX=x,firstUnsupportedY=y,lastUnsupportedDensity=0.0;
double firstUnsupportedX=x,firstUnsupportedY=y,
firstUnsupportedZ=footZ,lastUnsupportedDensity=0.0;
std::array<bool,5> supportMask{};
for(std::size_t offsetIndex=0;offsetIndex<supportOffsets.size();++offsetIndex)
{
const auto& offset=supportOffsets[offsetIndex];
const double supportX=x+offset[0],supportY=y+offset[1];
bool supported=false;
double offsetSampleZ=footZ;
for(double depth=supportStartMetres;
depth<=supportMaximumMetres+1.0e-6;depth+=supportStepMetres)
{
++audit.supportSamples;
offsetSampleZ=(footZ-depth)/coreMetres;
lastUnsupportedDensity=Field.densityAt({supportX/coreMetres,
supportY/coreMetres,(footZ-depth)/coreMetres});
supportY/coreMetres,offsetSampleZ});
if(lastUnsupportedDensity<0.0)
{
supported=true;break;
@@ -2384,7 +2387,11 @@ namespace StandaloneStreamBenchmark
{++nativeSupportedProbes;break;}
}
if(supported){++supportedProbes;supportMask[offsetIndex]=true;}
else{firstUnsupportedX=supportX;firstUnsupportedY=supportY;}
else
{
firstUnsupportedX=supportX;firstUnsupportedY=supportY;
firstUnsupportedZ=offsetSampleZ*coreMetres;
}
}
if(nativeField&&segmentAudit
&&nativeSupportedProbes<minimumSupportProbes)
@@ -2414,17 +2421,18 @@ namespace StandaloneStreamBenchmark
{
audit.hasDeepUnsupported=true;
audit.firstDeepUnsupported={firstUnsupportedX,firstUnsupportedY,
footZ,lastUnsupportedDensity};
firstUnsupportedZ,lastUnsupportedDensity};
audit.firstDeepSupportMask=supportMask;
}
if(audit.firstUnsupportedCount<audit.firstUnsupported.size())
{
const std::size_t sample=audit.firstUnsupportedCount++;
audit.firstUnsupported[sample]={
firstUnsupportedX,firstUnsupportedY,footZ,lastUnsupportedDensity};
firstUnsupportedX,firstUnsupportedY,firstUnsupportedZ,
lastUnsupportedDensity};
audit.firstSupportMasks[sample]=supportMask;
std::printf("[ResolvedWalkDispatch] kind=unsupported xyz_m=(%.3f,%.3f,%.3f) support_probes=%u/5 mask=%d%d%d%d%d path=%s\n",
firstUnsupportedX,firstUnsupportedY,footZ,supportedProbes,
firstUnsupportedX,firstUnsupportedY,firstUnsupportedZ,supportedProbes,
supportMask[0],supportMask[1],supportMask[2],supportMask[3],supportMask[4],
Field.densityDispatchPathAt({firstUnsupportedX/coreMetres,
firstUnsupportedY/coreMetres,footZ/coreMetres}).c_str());
@@ -2467,6 +2475,8 @@ namespace StandaloneStreamBenchmark
std::uint64_t floorSamples=0,floorExpectedSamples=0;
bool controlDetected=false,passed=false;
bool floorControlDetected=false;
double floorStepControlAmplitudeMetres=0.0;
bool floorStepControlDetected=false;
};
constexpr double MaximumFlatRunMetres=8.0;
constexpr double MinimumWallReliefMetres=0.20;
@@ -2859,21 +2869,55 @@ namespace StandaloneStreamBenchmark
double startDistance,std::vector<std::array<double,2>>& output)
{
if(values.size()<64)return;
// Remove a smooth mouth taper across each 32 m window while
// preserving the authored radius, where regular wall ribs can live.
// A cubic baseline tracks the broad flare without fitting the
// 0.5–8 m periods that this audit is meant to detect.
constexpr std::size_t Degree=3;
std::array<std::array<double,Degree+2>,Degree+1> normal{};
const double meanIndex=0.5*static_cast<double>(values.size()-1);
double mean=0.0,xy=0.0,xx=0.0;
for(double value:values)mean+=value;
mean/=static_cast<double>(values.size());
const double halfSpan=std::max(1.0,meanIndex);
for(std::size_t i=0;i<values.size();++i)
{
const double x=(static_cast<double>(i)-meanIndex)*SampleSpacingMetres;
xy+=x*(values[i]-mean);xx+=x*x;
const double x=(static_cast<double>(i)-meanIndex)/halfSpan;
std::array<double,2*Degree+1> powers{};
powers[0]=1.0;
for(std::size_t power=1;power<powers.size();++power)
powers[power]=powers[power-1]*x;
for(std::size_t row=0;row<=Degree;++row)
{
for(std::size_t column=0;column<=Degree;++column)
normal[row][column]+=powers[row+column];
normal[row][Degree+1]+=values[i]*powers[row];
}
}
for(std::size_t column=0;column<=Degree;++column)
{
std::size_t pivot=column;
for(std::size_t row=column+1;row<=Degree;++row)
if(std::abs(normal[row][column])>
std::abs(normal[pivot][column]))pivot=row;
if(std::abs(normal[pivot][column])<=1.0e-12)return;
if(pivot!=column)std::swap(normal[pivot],normal[column]);
const double divisor=normal[column][column];
for(std::size_t value=column;value<=Degree+1;++value)
normal[column][value]/=divisor;
for(std::size_t row=0;row<=Degree;++row)
{
if(row==column)continue;
const double scale=normal[row][column];
for(std::size_t value=column;value<=Degree+1;++value)
normal[row][value]-=scale*normal[column][value];
}
}
const double slope=xx>0.0?xy/xx:0.0;
for(std::size_t i=0;i<values.size();++i)
{
const double x=(static_cast<double>(i)-meanIndex)*SampleSpacingMetres;
const double x=(static_cast<double>(i)-meanIndex)/halfSpan;
double trend=normal[Degree][Degree+1];
for(std::size_t coefficient=Degree;coefficient-->0;)
trend=trend*x+normal[coefficient][Degree+1];
output.push_back({startDistance+static_cast<double>(i)*SampleSpacingMetres,
values[i]-mean-slope*x});
values[i]-trend});
}
};
const auto appendDetrendedPairs=[](
@@ -2915,6 +2959,50 @@ namespace StandaloneStreamBenchmark
audit.floorControlAmplitudeMetres=audit.controlAmplitudeMetres;
audit.floorControlDetected=audit.floorControlAmplitudeMetres
>=FloorRippleAmplitudeLimitMetres;
// A signed-distance floor with a real 0.25 m ledge must still trip
// the same floor-ripple gauge after the crossing-refinement change.
std::vector<std::array<double,2>> floorStepResiduals;
floorStepResiduals.reserve(static_cast<std::size_t>(WindowLengthMetres/
SampleSpacingMetres)+1);
constexpr double FloorStepControlProbeSpacingMetres=0.25;
for(std::size_t sample=0;
sample<=static_cast<std::size_t>(WindowLengthMetres/SampleSpacingMetres);
++sample)
{
const double distance=static_cast<double>(sample)*SampleSpacingMetres;
const double stepHeight=distance>=16.0?0.25:0.0;
double previousDensity=0.0,previousZ=0.0;
bool havePrevious=false,haveFloor=false;
double bestFloor=0.0,bestDistance=std::numeric_limits<double>::infinity();
for(int vertical=0;vertical<7;++vertical)
{
const double z=-1.0+vertical*FloorStepControlProbeSpacingMetres;
const double density=z-stepHeight;
if(havePrevious&&previousDensity<0.0&&density>=0.0)
{
double lowZ=previousZ,highZ=z;
for(int refine=0;refine<5;++refine)
{
const double middleZ=(lowZ+highZ)*0.5;
if(middleZ-stepHeight<0.0)lowZ=middleZ;
else highZ=middleZ;
}
const double crossing=(lowZ+highZ)*0.5;
const double candidateDistance=std::abs(crossing);
if(candidateDistance<bestDistance)
{bestDistance=candidateDistance;bestFloor=crossing;haveFloor=true;}
}
previousDensity=density;previousZ=z;havePrevious=true;
}
if(haveFloor)floorStepResiduals.push_back({distance,bestFloor});
}
std::vector<std::array<double,2>> floorStepSamples;
appendDetrendedPairs(floorStepResiduals,floorStepSamples);
double floorStepPeriod=0.0;
audit.floorStepControlAmplitudeMetres=sinusoidAmplitude(
floorStepSamples,floorStepPeriod);
audit.floorStepControlDetected=audit.floorStepControlAmplitudeMetres
>=FloorRippleAmplitudeLimitMetres;
const std::array<double,5> windowStarts{{0.03,0.31,0.457,0.61,0.91}};
std::vector<std::array<double,2>> coherentSamples;
std::vector<std::array<double,2>> coherentFloorSamples;
@@ -2955,8 +3043,27 @@ namespace StandaloneStreamBenchmark
if(havePrevious&&previousDensity<0.0&&density>=0.0)
{
const double denominator=density-previousDensity;
const double crossing=denominator>1.0e-12
double crossing=denominator>1.0e-12
?previousZ+(z-previousZ)*(-previousDensity)/denominator:z;
// Density can change sharply at a composed floor. Refine
// the sign bracket instead of assuming it is linear over
// an entire Core voxel; linear interpolation can report a
// one-voxel step even when the zero crossing is nearby.
double lowZ=previousZ,highZ=z;
double lowDensity=previousDensity,highDensity=density;
for(int refine=0;refine<5;++refine)
{
const double middleZ=(lowZ+highZ)*0.5;
const double middleDensity=static_cast<double>(Field.densityAt({
pose.x/coreMetres,pose.y/coreMetres,middleZ/coreMetres}))
*coreMetres;
if(middleDensity<0.0)
{lowZ=middleZ;lowDensity=middleDensity;}
else
{highZ=middleZ;highDensity=middleDensity;}
}
(void)lowDensity;(void)highDensity;
crossing=(lowZ+highZ)*0.5;
const double candidateDistance=std::abs(crossing-expectedFloor);
if(candidateDistance<bestDistance)
{bestDistance=candidateDistance;bestFloor=crossing;haveFloor=true;}
@@ -2985,6 +3092,9 @@ namespace StandaloneStreamBenchmark
{x0-nx*offset,y0-ny*offset,z0}))*coreMetres;
if(!std::isfinite(left)||!std::isfinite(right)
||left< -0.75||left>0.75||right< -0.75||right>0.75)continue;
// The probes sit 0.18 m inside the authored radius. Add that
// radius back to the signed wall distance so radius-carried ribs
// remain visible; the cubic detrend removes the smooth mouth flare.
radii.push_back(sampleRadius+0.5*(left+right));
++audit.samples;
}
@@ -3052,7 +3162,8 @@ namespace StandaloneStreamBenchmark
?static_cast<double>(audit.floorSamples)/audit.floorExpectedSamples:0.0;
audit.passed=audit.controlDetected&&coverage>=0.75
&&audit.localPeakAmplitudeMetres<RippleAmplitudeLimitMetres
&&audit.floorControlDetected&&floorCoverage>=0.75
&&audit.floorControlDetected&&audit.floorStepControlDetected
&&floorCoverage>=0.75
&&audit.floorAmplitudeMetres<FloorRippleAmplitudeLimitMetres;
return audit;
};
@@ -3546,6 +3657,12 @@ namespace StandaloneStreamBenchmark
meanRadiusByHeight.begin()+heightSamples)
-*std::min_element(meanRadiusByHeight.begin(),
meanRadiusByHeight.begin()+heightSamples):0.0;
std::printf("[PassageColumnReliefProfile] id=%s heights=%zu radii_m=",
passage.stableId.c_str(),heightSamples);
for(std::size_t height=0;height<heightSamples;++height)
std::printf("%s%.3f",height?",":"",
meanRadiusByHeight[height]);
std::printf("\n");
audit.minimumSurfaceRadiusMetres=std::min(audit.minimumSurfaceRadiusMetres,
crossingMinimumSurfaceRadius);
audit.maximumSurfaceRadiusMetres=std::max(audit.maximumSurfaceRadiusMetres,
@@ -3675,7 +3792,7 @@ namespace StandaloneStreamBenchmark
};
std::uint64_t passageCount=0,passagePasses=0,blockedControls=0,naturalPasses=0;
std::uint64_t mouthProfilePasses=0,ripplePasses=0,rippleControlsDetected=0;
std::uint64_t floorRippleControlsDetected=0;
std::uint64_t floorRippleControlsDetected=0,floorStepRippleControlsDetected=0;
std::uint64_t openAirViolations=0,openAirLegacyViolations=0,openAirSamples=0;
std::uint64_t openAirAudits=0,openAirColumnSamples=0,openAirShortSpanSamples=0;
std::uint64_t columnCrossings=0,shortGroundedSpans=0,columnConnectedEnds=0;
@@ -3767,6 +3884,7 @@ namespace StandaloneStreamBenchmark
ripplePasses+=rippleAudit.passed;
rippleControlsDetected+=rippleAudit.controlDetected;
floorRippleControlsDetected+=rippleAudit.floorControlDetected;
floorStepRippleControlsDetected+=rippleAudit.floorStepControlDetected;
passagePasses+=passageAudit.passed&&mouthsInRadius&&mouthsInContent
&&naturalAudit.passed&&mouthProfileAudit.passed&&rippleAudit.passed;
std::printf("[ResolvedPassageAudit] id=%s interface=%d-%d control_points=%zu center_samples=%llu capsule_samples=%llu blocked=%llu support_samples=%llu unsupported=%llu grade_failures=%llu mouth_content=%d/2 mouth_radius=%d/2 walkability=%s\n",
@@ -3794,7 +3912,7 @@ namespace StandaloneStreamBenchmark
mouthProfileAudit.wallFlatStepRunMetres,mouthProfileAudit.wallStepMetres,
PassageProfileSpacingMetres,PassageProfilePlateauMinimumMetres,
PassageProfileStepThresholdMetres,mouthProfileAudit.passed?"PASS":"FAIL");
std::printf("[PassageRippleAudit] id=%s window_m=32.000 spacing_m=0.125 period_m=%.3f amplitude_m=%.4f amplitude_cm=%.2f coherent_period_m=%.3f coherent_amplitude_m=%.4f coherent_amplitude_cm=%.2f local_peak_amplitude_m=%.4f coverage=%llu/%llu threshold_m=0.035 synthetic_spheres_period_m=1.500 synthetic_spheres_amplitude_m=%.4f synthetic_spheres_detected=%s floor_period_m=%.3f floor_amplitude_m=%.4f floor_amplitude_cm=%.2f floor_coherent_period_m=%.3f floor_coherent_amplitude_m=%.4f floor_coverage=%llu/%llu floor_threshold_m=0.025 floor_beaded_control_amplitude_m=%.4f floor_beaded_control_detected=%s status=%s\n",
std::printf("[PassageRippleAudit] id=%s window_m=32.000 spacing_m=0.125 period_m=%.3f amplitude_m=%.4f amplitude_cm=%.2f coherent_period_m=%.3f coherent_amplitude_m=%.4f coherent_amplitude_cm=%.2f local_peak_amplitude_m=%.4f coverage=%llu/%llu threshold_m=0.035 synthetic_spheres_period_m=1.500 synthetic_spheres_amplitude_m=%.4f synthetic_spheres_detected=%s floor_period_m=%.3f floor_amplitude_m=%.4f floor_amplitude_cm=%.2f floor_coherent_period_m=%.3f floor_coherent_amplitude_m=%.4f floor_coverage=%llu/%llu floor_threshold_m=0.025 floor_beaded_control_amplitude_m=%.4f floor_beaded_control_detected=%s floor_step_control_amplitude_m=%.4f floor_step_control_detected=%s status=%s\n",
passage.stableId.c_str(),rippleAudit.periodMetres,
rippleAudit.amplitudeMetres,rippleAudit.amplitudeMetres*100.0,
rippleAudit.coherentPeriodMetres,rippleAudit.coherentAmplitudeMetres,
@@ -3810,7 +3928,12 @@ namespace StandaloneStreamBenchmark
static_cast<unsigned long long>(rippleAudit.floorExpectedSamples),
rippleAudit.floorControlAmplitudeMetres,
rippleAudit.floorControlDetected?"true":"false",
rippleAudit.floorStepControlAmplitudeMetres,
rippleAudit.floorStepControlDetected?"true":"false",
rippleAudit.passed?"PASS":"FAIL");
std::printf("[PassageFloorStepNegativeControl] id=%s source=synthetic_signed_distance_step height_m=0.250 threshold_m=0.025 amplitude_m=%.4f detected=%s\n",
passage.stableId.c_str(),rippleAudit.floorStepControlAmplitudeMetres,
rippleAudit.floorStepControlDetected?"true":"false");
for(std::size_t sample=0;sample<rippleAudit.floorPeakProfile.size();sample+=4)
{
const auto& value=rippleAudit.floorPeakProfile[sample];
@@ -4134,11 +4257,12 @@ namespace StandaloneStreamBenchmark
PassageProfilePlateauMinimumMetres,PassageProfileStepThresholdMetres,
l23TerraceControlDetected?"DETECTED":"MISSED",
mouthProfilePasses==passageCount&&l23TerraceControlDetected?"PASS":"FAIL");
std::printf("[PassageRippleAuditSummary] passed=%llu/%llu synthetic_spheres_negative_control=%s max_amplitude_m=0.035 floor_beaded_negative_control=%s max_floor_amplitude_m=0.015 status=%s\n",
std::printf("[PassageRippleAuditSummary] passed=%llu/%llu synthetic_spheres_negative_control=%s max_amplitude_m=0.035 floor_beaded_negative_control=%s max_floor_amplitude_m=0.025 floor_step_negative_control=%s status=%s\n",
static_cast<unsigned long long>(ripplePasses),
static_cast<unsigned long long>(passageCount),
rippleControlsDetected==passageCount?"DETECTED":"MISSED",
floorRippleControlsDetected==passageCount?"DETECTED":"MISSED",
floorStepRippleControlsDetected==passageCount?"DETECTED":"MISSED",
ripplePasses==passageCount?"PASS":"FAIL");
const bool auditPassed=passageCount>0&&passagePasses==passageCount
&&naturalPasses==passageCount&&l23SmoothWallDetected