Implement M9.4 revision-tagged microscopic environment rendering

Add SDL-free owned EnvironmentPresentation copied from M6.3 views (no
store pointers or validation tokens), a single-slot EnvironmentLayer that
rejects foreign/regressed updates and reports none/current/stale against
observed authority watermarks, and a bounded camera projection with
explicit missing, not-requested, present-zero, undefined-moisture and
stale encodings (at most 2313 clipped rectangles, reused buffer).

The engineering app renders a local in-memory fixture authority with
configurable refresh cadence and layer selection. ADR-0080 records the
decision; validation evidence and limits are in VALIDATION.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-01 17:45:53 -04:00
co-authored by Claude Opus 5.5
parent bb0412cd0f
commit feca07f791
20 changed files with 1393 additions and 62 deletions
+60
View File
@@ -3284,3 +3284,63 @@ No full headless suite or TSan rerun; owned client state remains main-thread-onl
No physical keyboard/IME, human visual, real multi-monitor DPI, Wayland or real
GPU-failure qualification is claimed from injected events and Xvfb. No network
traffic, database, world mutation or deployment operation was introduced.
## M9.4 microscopic environment rendering — 2026-10-01
Implemented ADR-0080 and ENVIRONMENT_RENDERING.md: owned revision-tagged
`EnvironmentPresentation` copied from M6.3 views (no tokens/store pointers),
single-slot `EnvironmentLayer` ordering/freshness, and bounded camera-projected
rendering with explicit missing, not-requested, present-zero, undefined-moisture
and stale encodings. The app shows a local in-memory fixture authority (finite
same-channel water moves via `FieldStore::transfer`); it is not a server view.
Executed:
- Windows MSVC 19.44 Release via `tools/windows-check.ps1 -Preset client -Action
check` (run as a child `powershell.exe`): 4/4 labeled tests, including the new
`client-environment` suite. App runs with `--frames 240/300`, `--refresh-every
2`, `--layer organic-carbon` exited 0; `--layer bogus` exited 2;
`SDL_VIDEO_DRIVER=evo-invalid` still fails at SDL initialization (error 2),
after fixture creation, so `client-init-failure` keeps testing the SDL path.
- Linux GCC 14 Release (`build/client-probe-linux`, probe + client): 6/6 labeled
tests; native Xvfb/X11 lifecycle suite; X11 app runs (moisture, refresh 3).
- Clang 19 Debug ASan/UBSan (`build/client-asan`): 4/4 labeled tests, native X11
lifecycle, hidden X11 app (refresh 2), visible X11 moisture app and dummy-driver
nitrogen app (400 frames, refresh 3) with leak detection, no suppressions.
- clang-tidy 19 with warnings-as-errors on the four new/changed translation units:
passed after reserving a test vector, widening a test product, and annotating
two intentional out-of-range enum inputs (the rejection under test).
Repository-wide clang-format 19 check passed.
- Tests cover: synthetic known fields (exact ramp colour for log2 density -3,
present zero, missing checker geometry, hollow unrequested outline, undefined
zero-capacity moisture, collapsed small habitats); seams across chunk
boundaries -16/0/16 at three zooms, three centres and two DPI ratios, compared
with `Camera::world_to_screen`; voxels on the exclusive world bound; stale
updates (older tick, chunk-revision regression, foreign world, regressed and
pre-presentation watermarks, late-but-stale presentations, reset); failed
local validation after a field transfer; unchanged field/terrain snapshots
after presenting/rendering; presentations outliving their stores; 20 invalid
presentation shapes; 330 camera/mode/freshness combinations over 256 cells,
all within viewport, the 2313 bound, constant buffer capacity and Frame
limits including host UI.
- Profile (`environment_profile`, 256 visible cells, stale, nitrogen layer,
checker detail): 1701 rectangles; 53,248 presentation-cell bytes; 46,260-byte
reused output buffer; mean build 13.4 us (MSVC Release, this workstation),
6.6 us (GCC 14 Release, WSL2), 175 us (Clang ASan Debug). Indicative only; no
frame-time threshold is claimed.
- Visual sanity check: the fixture's output was rasterized offline for water,
stale, nitrogen (missing), moisture and organic-carbon (not requested). This
raised the not-requested outline from grey 140 to 210 for contrast with rock.
This is not human/colour-vision acceptance.
- Headless: a fresh MSVC Release directory with both client options OFF built
`evo-sim`; seed 123456 / eight entities / 1000 ticks replayed with unchanged
`d61ad5bf0c928c76`, `replay_verified=true`.
Limits: pre-existing `build/release` failed to link untouched headless objects
(unresolved MSVC STL `__std_rotate`/`__std_find_first_not_of_trivial_pos_1`),
consistent with stale objects from a different STL build; the fresh directory
above passed, and that directory was left as found. Docker/Gitea execution of the
extended `ci-client` stage was not observed locally. No full headless suite or
TSan rerun (headless sources unchanged; client state is main-thread-only). No
physical DPI, real GPU, Wayland, accessibility or human visual acceptance is
claimed. No network traffic, database, deployment or persistent format changed.