Skip to main content

WeightsBindingError

Type Alias WeightsBindingError 

Source
pub type WeightsBindingError = WeightsError;
Expand description

The kernel-side bind-time decision surface error. Wraps chio_weights::error::WeightsError so consumers get a single result type to pattern-match on.

Aliased Type§

pub enum WeightsBindingError {
    Encoding(String),
    MissingField(&'static str),
    SchemaRejected(String),
    Expired {
        expires_at: DateTime<Utc>,
        now: DateTime<Utc>,
    },
    BundleRejected(String),
    CardMismatch {
        expected: String,
        found: String,
    },
    ScopeNotSubset {
        scope: String,
    },
    ToolBanned {
        tool: String,
    },
}

Variants§

§

Encoding(String)

Canonical-JSON encoding or decoding failed. Fatal: do not retry until the encoding bug is resolved.

§

MissingField(&'static str)

Required field is missing from the model card structure.

§

SchemaRejected(String)

Schema-level invariant rejected (e.g. weights_hash not 64 hex chars).

§

Expired

Card expired before the verifier evaluated it.

Fields

§expires_at: DateTime<Utc>

Card’s expires_at field.

§now: DateTime<Utc>

Verifier-side now.

§

BundleRejected(String)

Cosign bundle verify path rejected the bundle. Wraps the upstream chio-attest-verify error so receipt consumers can correlate.

§

CardMismatch

Loaded weights_hash does not match the card’s weights_hash. Maps to urn:chio:error:weights:card-mismatch.

Fields

§expected: String

Card’s declared weights_hash (lowercase hex sha-256).

§found: String

Runtime-loaded hash (lowercase hex sha-256).

§

ScopeNotSubset

Requested capability scope is not in the card’s allowed_capability_set. Maps to urn:chio:error:weights:scope-not-subset.

Fields

§scope: String

First scope that violated subset containment.

§

ToolBanned

Requested tool is in the card’s banned_tools. Maps to urn:chio:error:weights:tool-banned.

Fields

§tool: String

Tool identifier that intersected banned_tools.