Follow-up to #1026.
Problem
Current main 8794ccc5 fails the unit test gc.test.Promise fits the 256-byte GC slab:
expected 256, found 248Promise is correctly packed to a 216-byte payload. With zig-gc's 32-byte header, Heap.cellAllocationBytes(Promise) is the exact 248-byte request. Production GcCellBacking rounds that request into its 256-byte size class, so the runtime optimization is present; the test incorrectly equates the unrounded request with the selected slab slot.
Exact unmodified-main reproduction:
zig test --dep regex --dep gc -Mroot=src/gc.zig \
-Mregex=../zig-regex/src/root.zig -Mgc=../zig-gc/src/root.zig -lc \
--test-filter 'Promise fits the 256-byte GC slab'Scope
- Expose the production GC backing's selected slab-slot size for a requested cell size.
- Assert that
Promise's exact request stays within budget and selects the 256-byte production slot. - Keep the payload packed; do not add padding merely to make the raw request equal the bucket size.
- Run the focused GC invariant and backing size-class tests.
No-workaround rule
Do not weaken the 256-byte production size-class invariant or add wasted payload padding. Test the allocator decision the invariant actually describes.