import type pg from "pg"; import type { Actor, OwnershipModel, ProbeResult, SchemaSnapshot, SeedResult } from "../types.js"; export interface DataProbeOptions { /** * `read_only` runs only SELECT probes. Write probes are always wrapped in a * transaction that is rolled back, but a rollback does not un-fire a trigger, * so anything pointed at real data should stay read-only. */ mode: "read_only" | "full"; } /** * Attempt every crossing of the line, as an anonymous client and as a logged-in * stranger, and record what actually happened. * * The oracle is exact: we filter by the primary key of a row we planted * ourselves, so a returned row cannot be anything other than the other * persona's. There is no similarity matching and no judgement call. */ export interface DataProbeOutcome { probes: ProbeResult[]; /** * Tables we planted a row in but could not reliably point back at, so no * check was attempted and none should be claimed. */ unverifiable: { tableId: string; reason: string; }[]; /** * Actors whose role could not even be assumed, so every check that would * have run as them was skipped. Asymmetric collapse — the connecting user * can SET ROLE authenticated but not anon — must reach the verdict, or the * anon half of the suite silently disappears while the run stays green. */ actorFailures: { actor: Actor; role: string; error: string; }[]; } export declare function probeDataPlane(client: pg.PoolClient, snapshot: SchemaSnapshot, model: OwnershipModel, seedResult: SeedResult, opts: DataProbeOptions): Promise;