Publish the groups report through a temp file + replace so a mid-write OSError leaves any prior complete JSON intact.
Co-authored-by: Cursor <cursoragent@cursor.com>
The 24,832 "other descriptor" streams of core_bvh4.rpf are two templates,
told apart by the page word in the block that the 0x08 pointer addresses:
* 2,531 instance descriptors with N > 1 slots (the 208-byte record is the
N = 1 case). The stream after each holds the BLAS of its non-zero entries
back to back; each entry's low u32 is that BLAS's declared end rounded up
to 256. 2,531/2,531 pass and 6,701 BLAS are tied; the N = 1 entry rule
holds for 269,106/269,106 records.
* 22,301 table streams (page word 0x1): K sorted u32 values and K 32-byte
items. None is followed by a BVH stream, and no key or value matches
anything beyond chance.
tools/bvh_groups.py reproduces the template and buffer counts, with
synthetic tests. docs/bvh.md gains §3.2a with the layouts, the rule,
the tested non-links and what stays open.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>