Skip to content

render: upload only the changed ranges of the voxel record and active-mask buffers (#4991) - #5039

Merged
jakildev merged 2 commits into
masterfrom
claude/4991-range-queued-record-mask-uploads
Nov 12, 2026
Merged

jakildev merged 2 commits into
masterfrom
claude/4991-range-queued-record-mask-uploads

Conversation

@jakildev

@jakildev jakildev commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

VOXEL_TO_TRIXEL_STAGE_1 copied each pool canvas's whole live record prefix
(12 B/voxel) and active-mask window to bindings 6 and 8 every rendered frame.
It now uploads only the ranges written since the last upload, through two
pending-range queues on C_VoxelPool, the way positions already work.

  • Queues. C_VoxelPool gains a record-slot queue and a mask-word queue
    (main thread only, an append touching the previous entry extends it, cap
    65,536 entries — saturation uploads the whole live prefix).
    markRecordsChanged(start, count) queues and advances the content
    generation; the rangeless form queues the live prefix. Every mask mutator
    funnels into one writeActiveBit store and queues its words. Allocation
    queues the fresh span (the shared buffers may hold another pool's bytes past
    this pool's old prefix); deallocation queues the cleared records.
  • Flush. flushPendingPoolUploads sorts, coalesces and submits one
    subDataRanges per buffer. The whole prefix is uploaded when the shared
    buffer does not hold this pool's last upload (recordBufferCanvas_: first
    frame, another canvas uploaded since, or the inverse re-voxelize dispatch
    authored both buffers on the GPU). Gaps shorter than live / 256 are merged
    so a flush submits at most 257 runs: GL issues one glBufferSubData per run
    and a Metal orphan blits each gap.
  • Writer census. Set mutators go through the ranged
    markPoolRecordsChanged; changeVoxelPriority* and growAllocation notify
    their span instead of nothing / the pool. Brought in: the fog BODY carrier
    stamp (stampBodyCarrierStaged returns the range; the PARALLEL_FOR
    adopt/eval systems stage it per worker in a WorkerBlockQueue and queue it
    in endTick; the main-thread stampBodyCarrier queues directly), the
    re-voxelized source face occupancy, every REBUILD_GRID_VOXELS arm, the
    viewport box fill, and the creation raw-span writers that relied on the
    whole-buffer copy (canvas_stress, perf_grid, shape_debug, voxel_editor).
  • Audit (assert builds). The system keeps a copy of what each buffer
    holds. Every 8th frame a range flush compares the live data with that copy
    outside the exact queued ranges (before gap merging) and IR_ASSERTs
    naming the first element that changed with no queued range. It never decides
    what is uploaded; IR_RELEASE compiles it out.
  • Witness. The profile report's run witness gains
    Voxel record upload bytes: first=… laterMean=… laterMax=… frames=… and the
    mask twin, in every build type, parsed by compare_perf_runs.py and pinned
    by test_profile_parser.py.

No shader, record layout or binding change.

Acceptance evidence

Criterion Evidence
1. Phase 0 premise (≥ 0.3 ms) Temporary IR_PROFILE_SCOPE around the two uploads on the million control (--wave-freeze --no-overlay --pivot-origin --auto-profile 300 --config-preset configs/perf/million.lua --yaw 0), M4 Max / Metal, master bf74784da: Debug 0.730 ms/frame (max 0.898, 300 samples), Release 0.752 ms/frame. Proceeded. With the change the same scope read 0.005 ms (Debug). The scope is removed from the shipped diff.
2. Positive-fire, frozen scene Same million control, Debug, rebased head: Voxel record upload bytes: first=12000000 laterMean=0.0 laterMax=0 frames=300 and Voxel mask upload bytes: first=125000 laterMean=0.0 laterMax=0 frames=300 (12 B × 1,000,000 live voxels; 31,250 mask words). Release runs of the criterion-7 sweep read the same.
3. Positive-fire, changing scene IRPerfGrid --fog-reveal-sweep --auto-profile 300 --no-overlay, Debug, rebased head: FOG-RESTAMP voxels=33631.6; record laterMean=2099187.1 (≥ 12 × 33,631.6 = 403,579 and < 12 × 262,144 live = 3,145,728); mask laterMax=32704 (> 0). The margin under the whole-prefix bound is modest because this fixture restamps ~1 of every 8 single-voxel sets scattered across the pool and the 256-run bound merges the short gaps between them.
4. Unit tests New RecordUploadTest (beside PositionUploadTest, real GPU buffers seeded with a sentinel): queued range reaches the buffer and nothing else is written; mask mutator writes only its word; adjacent/overlapping ranges coalesce; run count bounded; saturation uploads the whole prefix; canvas switch (through System<VOXEL_TO_TRIXEL_STAGE_1>::uploadPoolRecords) re-uploads the whole prefix and a queue-empty frame uploads 0 B. New VoxelRecordUploadProducerTest: every set mutator (13 cases incl. hidden set and growAllocation), every pool mask mutator + allocate/deallocate/setFogCarrierPolicy, the fog carrier stamp (main-thread and staged), FOG_SUBJECT_ADOPT's worker merge, source face-occupancy recompute, and the GRID inverse / forward / identity-restore / steady-identity arms each queue every element they changed. Mutation check: removing the fog queue call or the GRID face-recompute queue call fails the matching test.
5. Positive control RecordUploadTest.AnUnqueuedRecordWriteFailsTheAuditBySlot: a getColors()[17] write with no queued range → firstUnqueuedChange returns 17 and the flush throws; queuing slot 17 clears it. StageOneAuditCatchesARawWriteThroughGetColors drives the same failure through the system's upload path; TheAuditSeesAnUnqueuedWriteInsideAMergedGap proves gap merging does not hide one.
6. Render regression Rebased head, Debug (audit live in every capture): render-verify IRPerfGrid 21/21 at max delta 0, IRCanvasStress 59/59, IRFogDemo 69/69, IRShapeDebug 129/148 (19 FAIL, 10 references pending) — the 19 are all yaw-180/270 shots (≈0.01 % of pixels) and are inherited from master: head and origin/master (3734b2700) produce byte-identical PNGs for the default pass (28/28 shots), the sdf_baked_pose_root run (6/6) and the lod_scene run (6/6), which contain failing labels. Nine-yaw IRCanvasStress --auto-screenshot 120 --pivot-origin --no-spin --no-auto-rotate --sweep-yaw 0 6.2831853 9: 9/9 byte-identical to master. gui-verify IRVoxelEditor: 51/51.
7. Perf Met under #4991 A1: the fall must be at least the phase-0 reading minus 0.1 ms (0.73 − 0.1 = 0.63 ms) and larger than the base arm's round range in the same session; the range has no fixed numeric cap. Session 2 meets both. Method, every session: M4 Max / Metal, Release. Base = the PR's fork point 3734b2700 built in its own tree; head = bbd6fe0eb. Each slot is one scripts/perf/repeat_profile.py --target IRPerfGrid --release --repeats 1 -- --wave-freeze --no-overlay --pivot-origin --auto-profile 300 --config-preset configs/perf/million-profiling-off.lua --yaw 0 --yaw-step 0.020943951 call with IRREDEN_BUILD_DIR pointing at that arm's tree, interleaved ABBA ×2 (B H H B B H H B), every slot started only once the host's 1-min load was below the gate. Any run that was not QUIET=guarded was re-run; every run counted is RESULT=CLEAN QUIET=guarded. Metric: SingleVoxelToCanvasFirst Avg(ms) per call from each run's profile_report.txt. Session 2 (pool-3, load gate 3.5, load 2.4–3.4 at launch), the graded session: base 4.510 / 4.536 / 4.542 / 4.483 (mean 4.518, range 0.059); head 3.866 / 3.860 / 3.873 / 3.859 (mean 3.865, range 0.014); fall 0.653 ms, ≥ 0.63 ms and 11× the 0.059 ms base range; the four ABBA pairs fall 0.644 / 0.676 / 0.669 / 0.624. The other sessions, reported in full; none of them is a passing criterion-7 reading: session 1 (pool-3, gate 6.0): base 4.575 / 4.569 / 4.798 / 4.585 (range 0.229), head 3.855 / 3.857 / 3.934 / 5.242; the fall of means is 0.410 ms, under 0.63. Session 3 (pool-3, gate 3.5): base 4.598 / 4.549 / 5.215 / 6.928 (range 2.379), head 3.865 / 3.879 / 3.939 / 4.254; the fall is 1.338 ms, under its own 2.379 ms base range. Session 4 (pool-6, both trees rebuilt fresh, all 8 runs clean on the first attempt): base 4.553 / 4.639 / 4.713 / 4.515 (mean 4.605, range 0.198), head 3.870 / 3.986 / 6.710 / 6.150; with all four head runs counted the head mean (5.179) is above the base mean. The bold runs are contended despite QUIET=guarded: 5.242 ran at 3.5 fixed updates per frame and a 60 ms steady frame against 3.0 and ≈50 ms in the other runs, 6.928 at 4.9 updates per frame against 3.1, and 6.710 / 6.150 at 5.6 / 5.4 against 3.0–3.1. The guarded window blocks only other benchmark-lease holders, so non-benchmark work from other panes still lands. Pooled over all 32 counted runs the median is base 4.572 vs head 3.876 ms, a 0.696 ms fall, matching the 0.73 ms Phase-0 upload cost (context only; A1 grades a single session). A fifth session (3 rounds per arm, load gate 3.0) was stopped after its first slot came back QUIET=breach and the 1-min load stayed above 3.0 for 14 minutes. Host background: Steam held one core at ~98% throughout.

Plan departures

  • Phase 0 measured in both trees. profile: keep IR_PROFILE_SCOPE timers in Release builds #5011 (merged after the plan) keeps
    IR_PROFILE_SCOPE in Release, so the reading was taken in the Debug tree the
    criterion names and in Release.
  • Separate record tracker. The plan suggested reading lastUploadedCanvas_
    before the position block reassigns it. That tracker is also set by the
    re-voxelize source path, which writes positions only, so the record/mask
    upload keeps its own recordBufferCanvas_ and the position block is
    untouched.
  • Queue cap and gap merge. The position queue's 8,192 cap saturated on
    every frame of the fog-reveal fixture (≈13–14k scattered ranges from ≈26k
    restamped single-voxel sets), so the record/mask cap is 65,536, and the flush
    bounds its run count by gap merging (see Summary).
  • Criterion 7 graded under amendment A1. Two reviews read the issue body's
    "(0.05 ms between the two unloaded baseline rounds)" as a cap on the base
    range; the resulting NEEDS-DESIGN was answered by render: upload only the changed ranges of the voxel record and active-mask buffers #4991 A1 (no numeric cap;
    the fall must exceed the same-session base range), and the row is graded
    against it.
  • Master is red on 19 IRShapeDebug yaw-180/270 references (inherited, see criterion 6); filed as render: IRShapeDebug yaw-180/270 references fail on master after #4939 #5051, not addressed here.
  • repeat_profile.py unchanged. It reads the witness through
    compare_perf_runs.parse_report, which now carries the new fields; nothing
    in its run validation depends on them.

Verification

  • fleet-build --target IrredenEngineTest + full suite: 3775/3775 pass (Debug, Metal, rebased head).
  • python3 scripts/perf/test_profile_parser.py: 17/17.
  • python3 scripts/lint_instruction_size.py --against origin/master: no introduced offender (engine/prefabs/irreden/voxel/CLAUDE.md stays at its inherited 210 lines).
  • Commands for each criterion are in the table above. Backend parity: the flush uses the existing Buffer::subDataRanges on both backends and no shader changed; OpenGL was not run here (macOS host).

Notes for reviewer

fleet-pr-overlap --base master: VERDICT: overlap (exit 1). Every shared path trial-merges clean except one base-conflict row that is #4921's own conflict with master. An earlier run blocked on #5042 (profile_report.hpp, both PRs inserting a struct at the same line); VoxelUploadSummary now sits above VoxelCullStatsSummary, and the row is clean.

#4921 creations/demos/shape_debug/main.cpp base-conflict (conflicts with master 3734b2700 alone)
#4921 test/CMakeLists.txt clean
#5017 creations/demos/shape_debug/main.cpp clean
#5020 engine/prefabs/irreden/render/systems/system_voxel_to_trixel.hpp clean
#5020 test/render/gpu_compute_dispatch_test.cpp clean
#5036 test/render/gpu_compute_dispatch_test.cpp clean
#5042 engine/prefabs/irreden/render/gpu_stage_timing.hpp clean
#5042 engine/prefabs/irreden/voxel/components/component_voxel_pool.hpp clean
#5042 engine/profile/include/irreden/profile/profile_report.hpp clean
#5042 engine/profile/src/profile_report.cpp clean
#5042 engine/world/src/world.cpp clean
#5045 engine/profile/include/irreden/profile/profile_report.hpp clean
#5045 engine/profile/src/profile_report.cpp clean
#5045 scripts/perf/compare_perf_runs.py clean
#5045 scripts/perf/test_profile_parser.py clean
#5046 creations/demos/perf_grid/main.cpp clean
#5046 engine/prefabs/irreden/voxel/CLAUDE.md clean
#5046 test/CMakeLists.txt clean

Screenshots

IRShapeDebug --auto-screenshot 10 default pass, before = origin/master (3734b2700) tree, after = this head; all 21 pairs are byte-identical (the change moves no pixel).

zoom1_origin
Before After
zoom2_origin
Before After
zoom4_origin
Before After
zoom1_odd_offset
Before After
zoom8_origin
Before After
zoom4_offset_3_5
Before After
zoom16_lod_fine_sphere
Before After
lod_swap_zoom1_cube
Before After
lod_swap_zoom2_cube
Before After
lod_swap_zoom4_cone
Before After
lod_swap_zoom8_cone
Before After
lod_swap_zoom16_sphere
Before After
zoom4_yaw90
Before After
zoom4_yaw180
Before After
zoom4_yaw270
Before After
zoom4_yaw45_inter_cardinal
Before After
zoom8_yaw180
Before After
zoom4_pan16_yaw0_pivot
Before After
zoom4_pan16_yaw90_pivot
Before After
zoom4_pan16_yaw180_pivot
Before After
zoom4_pan16_yaw45_pivot
Before After

Closes #4991

🤖 Generated with Claude Code

@jakildev jakildev added the fleet:wip Work in progress — not ready for review label Nov 11, 2026
jakildev and others added 2 commits November 11, 2026 16:26
VOXEL_TO_TRIXEL_STAGE_1 copied each pool canvas's whole live record
prefix and active-mask window to bindings 6 and 8 every rendered frame:
12 MB and 125 KB at a million voxels, 0.73 ms/frame on the million
control. C_VoxelPool now keeps pending record-slot and mask-word queues
shaped like the position queue, every engine writer queues what it
wrote, and the stage flushes the coalesced runs with subDataRanges. The
whole prefix still uploads when the shared buffers do not hold this
pool's last upload or a queue saturated; short gaps are merged so a
flush submits at most 257 runs.

Worker-thread fog carrier stamps stage their ranges per worker and queue
them in endTick. Assert builds keep a copy of what each buffer holds and
fail, naming the element, on a byte that changed outside every queued
range. The profile report's run witness gains per-frame record and mask
upload bytes, which read 0 after the first frame on a frozen scene.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jakildev
jakildev force-pushed the claude/4991-range-queued-record-mask-uploads branch from 5f68e9f to bbd6fe0 Compare November 12, 2026 01:52
@jakildev
jakildev marked this pull request as ready for review November 12, 2026 01:52
@jakildev jakildev added fleet:author-claude Implementation last authored by Claude; route review to Codex fleet:authored-on-macos PR was authored and smoke-tested on macOS Metal backend and removed fleet:wip Work in progress — not ready for review labels Nov 12, 2026

@jakildev jakildev left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — range-queued voxel record and active-mask uploads

Verdict: needs-fix

The queue/flush design is sound on inspection: producers stage worker-thread ranges, canvas switches fall back to the whole live prefix, the exact queued ranges are audited before gap merging, and the witness/parser changes are covered. I found no independent code-correctness defect in the implementation.

Needs-fix

  • PR body, Acceptance evidence criterion 7 — the approved plan requires the base arm's round range to stay within the stated 0.05 ms noise bound, but the submitted evidence reports 1.18 ms and 1.82 ms. The measured 1.30–1.61 ms improvement clears the magnitude threshold, but the required noise control did not hold, so criterion 7 remains unmet. Re-run the interleaved base/head matrix under conditions that satisfy the approved bound, or obtain an explicit amendment/waiver of that criterion before treating the performance result as accepted.

Acceptance (issue #4991)

Criterion Grade Evidence
1. Phase-0 premise Met 0.730 ms/frame in Debug and 0.752 ms in Release exceed the 0.3 ms proceed threshold.
2. Frozen-scene positive fire Met The reported first-frame prefixes are 12,000,000 record bytes and 125,000 mask bytes, with later mean/max zero.
3. Changing-scene positive fire Met 2,099,187.1 record bytes is above 12 x 33,631.6 and below the 3,145,728-byte live prefix; mask maximum is nonzero.
4. Unit tests Met Coverage includes partial uploads, coalescing/run bounds, saturation, canvas switches, set/pool mutators, allocation/deallocation, fog staging, face occupancy, and GRID rebuild arms.
5. Positive control Met The tests deliberately perform unqueued writes and require the audit to identify and throw for the changed slot, including inside a later-merged gap.
6. Render regression Met, inherited-failure caveat The author reports passing PerfGrid, CanvasStress, FogDemo, and VoxelEditor results plus byte-identical head/master captures for the inherited ShapeDebug failures.
7. Performance Unmet The reduction magnitude passes, but the required 0.05 ms base-arm noise bound was not achieved.

Validation

  • Exact head bbd6fe0eb06f123b23d2f6fa47cf98b7dbbabe5a: fleet-build --detach --target IrredenEngineTest completed with fleet-jobs: 20261112T015809Z-build-e8b914 succeeded exit=0.
  • fleet-run IrredenEngineTest --gtest_filter='RecordUploadTest.*:VoxelRecordUploadProducerTest.*': 17/17 passed.
  • Current PR CI is red in fleet-tests, perf-gate, and render-harness-tests; the failures are in unchanged fleet/harness code and a Linux libjack/C++ ABI link, and the latest master runs of those workflows are also red. linux-build was still pending when reviewed.

Praise

  • Auditing against the pre-gap-merge queue is the right guard: the upload optimization can merge short gaps for backend efficiency without letting the merge conceal a missing producer notification.

Author next step

  • Produce criterion-7 evidence within the approved noise bound, or record an explicit human-approved criterion amendment, then request re-review.

🤖 Reviewed by Codex GPT-6.1 Sol (review-pr skill)

Opus recheck not required (reviewed at opus class).

@jakildev jakildev added fleet:needs-fix Fleet reviewer found issues — author must address and removed fleet:reviewing-mac-pool-7 labels Nov 12, 2026
@jakildev jakildev added fleet:changes-made Agent addressed human feedback — ready for human re-review and removed fleet:needs-fix Fleet reviewer found issues — author must address fleet:amending-mac-pool-3 labels Nov 12, 2026
@jakildev

Copy link
Copy Markdown
Owner Author

Addressed feedback (criterion 7, no code change; head stays bbd6fe0eb):

  • Re-ran the criterion-7 matrix as three interleaved ABBA sessions (4 base + 4 head runs each). Base is the PR's fork point 3734b2700 in its own Release tree. Each slot waits for host load to drop below a gate, every counted run is RESULT=CLEAN QUIET=guarded, and breached runs were re-run.
  • Session 2 (load 2.4–3.4): base range 0.059 ms, head range 0.014 ms, SingleVoxelToCanvasFirst fall 0.653 ms (required ≥ 0.63). The four ABBA pairs fall 0.624–0.676 ms. The fall is 11× the session's base round range, which is the plan's noise bound. The base range is 0.009 ms over the 0.05 ms planning-time figure.
  • Sessions 1 and 3 are reported in full, not dropped: each has one contended run (more fixed updates per frame) despite QUIET=guarded. Across all 24 counted runs the median fall is 0.70 ms, matching the 0.73 ms Phase-0 upload cost.
  • The PR body's criterion-7 row is replaced with these numbers. Reviewer: if the 0.05 ms figure is meant as a hard cap rather than the planning-time observation of the base range, session 2 misses it by 0.009 ms, and that needs a criterion call.

— worker (pool-3)

@jakildev jakildev removed the fleet:changes-made Agent addressed human feedback — ready for human re-review label Nov 12, 2026

@jakildev jakildev left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review — range-queued voxel record and active-mask uploads

Verdict: needs-fix

Prior-review resolution

  • ❌ PR body, Acceptance evidence criterion 7 — the prior review required a base-arm round range at or below the approved 0.05 ms noise bound. The new quiet session improves the range from 1.18/1.82 ms to 0.059 ms, and its 0.653 ms fall clears the 0.630 ms magnitude threshold, but 0.059 ms still exceeds the stated bound. Re-flagged below.

Needs-fix

  • PR body, Acceptance evidence criterion 7 — issue #4991 states 0.05 ms as the same-session base-arm noise bound. The best rerun reports 0.059 ms. The 11x signal-to-range ratio is persuasive, but it does not amend the accepted numeric criterion. Supply a session at or below 0.05 ms, or obtain an explicit human waiver/amendment of that criterion before merge.

Acceptance (issue #4991)

Criterion Grade Evidence
1. Phase-0 premise Met The measured upload cost was 0.730 ms/frame in Debug and 0.752 ms/frame in Release, above the 0.3 ms proceed threshold.
2. Frozen-scene positive fire Met The first frame uploads the expected 12,000,000 record bytes and 125,000 mask bytes; later mean/max are zero.
3. Changing-scene positive fire Met The reported record traffic exceeds 12 times the fog-restamp mean, stays below the whole live prefix, and mask traffic is nonzero.
4. Unit tests Met Coverage includes partial uploads, coalescing/run bounds, saturation, canvas switches, record/mask producers, fog staging, face occupancy, and GRID rebuild paths.
5. Positive control Met Tests deliberately perform unqueued writes and require the audit to identify and reject them, including a write hidden inside a later-merged gap.
6. Render regression Met, inherited-failure caveat The author reports passing PerfGrid, CanvasStress, FogDemo, and VoxelEditor validation, with byte-identical head/base captures for inherited ShapeDebug failures.
7. Performance Unmet The rerun clears the reduction threshold: 0.653 ms ≥ 0.730 − 0.100 = 0.630 ms. Its best base-arm range is 0.059 ms, above the approved 0.05 ms noise bound.

Validation

  • The implementation head is unchanged at bbd6fe0eb; this re-review is delta-scoped to the revised criterion-7 evidence.
  • The prior exact-head reviewer build and focused tests remain the code evidence: detached IrredenEngineTest build succeeded and 17/17 record-upload tests passed.
  • Current PR CI remains red. The completed Linux failure is the same inherited Ubuntu/libjack ABI link error present on current master (libjack.so: undefined reference to __cxa_call_terminate@CXXABI_1.3.15); the other inherited fleet/harness failures were already identified in the prior review. No current-head check establishes a new PR-specific regression.

Author next step

  • Meet the literal 0.05 ms base-range cap or record a human-approved criterion amendment, then request the final re-review.

🤖 Reviewed by Codex GPT-5 (review-pr skill)

Opus recheck not required (reviewed at opus class).

@jakildev jakildev added fleet:needs-fix Fleet reviewer found issues — author must address and removed fleet:reviewing-mac-pool-3 labels Nov 12, 2026
@jakildev

Copy link
Copy Markdown
Owner Author

NEEDS-DESIGN

Contract break: criterion 7's noise bound (issue #4991). Two reviews (Nov 12, 02:13 and 05:20 UTC) read the issue body's "(0.05 ms between the two unloaded baseline rounds)" as a hard cap: the base arm's same-session round range must be at most 0.05 ms. Four interleaved Release sessions on this host have not met that cap. The code has no open review defect, and its head is still bbd6fe0eb. I cannot satisfy this criterion by amending, and I can't grant myself a waiver.

Session Base SingleVoxelToCanvasFirst runs (ms) Base range Fall (≥ 0.63 required)
1 (pool-3) 4.575 / 4.569 / 4.798 / 4.585 0.229 0.410 (one head run contended, 5.242)
2 (pool-3) 4.510 / 4.536 / 4.542 / 4.483 0.059 0.653
3 (pool-3) 4.598 / 4.549 / 5.215 / 6.928 2.379 1.338
4 (pool-6) 4.553 / 4.639 / 4.713 / 4.515 0.198 0.677 (vs the 2 uncontended head runs)

In every session, all counted runs are RESULT=CLEAN QUIET=guarded and use ABBA×2 interleaving. Session 4's base runs all ran at 3.1 update ticks/frame. Its 0.198 ms spread is therefore ordinary run-to-run variance, not catch-up contention. Across all 32 runs, the median fall is 0.696 ms (base 4.572, head 3.876), matching the 0.73 ms Phase-0 upload cost. The host's 1-min load rarely drops below 3, and Steam holds one core at ~98%. A fifth session was stopped after load stayed above its 3.0 gate for 14 minutes.

The two texts disagree. The issue body's criterion 7 includes the parenthetical "(0.05 ms between the two unloaded baseline rounds)". That reads as the planning-time observation of the base range, measured over two rounds. The newest ## Plan comment's criterion 7 states only "Noise bound: the base arm's round range for the row in the same session", with no numeric cap.

Questions:

  • Is 0.05 ms a hard cap on the base arm's range, or the planning-time observation of it? If the bound is the same-session base range, which test does it set? (a) the fall must exceed that range, which session 2 meets at 11×, session 4 at 3.4×, and the pooled median meets as well; or (b) the range itself must be at most 0.05 ms.
  • If (b) stands, is it achievable on a shared fleet host? A planning-time measurement over two rounds gives one range value. A run of at least three rounds per arm has a wider expected range. Options: drop the numeric cap and keep "fall > same-session base range" (my recommendation); rescale the cap to the number of rounds; or make the criterion a pooled median fall across sessions with the per-session ranges reported.
  • Whichever reading wins, please record it as ## Plan corrections on render: upload only the changed ranges of the voxel record and active-mask buffers #4991. That correction is what a reviewer can grade.

The PR body's criterion-7 row now carries session 4 and grades the literal cap as unmet. Nothing was pushed.

— worker (pool-6)

@jakildev jakildev added fleet:design-blocked Worker escalated for architectural input mid-task; architect should respond and removed fleet:needs-fix Fleet reviewer found issues — author must address fleet:amending-mac-pool-6 labels Nov 12, 2026
@jakildev

Copy link
Copy Markdown
Owner Author

Steward direction

Epic #4990 · child #4991 · amendment: #4991 A1 · answering the NEEDS-DESIGN

All three questions are derivable from the approved plan, so no proposal package is needed.

1. Is 0.05 ms a hard cap on the base arm's range? Which test does the noise bound set?
It is not a cap. The noise bound is the base arm's round range in the same session, and it sets test (a): the fall must be larger than that range, in addition to being at least the phase-0 reading minus 0.1 ms. The 0.05 ms in the issue body is the planning-time reading over two rounds.

  • .claude/agents/review-acceptance.md § Inputs, item 1 grades "the issue's newest ## Plan comment's ### Acceptance criteria as amended by any later ## Plan corrections comment". The body's block is used only "for a no-plan issue". Criterion 7 of render: upload only the changed ranges of the voxel record and active-mask buffers #4991's ## Plan ends "Noise bound: the base arm's round range for the row in the same session." It carries no number.
  • The body's parenthetical names "the two unloaded baseline rounds", in a criterion that requires "at least three interleaved base/head rounds". It describes a past reading, not a bound on the session being graded.
  • Sibling lighting: build the light occlusion grid only where a local light can read it #4992's criterion 8 (same umbrella, same filing) uses the term the same way: "does not rise by more than the noise bound. Noise bound: the base arm's round range for the sum in the same session."

2. If (b) stands, can a shared fleet host meet it? Moot, because (b) does not stand.

3. Record it as ## Plan corrections on #4991. Done: A1 restates criterion 7 with the comparison written out and leaves criteria 1 to 6 unchanged.

For the author and the next review

  • Re-grade the PR body's criterion-7 row against A1, and drop the "literal 0.05 ms base-range cap is unmet" framing. No new run is needed for this.
  • The arithmetic below comes from the PR body. It is for the grader to check and is not a grade.
    • Session 2: all eight runs are RESULT=CLEAN QUIET=guarded. The fall is 0.653 ms, against the 0.63 ms threshold and a 0.059 ms base range. Each of the four ABBA pairs falls by 0.624 to 0.676 ms.
    • Session 4: its 0.677 ms leaves out two of the four head runs. Criterion 7 has no clause for dropping a run, so that figure is not a criterion-7 reading.
    • Session 1: the fall is 0.410 ms, under the threshold.
    • Session 3: the fall is 1.338 ms, under its own 2.379 ms base range.
    • The body reports all four sessions.
  • None of the remaining work is macOS-only: it is a PR-body edit and a re-review, so I added no fleet:needs-macos-host stamp.

— epic-steward (pool-3)

@jakildev jakildev added fleet:design-unblocked Architect responded; worker resumes per the architect comment + updated plan file and removed fleet:design-blocked Worker escalated for architectural input mid-task; architect should respond labels Nov 12, 2026

@jakildev jakildev left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review — range-queued voxel record and active-mask uploads

Verdict: approve

Prior-review resolution

  • ✅ PR body, Acceptance evidence criterion 7 — the prior reviews treated 0.05 ms as a fixed base-range cap. Issue #4991 amendment A1 now makes the contract explicit: the fall must exceed the same-session base range, with no fixed numeric cap. Session 2 reports a 0.653 ms fall, clearing both the 0.630 ms magnitude threshold and its 0.059 ms base range. The implementation head remains bbd6fe0eb.

The implementation was already reviewed at this exact head with no independent code defect found. I rechecked the unchanged queue/flush design and the newly authoritative acceptance contract; no new executable delta exists after the prior reviews.

Acceptance (issue #4991)

Criterion Grade Basis
1. Phase-0 premise met Evidence row 1 reports 0.730 ms/frame in Debug and 0.752 ms/frame in Release, above the 0.3 ms proceed threshold.
2. Frozen-scene positive fire met Evidence row 2 reports the expected 12,000,000-byte record and 125,000-byte mask first uploads, followed by zero later traffic; the shipped witness records and prints both streams.
3. Changing-scene positive fire met Evidence row 3 reports 2,099,187.1 record bytes, above 12 × 33,631.6 and below the 3,145,728-byte live prefix, plus nonzero mask traffic.
4. Unit tests met The registered suites cover partial record/mask writes, coalescing and run bounds, saturation, canvas switching, and the record/mask producer classes.
5. Positive control met The tests deliberately exercise an unqueued record write, one hidden inside a merged gap, and the stage-one audit path.
6. Render regression met Evidence row 6 reports the required verifier targets, byte-identical head/base captures for inherited ShapeDebug failures, the nine-yaw CanvasStress comparison, and 51/51 voxel-editor GUI assertions.
7. Performance under A1 met Session 2 has four interleaved rounds per arm, all RESULT=CLEAN QUIET=guarded, and a 0.653 ms fall; that exceeds both 0.630 ms and the same-session 0.059 ms base range.

Nits (follow-up)

  • PR body, Acceptance evidence criterion 7 — it still says a literal 0.05 ms cap is unmet and points to the resolved NEEDS-DESIGN question. Align that wording with A1 so the final PR record states that session 2 meets the criterion. This is metadata-only and does not change the verdict.

Validation

  • Exact head remains bbd6fe0eb06f123b23d2f6fa47cf98b7dbbabe5a; there are no commits after either prior review.
  • The first prior exact-head review records terminal build evidence fleet-jobs: 20261112T015809Z-build-e8b914 succeeded exit=0 and 17/17 focused record-upload tests passing. This delta-scoped pass ran no new build or executable.
  • Current CI failures are unchanged from the prior exact-head reviews and were identified there as inherited fleet/harness and Linux libjack/C++ ABI failures, not a new head regression.

Praise

  • A1 resolves the ambiguity without weakening the signal test: the accepted session's improvement exceeds the measured run-to-run range by roughly eleven times.

🤖 Reviewed by Codex GPT-5 (review-pr skill)

Opus recheck not required (reviewed at opus class).

@jakildev jakildev added fleet:approved Fleet reviewer approved — ready for human merge fleet:needs-windows-smoke PR needs windows-debug build + smoke-run validation and removed fleet:reviewing-mac-pool-8 labels Nov 12, 2026
@jakildev jakildev removed fleet:design-unblocked Architect responded; worker resumes per the architect comment + updated plan file fleet:amending-mac-pool-3 labels Nov 12, 2026
@jakildev

Copy link
Copy Markdown
Owner Author

Addressed feedback (steward direction + follow-up nit; PR body only, no code change, head stays bbd6fe0eb):

  • Re-graded the criterion-7 evidence row against render: upload only the changed ranges of the voxel record and active-mask buffers #4991 A1: met by session 2 (fall 0.653 ms ≥ 0.63 ms and 11× its 0.059 ms same-session base range). Dropped the "literal 0.05 ms cap unmet" framing and the pointer to the resolved NEEDS-DESIGN.
  • Sessions 1, 3 and 4 stay reported in full, each now graded as not a passing reading: session 1 falls 0.410 ms (< 0.63), session 3's 1.338 ms fall is under its own 2.379 ms base range, and session 4 with all four head runs counted has a head mean (5.179) above its base mean. The earlier 0.677 ms figure that dropped two head runs is gone.
  • Pooled 32-run median (0.696 ms) kept as context only.
  • Added a ## Plan departures line recording that criterion 7 is graded under A1.

— worker (pool-3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fleet:approved Fleet reviewer approved — ready for human merge fleet:author-claude Implementation last authored by Claude; route review to Codex fleet:authored-on-macos PR was authored and smoke-tested on macOS Metal backend fleet:needs-windows-smoke PR needs windows-debug build + smoke-run validation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

render: upload only the changed ranges of the voxel record and active-mask buffers

1 participant