From 59eb6834045218fd35dda65a5c819719220f5712 Mon Sep 17 00:00:00 2001 From: "Aleksei (Faumaray) Selikhov" Date: Thu, 3 Dec 2026 00:15:16 +0300 Subject: [PATCH] docs(m02): record signed slice picking and WARP acceptance evidence --- docs/agent-workflow/tasks/M02-V2.md | 49 +++++++++++++++++++++++++++++ docs/plan/milestones/M02.md | 1 + 2 files changed, 50 insertions(+) create mode 100644 docs/agent-workflow/tasks/M02-V2.md diff --git a/docs/agent-workflow/tasks/M02-V2.md b/docs/agent-workflow/tasks/M02-V2.md new file mode 100644 index 0000000..cf7e18a --- /dev/null +++ b/docs/agent-workflow/tasks/M02-V2.md @@ -0,0 +1,49 @@ +# Review bounded signed voxel meshing, D3D11 height slices and picking + +Task ID: M02-V2 +Role: astra_reviewer +Status: READY + +## 1. Context and baseline +Foundation S02/S03 accepted at 14987b2. Actual frozen S17 slice component 37a08d4 in s17-voxel vs 13dc673, and combined 129d7f2 in m02-render vs 14987b2. Normal S18 client hookup is subsequent and deliberately not claimed yet. Independent reviewer has not implemented this code. + +## 2. Objective and deliverables +Adversarial code/contract and recorded-test review of real WARP and CPU mesh/picking/retained packet. Provide quick actionable findings for any code or claimed evidence problem then verdict on component and combined. + +## 3. Scope and non-goals +Only S17 geometry/limits/session/readset, render/camera/pick agreement/surface and exceptions, D3D integration and regressions. Later gameplay/codec/S18 UI out of scope. Native physical hardware separate. + +## 4. Files to inspect +Inspect app/{voxel_scene,d3d_scene_win32}.{hpp,cpp}, tests/voxel_scene_tests.cpp, CMakeLists.txt, docs/plan/systems/S17.md, S17-02 task, S02 navigable geometry/header, existing frame smoke/shader code. Exact sibling worktrees outside root graph; direct source and git diff/check. Never change shared Serena project. + +## 5. Write ownership and coordination +Write scope: none +No file/Git/remote mutations, commands for read-only inspection; no subagents. Root gathers actual runs. S17 worker completed implementation separately. + +## 6. Implementation or investigation approach +Trace projected coordinates vs shader (foot origin/local offset/z-up, signed extremes, camera fractional pan/zoom, cap distance and overflow); DDA direction/ties/zero component, missing/invisible paired open door, cut at inclusive slice and border of region. Check visibility of internal/edge faces, admission/culling budgets before allocations, stale/empty session and actual frame/pick consistent for held publication. + +## 7. Interfaces and data contracts +Retained immutable VoxelScene uses actual VoxelRegion directory and readstamps, preserve source data through newer edits. Mutable GPU resources must keep old prepared geometry working after failed preparation and avoid treating device mismatch as valid. Verify tested D3D11 WARP color readback vs mathematically chosen surfaces and real default frame path. Ensure terrain/unknown materials draw accurately with z-buffer and DDA at shared boundaries. + +## 8. Dependencies and integration +Compare original 13dc673 and 37a08d4; combined 129d7f2 includes corrected S03/current M01. Evidence resides /tmp/stoneheart-milestones.xprJ2SVp/s17-voxel-final-{build,ctest}.log and m02-render-integrated-{build,ctest}.log when complete. Void #12/#13 existing links and proposed replacement conditions; no extra novel gap absent evidence. + +## 9. Edge cases security and performance +Bound read/face/vertex bytes, allocation failure, effective public camera/view dimension and signed-coordinate endpoints, ambiguous corners, overflow D3D limits, HRESULT lifecycle, capturing prior immutable GPU packet from another device, stable rendering while world or save busy. Discern correctness vs explicitly declared renderer limits/performance. + +## 10. Acceptance criteria +Concrete trigger/ref/impact/correction plus before/after validation for any finding. 15 focused behavioral pixel/CPU cases and full 6-target CTest + new integrated code must match actual logs. Give verdict only for what was built, distinguish real WARP readback/visible legacy frame/physical Windows or untested GPU failure injection. + +## 11. Verification commands and evidence +git show 37a08d4; git diff --check 13dc673..37a08d4 and 14987b2..129d7f2; inspect files and /tmp/stoneheart-milestones.xprJ2SVp/{s17-voxel-final,m02-render-integrated}-{build,ctest}.log. Component 6/6 in17.60s reported; verify independently. Full combined build still running; send initial findings independently. + +## 12. Constraints and stop conditions +No changes, credential or remote writes. No reliance solely on existing summary. No false approval for end-to-end editable game until S18/World integration. Send first defect early even if waiting on remaining logs. + +## 13. Authorization and decisions +User authorized milestone/branches; only root commits/pushes/opens issues. This contract covers independent technical review, not external merge. + +## 14. Return format +Return M02-V2 READY/CHANGES_REQUIRED per component and combined, exact source refs, concrete experiments, checked logs and platform limits. +Independent review accepted the S17 component at `37a08d4` and joint renderer/region/navigation tree `129d7f2`. The rendering branch merge `f2ff1ce` has exactly the same tree as the reviewed component. The combined run passed all six CTest targets under Wine 11, including 15 voxel scene tests with real WARP pixel captures. Generated signed terrain contained 1,998 faces for 6,528 inspected cells. Separate work connects this API to the resident, preview, pointer controls and saved session. diff --git a/docs/plan/milestones/M02.md b/docs/plan/milestones/M02.md index 237efaa..1fff185 100644 --- a/docs/plan/milestones/M02.md +++ b/docs/plan/milestones/M02.md @@ -46,3 +46,4 @@ В `1ca481b` каталог S02 публикует только целые правки. Из 256 исходных страниц при изменении одной клетки переиспользуются 255. Отдельная программа по очереди внесла 18 отказов выделения памяти и сравнила исходные данные после каждого отказа. В `2017e56` поиск S03 фиксирует также прочитанные недоступные страницы. При поиске рабочей позиции он различает замкнутую стеной область, недостающий проход и выход за край исследованного окна. Узкое окно в контрольном примере исчерпывает границу; расширение на две клетки находит доступ к материалу. [Каталог S02](../systems/S02.md) · [Маршруты S03](../systems/S03.md) Обе системы с окончательной версией M01 проверены в `14987b2`. Сборка Windows x64 GCC 16.2 под Wine 11 прошла все пять наборов CTest, в том числе 14 проверок каталога и 14 навигации. В следующих изменениях M02 реальный житель получает задание на добычу, владеет извлечённым камнем до доставки, а игрок выбирает высоту и клетку в окне. Состояние рельефа и незаконченной работы получает версионное представление в сохранении. [Проверка исходного кода](../../agent-workflow/tasks/M02-V1.md) · [Контракты интеграции](../../agent-workflow/tasks/M02-F2.md) +В совместной сборке `129d7f2` видимая поверхность и выбор лучом используют одну проекцию с высотой `z`. При открытой двери пиксель соответствует более далёкому блоку, а недоступная страница перекрывает выбор. На 16 страницах генератора из 6 528 проверенных ячеек получились 1 998 граней. Запись старого кадра осталась доступной после отказа по бюджету. Проверены 15 случаев слоя и все шесть наборов CTest под Wine, включая чтение реальных пикселей WARP. [Визуализация S17](../systems/S17.md) · [Независимая проверка](../../agent-workflow/tasks/M02-V2.md)