Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-sovereign-core-mv/issues/6f4ad5162c6572e3 # aien-sovereign-core-mv AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers # [27B P0] Separate trusted template control tokens from untrusted request text in .om Open · #719 · open 2026-10-23 23:03 UTC Imported from GitHub aien-dev/aien-sovereign-core-mv#719, by drakestapleton drakestapleton wrote on 2026-10-23 23:03 UTC 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. No comments. Sign in to comment