feat(client): capture harness redesigned for the stepped Atlas — (body, rung) goldens (T-1157)

_setup_atlas_golden_shot and _run_atlas_matrix rebuilt on the real D-255
surface: nav.push('regional') through AtlasApp's own body-selection tail,
then StepCanvasViewer.jump_to at a fixed center (inventory item 5) — no
shim over the retired continuous-zoom API. is_pending()-aware bounded
settle (mirroring atlas_agent_driver.gd) and view-transform logging
(inventory item 3) wired into both capture paths. The 12 z2_0/z4_0/zfit
goldens are replaced by 12 (body, rung) goldens captured live against
fresh --test-mode servers; atlas_shots.json/visual.json re-keyed;
atlas_gen_open's stale gen_l1_* overlay ids fixed to gen_dw_temp.

Verification: two consecutive District runs byte-identical, and a
cold-vs-warm disk-cache invariance proof on both terrain draw branches
(Global/NEAREST, District/LINEAR) — byte-identical either way, so
capture output does not depend on the shared user://atlas_cache state.
DEVOPS.md's real-rendering exception note now records the fold-target
mapping for the smoke file T-1182 already deleted (Global + District
goldens exercise its two real-pixel draw branches). Old legacy-tracked
.import sidecars go with their PNGs; new goldens ship bare per
.gitignore's client/**/*.import rule.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-25 22:13:37 +02:00
co-authored by Claude Fable 5
parent 0822390f7a
commit a45d4a5f58
42 changed files with 313 additions and 828 deletions
+31 -20
View File
@@ -352,31 +352,42 @@ Key components:
- **CauseChain** (production ECS component) — Tracks causal attribution for testable observation sequences (D-030).
- **Deterministic replay** — Server simulation is deterministic given the same seed + input sequence. Replay logs enable regression testing (#201, critical).
### Real-rendering test exception: `test_atlas_window_overlay_draw_smoke.gd`
### Real-rendering test exception: `tests/run-visual` (`tests/visual_capture.gd`)
`tests/run-godot` hardcodes `--headless`, whose dummy driver produces no usable GPU
texture output (`SubViewport.get_texture().get_image()` returns unusable data). One
file needs real pixels — `client/tests/test_atlas_window_overlay_draw_smoke.gd` (T-1153
live round 4) renders `AtlasWindowOverlay` into a `SubViewport` and asserts real terrain
pixels were composited, closing a "did anything draw at all" gap that bit twice
(a tile-mosaic coordinate bug and an unstored-texture GPU-lifetime bug, both invisible
to cache-state-only assertions). It self-detects the dummy driver
(`DisplayServer.get_name() == "headless"`) and **skips** under the standard suite —
`tests/run-godot --filter test_atlas_window_overlay_draw_smoke` reports green-with-skips,
never a false failure that would bounce the push gate. To exercise its real assertions:
texture output (`SubViewport.get_texture().get_image()` returns unusable data). Any
test that needs real composited pixels lives in `tests/run-visual`
(`client/tests/visual_capture.gd`) instead, which boots Godot with a real
`--rendering-driver opengl3` and asserts on an actual `get_viewport().get_texture().
get_image()` capture — this is the project's one real-driver exception, and every
"did anything draw at all" real-pixel check lives here now, not in a standalone gdUnit
file with its own headless-skip guard.
`client/tests/test_atlas_window_overlay_draw_smoke.gd` (T-1153 live round 4) used to be
a second, parallel real-driver path — a standalone gdUnit suite that rendered
`AtlasWindowOverlay` into its own ad hoc `SubViewport`, self-detecting the dummy driver
(`DisplayServer.get_name() == "headless"`) and skipping under `tests/run-godot`. It
retired with the rest of the `AtlasWindowViewer`/continuous-zoom cluster (T-1182, D-255)
and its 2 real-pixel scenarios (single-window draw, tile-mosaic draw) folded into this
harness (T-1157): the stepped ladder has no separate "single window" vs "tile mosaic"
draw path anymore (D-255(a): "one viewer one path"), so the fold's two natural
equivalents are a fixed-rung canvas capture (`atlas_GJ380c_District` — LINEAR-filtered,
`StepCanvasTerrainLayer._filter_for_rung()`'s non-orbital branch) and the Global-rung
capture (`atlas_GJ380c_Global` — NEAREST-filtered, the orbital branch, a differently-shaped
canvas/footprint). Both are ordinary `tests/visual.json` golden scenarios driven through
production navigation (`visual_scenarios.gd`'s `_setup_atlas_golden_shot`) against a real
`--test-mode` server (`SR_LIVE=1`) — real derived terrain, real composited pixels, no
synthetic stub canvas — closing the "did anything draw at all" gap without a second,
parallel real-driver mechanism.
```bash
godot4 --display-driver x11 --rendering-driver opengl3 \
-s addons/gdUnit4/bin/GdUnitCmdTool.gd --ignoreHeadlessMode -c \
-a res://tests/test_atlas_window_overlay_draw_smoke.gd
```
# Any single atlas golden, real driver, real server:
make screenshot SCENARIO=atlas_GJ380c_District
make screenshot SCENARIO=atlas_GJ380c_Global
Same underlying constraint as `tests/visual_capture.gd` (`tests/run-visual`), which is
the project's other real-driver exception — currently broken on this branch by the
retired `AtlasViewer` API (T-1157, capture-harness redesign). This file's scenarios are
slated to migrate into that redesigned harness once T-1157 lands, folding it into
`tests/visual.json` for consistency; until then it stays a standalone gdUnit file with
its own skip guard.
# The full golden suite (xvfb-wrapped, all scenarios incl. atlas_*):
make test-visual
```
## Planning store (pql)