Skip to content

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

pub struct AdversarialLimits

Bounds memory use for a test run while setting the store’s update limit.

Fields

  • pub max_update_bytes: usize
  • pub growth_updates: u16
  • pub max_growth_bytes: u64

Implements: Clone, Copy, Debug

Source: crates/calternal-collab/src/history/adversarial.rs:14

pub struct AdversarialReport

Results returned after the hostile inputs complete without a privacy leak.

Fields

  • pub points_after_burst: usize
  • pub bytes_after_burst: u64
  • pub accepted_extreme_clock_points: u8

Implements: Clone, Copy, Debug, Eq, PartialEq

Source: crates/calternal-collab/src/history/adversarial.rs:22

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