Implement M9.2 native client lifecycle and immutable render boundary

This commit is contained in:
dingo
2026-10-01 16:58:46 -04:00
parent d487d86ea3
commit 04c7715646
24 changed files with 827 additions and 34 deletions
+53
View File
@@ -3187,3 +3187,56 @@ remote Gitea run or Kubernetes action was performed for this gate. The new clien
CI job performs analysis, dummy pixel/error tests and an Xvfb window probe;
remote execution remains pending. M9.1 selects a scoped dependency, not a
production-ready renderer or packaged client.
## M9.2 native application and renderer boundary — 2026-10-01
Implemented ADR-0078, opt-in `evo-client`, bounded immutable presentation frames,
private main-thread SDL ownership, logical/drawable size separation, focus and
visibility/minimize handling, recoverable reset and terminal device-loss policy.
No camera, gameplay, protocol, simulation-state or deployment changes.
Executed:
- Fresh Windows Release: `tools/windows-check.ps1 -Preset client -Action check`
configured and built with MSVC 19.44; **3/3 client CTests passed** under NDEBUG.
Also ran `build/client/evo-client-lifecycle-tests.exe` with native Windows video,
then `evo-client.exe --frames 3` (default renderer) and `--renderer vulkan
--frames 3`; all returned success. Earlier combined probe/client configuration
passed 5/5 labeled tests.
- Linux GCC 14 Release in `build/client-probe-linux`: **5/5 combined probe/client
CTests passed**, as did native X11 lifecycle checks under Xvfb. The new suite executes 32
window/app destroy/recreate rounds, plus partial renderer initialization failure
and hidden-window/quit behavior. It covers copied-frame independence, finite
geometry/primitive limits, foreign events, focus, resize/scale queries,
non-unit anisotropic scale pixel readback, hide/minimize/resume, renderer
reset/loss and terminal close/error behavior.
- Clang 19 Debug ASan/UBSan: `cmake --preset asan -B build/client-asan
-DEVO_BUILD_CLIENT=ON -DCMAKE_CXX_COMPILER=clang++-19
-DCMAKE_C_COMPILER=clang-19 -DSDL_X11=ON -DSDL_WAYLAND=OFF`, built application
and lifecycle tests, **3/3 CTests passed**. Xvfb/X11 lifecycle executable also
passed with default leak detection, **no LD_PRELOAD or suppressions** after
adopting direct X11 linkage. Owned libraries, app and tests are instrumented;
SDL and system libraries are not comprehensively sanitizer-instrumented.
- Investigated M9.1's X11 unload issue: dynamically loaded X11 configuration left
1,700,544 bytes / 31,008 allocations reported at process exit in the repeated
fixture. Preloading libX11 avoided the report. SDL's supported
`SDL_X11_SHARED=OFF` fixes the observed repeated-lifecycle case by retaining the
linked system libraries for process lifetime. `ldd` confirms libX11 and libXext
dependencies; normal X11 sanitizer run passes. This is an adopted Linux build
constraint, not a claim to have repaired upstream Xlib or all native drivers.
- `clang-tidy-19 -p build/client-asan` on all five new C++ translation units:
passed with warnings-as-errors. Initial enum-size and multi-level pointer
conversion diagnostics were corrected. Repository `format-check` passed.
- Headless Release configured with **both client options OFF**, built `evo-sim`
and replayed seed 123456, eight entities, 1000 ticks: unchanged hash
`d61ad5bf0c928c76`, `replay_verified=true`. No SDL acquisition is part of this
configure/build path.
CI's isolated client stage now builds the actual app, runs static analysis and
labeled checks, exercises X11 lifecycles, then instruments owned code and repeats
software/X11 checks. No Docker build or remote Gitea execution was verified here.
No full headless suite rerun or TSan run: headless source did not change, and this
boundary requires single-main-thread use. Tests do not establish physical
multi-monitor DPI, real keyboard/focus behavior, Wayland, hardware GPU loss or
human visual acceptance. Those remain M9.3/M9.8 qualification work. No cluster
operation was performed.