Parent delivery index: #715. New first-party implementation/tests/automation are handwritten seeded .om; use existing compiler, runtime and migration owners. Reconcile current heads, PRs, comments, consumer pins and recovery archives before edits. No permanent Rust/C/.osc/Python implementation or hidden third-party inference engine. Qualify affected replacements before deleting superseded active code. Preserve live service, driver state, visibility and existing hardware coordination. Exact hashes, commands, raw results, negative controls and independent final-source review are required. Hardware NOT_RUN is not PASS.
Source-grounded audit gap
Main HTTP codec.rs blob 2162f59124361fd605f869c70dc4fbf5bee465cd calls encode_with_special(text,true) on the rendered prompt. tokenizer.rs delegates to the tokenizer's encode(text, add_special_tokens). Closed #310 and tool_boundary cover tool-output rejection, not every request field. This issue must first reproduce/classify behavior with the pinned tokenizer; do not label every model exploitable from the API name alone.
Acceptance
- Establish the trusted structural-token boundary for template rendering versus message text, tool descriptions/schemas/results, reasoning fields and any future labels/media marker text. Client-supplied role content is text even when a privileged role is permitted by the API.
- User spellings of model control tokens encode as ordinary text, or fail closed with a documented named refusal when safely representing them is impossible. Legitimate trusted template control IDs remain structural.
- Do not assume add_special_tokens=false disables recognition of added tokens. Test token IDs and rendered structure, not merely string replacement.
- Preserve ordinary text encoding and template semantics where inputs contain no control spellings; recompute actual prompt counts/context checks after encoding. Do not globally strip legitimate text or silently rewrite role structure.
- Keep existing #310 ToolConversation boundary and callers protected; inspect typed/raw token APIs and multimodal markers so alternate entry points cannot bypass the contract.
- Parameterize regressions using the pinned model's added/control token inventory; cover forged role delimiters, tool-response closing strings, Unicode/normalization variants, fragmented field inputs, malformed UTF-8 where admitted, roundtrip and oversized input.
- Test all supported HTTP prompt paths end to end and use a deliberate unsafe encoding mutant as a negative control. Trusted template IDs must remain correct; request text must not inject structure.
- Document supported tokenizer/template identities and refusal behavior; use real tokenizer fixtures, not only ByteCodec. This is structural hardening, not a claim to solve all semantic prompt injection.
Integration
Gate expanded structured-tool support in #715 on this contract. Implement via the existing .om tokenizer/rendering owner under Omega #666; preserve model qualification and do not introduce a parallel tokenizer implementation.