an_allocation_at_the_limit_waits_for_the_untaken_chunks_to_go_back failed on the M3 Max under
MoltenVK (4/4 in full runtime gpucfg suites at 81d7268023; m3-max-13593 at e72579a8b7): 2
buffers made of a room of 3, the next refused at the limit.
The M3 runs (m3-max-13619, alone 3/3 and in the suite, with the work counts printed around the
window) show the give-back itself did its work: all 3 untaken chunks went back before the first
allocation's retry (host_imports_live 4 -> 2, host_ram_chunks_live 2, one wait for the
give-back), and the live count then stayed at the limit for 2.5 s after the refusal, so no free
lagged. The third allocation of the room went to the device's first pooled block, a block of
buffers made ahead that a placement waited for, made once the give-back left room past the
margin (pooled_memory_blocks_made 0 -> 1, buffer_blocks_made_ahead 0 -> 1,
blocks_ahead_waited_for 0 -> 1, memory_blocks_live 0 -> 1). allocations.rs's room_ahead lets the
runtime's own work take that room by design; lavapipe makes no block in this window. So the
test's arithmetic assumed lavapipe's order, not a path the fix misses.
The test now counts the runtime's pooled blocks live at the refusal that were not live before
the object (memory_blocks_live + empty_memory_blocks_live) with the objects' buffers against the
room, prints them, and keeps every other assertion: the untaken chunks went back, only the
objects' chunks were live at the refusal, an allocation waited for the give-back, and the
refusal came at the limit.
Verified: the next potluck jobs (M3 alone and in the suite, a control with the give-back wait
removed, lavapipe).
(cherry picked from commit 75de915a59ff3a3a6d3eb74eeb3d374e1388ae1b)