fix(diag): Campaign V slice V7 commit 2 - pin the world clock, because the route never did

THE ROUTE'S TIME PIN NEVER HELD, AND EVERY V7 NUMBER SO FAR WAS TAKEN THROUGH IT.

connected-backend-differential.route.txt opened by pressing
AcdreamCycleTimeOfDay three times, on the stated theory that the cycle walks
live -> 0.00 -> 0.25 -> 0.50 and lands on noon. The mechanism underneath is
WorldTimeService.SetDebugTime, and SyncFromServer clears it -- deliberately,
because that setter is the /time slash command and the command is meant to be a
look-at-dusk-for-a-moment affordance rather than a mode. There is even a test
pinning that behaviour: WorldTimeDebugTests.SyncFromServer_ClearsDebugOverride.
ACE sends TimeSync every few seconds. The clock was therefore un-pinned again
long before the route reached its first stop, on every run this campaign has
taken, including V6m's smoke pair.

The Dereth clock does not only move the sky. It moves the SUN, so it moves the
directional term of every lit surface in the scene.

MEASURED, rather than argued. A probe route captured each stop TWICE, 45 seconds
apart, in the same run on the same backend:

    GL,     Holtburg,      capture 1 vs capture 2:  205,772 px   22.33%
    Vulkan, Holtburg,      capture 1 vs capture 2:  218,732 px   23.73%
    GL,     Facility Hub,  capture 1 vs capture 2:  108,795 px   11.81%
    Vulkan, Facility Hub,  capture 1 vs capture 2:  130,206 px   14.13%

One backend, one stop, nothing moving, and a fifth of the frame changes while
you watch. No cross-backend number means anything against that noise floor, and
the cross-backend numbers taken during that probe run were duly absurd -- 56% at
Holtburg, where the two launches happened to be at different times of Dereth day.

THE FIX IS A PIN THAT OUTRANKS THE SERVER CLOCK AND SURVIVES SYNC.

WorldTimeService.PinnedDayFraction is a nullable day fraction that wins over both
Calendar.DayFraction(NowTicks) and SetDebugTime, and that SyncFromServer does not
touch. ACDREAM_WORLD_TIME -> RuntimeOptions.PinnedWorldDayFraction ->
WorldEnvironmentController, which writes it once: the Runtime environment owner
and its clock are session-scoped, so one write outlives every teleport and every
reveal generation. Values outside [0, 1) are REJECTED rather than clamped -- a
day fraction of 12.5 is a typo, and silently pinning the world at it would be
worse than ignoring it.

Unset is the default and every ordinary run. The calendar DATE still advances,
which is intentional: the date drives day-group selection, and ACDREAM_DAY_GROUP
already pins that. The differential gate forces the pin at 0.5 -- noon, which is
what the three presses were aiming at -- on both launches, and the route's
presses are deleted rather than left in as decoration.

This is instrument determinism on the footing of ACDREAM_DAY_GROUP and V7's
ACDREAM_SKY_PHASE_SECONDS, not a workaround: it is off by default, nothing in the
shipping client reads it, and the alternative was to keep measuring two backends
through a fifth of a frame of sunlight.

WHAT IT MOVED. The same three-stop route, same commit otherwise, before and after:

    holtburg_town           9.05%  ->  2.86%      (83,438 -> 26,330 px)
    facility_hub_interior  12.16%  ->  0.78%      (112,075 -> 7,176 px)
    aerlinthe_island       23.09%  ->  6.82%      (212,824 -> 62,892 px)

The interior stop is the headline. V6m recorded it as a route defect on the
theory that the indoor spring-arm camera settles to different distances in two
runs; that theory is now refuted. The camera was fine. The interior was lit
differently because the sun had moved, and with the sun held still the stop drops
by a factor of 15 to 0.78% -- close enough to the 0.001 threshold that its
remaining population is worth naming rather than guessing at. No route change was
needed and none was made.

WHAT REMAINS, per the difference maps, all of it now attributable by eye:
the animated portal beside the Holtburg stop; distant scenery foliage; wandering
NPCs and a chimney smoke plume, which are animation and emitter phase; the vitals
readouts, whose stamina and mana genuinely regenerate at different rates across
two logins minutes apart; and, at Aerlinthe, a dense low-magnitude speckle in a
scene whose mean luminance is 28/255 -- half of its differing pixels are exactly
delta 3, one step over a tolerance that is absolute rather than relative.

Gates. Release build green. App tests 4,134 passed / 3 skipped (one new: the
day-fraction range check); AcDream.Core.Tests WorldTimeDebugTests 6/6, including
the two new ones that assert the pin survives a sync and outranks the transient
override. GL offline pixel gate against the pre-slice tree: 2.66e-05, 15 pixels
of 563,200, inside the documented 9-31 band -- GL did not move.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-07-28 19:34:13 +02:00
parent ad5f8b68dc
commit 1f25a60999
8 changed files with 161 additions and 14 deletions

View file

@ -27,9 +27,16 @@
Note that it must be forced on BOTH -- matching a GL run at 4x against a
Vulkan run at 0 would be worse than either.
2. ACDREAM_DAY_GROUP pinned. The sky animates and the Dereth clock advances
with wall time; two launches minutes apart cannot agree about either.
The route additionally pins the client-only time-of-day override.
2. ACDREAM_DAY_GROUP and ACDREAM_WORLD_TIME pinned. The Dereth clock
advances with wall time, and it does not only move the sky: it moves the
SUN, so every lit surface in the scene drifts with it. The route used to
press AcdreamCycleTimeOfDay three times instead, and that was measured
NOT to hold -- SetDebugTime is transient by design and ACE's next
TimeSync clears it within seconds. What that cost, measured at V7 on two
captures 45 s apart at ONE stop on ONE backend: 22.3% of the frame at
Holtburg and 11.8% inside the Facility Hub. A cross-backend number taken
against that noise floor means nothing, which is why the day fraction is
now pinned by env var and the route no longer presses anything.
3. ACDREAM_SKY_PHASE_SECONDS pinned ON BOTH LAUNCHES. The day group and the
time-of-day override pin ONE of the sky's two clocks -- the one that
@ -84,6 +91,12 @@
.PARAMETER DayGroup
Sky day-group index pinned on both launches. Default 0.
.PARAMETER WorldDayFraction
Dereth day fraction pinned on both launches, in [0, 1). Default 0.5 -- noon,
the brightest and flattest lighting the day has, which is what the route's
three AcdreamCycleTimeOfDay presses were aiming at before it was measured
that they do not hold. See forced item 2 above.
.PARAMETER SkyPhaseSeconds
Elapsed-seconds value the sky's UV scroll is pinned to on both launches.
Default 0 -- the cloud sheet's authored origin. Any finite value works: the
@ -130,6 +143,7 @@ param(
[int]$Tolerance = 2,
[double]$MaxDifferentFraction = 0.001,
[int]$DayGroup = 0,
[double]$WorldDayFraction = 0.5,
[double]$SkyPhaseSeconds = 0,
[int]$MaskTopPixels = 0,
[int]$MinRenderedBytes = 500000,
@ -214,6 +228,8 @@ function Invoke-BackendRun([string]$Backend) {
$env:ACDREAM_MSAA_SAMPLES = '0'
$env:ACDREAM_SKY_PHASE_SECONDS =
$SkyPhaseSeconds.ToString([System.Globalization.CultureInfo]::InvariantCulture)
$env:ACDREAM_WORLD_TIME =
$WorldDayFraction.ToString([System.Globalization.CultureInfo]::InvariantCulture)
$env:ACDREAM_RENDER_BACKEND = $Backend
$env:ACDREAM_UI_PROBE_SCRIPT = $effectiveRoute
$env:ACDREAM_AUTOMATION_ARTIFACT_DIR = $dir
@ -275,6 +291,7 @@ function Invoke-BackendRun([string]$Backend) {
Remove-Item Env:\ACDREAM_RENDER_BACKEND -ErrorAction SilentlyContinue
Remove-Item Env:\ACDREAM_MSAA_SAMPLES -ErrorAction SilentlyContinue
Remove-Item Env:\ACDREAM_SKY_PHASE_SECONDS -ErrorAction SilentlyContinue
Remove-Item Env:\ACDREAM_WORLD_TIME -ErrorAction SilentlyContinue
$strayInput = @(Select-String -Path $log -Pattern 'ScrollUp|ScrollDown|ZoomIn|ZoomOut|CameraZoom' `
-CaseSensitive -ErrorAction SilentlyContinue)
@ -384,6 +401,7 @@ $report = [pscustomobject][ordered]@{
MaxDifferentPixelFraction = $MaxDifferentFraction
MsaaSamples = 0
DayGroup = $DayGroup
WorldDayFraction = $WorldDayFraction
SkyPhaseSeconds = $SkyPhaseSeconds
MaskTopPixels = $MaskTopPixels
Runs = @($gl, $vk)