Unit
crates/cli/src/meta/types/op/v1.rs — Input (computed vs constant inputs).
Intent oracle
OpMeta.inputs doc: "for opcodes with dynamic number of inputs, 'bits' field must be specified which determines this opcode has dynamic inputs ... with 'computation' field applied if specified". Input.bits doc: "Required only for computed (non-constant) inputs"; Input.computation doc: same.
Violated property
Cross-field consistency of the computed-input shape. Validation is per-field only, so these all validate today:
{"computation": "bits + 1"} with no bits — a computation over operand bits that are never allocated;
{"parameters": [..], "bits": [0, 3]} — constant parameters together with dynamic bits, leaving the input count ambiguous between parameters.len() and the bits value.
Verified repro
OpMeta::try_from(br#"{"name":"add","inputs":[{"computation":"bits + 1"}]}"#.to_vec()) returns Ok (verified while building the AMT suite — the new test_opmeta_input_computation_validated uses exactly this shape as its "valid" arm because the current validator accepts it).
Triage framing
The docs describe a discriminated union (constant: parameters; computed: bits [+ computation]) that the struct does not enforce. Consumers (rainlang tooling) presumably fail later or misread such metas. Possibly out of scope for schema-level validation — flagged for a human call.
Unit
crates/cli/src/meta/types/op/v1.rs—Input(computed vs constant inputs).Intent oracle
OpMeta.inputsdoc: "for opcodes with dynamic number of inputs, 'bits' field must be specified which determines this opcode has dynamic inputs ... with 'computation' field applied if specified".Input.bitsdoc: "Required only for computed (non-constant) inputs";Input.computationdoc: same.Violated property
Cross-field consistency of the computed-input shape. Validation is per-field only, so these all validate today:
{"computation": "bits + 1"}with nobits— a computation over operand bits that are never allocated;{"parameters": [..], "bits": [0, 3]}— constant parameters together with dynamic bits, leaving the input count ambiguous betweenparameters.len()and the bits value.Verified repro
OpMeta::try_from(br#"{"name":"add","inputs":[{"computation":"bits + 1"}]}"#.to_vec())returnsOk(verified while building the AMT suite — the newtest_opmeta_input_computation_validateduses exactly this shape as its "valid" arm because the current validator accepts it).Triage framing
The docs describe a discriminated union (constant: parameters; computed: bits [+ computation]) that the struct does not enforce. Consumers (rainlang tooling) presumably fail later or misread such metas. Possibly out of scope for schema-level validation — flagged for a human call.