pub struct DecisionRecordV1 {Show 19 fields
pub schema_version: u32,
pub decision_id: DecisionId,
pub task_id: TaskId,
pub plan_id: Option<PlanId>,
pub decision_stage: DecisionStageV1,
pub decision_kind: DecisionKind,
pub input_refs: Vec<String>,
pub constraint_refs: Vec<String>,
pub selected_result: Value,
pub rationale_code: String,
pub rationale_ref: Option<String>,
pub policy_ref: Option<String>,
pub decision_system_name: String,
pub decision_system_version: String,
pub evidence_refs: Vec<EvidenceRefV1>,
pub observed_at: String,
pub signature: String,
pub supersedes: Option<DecisionId>,
pub extensions: ExtensionsV1,
}Expand description
Signed, evidence-linked record of one deterministic decision.
Fields§
§schema_version: u32§decision_id: DecisionId§task_id: TaskId§plan_id: Option<PlanId>§decision_stage: DecisionStageV1§decision_kind: DecisionKind§input_refs: Vec<String>§constraint_refs: Vec<String>§selected_result: Value§rationale_code: String§rationale_ref: Option<String>§policy_ref: Option<String>§decision_system_name: String§decision_system_version: String§evidence_refs: Vec<EvidenceRefV1>§observed_at: String§signature: String§supersedes: Option<DecisionId>§extensions: ExtensionsV1Implementations§
Source§impl DecisionRecordV1
impl DecisionRecordV1
Sourcepub const SIGNATURE_DOMAIN: &'static [u8] = b"lean-ctx:decision-record:v1\0"
pub const SIGNATURE_DOMAIN: &'static [u8] = b"lean-ctx:decision-record:v1\0"
Purpose/version separation for the Ed25519 decision-signature profile.
Sourcepub fn unsigned_canonical_bytes(&self) -> Result<Vec<u8>, ValidationError>
pub fn unsigned_canonical_bytes(&self) -> Result<Vec<u8>, ValidationError>
Compact UTF-8 JSON with recursively sorted object keys, omitting only
signature. This is serialization, not signature or authority validation.
Unknown extension fields remain covered by the signature payload.
Sourcepub fn signing_bytes(&self) -> Result<Vec<u8>, ValidationError>
pub fn signing_bytes(&self) -> Result<Vec<u8>, ValidationError>
Versioned domain prefix followed by the unsigned canonical document. No key discovery, signing, verification, policy or I/O occurs here.
Sourcepub fn validate(&self) -> Result<(), ValidationError>
pub fn validate(&self) -> Result<(), ValidationError>
Validate schema invariants for a decision record.
Trait Implementations§
Source§impl Clone for DecisionRecordV1
impl Clone for DecisionRecordV1
Source§impl Debug for DecisionRecordV1
impl Debug for DecisionRecordV1
Source§impl<'de> Deserialize<'de> for DecisionRecordV1
impl<'de> Deserialize<'de> for DecisionRecordV1
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DecisionRecordV1
impl PartialEq for DecisionRecordV1
Source§impl Serialize for DecisionRecordV1
impl Serialize for DecisionRecordV1
impl StructuralPartialEq for DecisionRecordV1
Auto Trait Implementations§
impl Forget for DecisionRecordV1
impl Freeze for DecisionRecordV1
impl Move for DecisionRecordV1
impl RefUnwindSafe for DecisionRecordV1
impl Send for DecisionRecordV1
impl Sync for DecisionRecordV1
impl Unpin for DecisionRecordV1
impl UnsafeUnpin for DecisionRecordV1
impl UnwindSafe for DecisionRecordV1
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more