Skip to main content

ControlReceipt

Struct ControlReceipt 

Source
pub struct ControlReceipt {
Show 30 fields pub schema_version: String, pub receipt_id: ControlReceiptId, pub action_kind: ControlActionKind, pub case_id: Option<VerificationCaseId>, pub plan_id: Option<CheckPlanId>, pub trace_ctx: TraceCtx, pub attempt_id: AttemptId, pub trial_id: Option<TrialId>, pub actor: String, pub planner_stage: Option<String>, pub started_at: String, pub finished_at: String, pub citation: V25CitationContext, pub obligation_refs: V25ControlObligationRefs, pub citation_status: ConstitutionalContextStatus, pub obligation_refs_status: ConstitutionalContextStatus, pub deadline: Option<String>, pub workload_class: Option<String>, pub budget_context: Option<ReceiptBudgetContext>, pub parent_receipt_id: Option<ControlReceiptId>, pub family_receipt_id: Option<ControlReceiptId>, pub replay_parent_receipt_id: Option<ControlReceiptId>, pub retry_owner: Option<ControlRetryOwnerV1>, pub non_authoritative: bool, pub advisory_only: bool, pub degraded: bool, pub promotable: bool, pub source_receipt_kind: String, pub source_receipt_id: Option<String>, pub details: Value,
}
Expand description

An immutable receipt recording a control-plane action with full provenance.

Control receipts carry constitutional citation context, budget context, retry ownership, and promotion eligibility. They are the atomic audit unit for the verification ledger.

Fields§

§schema_version: String§receipt_id: ControlReceiptId§action_kind: ControlActionKind§case_id: Option<VerificationCaseId>§plan_id: Option<CheckPlanId>§trace_ctx: TraceCtx§attempt_id: AttemptId§trial_id: Option<TrialId>§actor: String§planner_stage: Option<String>§started_at: String§finished_at: String§citation: V25CitationContext§obligation_refs: V25ControlObligationRefs§citation_status: ConstitutionalContextStatus§obligation_refs_status: ConstitutionalContextStatus§deadline: Option<String>§workload_class: Option<String>§budget_context: Option<ReceiptBudgetContext>§parent_receipt_id: Option<ControlReceiptId>§family_receipt_id: Option<ControlReceiptId>§replay_parent_receipt_id: Option<ControlReceiptId>§retry_owner: Option<ControlRetryOwnerV1>§non_authoritative: bool§advisory_only: bool§degraded: bool§promotable: bool§source_receipt_kind: String§source_receipt_id: Option<String>§details: Value

Implementations§

Source§

impl ControlReceipt

Source

pub fn new_case_execution( case: &VerificationCase, plan: &CheckPlan, attempt: &VerificationAttempt, promotable: bool, details: Value, ) -> Self

Creates a verification execution receipt with explicit missing constitutional context status.

Source

pub fn validate(&self) -> Result<(), String>

Rejects receipts whose constitutional status payload or promotability claims are incoherent.

Trait Implementations§

Source§

impl Clone for ControlReceipt

Source§

fn clone(&self) -> ControlReceipt

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ControlReceipt

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ControlReceipt

Source§

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 Eq for ControlReceipt

Source§

impl From<&ForgeToolReceiptV2> for ControlReceipt

Source§

fn from(value: &ForgeToolReceiptV2) -> Self

Converts to this type from the input type.
Source§

impl From<&ToolReceipt> for ControlReceipt

Source§

fn from(value: &ToolReceipt) -> Self

Converts to this type from the input type.
Source§

impl JsonSchema for ControlReceipt

Source§

fn schema_name() -> String

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn is_referenceable() -> bool

Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more
Source§

impl PartialEq for ControlReceipt

Source§

fn eq(&self, other: &ControlReceipt) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for ControlReceipt

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ControlReceipt

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more