JS-092 MED: hunk.feed writes the TOK TLV at 1/4 the byte length

js/hunk.hpp JABChunkFeed sets the toks slice END pointer with token-COUNT byte arithmetic instead of BYTE length: hk.toks[1] = (tok32c*)(toks[0] + $len(toks)/sizeof(tok32)). toks[0] is a u8*, so + N advances N BYTES, but $len(toks)/sizeof(tok32) is the token COUNT — so the TOK TLV is written with numtokens bytes, a QUARTER of the real numtokens*4. Result: a fed hunk with N tok32 spans drains back only N/4 toks (rounded), and HUNKu8sDrain FAILS outright (next() → false, the record vanishes) unless 4 | N — because hunk_drain_toks rejects a 'K' length not a multiple of sizeof(tok32). Surfaced fixing COMMIT-003. Method: Issues.

Input

Context

Goals

Constraints

WIP

Design decisions

TODOs

Blockers and bummers

Outcome