capacities (25.5a): @max(n) on a list field, and a full table is a failure

'@max(64) boxes: []Box' on a property's or a state's field is a promise: the grow path of a push to
that field (only the grow path, so nothing is paid until it doubles) checks it, and growing past n is
reported by the fence - 'PoolState.boxes grew past its @max(16) (it holds 16)' - counted under
count, said under warn, and under fail (a headless or dev build's default) the run ends with exit 87.
Mem.over("what") is the same for a package's own table: ludic.base's StrTable past its most
(sb_intern) and ludic.ui's memo past three quarters of MM_CAP no longer quietly copy per call. The
census counts overflows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-28 16:43:02 +03:00
parent 69d1db06a5
commit 6fb5118afd
8 changed files with 73094 additions and 71750 deletions

View file

@ -45,7 +45,10 @@ export function sb_intern(sb: StrBuf, tb: StrTable) -> string {
slot = (slot + 1) & mask
}
let s = text_of(sb.b, sb.n)
if len(tb.ss) >= tb.most { return s }
if len(tb.ss) >= tb.most {
Mem.over("a StrTable past its most (sb_intern)") # 25.5a: a full table is a failure, not a copy per call
return s
}
push(tb.ss, s)
tb.hs[slot] = h
tb.at[slot] = len(tb.ss)