Shape Is Not Cardinality: Unenforced Constraints in Structured Generation
Abstract
Constrained decoding compiles JSON Schema into a regular approximation and masks tokens that leave that language. Across two pinned libraries, object-cardinality constraints are either silently dropped in that compilation or refused at compile time: neither demonstrates enforcement. Under Outlines at 4× search budget, Guide-reachable violating closes appear in 6 of 18 compiled schemas (6/24 cells; up from 5 at 1×), concentrated in minProperties and required. A lightweight composed adapter, scoped before implementation to those two leak sites, covers all 17 object-quota cells: over 60 matched draws it removes 1,382 quota-unsafe closes with zero empty-mask events, parse completion identical to base (58/60), and at least two admissible tokens remaining at every blocked step (median 620). llguidance compile-rejects optional minProperties schemas that Outlines compiles and then under-enforces—fail-closed versus fail-silent, not enforcement.