Implements the D-230 on-demand FillChunk derive phase (T-987) — the building-shell half of the cascade chunk fill. New atlas/shell.rs derives a sparse {Void|Wall|FloorSlab|Roof} shell for one 64 m chunk from the plan-phase BuildingPropertyTags: rectangle-containment (footprint within chunk) times z-range (per-floor bands from FloorExtent), in a quarter-ground z frame (D-110). Walls on the footprint perimeter, floor slabs on interior floor bases, a roof above the top floor; interior air is Void and never stored.
Changes
atlas/shell.rs (new): ShellVoxel, sparse FilledChunk (D-010), pure fill_chunk().
gen_queue.rs: FillChunk work item carries pre-resolved block_tags (run_work_item stays cache-free, mirroring GenerateSkeleton); ChunkFilled carries the FilledChunk; pure build_fill_chunk_item().
plugin.rs: ChunkFilled handler accepts the shell (trace-only).
Scope
Data-production half only. The on-demand streaming dispatch trigger (the stale T-959 note about wiring chunk_streaming.rs) is deferred to Phase 5 — chunk_streaming.rs is legacy Phase-5 rendering code (CLAUDE.md forbids building on it pre-Phase-5; gated by T-962). Surface-material vocabulary (D-235) = T-988; condition overlay = T-999.
## Summary
Implements the D-230 on-demand FillChunk derive phase (T-987) — the building-shell half of the cascade chunk fill. New atlas/shell.rs derives a sparse {Void|Wall|FloorSlab|Roof} shell for one 64 m chunk from the plan-phase BuildingPropertyTags: rectangle-containment (footprint within chunk) times z-range (per-floor bands from FloorExtent), in a quarter-ground z frame (D-110). Walls on the footprint perimeter, floor slabs on interior floor bases, a roof above the top floor; interior air is Void and never stored.
## Changes
- atlas/shell.rs (new): ShellVoxel, sparse FilledChunk (D-010), pure fill_chunk().
- gen_queue.rs: FillChunk work item carries pre-resolved block_tags (run_work_item stays cache-free, mirroring GenerateSkeleton); ChunkFilled carries the FilledChunk; pure build_fill_chunk_item().
- plugin.rs: ChunkFilled handler accepts the shell (trace-only).
## Scope
Data-production half only. The on-demand streaming dispatch trigger (the stale T-959 note about wiring chunk_streaming.rs) is deferred to Phase 5 — chunk_streaming.rs is legacy Phase-5 rendering code (CLAUDE.md forbids building on it pre-Phase-5; gated by T-962). Surface-material vocabulary (D-235) = T-988; condition overlay = T-999.
## Tests
determinism, sparsity-vs-dense-volume, wall/floor/roof correctness, basement z-origin, sub-chunk clipping, full submit-drain-ChunkFilled round-trip. clippy -D warnings clean, 1571 lib tests pass.
Ticket: T-987
Implement the D-230 on-demand derive phase (data-production half). New
atlas/shell.rs derives a sparse building shell for one 64 m chunk from the
plan-phase BuildingPropertyTags: rectangle-containment (footprint ∩ chunk) ×
z-range (per-floor voxel bands from FloorExtent), in a quarter-ground z frame
(D-110). Walls on the footprint perimeter, FloorSlab on interior floor bases,
Roof above the top floor; interior air is Void and never stored.
- gen_queue.rs: GenWorkItem::FillChunk carries pre-resolved block_tags +
block_pos + sub_chunk (run_work_item stays cache-free, mirroring
GenerateSkeleton); GenCompletion::ChunkFilled carries Box<FilledChunk>; the
arm calls shell::fill_chunk; pure build_fill_chunk_item(&QuarterWorldState,..)
added.
- plugin.rs: ChunkFilled handler accepts the shell (trace-only — the Phase-5
rendering consumer and the on-demand streaming dispatch trigger are deferred;
do not build on legacy chunk_streaming.rs before Phase 5, gated by T-962).
Tests: determinism, sparsity-vs-dense-volume, wall/floor/roof correctness,
basement z-origin, sub-chunk clipping, full submit→drain→ChunkFilled round-trip.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Review: fillchunk-shell-derive → main (type: code) — APPROVED, all findings processed
Reviewers: Hoshe (code quality) + Tyre (architecture), both APPROVE. Branch read via git show origin/fillchunk-shell-derive:…; .pql/changelog/* excluded.
Both reviewers found the core implementation correct and faithful to D-230: the z-origin math (D-110), the footprint∩chunk clip, perimeter/slab/roof classification, the cache-free run_work_item with tags pre-resolved into the work item (mirroring GenerateSkeleton), D-010 determinism (integer + BTreeMap), D-227 re-derivability, and D-243 scale math. No security/panic concerns.
Per the zero-suggestion-tier rule, every finding was processed — fixed in commit 7597e3165, none parked:
#
Reviewer
Finding
Resolution
H1
Hoshe
i8 floor-range truncation unguarded
debug_assert! pins the invariant in shell_derive_into
H2
Hoshe
base_floor>0 (no floor-0) fallback untested
added elevated_building_with_no_ground_floor_anchors_at_its_own_bottom test
T1
Tyre
ground_offset comment conflated two zeroes
comment rewritten to explain the no-shift fallback
T2
Tyre
FillChunk Vec payload sizing unexplained
doc added on why no Box is needed (vs AnalyzeBody)
T3
Tyre
roof_z None-case undocumented
comment added on the well-formed-extent guarantee
T4
Tyre
clip test comment misleading
clarified that chunk-local == block-local only at sub_chunk (0,0)
T5
Tyre
no CHUNKS_PER_BLOCK constant
added to scale.rs (+ compile-time asserts); used by fill_chunk's sub_chunk bounds assert
## Review: fillchunk-shell-derive → main (type: code) — APPROVED, all findings processed
Reviewers: **Hoshe** (code quality) + **Tyre** (architecture), both **APPROVE**. Branch read via `git show origin/fillchunk-shell-derive:…`; `.pql/changelog/*` excluded.
Both reviewers found the core implementation correct and faithful to D-230: the z-origin math (D-110), the footprint∩chunk clip, perimeter/slab/roof classification, the cache-free `run_work_item` with tags pre-resolved into the work item (mirroring `GenerateSkeleton`), D-010 determinism (integer + `BTreeMap`), D-227 re-derivability, and D-243 scale math. No security/panic concerns.
Per the zero-suggestion-tier rule, **every finding was processed** — fixed in commit `7597e3165`, none parked:
| # | Reviewer | Finding | Resolution |
|---|----------|---------|------------|
| H1 | Hoshe | `i8` floor-range truncation unguarded | `debug_assert!` pins the invariant in `shell_derive_into` |
| H2 | Hoshe | `base_floor>0` (no floor-0) fallback untested | added `elevated_building_with_no_ground_floor_anchors_at_its_own_bottom` test |
| T1 | Tyre | `ground_offset` comment conflated two zeroes | comment rewritten to explain the no-shift fallback |
| T2 | Tyre | FillChunk `Vec` payload sizing unexplained | doc added on why no `Box` is needed (vs `AnalyzeBody`) |
| T3 | Tyre | `roof_z` None-case undocumented | comment added on the well-formed-extent guarantee |
| T4 | Tyre | clip test comment misleading | clarified that chunk-local == block-local only at sub_chunk (0,0) |
| T5 | Tyre | no `CHUNKS_PER_BLOCK` constant | added to `scale.rs` (+ compile-time asserts); used by `fill_chunk`'s sub_chunk bounds assert |
Post-fix gate: `clippy --all-targets -D warnings` clean; **1572 lib tests pass** (+1).
### Verdict: APPROVED — ready to merge.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Implements the D-230 on-demand FillChunk derive phase (T-987) — the building-shell half of the cascade chunk fill. New atlas/shell.rs derives a sparse {Void|Wall|FloorSlab|Roof} shell for one 64 m chunk from the plan-phase BuildingPropertyTags: rectangle-containment (footprint within chunk) times z-range (per-floor bands from FloorExtent), in a quarter-ground z frame (D-110). Walls on the footprint perimeter, floor slabs on interior floor bases, a roof above the top floor; interior air is Void and never stored.
Changes
Scope
Data-production half only. The on-demand streaming dispatch trigger (the stale T-959 note about wiring chunk_streaming.rs) is deferred to Phase 5 — chunk_streaming.rs is legacy Phase-5 rendering code (CLAUDE.md forbids building on it pre-Phase-5; gated by T-962). Surface-material vocabulary (D-235) = T-988; condition overlay = T-999.
Tests
determinism, sparsity-vs-dense-volume, wall/floor/roof correctness, basement z-origin, sub-chunk clipping, full submit-drain-ChunkFilled round-trip. clippy -D warnings clean, 1571 lib tests pass.
Ticket: T-987
Review: fillchunk-shell-derive → main (type: code) — APPROVED, all findings processed
Reviewers: Hoshe (code quality) + Tyre (architecture), both APPROVE. Branch read via
git show origin/fillchunk-shell-derive:…;.pql/changelog/*excluded.Both reviewers found the core implementation correct and faithful to D-230: the z-origin math (D-110), the footprint∩chunk clip, perimeter/slab/roof classification, the cache-free
run_work_itemwith tags pre-resolved into the work item (mirroringGenerateSkeleton), D-010 determinism (integer +BTreeMap), D-227 re-derivability, and D-243 scale math. No security/panic concerns.Per the zero-suggestion-tier rule, every finding was processed — fixed in commit
7597e3165, none parked:i8floor-range truncation unguardeddebug_assert!pins the invariant inshell_derive_intobase_floor>0(no floor-0) fallback untestedelevated_building_with_no_ground_floor_anchors_at_its_own_bottomtestground_offsetcomment conflated two zeroesVecpayload sizing unexplainedBoxis needed (vsAnalyzeBody)roof_zNone-case undocumentedCHUNKS_PER_BLOCKconstantscale.rs(+ compile-time asserts); used byfill_chunk's sub_chunk bounds assertPost-fix gate:
clippy --all-targets -D warningsclean; 1572 lib tests pass (+1).Verdict: APPROVED — ready to merge.
Pull request closed