fix(strate): opt-in diagnostic must not fail the automation suite
Sol's opt-in warning logs at Warning. UE's automation framework counts a Warning as a failure, and the Determinism.* tests deliberately build a NON-opted-in world -- that world is their comparison oracle, the baseline every OpStack.* number is measured against. The diagnostic was failing the suite by correctly reporting an intentional configuration. Verbosity is now Log under GIsAutomationTesting and Warning otherwise. The message is written once and only the verbosity branches (Printf then log %s): four copies of a long format string across two sites would have been exactly the "one definition, not two kept in sync" failure this project has rules about. CoreGlobals.h included explicitly for GIsAutomationTesting -- IWYU, no shared PCH here. Note for the record: the tests must NOT be switched to the op stack. The non-opted-in fixture is the oracle, not an oversight. The diagnostic also did its job: 7/7 cave slots report disabled in the fixture (slot 4 absent = the SurfaceWorld narrowing working). The same line read from the GAME log is now the ground truth for whether T1.d has ever been enabled in production. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -4231,3 +4231,48 @@ so the pointer proves its own safety instead of relying on two conditions stayin
|
||||
Swept the file: the only other `Box.` uses (761–763) are inside the `if` and in scope. Not a logic
|
||||
error and not a caching change — a scope slip, invisible in review because the diff showed both
|
||||
halves separately. Still unbuilt beyond this compile fix.
|
||||
|
||||
## 2026-08-16 (p) — the opt-in diagnostic was failing the test suite; and it answered T1.d
|
||||
|
||||
### The six-box LRU worked
|
||||
|
||||
Jahni: *"column memo miss is quite a fraction of what it used to be."* First qualitative
|
||||
confirmation that the LRU port was the right call — the single-box version wiped 6561 cells on every
|
||||
recenter. **Still owed a same-seed/same-route number before it counts as measured.**
|
||||
|
||||
### The diagnostic broke the tests, for doing its job
|
||||
|
||||
Sol's opt-in warning logs at `Warning`. UE's automation framework counts a `Warning` as a failure,
|
||||
and the `Determinism.*` tests **deliberately build a non-opted-in world** — that world is their
|
||||
comparison oracle, the baseline the `OpStack.*` numbers are measured against. So the diagnostic was
|
||||
failing the suite by correctly reporting an intentional configuration.
|
||||
|
||||
Fixed: verbosity is now `Log` when `GIsAutomationTesting`, `Warning` otherwise. The message is
|
||||
written **once** and only the verbosity branches (`FString::Printf` then log `%s`) — four copies of a
|
||||
long format string across two sites would have been the "one definition, not two kept in sync"
|
||||
failure this project already has rules about. `CoreGlobals.h` added explicitly for
|
||||
`GIsAutomationTesting` rather than relying on transitivity, since there is no shared PCH.
|
||||
|
||||
**Answer to "can I set the tests to use the op stack?" — no, and it must stay that way.** The
|
||||
`Determinism.*` fixture being non-opted-in is not an oversight; it is the oracle. `OpStack.*` runs the
|
||||
opted-in variant. Flipping the fixture would delete the comparison that gives every T1.d number its
|
||||
meaning.
|
||||
|
||||
### ⚠️ AND THE DIAGNOSTIC ANSWERED T1.d — pending one check in the GAME log
|
||||
|
||||
```
|
||||
7/7 cave layout slots have Use Operator Stack disabled
|
||||
cave slot=0..3, 5..7 bUseOperatorStack=false
|
||||
```
|
||||
|
||||
Slot 4 is absent, which is Sol's SurfaceWorld narrowing working as intended.
|
||||
|
||||
Those slots are the **test fixture** (`name=''` ⇒ transient objects). **The line that matters is the
|
||||
same log from the real game.** If it also reports slots disabled, then the belief recorded on
|
||||
2026-08-16 (h) — *"the data assets in game have the switch on"* — is **wrong**, and T1.d has never
|
||||
been enabled in production at all. That single log line settles what a day of counter-reading could
|
||||
not, and it costs nothing to read.
|
||||
|
||||
⇒ **Next action for Jahni: open the game (not the tests) and search the log for
|
||||
`Operator-stack opt-in`.** Whatever it says is the ground truth, and it supersedes both my earlier
|
||||
inference from `Cave Bail Not Op Stack` and the recorded belief about the assets.
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// Runtime strate layout generation and queries.
|
||||
|
||||
#include "VoxelStrateManager.h"
|
||||
#include "CoreGlobals.h" // GIsAutomationTesting — the opt-in diagnostic stays quiet under tests
|
||||
#include "VoxelSettings.h"
|
||||
#include "VoxelTypes.h" // For CHUNK_SIZE, VOXEL_SIZE, WorldToChunkCoord
|
||||
#include "VoxelCaveMorphology.h" // For VoxelSDF and VoxelHash
|
||||
@@ -149,11 +150,23 @@ void UVoxelStrateManager::Initialize(UVoxelSettings* Settings, int32 WorldSeed)
|
||||
}
|
||||
}
|
||||
|
||||
// ⚠️ WARNING EN ÉDITEUR/JEU, JAMAIS EN TEST. Les tests `Determinism.*` construisent
|
||||
// DÉLIBÉRÉMENT un monde non opt-in — c'est leur oracle de comparaison — et le framework
|
||||
// d'automatisation compte un Warning comme un échec. Un diagnostic ne doit pas casser la suite
|
||||
// qu'il est censé éclairer. Le message reste écrit UNE fois : seule la verbosité change.
|
||||
// Warning in editor/game where it is actionable, never in tests: the Determinism.* tests build
|
||||
// a non-opted-in world ON PURPOSE as their comparison oracle, and the automation framework
|
||||
// treats a Warning as a failure. One message, two verbosities.
|
||||
const bool bQuietDiagnostic = GIsAutomationTesting;
|
||||
|
||||
if (NumOperatorStackDisabledCaves > 0)
|
||||
{
|
||||
UE_LOG(LogTemp, Warning,
|
||||
const FString Summary = FString::Printf(
|
||||
TEXT("[StrateManager] Operator-stack opt-in: %d/%d cave layout slots have Use Operator Stack disabled. These slots cannot use operator-stack ClassifyBox/T1.d; enable the asset setting on the listed definitions if that is intended."),
|
||||
NumOperatorStackDisabledCaves, NumCaveSlots);
|
||||
|
||||
if (bQuietDiagnostic) { UE_LOG(LogTemp, Log, TEXT("%s"), *Summary); }
|
||||
else { UE_LOG(LogTemp, Warning, TEXT("%s"), *Summary); }
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -171,12 +184,15 @@ void UVoxelStrateManager::Initialize(UVoxelSettings* Settings, int32 WorldSeed)
|
||||
continue;
|
||||
}
|
||||
|
||||
UE_LOG(LogTemp, Warning,
|
||||
const FString Line = FString::Printf(
|
||||
TEXT("[StrateManager] cave slot=%d name='%s' Z chunks=[%d to %d] bUseOperatorStack=false"),
|
||||
Slot.StrateIndex,
|
||||
*Slot.Definition->StrateName.ToString(),
|
||||
Slot.TopChunkZ,
|
||||
Slot.BottomChunkZ);
|
||||
|
||||
if (bQuietDiagnostic) { UE_LOG(LogTemp, Log, TEXT("%s"), *Line); }
|
||||
else { UE_LOG(LogTemp, Warning, TEXT("%s"), *Line); }
|
||||
}
|
||||
|
||||
CachedSeed = WorldSeed;
|
||||
|
||||
Reference in New Issue
Block a user