calternal_collab::history::adversarial
Reusable hostile-input probes for the #975 HistoryStore contract.
Slice A owns each concrete store and its conformance tests. This test-only module keeps the abuse cases reusable so the integration branch can run them against the segment store without copying test logic.
Source: crates/calternal-collab/src/history/adversarial.rs
Structs
Section titled “Structs”AdversarialLimits
Section titled “AdversarialLimits”pub struct AdversarialLimitsBounds memory use for a test run while setting the store’s update limit.
Fields
pub max_update_bytes: usizepub growth_updates: u16pub max_growth_bytes: u64
Implements: Clone, Copy, Debug
Source: crates/calternal-collab/src/history/adversarial.rs:14
AdversarialReport
Section titled “AdversarialReport”pub struct AdversarialReportResults returned after the hostile inputs complete without a privacy leak.
Fields
pub points_after_burst: usizepub bytes_after_burst: u64pub accepted_extreme_clock_points: u8
Implements: Clone, Copy, Debug, Eq, PartialEq
Source: crates/calternal-collab/src/history/adversarial.rs:22
Functions
Section titled “Functions”pub async fn probe<S: HistoryStore + ?Sized>( store: &S, owner: UserId, limits: AdversarialLimits,) -> Result<AdversarialReport>Run oversized-update, growth, clock, page-length and cross-User checks.
The caller supplies limits from the concrete store. Point order is always
by PointId, never wall-clock time. A foreign owner with the same item ID
must not read points, state, updates or byte usage (#975, DESIGN §61).
Source: crates/calternal-collab/src/history/adversarial.rs:33