wip(assembler): M1 round 5 -- native SurfaceWorld manifest delivered into the Unreal Core route

Manifest imported into UVoxelSettings (hash 8933693d9560ba9f), folded into the season
content hash only when Core is on. BuildHost: W1/W8/W16 stable, 2553 surface tiles match
standalone, 432 LOD transitions, collision on all 36 expected tiles. Matched timing
96.8 s native vs 197.3 s bridge (2.04x). Collision support tiles wait for Core region admission.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MmSoF64BbRFmk9C3p1VsBJ
This commit is contained in:
Fr0zkaandClaude Opus 5.5 committed 2026-10-09 15:31:48 +02:00
1 parent 2d0cec90e4
commit f67b519e75
11 files changed
+1002 -45

No files matched your search

+63 -1
View File
@@ -40,6 +40,7 @@
#include "Engine/World.h"
#include "Misc/IQueuedWork.h"
#include "Misc/QueuedThreadPool.h"
#include "Misc/SecureHash.h"
#include "RealtimeMeshCollisionLibrary.h"
#include "Camera/PlayerCameraManager.h"
#include "Async/Async.h"
@@ -7259,6 +7260,15 @@ bool AVoxelWorld::InitializeVoxelForgeCoreWorld()
UTF8_TO_TCHAR(CoreError.c_str()));
return false;
}
if (const VoxelForgeCore::WorldAssemblyManifest* Assembly = Snapshot->worldAssembly())
{
UE_LOG(LogTemp, Display,
TEXT("[VoxelForgeCoreRuntime] world_assembly_hash=%016llx recipe_hash=%016llx plan_hash=%016llx strates=%d"),
static_cast<unsigned long long>(Assembly->contentHash),
static_cast<unsigned long long>(Assembly->recipe.contentHash),
static_cast<unsigned long long>(Assembly->plan.contentHash),
static_cast<int32>(Assembly->plan.strates.size()));
}
TSharedPtr<FVoxelForgeCoreRuntimeState, ESPMode::ThreadSafe> State =
MakeShared<FVoxelForgeCoreRuntimeState, ESPMode::ThreadSafe>();
@@ -7786,6 +7796,18 @@ void AVoxelWorld::RequestCollisionGateSupportTile(const FVoxelTileKey& SupportTi
}
bForceDesiredRebuild |= bNeedsDesiredRebuild;
// Core surface tiles must enter through the desired-set region compile before collision work.
// Les tuiles de surface Core doivent passer par la compilation de région avant la collision.
if (bUseVoxelForgeCore && !bDesiredAtRequest)
{
UE_LOG(LogTemp, Display,
TEXT("[VoxelForgeCollisionGate] support_request_deferred tile=(%d,%d,%d) "
"reason=core_region_admission desired=0"),
SupportTile.Coord.X, SupportTile.Coord.Y, SupportTile.Coord.Z);
bPawnGateSupportRequestReported = true;
return;
}
// Preserve the established critical floor ordering when it already belongs to this desired
// epoch. Before the first build there is no array to promote into; LoadTile below still uses
// the same CollisionCritical work class and priority queue.
@@ -13222,7 +13244,47 @@ int32 AVoxelWorld::GetCurrentSeason() const
FString AVoxelWorld::GetCurrentSeasonContentHash() const
{
return StrateManager ? StrateManager->GetSeasonContentHash() : FString();
const FString SeasonHash = StrateManager ? StrateManager->GetSeasonContentHash() : FString();
// Only active Core generation includes the optional native surface manifest in world identity.
// Seul le Core actif inclut le manifeste de surface natif dans l'identite du monde.
if (!Settings || !bUseVoxelForgeCore)
{
return SeasonHash;
}
FString AssemblyJson;
FString AssemblyHash;
FString AssemblyError;
if (!Settings->GetWorldAssemblyManifestJson(AssemblyJson, AssemblyHash, AssemblyError))
{
return FString();
}
if (AssemblyHash.IsEmpty())
{
return SeasonHash;
}
FString Payload = SeasonHash;
if (Payload.IsEmpty())
{
Payload = FString::Printf(TEXT("seed=%d"), StrateManager ? StrateManager->GetWorldSeed()
: Settings->GetEffectiveWorldSeed());
if (StrateManager)
{
for (const FStrateSlot& Slot : StrateManager->GetLayout())
{
Payload += FString::Printf(TEXT("|strate=%d,%d,%d,%s"), Slot.StrateIndex,
Slot.TopChunkZ, Slot.BottomChunkZ,
Slot.Definition ? *Slot.Definition->GetPathName() : TEXT("missing"));
}
}
}
Payload += TEXT("|world_assembly=");
Payload += AssemblyHash;
FTCHARToUTF8 Utf8Payload(*Payload);
uint8 Digest[FSHA1::DigestSize];
FSHA1::HashBuffer(Utf8Payload.Get(), Utf8Payload.Length(), Digest);
return BytesToHex(Digest, FSHA1::DigestSize);
}
//=============================================================================