tools: per-strate density dispatch report in the fast tier (L132)

--density-dispatch-report prints each strate's bound path and tile shares. Owner world: SW native heightfield;
FI, TN, VS on compiled-analytic legacy fallback (FI lacks an imported FloatingIslandPlan; TN/VS have legacy recipes).
A native FI candidate broke the composed owner walk/shell gates, so the owner stays on its path. Output unchanged.

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-31 02:40:58 +01:00
1 parent ebae71b142
commit 0065ee68e6
5 files changed
+277 -7

No files matched your search

+73 -3
View File
@@ -70,6 +70,8 @@ namespace
bool HasRenderDistanceOverride=false;
int RenderDistanceOverride=0;
bool FloatingIslandsRecipe=false;
bool NativeOwnerFloatingIslandsRecipe=false;
bool DensityDispatchReport=false;
bool CavesRecipe=false;
bool LatticeRecipe=false;
int LatticeStrateIndex=-1;
@@ -1432,6 +1434,8 @@ namespace
" --core-snapshot=FILE (benchmark the exact resolved Core snapshot from Unreal)\n"
" --profile-column-overlap --far-horizon-lod8-step=N --force-generate\n"
" --seed=N --recipe=surface-world|floating-islands|caves|lattice\n"
" --native-owner-fi (build the existing owner FI plan; leave other strates intact)\n"
" --density-dispatch-report (print bound path per strate and tile hashes)\n"
" --lattice-strate=N (opt one Maze or VerticalShafts strate into Core.Lattice)\n"
" --landmark-chamber-demo (opt-in SW cavern room and swept tunnel)\n"
" --ore-veins-demo (opt-in material-only SW capsule veins)\n"
@@ -1490,6 +1494,9 @@ namespace
else if(arg=="--resolved-layout-only")options.ResolvedLayoutOnly=true;
else if(arg=="--audit-resolved-layout-boundaries")options.AuditResolvedLayoutBoundaries=true;
else if(arg=="--audit-resolved-layout-passages")options.AuditResolvedLayoutPassages=true;
else if(arg=="--native-owner-fi")options.NativeOwnerFloatingIslandsRecipe=true;
else if(arg=="--density-dispatch-report")
{options.DensityDispatchReport=true;options.StreamHash=true;options.StreamHashTiles=true;}
else if(arg=="--audit-landmark-reachability")options.AuditLandmarkReachability=true;
else if(arg=="--audit-native-caves")options.AuditNativeCaves=true;
else if(arg=="--audit-native-lattice")options.AuditNativeLattice=true;
@@ -1819,7 +1826,9 @@ int main(int argc,char** argv)
else if(!StandaloneWorldAssemblyPrototype::AttachRound1WorldAssemblyPrototype(
*ownerWorld,ownerJsonRoot,error,{},&worldAssembly))
{std::fprintf(stderr,"World assembler prototype setup failed: %s\n",error.c_str());return 2;}
if(!useExportedCorePlan&&options.FloatingIslandsRecipe
if(((!useExportedCorePlan&&options.FloatingIslandsRecipe)
||(options.NativeOwnerFloatingIslandsRecipe
&&worldAssembly.floatingIslands.empty()))
&&!StandaloneWorldAssemblyPrototype::AttachFloatingIslandWorldAssembly(
*ownerWorld,ownerJsonRoot,worldAssembly,error))
{std::fprintf(stderr,"Floating-island assembly setup failed: %s\n",error.c_str());return 2;}
@@ -1852,15 +1861,17 @@ int main(int argc,char** argv)
const std::string variant=options.LatticeRecipe
?"lattice/"+std::to_string(options.LatticeStrateIndex)
:options.CavesRecipe?"caves"
:options.FloatingIslandsRecipe?"floating-islands":"surface-world";
:(options.FloatingIslandsRecipe||options.NativeOwnerFloatingIslandsRecipe)
?"floating-islands":"surface-world";
const bool layoutResolved=useExportedCorePlan
&&!options.NativeOwnerFloatingIslandsRecipe
?StandaloneWorldAssemblyPrototype::ImportExportedResolvedLayout(
ownerJsonRoot,resolvedLayout,error)
:StandaloneWorldAssemblyPrototype::BuildResolvedLayoutSnapshot(
*ownerWorld,worldAssembly,variant,resolvedLayout,error);
if(!layoutResolved)
{std::fprintf(stderr,"Resolved-layout snapshot failed: %s\n",error.c_str());return 2;}
if(useExportedCorePlan
if(useExportedCorePlan&&!options.NativeOwnerFloatingIslandsRecipe
&&!StandaloneWorldAssemblyPrototype::ValidateExportedCorePlanMatchesOwner(
*ownerWorld,worldAssembly,resolvedLayout,error))
{std::fprintf(stderr,"Unreal-resolved Core plan/owner slot validation failed: %s\n",error.c_str());return 2;}
@@ -2113,6 +2124,65 @@ int main(int argc,char** argv)
controls.controlsRejectedAsExpected,controls.controlsRun,controls.passed?"PASS":"FAIL");
if(!controls.passed)
{for(const auto& failure:controls.failures)std::printf("[ResolvedLayoutValidatorControlFailure] %s %s\n",failure.code.c_str(),failure.detail.c_str());return 2;}
if(options.DensityDispatchReport)
{
const auto& slots=ownerWorld->Manager->GetLayout();
for(const auto& stratum:resolvedLayout.strates)
{
const auto slot=std::find_if(slots.begin(),slots.end(),[&](const auto& candidate)
{return candidate.StrateIndex==stratum.strateIndex;});
bool native=false;
std::string path,adapter;
if(slot!=slots.end()&&stratum.generatorKind=="SurfaceWorld")
{
const auto plan=std::find_if(worldAssembly.plan.strates.begin(),
worldAssembly.plan.strates.end(),[&](const auto& candidate)
{return candidate.strateIndex==stratum.strateIndex
&&candidate.bottomChunkZ==slot->BottomChunkZ
&&candidate.topChunkZ==slot->TopChunkZ;});
if(plan!=worldAssembly.plan.strates.end())
{
const VoxelForgeCore::Heightfield2D field(worldAssembly.recipe,*plan);
native=field.isValid();
}
if(native){path="SurfaceWorld-native";adapter="FSurfaceWorldFieldAdapter";}
}
else if(slot!=slots.end()&&stratum.generatorKind=="FloatingIslands")
{
const auto plan=std::find_if(worldAssembly.floatingIslands.begin(),
worldAssembly.floatingIslands.end(),[&](const auto& candidate)
{return candidate.strateIndex==stratum.strateIndex
&&candidate.bottomChunkZ==slot->BottomChunkZ
&&candidate.topChunkZ==slot->TopChunkZ;});
if(plan!=worldAssembly.floatingIslands.end())
{
const VoxelForgeCore::FloatingIslandFieldV1 field(
plan->manifest.recipe,plan->manifest.plan);
native=field.isValid();
}
if(native){path="FloatingIslands-native";adapter="FFloatingIslandFieldAdapter";}
}
else if(VoxelForgeCore::HasNativeGraphField(stratum)
&&(VoxelForgeCore::IsNativeCaveFieldStratum(stratum)
?stratum.passageCapabilities.hasNativeCaveField
:stratum.passageCapabilities.hasNativeLatticeField))
{
native=true;
path=VoxelForgeCore::IsNativeLatticeFieldStratum(stratum)
?"Lattice-native":"Caves-native";
adapter="FCavesFieldAdapter";
}
if(!native)
{
path=stratum.generatorKind=="SurfaceWorld"
?"SurfaceWorld-legacy":"compiled-analytic/"+stratum.generatorKind;
adapter="FLegacyGeneratorFieldAdapter";
}
std::printf("[DensityDispatch] strate=%d generator=%s recipe=%s version=%u bound_path=%s adapter=%s\n",
stratum.strateIndex,stratum.generatorKind.c_str(),stratum.recipeId.c_str(),
stratum.recipeVersion,path.c_str(),adapter.c_str());
}
}
if(!options.ResolvedLayoutOutputPath.empty())
std::printf("[ResolvedLayoutSnapshotOutput] path=%s\n",options.ResolvedLayoutOutputPath.c_str());
if(auto* root=std::get_if<VFJson::Value::Object>(&ownerJsonRoot.Data))