CODE-040: weave.js group mask lies above 31 groups, null side throws

Now
DONE
Sev
LOW
Rep
///bee
Ask
gritzko
Rev
///bee#184fddf

Input

Context

index/weave.js:64:ET spells spine = ng >= 32 ? 0xFFFFFFFF : ((1 << ng) - 1), but the mask loop at :72 uses 1 << g, which JS shifts mod 32 at 32+ groups every mask is wrong and no run ever matches the spine, so the guard reads as handling a case it breaks. weave.js:134 null-guards base but not ours/theirs, and bytesEq dereferences .length at once a null side throws where the contract is "null means unweavable, the caller falls back loudly". Callers pass 2 groups today. Found in the 2026-08-21 review.

Goals

Fail loudly at ng > 31 (or go BigInt) instead of mis-masking; symmetric null guards on all three sides; unit repro for both.

WIP

TODOs

Outcome