Unit
crates/cli/src/meta/types/interpreter_caller/v1.rs — impl TryFrom<RainMetaDocumentV1Item> for InterpreterCallerMeta (group g5-interpretercallermeta-v1, adversarial mutation-test pass).
Intent oracle
Rain metadata-v1 spec: the per-item magic number is the "signal of intent for the payload" that tooling reads "in O(1)... without needing to first parse". A meta map's magic says what the payload is.
Violated property
InterpreterCallerMeta::try_from(item: RainMetaDocumentV1Item) never inspects item.magic. A document item tagged with any magic — e.g. KnownMagic::SolidityAbiV2 or KnownMagic::OpMetaV1 — whose payload happens to parse as InterpreterCaller JSON converts successfully into an InterpreterCallerMeta. The declared intent signal is ignored at the exact boundary whose job is to interpret it.
RainMetaDocumentV1Item::unpack_into::<T> (meta/mod.rs) does gate on magic, but only on "is this any supported magic", not "is this the magic that matches T" — so the same confusion passes through unpack_into as well, and direct TryFrom has no gate at all.
Verified repro
let item = RainMetaDocumentV1Item {
payload: serde_bytes::ByteBuf::from(VALID_INTERPRETER_CALLER_JSON),
magic: KnownMagic::SolidityAbiV2, // wrong intent signal
content_type: ContentType::Json,
content_encoding: ContentEncoding::None,
content_language: ContentLanguage::En,
schema: None,
};
assert!(InterpreterCallerMeta::try_from(item).is_ok()); // succeeds despite the mismatched magic
Triage framing (neutral)
This pattern is shared by the other meta types' TryFrom<RainMetaDocumentV1Item> impls, so it may be a deliberate "caller has already routed on magic" design. If so it is undocumented; if not, the conversion should reject a mismatched magic. Flagged for a decision, not adjudicated. (Scope of this run's slice is the InterpreterCaller unit; the same question likely generalises.)
Unit
crates/cli/src/meta/types/interpreter_caller/v1.rs—impl TryFrom<RainMetaDocumentV1Item> for InterpreterCallerMeta(group g5-interpretercallermeta-v1, adversarial mutation-test pass).Intent oracle
Rain metadata-v1 spec: the per-item magic number is the "signal of intent for the payload" that tooling reads "in O(1)... without needing to first parse". A meta map's magic says what the payload is.
Violated property
InterpreterCallerMeta::try_from(item: RainMetaDocumentV1Item)never inspectsitem.magic. A document item tagged with any magic — e.g.KnownMagic::SolidityAbiV2orKnownMagic::OpMetaV1— whose payload happens to parse as InterpreterCaller JSON converts successfully into anInterpreterCallerMeta. The declared intent signal is ignored at the exact boundary whose job is to interpret it.RainMetaDocumentV1Item::unpack_into::<T>(meta/mod.rs) does gate on magic, but only on "is this any supported magic", not "is this the magic that matches T" — so the same confusion passes throughunpack_intoas well, and directTryFromhas no gate at all.Verified repro
Triage framing (neutral)
This pattern is shared by the other meta types'
TryFrom<RainMetaDocumentV1Item>impls, so it may be a deliberate "caller has already routed on magic" design. If so it is undocumented; if not, the conversion should reject a mismatched magic. Flagged for a decision, not adjudicated. (Scope of this run's slice is the InterpreterCaller unit; the same question likely generalises.)