pub struct CompositionAudit {
pub entries: Vec<AuditEntry>,
pub global_budget: u32,
pub tokens_used: u32,
}Expand description
The record of how a composed prompt was assembled (issue #15): one
AuditEntry per frame the host offered, the budget it was packed against,
and the canonical token cost actually used. The audit is a total
partition — every offered frame is either included or excluded with a
reason — so a host can answer “why is this evidence not in the prompt?” and
“why is the prompt within budget?” from the record alone.
Fields§
§entries: Vec<AuditEntry>One entry per offered frame; included or excluded-with-reason.
global_budget: u32The global token budget the composition was packed against.
tokens_used: u32The summed canonical token cost of the included frames — always
<= global_budget.
Implementations§
Source§impl CompositionAudit
impl CompositionAudit
Sourcepub fn included(&self) -> impl Iterator<Item = &FrameId>
pub fn included(&self) -> impl Iterator<Item = &FrameId>
The identities that made it into the prompt.
Sourcepub fn excluded(&self) -> impl Iterator<Item = &AuditEntry>
pub fn excluded(&self) -> impl Iterator<Item = &AuditEntry>
The excluded entries, each with its reason.
Sourcepub fn explains_every_drop(&self) -> bool
pub fn explains_every_drop(&self) -> bool
Whether every excluded frame carries a concrete reason — true by construction (the type makes a reasonless exclusion unrepresentable), and asserted by host-conformance so the guarantee is checked, not assumed.
Trait Implementations§
Source§impl Clone for CompositionAudit
impl Clone for CompositionAudit
Source§fn clone(&self) -> CompositionAudit
fn clone(&self) -> CompositionAudit
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more