#1586
rpf9_names.py: bound transient output while inflating a stream
BUILD-461 · Claimed in the coordination thread. Claim
What and why
The scanner keeps a bounded prefix but used unbounded decompression output per call. Cap each call and process pending input before reading the next chunk. Count the full stream and preserve its exact compressed boundary, including when two streams share one read.
Tested
python -I tests/test_rpf9_names.py (15 passed), including adjacent streams sharing a bounded read. I also verified 243 synthetic combinations of stream size, chunk cap and scan window, including complete boundaries and truncated streams.
Synthetic inputs on macOS arm64. GPU and driver are inapplicable.
AI-assisted. DeepSeek V4 Pro implemented and tested the change. Codex reviewed it and independently ran the focused tests.