pub struct BatchAssertions {
pub tool_names_in_batch: Vec<String>,
pub has_memory_excerpt: bool,
pub excerpt_labels: Vec<String>,
}Expand description
Batch-level compaction assertions for typed-page enforcement.
Unlike per-page PageInvariant which checks one page against its compacted form,
batch assertions verify aggregate properties of the entire summary against the set
of classified pages that were sent to the LLM.
Violations are observational — they never block compaction. They are logged and emitted to the audit trail.
§Examples
use zeph_context::typed_page::BatchAssertions;
let assertions = BatchAssertions {
tool_names_in_batch: vec!["shell".to_string()],
has_memory_excerpt: false,
excerpt_labels: vec![],
};
// Summary that mentions the tool — all assertions pass.
let violations = assertions.check("shell ran and exited 0");
assert!(violations.is_empty());Fields§
§tool_names_in_batch: Vec<String>Tool names collected from ToolOutput pages in the batch.
has_memory_excerpt: boolWhether any MemoryExcerpt pages were in the batch.
excerpt_labels: Vec<String>Source labels from MemoryExcerpt pages.
Implementations§
Source§impl BatchAssertions
impl BatchAssertions
Sourcepub fn check(&self, summary: &str) -> Vec<BatchViolation>
pub fn check(&self, summary: &str) -> Vec<BatchViolation>
Check the summary against batch-level assertions.
Returns a list of assertion failures (empty = all pass). Failures are never fatal.
Trait Implementations§
Source§impl Clone for BatchAssertions
impl Clone for BatchAssertions
Source§fn clone(&self) -> BatchAssertions
fn clone(&self) -> BatchAssertions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BatchAssertions
impl Debug for BatchAssertions
Source§impl Default for BatchAssertions
impl Default for BatchAssertions
Source§fn default() -> BatchAssertions
fn default() -> BatchAssertions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BatchAssertions
impl RefUnwindSafe for BatchAssertions
impl Send for BatchAssertions
impl Sync for BatchAssertions
impl Unpin for BatchAssertions
impl UnsafeUnpin for BatchAssertions
impl UnwindSafe for BatchAssertions
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