pub struct SignedAbReportV1 {
pub schema_version: u32,
pub kind: String,
pub created_at: String,
pub lean_ctx_version: String,
pub agent_id: String,
pub determinism_digest: String,
pub verdict: Verdict,
pub report: AbReport,
pub signer_public_key: Option<String>,
pub signature: Option<String>,
}Expand description
A signed A/B quality attestation.
Fields§
§schema_version: u32§kind: String§created_at: String§lean_ctx_version: String§agent_id: String§determinism_digest: StringMachine-independent digest over the run evidence (see module docs).
verdict: VerdictCopied out of the report so a verifier sees the conclusion without parsing stats.
report: AbReportThe full report (records + stats + provenance).
signer_public_key: Option<String>Ed25519 public key (hex). None until signed.
signature: Option<String>Ed25519 signature over the canonical bytes (hex). None until signed.
Implementations§
Source§impl SignedAbReportV1
impl SignedAbReportV1
Sourcepub fn from_report(report: AbReport, agent_id: &str) -> Self
pub fn from_report(report: AbReport, agent_id: &str) -> Self
Builds an unsigned artifact from a finished report.
Sourcepub fn canonical_bytes(&self) -> Result<Vec<u8>, String>
pub fn canonical_bytes(&self) -> Result<Vec<u8>, String>
Deterministic bytes that get signed/verified: the whole struct with the signature fields cleared (identical on sign + verify regardless of JSON float formatting).
Sourcepub fn sign(&mut self, agent_id: &str) -> Result<(), String>
pub fn sign(&mut self, agent_id: &str) -> Result<(), String>
Signs with the persistent machine identity (agent_identity keystore).
Sourcepub fn sign_with_key(&mut self, key: &SigningKey) -> Result<(), String>
pub fn sign_with_key(&mut self, key: &SigningKey) -> Result<(), String>
Signs with an explicit key (used by sign and hermetic tests).
Sourcepub fn verify(&self) -> AbVerifyResult
pub fn verify(&self) -> AbVerifyResult
Verifies the embedded signature and recomputes the determinism digest — offline.
Trait Implementations§
Source§impl Clone for SignedAbReportV1
impl Clone for SignedAbReportV1
Source§fn clone(&self) -> SignedAbReportV1
fn clone(&self) -> SignedAbReportV1
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SignedAbReportV1
impl Debug for SignedAbReportV1
Source§impl<'de> Deserialize<'de> for SignedAbReportV1
impl<'de> Deserialize<'de> for SignedAbReportV1
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>,
Source§impl PartialEq for SignedAbReportV1
impl PartialEq for SignedAbReportV1
Source§fn eq(&self, other: &SignedAbReportV1) -> bool
fn eq(&self, other: &SignedAbReportV1) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for SignedAbReportV1
impl Serialize for SignedAbReportV1
impl StructuralPartialEq for SignedAbReportV1
Auto Trait Implementations§
impl Freeze for SignedAbReportV1
impl RefUnwindSafe for SignedAbReportV1
impl Send for SignedAbReportV1
impl Sync for SignedAbReportV1
impl Unpin for SignedAbReportV1
impl UnsafeUnpin for SignedAbReportV1
impl UnwindSafe for SignedAbReportV1
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more