wip(assembler): round L2 -- the cross-platform hash check can fail; FP contraction changes the world

Clang -ffp-contract=on/fast and GCC's default (fast) all change the density hash on the L1 view;
contraction off reproduces L1 (= Windows S13) at W1/W12. Seed sweep: 48 FloatingIslands seeds and
14 effective SurfaceWorld seeds (34 of 48 fell on a seed-independent cube) match across Clang/GCC
and W1/W12. Standalone gains --seed/--recipe/--render-distance-chunks (viewer + headless) and a
Windows replay script. Linux standalone workers get 32 MiB pthread stacks (TLS is 17.3 MiB/thread),
so no external stack limit is needed. No Core or world-output change; MSVC compile unverified.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Fr0zkaandClaude Opus 5.5 committed 2026-10-19 18:18:34 +02:00
1 parent 1276fd11e3
commit 303b7b9f24
17 files changed
+1401 -13

No files matched your search

+47 -1
View File
@@ -8877,6 +8877,11 @@ int main(int Argc,char** Argv)
bool bStreamPipeline=false;
bool bProfileColumnOverlap=false;
bool bCoarseFirstStreamOrder=false;
bool bHasSeedOverride=false;
int32 SeedOverride=0;
bool bHasRenderDistanceOverride=false;
int32 RenderDistanceOverride=0;
bool bFloatingIslandsRecipe=false;
bool bProfileDetailBand=false;
bool bPassageDetailAuditOnly=false;
bool bGridStairAudit=false;
@@ -8898,6 +8903,33 @@ int main(int Argc,char** Argv)
{
const std::string_view Arg=Argv[I];
if(Arg.starts_with("--capture="))App.CapturePath=std::string(Arg.substr(10));
else if(Arg.starts_with("--seed="))
{
const std::string Value(Arg.substr(std::string_view("--seed=").size()));
char* End=nullptr;
const long long Parsed=std::strtoll(Value.c_str(),&End,10);
if(End==Value.c_str()||*End!='\0'||Parsed<INT32_MIN||Parsed>INT32_MAX)
{std::fprintf(stderr,"Invalid --seed value: %s\n",Value.c_str());return 2;}
SeedOverride=static_cast<int32>(Parsed);bHasSeedOverride=true;
}
else if(Arg.starts_with("--render-distance-chunks="))
{
const std::string Value(Arg.substr(std::string_view("--render-distance-chunks=").size()));
char* End=nullptr;
const long long Parsed=std::strtoll(Value.c_str(),&End,10);
if(End==Value.c_str()||*End!='\0'||Parsed<0||Parsed>INT32_MAX)
{std::fprintf(stderr,"Invalid --render-distance-chunks value: %s\n",Value.c_str());return 2;}
RenderDistanceOverride=static_cast<int32>(Parsed);bHasRenderDistanceOverride=true;
}
else if(Arg.starts_with("--recipe="))
{
const std::string_view Recipe=Arg.substr(std::string_view("--recipe=").size());
if(Recipe=="surface-world")bFloatingIslandsRecipe=false;
else if(Recipe=="floating-islands")
{bFloatingIslandsRecipe=true;App.bWorldAssemblerPrototype=true;App.bShapeWorld=true;}
else
{std::fprintf(stderr,"Invalid --recipe value: %.*s\n",static_cast<int>(Recipe.size()),Recipe.data());return 2;}
}
else if(Arg.starts_with("--far-horizon-lod8-step="))
App.FarHorizonLOD8InteriorStepVoxels=std::max(0,std::atoi(
std::string(Arg.substr(std::string_view("--far-horizon-lod8-step=").size())).c_str()));
@@ -9134,6 +9166,16 @@ int main(int Argc,char** Argv)
if(!VFJson::Parser(std::move(OwnerJsonText)).Parse(App.OwnerJsonRoot,Error))
{std::fprintf(stderr,"Owner data load failed: %s\n",Error.c_str());return 2;}
}
if(bHasSeedOverride
&&!StandaloneWorldAssemblyPrototype::OverrideStandaloneSeed(App.OwnerJsonRoot,SeedOverride,Error))
{std::fprintf(stderr,"Seed override failed: %s\n",Error.c_str());return 2;}
if(bHasRenderDistanceOverride
&&!StandaloneWorldAssemblyPrototype::OverrideStandaloneRenderDistance(
App.OwnerJsonRoot,RenderDistanceOverride,Error))
{std::fprintf(stderr,"Render-distance override failed: %s\n",Error.c_str());return 2;}
if(bFloatingIslandsRecipe
&&!StandaloneWorldAssemblyPrototype::SelectTopStrateAsFloatingIslands(App.OwnerJsonRoot,Error))
{std::fprintf(stderr,"Floating-island recipe selection failed: %s\n",Error.c_str());return 2;}
if(!StandaloneOwnerLoader::Resolve(App.OwnerJsonRoot,*App.World,Error))
{std::fprintf(stderr,"Owner data load failed: %s\n",Error.c_str());return 2;}
std::printf("[ColdTimeline] stage=owner_data_load end_ms=%.3f\n",
@@ -9165,8 +9207,12 @@ int main(int Argc,char** Argv)
if(App.bWorldAssemblerPrototype)
{
const auto PlanStart=std::chrono::steady_clock::now();
VoxelForgeCore::WorldAssemblyManifest WorldAssembly;
const bool bPlanReady=StandaloneWorldAssemblyPrototype::AttachRound1WorldAssemblyPrototype(*App.World,App.OwnerJsonRoot,
Error,WorldAssemblyManifestOutputPath);
Error,WorldAssemblyManifestOutputPath,&WorldAssembly)
&&(!bFloatingIslandsRecipe
||StandaloneWorldAssemblyPrototype::AttachFloatingIslandWorldAssembly(
*App.World,App.OwnerJsonRoot,WorldAssembly,Error));
const double PlanMilliseconds=std::chrono::duration<double,std::milli>(
std::chrono::steady_clock::now()-PlanStart).count();
std::printf("[WorldAssemblerPlanTiming] total_ms=%.3f status=%s\n",