Skip to main content

Module report

Module report 

Source
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, and navigator.webdriver MUST be identical across all contexts. Drift here is a strong anti-bot detection signal.
  • DriftSeverity::KnownLimitation — fields like hardwareConcurrency and deviceMemory are 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§

CoherenceDriftReport
Aggregate coherence drift report covering top-level, iframe, and (best-effort) worker contexts.
DriftDiagnostic
Single drift record describing one field that disagreed across two contexts.
IdentitySurface
Identity surface probed in a single browser context.

Enums§

ContextKind
Logical browser context in which an identity surface was observed.
ContextObservation
Result of probing a single context: either an observed IdentitySurface or a Skipped marker describing why the probe could not run.
ContextPair
Pair of contexts to compare.
DriftSeverity
Drift severity classification.

Functions§

build_report
Build a CoherenceDriftReport from three ContextObservations by running diff_surfaces for every applicable pair.
diff_surfaces
Compare a and b (both Observed) and emit a Vec<DriftDiagnostic> covering every disagreed field. Returns an empty vec when a == 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.