Implement M9.1 scoped SDL3 native client dependency probe
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
# M9.1 native client dependency probe
|
||||
|
||||
Decision: [ADR-0077](../adr/0077-scoped-native-client-dependencies.md). This is an
|
||||
isolated dependency evaluation, not `evo-client`, gameplay or the M9.2 renderer.
|
||||
SDL 3.4.16 provides window/events and a thin 2D renderer. Direct Vulkan and SDL_GPU
|
||||
remain alternatives if measured workloads outgrow it. Audio and player UI are deferred.
|
||||
|
||||
## Reproduce
|
||||
|
||||
In a C++23 developer shell with CMake 3.28+ and Ninja:
|
||||
|
||||
```sh
|
||||
cmake -P tools/prepare-sdl3.cmake
|
||||
cmake --preset client-probe
|
||||
cmake --build --preset client-probe --parallel 4
|
||||
ctest --preset client-probe --no-tests=error
|
||||
./build/client-probe/evo-client-probe
|
||||
./build/client-probe/evo-client-probe --renderer vulkan
|
||||
```
|
||||
|
||||
Windows executables have `.exe`. CTest uses SDL's dummy window driver and software
|
||||
renderer for deterministic rectangle/background pixel checks. The standalone run
|
||||
uses the native video driver and reports the actual renderer. The window is hidden
|
||||
and the process exits after one checked frame; no persistent desktop window is left.
|
||||
An explicitly requested missing renderer must fail, not silently fall back.
|
||||
Synthetic keyboard injection proves event plumbing, not physical input/focus behavior.
|
||||
|
||||
Linux desktop builds require SDL's documented X11/Wayland development packages.
|
||||
The `ci-client` Docker stage installs the X11 subset and runs a window probe under
|
||||
Xvfb, in addition to dummy-driver CTests. It does not require a GPU or cluster.
|
||||
For a CI host without these, explicitly add `-DSDL_UNIX_CONSOLE_BUILD=ON
|
||||
-DSDL_X11=OFF -DSDL_WAYLAND=OFF`. That configuration proves software/offscreen
|
||||
behavior only. Do not use it to claim Linux desktop-window qualification.
|
||||
|
||||
Offline preparation from a previously downloaded archive:
|
||||
|
||||
```sh
|
||||
cmake -DSDL_ARCHIVE=/absolute/path/SDL3-3.4.16.tar.gz -P tools/prepare-sdl3.cmake
|
||||
```
|
||||
|
||||
The script checks the archive before extraction. Sources go under ignored
|
||||
`build/external/sdl3/`; configuration consumes only prepared sources and refuses
|
||||
a missing/mismatched preparation marker. Treat that directory as an immutable
|
||||
local dependency checkout; edits there invalidate qualification. Delete/reprepare
|
||||
it explicitly for a clean rebuild. No network access occurs during configuration.
|
||||
|
||||
## Ownership, licensing and updates
|
||||
|
||||
- Machine-readable release URL/version/hash: `tools/sdl3-pin.cmake`.
|
||||
- Owner: client/platform engineering. Upgrade by reviewing upstream release and
|
||||
security changes, updating version/hash, preparing fresh sources and rerunning
|
||||
Windows/Linux probes, analysis and package measurements.
|
||||
- SDL's zlib notice is retained in `third_party/SDL3/LICENSE.txt`; the complete
|
||||
upstream archive retains bundled component notices. No claim is made that SDL
|
||||
license review licenses the game itself. Binary release packaging must retain
|
||||
applicable third-party notices and audit enabled backend/system dependencies.
|
||||
- Shared SDL is linked only by `evo-client-probe`; no SDL includes/link dependencies
|
||||
enter `include/evo`, simulation, world, biology or server targets. It is disabled
|
||||
by default. Windows copies SDL3.dll beside the probe; Linux uses the build RPATH.
|
||||
- Size reports are build artifacts, not performance rankings. No representative
|
||||
creature/terrain workload exists yet, so no renderer throughput claim is made.
|
||||
|
||||
## Follow-up boundary
|
||||
|
||||
M9.2 owns the real application lifecycle, immutable-view renderer interface,
|
||||
resize/DPI/focus/device failures and resource limits. M9.3 owns camera/intentions.
|
||||
M9.8 owns distributable packaging. Xvfb verifies the Linux X11 window path; real
|
||||
desktop input, focus, DPI, Wayland and GPU qualification remain later gate work.
|
||||
See VALIDATION.md for executed measurements and limitations.
|
||||
@@ -3133,3 +3133,57 @@ as proof of rollback.
|
||||
layers deep and only the outer layer is tested.
|
||||
- Not run: a real network partition around COMMIT. The lost acknowledgement is an
|
||||
injected test mode (`EVO_RESTORE_TEST_INSTALL_ACK`).
|
||||
|
||||
## M9.1 scoped native dependency probe — 2026-10-01
|
||||
|
||||
Decision: ADR-0077. SDL 3.4.16 shared window/events/2D renderer, explicitly
|
||||
prepared from the official archive with SHA-256 validation. No simulation API,
|
||||
world format, server image or deployed workload changed.
|
||||
|
||||
Executed:
|
||||
|
||||
- Windows x64 MSVC 19.44: fresh `client-probe` configure/build and 2/2 labeled
|
||||
CTests passed. Native standalone probes reported `video=windows` with both
|
||||
`renderer=direct3d11` (automatic) and explicitly requested `renderer=vulkan`;
|
||||
synthetic key delivery and rectangle/background pixel readback passed.
|
||||
Developer environment required explicit compiler and Windows SDK tool paths.
|
||||
- WSL Ubuntu, GCC 14 Release: configured the same preset in
|
||||
`build/client-probe-linux` with `SDL_X11=ON`, `SDL_WAYLAND=OFF`; build and 2/2
|
||||
client CTests passed. `xvfb-run -a env SDL_VIDEO_DRIVER=x11
|
||||
./build/client-probe-linux/evo-client-probe --renderer software` passed.
|
||||
X11 development dependencies are reproduced in Docker's `ci-client` stage.
|
||||
- clang-tidy 19 standalone against `experiments/client/main.cpp`, C++23 and the
|
||||
prepared SDL include directory: no owned-code diagnostics. Initial use of the
|
||||
GCC compilation database failed on GCC module options; rerun used explicit
|
||||
Clang arguments. Repository `format-check` passed.
|
||||
- Clang 19 ASan/UBSan build of the owned probe, linked to the Release SDL shared
|
||||
library: dummy video/software renderer passed. SDL itself was not instrumented.
|
||||
**Additional X11 sanitizer run failed LeakSanitizer:** 50,016 bytes in 912
|
||||
allocations remained at exit; resolved SDL call sites included
|
||||
`X11_InitKeyboard` and `X11_GetGlobalContentScale`, with underlying unloaded
|
||||
library frames unresolved. This is not a proven application leak or a clean
|
||||
native sanitizer result. Do not suppress or declare it fixed. M9.2 must reproduce
|
||||
with symbolized native libraries and establish repeated window-lifecycle memory
|
||||
behavior before desktop qualification.
|
||||
Diagnostic rerun with `LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libX11.so.6`
|
||||
passed with leak detection enabled. Keeping libX11 loaded changes the result,
|
||||
suggesting library unload/static allocation reachability; it does not establish
|
||||
that repeated native lifecycles are leak-free. No suppression was added.
|
||||
- Headless Release, client disabled: configured/built `evo-sim`; seed 123456,
|
||||
eight entities, 1,000 ticks and `--verify-replay` passed, hash `d61ad5bf0c928c76`.
|
||||
- Offline cached archive preparation passed; deliberately invalid archive was
|
||||
rejected with checksum mismatch before extraction. CI selector regression:
|
||||
all 12 fixtures passed, including an SDL pin change selecting the client gate.
|
||||
- Artifact sizes (not comparable performance measurements): Windows executable
|
||||
14,336 bytes + SDL3.dll 1,998,848; Linux X11 executable 17,624 bytes + shared SDL
|
||||
3,304,808. Build configurations/backend sets differ. No throughput or cold-build
|
||||
benchmark claim is made.
|
||||
|
||||
Limits: synthetic keyboard events only; hidden Windows window and virtual Linux
|
||||
X11 display. No human visual inspection, real input/focus/DPI, Wayland or Linux
|
||||
GPU qualification. A Linux offscreen GLES attempt failed because the environment
|
||||
could not initialize OpenGL/GLES. No full headless CTest rerun, TSan, Docker build,
|
||||
remote Gitea run or Kubernetes action was performed for this gate. The new client
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user