interplane.Get Omega
Read in your language

interplane-mv

INTERPLANE: open interoperability protocol between AI models and agent runtimes. Models express intent. Runtimes retain authority.

Brought by drakestapleton

branch main Branches Tags History

interplane-mv / docs / analysis / ISSUE-57-refusal-exposure.md

161 lines · 11528 bytes Raw Blame History Source

Issue 57: refused and held calls and the exposure floor

Status: RESOLVED by option C (keep fail-closed), decided by the coordinator on 2026-10-07. No behaviour or fixture change. The rule is now stated in spec/CORE.md (non-executed results in the exposure ledger) and spec/CROSSVEIL.md rule 6. Options R and V are tracked in issue #80, to be taken up only when a host shows a real usability cost. Evidence is CPU evidence: no model, no GPU.

1. What happens today

When the pipeline renders a result back to the model it records it in the trace's input ledger (Rust pipeline.rs:1320 calls record_result at :531, which calls push_result_input at :535; Python crossveil.py:1000 -> _record_result :478 -> _push_result_input :482). The record's content_kind and trust are the result's provenance; absent gives unknown (Rust :540-560, Python :490-505). Host continuations take the same path (Rust :1132, :1163; Python :815, :825).

Results that were not executed carry null content_kind and trust by design: CORE.md "Canonical result payload shape" (spec/CORE.md:254-259, "no data was produced, so there is no content to classify"). Rust builds them in reached / non_exec (pipeline.rs:~800-840) and reject (:597); Python in make_result and _rejected (crossveil.py:522).

The floor is the minimum over the ledger (Rust exposure_for :512, Python :460). unknown ranks as external_untrusted; an empty ledger is external_untrusted (CROSSVEIL rule 6, spec/CROSSVEIL.md:103-118). So a null label on a refusal becomes unknown in the ledger and lowers the floor to external_untrusted for the rest of the trace. Reproduced on the todo example at main 0ff60f2: c4 shows floor before: external_untrusted with only the "held" reply to c3 as new input.

The two specs were never reconciled on this point. CORE.md says "null, nothing to classify". CROSSVEIL rule 6 says every rendered result is recorded, unknown when it has no label. The unknown is the generic fail-closed default written for executed results whose adapter said nothing (rule 2); nothing in the text, the 0.3 plan (docs/plans/0.3-TRUST-PLAN.md) or bench/PROTOCOL-0.3.md (gates P and E) discusses refusals. Gate P2 counts only executed results. There is no separate threat-model document under docs/; SECURITY.md states the rule only as "fail closed on unknown decisions". The intent has to be read from the trust rules.

2. What the authors intended

Three stated principles bear on it.

  1. The floor is "the least trusted level among inputs visible to the model" (rule 6). The ledger exists so that nothing the model sees escapes it. The continuation text says so directly: a resolved continuation is recorded "so what the model sees next stays inside its exposure floor" (spec/CORE.md:216-218). Not recording a refusal body contradicts that.
  2. Inability to determine trust is never turned into trust (CROSSVEIL Trust rule 1).
  3. The pipeline does NOT record the model's own text, because doing so "would make the floor of every multi-turn trace external_untrusted by construction and hide real exposure changes" (spec/CROSSVEIL.md:143-146). The floor is meant to move on real new exposure, not by construction.

Reading 1 and 2 together with 3: the unknown on a refusal was an unintended side effect of two rules meeting (the default for unlabelled results, and the null label for non-executed ones). It was unintended when written and is now a decided policy (option C, section 6). But the safe direction (fail closed) is what the authors chose for every gap, and the fix must not open one.

3. Can a refusal body carry attacker-influenced text?

Yes, in four ways. The model-visible body is {status, error.code, error.message} (Lenshift serialize_result, lenshift/src/lib.rs:181); the embedded decision is not rendered. The aien_legacy dialect also puts the model's raw tool name in the wrapper tag (lenshift/aien_legacy.py:157).

Source of textExamplesAuthor
fixed pipeline textruntime authority raised an error, approval cancelled by host, too many tool calls in one turn, session limit exceeded: <limit>pipeline
echoed caller textno mapping for tool: <name>, duplicate request_id: <id>, duplicate parameter: <key>, tool name in the aien_legacy tagthe model, steered by whatever it read
adapter textpolicy_denied and invalid_arguments use the decision reason verbatim; approval required: <id> uses the adapter-minted id (mock: mock-approval-<request_id>, which embeds a model-chosen id); unknown decision value: <value> echoes an adapter stringthe runtime adapter
runtime catalog textunknown capability: <capability>the catalog

The Odysseus adapter passes the gate's own reason through (authority.py:197-212, redacted and cut to _MAX_REASON); the AIEN adapter passes reasons from AIEN's own primitives (adapters/aien/src/lib.rs:394 staging refusals, :450-459 approval errors formatted as approval refused: {e:?} or e.to_string(), :591-607 the pending reason, :803-809 the aegis gate reason). Neither checks that the reason is free of text the model could be steered by. Whether any AIEN or aegis reason quotes arguments or content is UNVERIFIED (those crates were not read for this note).

Approval ids differ per adapter. Odysseus mints none (authority.py:200-212, approval=None), so its body reads approval required: with an empty id; its reasons go through _redact and a length cut (:117-118). AIEN mints aien-approval:<request_id>:<16 hex of the intent digest> (lib.rs:598), which embeds the model-chosen request id, so it is not opaque: it is echoed model text plus a digest prefix. The mock id embeds the request id the same way.

4. Threat cases

Invariants every acceptable policy keeps: (I1) a refusal never raises the floor; (I2) an empty ledger stays external_untrusted after a refusal; (I3) echoed or adapter text keeps its taint; (I4) later calls are judged on the floor exactly as before; (I5) the existing conformance verdicts are unchanged unless a change is listed and justified.

5. Candidate policies

PolicyI1I2I3Verdict
A. record as runtime_instruction + trusted_runtimeholds (min)BREAKS (T2)BREAKS (T1, T3)unsafe
B. do not recordholdsholdsBREAKS for adapter text (T3): body seen, not in ledger; contradicts CORE.md:216-218unsafe for adapter text; safe only for pipeline-fixed text
C. keep unknown (today)holdsholdsholdssafe, costs the floor after every refusal
R. refinement: record the refusal at the floor of the exposure the call was made under, for fixed and echoed text onlyholdsholds (empty ledger gives external)holds (T4 adds nothing new)safe; does NOT fix the issue's example, whose held reply carries an adapter-minted id
V. R plus an optional adapter flag vouching that its reason and ids carry no content the model has not seenholdsholdsholds if the adapter is honest (T3 becomes an adapter duty)safe; fixes the example; new optional field

R sets a record's trust to the call's own turn floor, never above it. It cannot raise the floor (min), and it cannot lower it, because the text it covers is the model's own or pipeline-fixed. V adds one optional boolean-like field on the decision (a MINOR change in 0.x), defaulting to today's behaviour; an adapter that does not set it is unchanged.

6. Decision

Policies A and B are ruled out on security grounds (T2 is a concrete bypass; B hides adapter text). The remaining choices (C, R, V) are all safe. They differ in cost, not in safety:

That was a product call (how much usability is worth a new protocol field and a new adapter duty). It was made for C. R and V are kept as a revision candidate in https://github.com/aien-spark/interplane/issues/80 with the trigger "real usability cost observed in a host". The tests below pin what must hold under C, R and V alike, and pin today's behaviour.

7. Tests added (no behaviour change)

python/tests/test_refusal_exposure.py (9) and rust/crates/interplane-crossveil/tests/refusal_exposure.rs (9): same scenarios and strings. Covered: I1, I2, echoed tool name with a later effect still held, an adapter reason carrying injected text, held then approved then executed, a mixed chain ending in an untrusted read, a todo-shaped floor sequence on the mock, the current-policy pin, and a table test that pins the documented rule over 11 outcome rows: denied, requires_approval, not_found, a runtime invalid decision (status rejected), an unknown decision value, a decide that raised, an execute that raised, executed error, executed timed_out, and two pre-runtime rejections. Each ends at floor external_untrusted; not-executed rows are recorded unknown / unknown, executed ones tool_result / unknown.

Red check: with refusals patched to trusted_runtime (policy A) 7 of 9 fail in each SDK; the real code passes all 9.