Implement M9.5 biology-derived organism rendering and inspector

Add OrganismPresentation cells derived via biology::derive_phenotype with
no controller, owner or level fields (pinned by test), so identical
biology renders identically for players and NPCs. OrganismLayer reuses
the ADR-0080 ordering/freshness semantics; death is a remnant state and
removal is absence. Rendering takes an explicit rectangle budget, falls
back to body-only detail and marks truncation instead of dropping data.
An opt-in rectangle-only hover inspector shows phenotype gauges; ImGui is
not adopted. ADR-0081 records the decision; evidence in VALIDATION.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-01 18:21:53 -04:00
co-authored by Claude Opus 5.5
parent feca07f791
commit 9bb147de82
21 changed files with 1169 additions and 33 deletions
+45
View File
@@ -3344,3 +3344,48 @@ 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.
## M9.5 organism and debug views — 2026-10-01
Implemented ADR-0081 and ORGANISM_RENDERING.md: biology-derived
`OrganismPresentation` (no controller/owner/level fields), `OrganismLayer`
ordering/freshness, budgeted organism projection with explicit truncation, and an
opt-in rectangle-only hover inspector. ImGui was evaluated as optional and not
adopted. The app adds a static 48-organism fixture built from real genomes.
Executed:
- Windows MSVC 19.44 Release via `tools/windows-check.ps1 -Preset client -Action
check` (child `powershell.exe`): 5/5 labeled tests including `client-organisms`.
App runs `--frames 300 --refresh-every 2 --inspect` and `--frames 120 --layer
moisture` exited 0; `--frames 0` exited 2 (usage).
- Linux GCC 14 Release (`build/client-probe-linux`): 7/7 labeled tests, native
Xvfb/X11 lifecycle suite, X11 app with `--inspect --refresh-every 3`.
- Clang 19 Debug ASan/UBSan (`build/client-asan`): 5/5 labeled tests, X11
lifecycle, X11 app (`--inspect --layer moisture --refresh-every 2`, 300 frames)
and hidden dummy-driver app (`--inspect`, 200 frames); leak detection on, no
suppressions.
- Organism tests: phenotype equals `derive_phenotype` (20 um cube, hand-checked
bounds 390..410 at 1000 units/mm); a structured binding pins the cell's seven
fields; membrane thickness cap, motility ring and ingestion mark only with the
capabilities; conversion/growth/damage change body colour; visibility floor and
halo; byte-identical rectangles and inspector panels for player- and
NPC-controlled hosts with identical biology (ids 5 vs 900), translation-only
differences when moved; death (remnant colour, no ring/mark, same size) and
removal (absence, then empty presentation); 1024 visible organisms collapsing to
bodies within the 1755 app budget, explicit truncation at budget 500 (498 drawn
plus marker), invalid budget; a worst-case frame (environment bound + organisms
+ inspector + UI) within `Frame` limits; regression/foreign/watermark ordering
and stale dimming; 15 invalid presentation shapes and over-capacity; topmost picking on
floored bounds; gauge values and widths.
- Visual sanity check (offline rasterization of the app fixture at habitat zoom
and 2000 units/mm with the inspector): 3-unit floored organisms were hard to see
against habitats, so the floor became 5 units with a dark halo for collapsed
bodies. Not human, colour-vision or accessibility acceptance.
- clang-tidy 19 with warnings-as-errors on the five new/changed translation units:
passed after reserving a test vector. Repository-wide clang-format 19 passed.
Limits: Docker/Gitea execution of the extended `ci-client` stage was not observed
locally. No headless source changed; no full headless suite or TSan rerun. The
fixture population is static presentation data, not ecology. No network, database,
deployment, persistent format or simulation rule changed.