Expand description
Cross-context coherence drift report schema.
Defines the per-context identity surfaces, the Skipped marker for
unavailable contexts, and the drift-diagnostic records emitted by
crate::coherence::probes::CoherenceProbe. All comparison logic
in this file is pure Rust with no I/O so it can be unit-tested
deterministically without booting Chrome.
§Feature flag
The coherence module is default-on and is always compiled as
part of the stygian-browser crate.
§Separation of hard failures vs known limitations
Drift is classified into two severity bands:
DriftSeverity::Hard— user-agent, platform, languages, andnavigator.webdriverMUST be identical across all contexts. Drift here is a strong anti-bot detection signal.DriftSeverity::KnownLimitation— fields likehardwareConcurrencyanddeviceMemoryare documented to differ between Document and Worker contexts in some browsers. Drift here is a known limitation, not a stealth regression.
Reports always carry both bands; callers can filter on
DriftSeverity to surface regressions only.
Structs§
- Coherence
Drift Report - Aggregate coherence drift report covering top-level, iframe, and (best-effort) worker contexts.
- Drift
Diagnostic - Single drift record describing one field that disagreed across two contexts.
- Identity
Surface - Identity surface probed in a single browser context.
Enums§
- Context
Kind - Logical browser context in which an identity surface was observed.
- Context
Observation - Result of probing a single context: either an observed
IdentitySurfaceor aSkippedmarker describing why the probe could not run. - Context
Pair - Pair of contexts to compare.
- Drift
Severity - Drift severity classification.
Functions§
- build_
report - Build a
CoherenceDriftReportfrom threeContextObservations by runningdiff_surfacesfor every applicable pair. - diff_
surfaces - Compare
aandb(bothObserved) and emit aVec<DriftDiagnostic>covering every disagreed field. Returns an empty vec whena == b. - field_
severity - Severity for a given field name.
- signature_
field_ names - Fields that contribute to
surface_signature. Exposed for callers that need to extend the contract. - surface_
signature - Compute a deterministic signature hash from an
IdentitySurface.