Skip to main content

Module probes

Module probes 

Source
Expand description

JavaScript probe definitions for cross-context identity surfaces.

Each probe is a self-contained JavaScript expression that evaluates to a JSON string matching the IdentitySurface schema (or a {"skipped":"..."} envelope when the context is unavailable).

All scripts:

  • Use old-style function () / var rather than arrow functions or let/const for broadest browser-engine compatibility.
  • Wrap reads in try/catch so a single missing field never aborts the whole probe.
  • Never panic; a context that cannot be probed returns {"skipped":"<reason>"} which super::ContextObservation decodes into a Skipped marker.

§Worker probe synchronous-busy-wait rationale

The worker probe posts a message to a Worker constructed from a Blob URL and then busy-waits on the main thread until the worker posts back its identity surface (or the deadline elapses). The busy-wait is bounded to a few hundred milliseconds — workers always reply in microseconds on a clean browser, and the timeout ensures the runner can never block indefinitely.

§Iframe probe srcdoc rationale

The iframe probe creates a same-origin <iframe> with a srcdoc payload. srcdoc iframes inherit the parent’s origin and provide a deterministic, network-free context for probing.

Structs§

CoherenceProbe
Runner that executes the cross-context identity probes via CDP and aggregates the results into a CoherenceDriftReport.