Files

7.3 KiB

Audit immutable terrain mutations and their navigation consumer

Task ID: M02-V1 Role: astra_reviewer Status: READY

1. Context and baseline

M02 foundation candidate 1ca481b in identical s02 and m02 worktrees, compared to 0d71bcf. M02-P1/F1 set signed32 coordinates/64bit endpoints, finite bounds/canonical generation, disjoint worktree ownership. S03 branch initially 6d1123e with incomplete implementation; review that only when final evidence announced. Actual S02 full 4/4 CTest, 155 core includes14 voxel,9 LAN,14 viewer plus real frame; checks in temp.

2. Objective and deliverables

Independent defect-oriented source review of completed section S02-01, then S03-01 and both combined after frozen. Send first S02 verdict as soon as possible. Root uses that sign-off and integration checks for real new branch/PR.

3. Scope and non-goals

Coordinate math, generation, immutable lifetime and edit failure contracts, then separately path/query/cache invariants. No gameplay/codec/render implementation or approval of unchecked future M02 integration.

4. Files to inspect

Read actual include/settlement/core/voxel_region.hpp under engine/, engine/src/voxel_region.cpp, tests/voxel_region_tests.cpp, two CMake entries, S02 docs, S02-01 and M02-P1/F1. Review exact pinned Void Numeric/Binary/Hash APIs and #11/#14 if relevant. Once S03 is frozen, read voxel_navigation.hpp/cpp/test plus CMake/graph interfaces/region consumers and S03-01. Use direct sibling source; do not activate shared Serena. For Stage A m02 HEAD=1ca481b.

5. Write ownership and coordination

Write scope: none No mutations/builds/remote effects or children. Parent and workers have exclusive separate WTs. Stage A must use actual committed code plus standalone allocation-probe source and logs, not just worker statements.

6. Implementation or investigation approach

For S02 trace equals/extremes, join/split INT_MIN/INT_MAX, checked half-open bounds and partial pages, stable index/neighbor overflow, deterministic seed encoding, generator consistency at seams and version, opaque candidate/provenance validation for multiple activation, immutable directory/const page/ref lifetimes, aliases from import retained data. All-or-nothing activate/edit for stale duplicate invalid/no-op/resident/revision/alloc failures with output arrays. Test transactional/caller-retained memory boundaries incl actual charged value vs std::vector capacity, incorrect estimates, dirty-face list canonical with boundary cells and unaffected pages. Evaluate actual failure-injection probe rather than counting a synthetic status.

7. Interfaces and data contracts

Passability helpers must agree with mission: soil/stone support, DoorClosed blocks body, DoorOpen/Air permit clearance only, generator natural. Queries distinct outside/unavailable/air, stamps identity consistent at partial and extreme bounds, after activation previous unavailability stale. Request ordering should not alter same group revision/result. Multiple independent copies sharing original base can diverge; document expected caller/session/view assumptions and distinguish actionable bug from absent future feature.

8. Dependencies and integration

Stage B only after linked S03 and complete worktree. Check actual Void BFS worklimits incl scratch allocations, bounded index dimensions, zero-length fast path legality, input/refusal/cancel/unknown, blocked/clearance reads incl passage and support from neighboring pages, exact path/interaction/cost, stable deterministic ties, affected negative invalidation vs edit in off-route region, safe next step. Actual two-floor scenario and interaction consumers belong to later packages.

9. Edge cases security and performance

Reject overstated memory/benchmark claims, unsafe reference/worker lifetime or future worlds using stale pages after region handoff. Check wrapping revision/limit results with no dirty mutation. Compare actual content and live normal edge flows vs only invented tests. Later path results cannot authorize newer session, through walls or truncated search marketed as unreachable.

10. Acceptance criteria

  1. Stage A/B verdicts independently with actual refs, exact location, trigger, impact and fix/verification for each defect. 2. Affirm or refute saved earlier views/rejected edits/accurate neighbors, 1 vs 2/6/12 genuine tasks, branch evidence. 3. Stage B inspect real upper floor stairs/door/material semantics, limited and unavailable results plus missing/unchanged revisions. 4. Final integration verdict only when source/logs provided, report native target limitations.

11. Verification commands and evidence

Use git -C sibling show/diff --check and actual files, no builds. Inspect /tmp/stoneheart-milestones.xprJ2SVp/s02-voxel-{build-complete,ctest-complete}.log, s02-voxel-allocation-probe.cpp/s02-voxel-allocation.log, targeted info and S03 logs when supplied. Source-only facts separate from logged runs. Sibling paths outside verified root index, direct reads appropriate.

12. Constraints and stop conditions

No approving the S03 implementation mid-flight. No fake workloads/claims or extra upstream issues without a genuine uncovered API. Send earliest actionable finding immediately. No source/branch/Serena/remote changes.

13. Authorization and decisions

User supplied fully approved roadmap plus branches, Gitea and issue workflow. Reviewer role independent. Root owns all side effects and roadmap acceptance.

14. Return format

Return M02-V1 Stage A (and later B/combo) READY or CHANGES_REQUIRED with actual evidence and source refs. Include any untested platform/hardware behavior.

Stage A 1ca481b passed component inspection. Combined region / current M01 source is 13dc673; build and CTest evidence are in m02-region-{build,ctest}.log. The finished S03 component is 7a7ff32 on top of the actual linked S02 base. Inspect the new navigation header, implementation and tests with s03-voxel-{build-final,focused-final,ctest}.log. Stage A and B verdicts may be returned separately before the later combined navigation check. Corrective checkpoint: the two reported S03 defects are fixed at 17389b2, and the integrated code plus all M01 corrections is c40d9b2 in m02. Inspect the actual 7a7ff32..17389b2 source and tests, including proof of both old failures, possible/inconclusive reachable edges, all four max-size calls, and all combined status/geometry contracts. Evidence is in s03-voxel-review-{before,final-focused,final-goals-ctest}.log and m02-foundation-{build,ctest}.log when complete. Root requests an independent final Stage B and integrated foundation verdict; no review of future unpublished gameplay. Final interaction-window correction at 2017e56, integrated with final M01 at 14987b2. Reinspect actual 17389b2..2017e56 including omitted contacts, both missing and known exits and enclosed start, side effects on budgets/direct goals. Component proof and full results s03-interaction-{before,after,after-build,after-ctest}.log; combined build/CTest m02-foundation-final-{build,ctest}.log. Return final source and Stage B/combined signoff after logs. Final review accepted 1ca481b, 2017e56 and their combined implementation 14987b2. Logs contain both old failure classes and the clipped-contact regression before and after repair. All 14 focused navigation cases and all five integrated CTest targets pass under Wine. Native hardware and the future normal gameplay integration remain outstanding.