Archived
h_bidi carries one slot per run that intersects the chunk, over a plane four times the step's token capacity wide -- sound only because RopeLayout::runs is documented ascending and pairwise disjoint, so every accepted run can bill at least one real token of the step. Until 2.0 the layout was built solely from the tokenizer's own placeholder scan; request-side placement writes it now, and a layout with overlapping runs would bill one token twice, run n_bidi past the plane, and hand the card an index plane its shape validation waved through. The build now checks the promise where it consumes it: a run starting before the last accepted one's end is dropped -- those media rows simply lose bidirectionality for the step, which is an ordinary miss -- and a hard stop guards the plane width itself, unreachable unless the check is wrong. Both events speak once per process, not per step.