pub struct SummaryRequest {
pub model_name: String,
pub prompt_template_blake3: String,
pub source_claims: Vec<SourceClaim>,
pub max_output_bytes: Option<usize>,
pub decay_job_id: Option<String>,
}Expand description
Input to a SummaryBackend::summarize call.
Field shape is deliberately small. The two pins (model_name,
prompt_template_blake3) come from the operator-signed attestation
envelope at cortex_memory::decay::summary::LlmSummaryOperatorAttestationEnvelope
so the backend’s allowlist check is structurally bound to the same
signed authority surface.
Fields§
§model_name: StringPinned model name (e.g. claude-sonnet-4-7@1). Backends MUST refuse
if their resolved model is not on the local allowlist; the
ReplaySummaryBackend refuses on exact-string mismatch with the
fixture key.
prompt_template_blake3: StringPinned BLAKE3 digest (prefixed blake3:) of the prompt template
that will be sent. Backends MUST refuse on mismatch with their
resolved template before any call.
source_claims: Vec<SourceClaim>Source claims in the order the decay-job manifest lists them. The fixture and any hosted backend MAY reorder internally but MUST NOT drop entries.
max_output_bytes: Option<usize>Optional byte budget on the produced summary. Backends MAY truncate or refuse on exceedance; the decay path will always re-check the produced length downstream.
decay_job_id: Option<String>Optional decay job id stamped onto the request for correlation / fixture key derivation. The fixture backend keys on the canonical request bytes, so two calls with the same model, prompt, and sources collide unless this field disambiguates them.
Implementations§
Source§impl SummaryRequest
impl SummaryRequest
Sourcepub fn request_hash(&self) -> String
pub fn request_hash(&self) -> String
Stable BLAKE3 hash over the canonicalised request fields. The hash
is the lookup key for the ReplaySummaryBackend fixture map and
is also a useful audit-correlation hint.
Hash domain is cortex.llm.summary.request.v1 so a captured hash
cannot collide with the crate::LlmRequest::prompt_hash domain.
Trait Implementations§
Source§impl Clone for SummaryRequest
impl Clone for SummaryRequest
Source§fn clone(&self) -> SummaryRequest
fn clone(&self) -> SummaryRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more