/** * Harness template for the `siteAdapter` assembly arm — LANE-AWARE. * * A `siteAdapter` capsule converts between native host objects and czap * representations and declares the host `site`s it runs under. Its two * canonical checks live in different lanes, and BOTH are real (the owner's * decision — lane-aware, real everywhere): * * - **round-trip equality → UNIT lane** (`.test.ts`, `pnpm test`). The adapter's * `native -> czap -> native` transform is pure: czap's canonical serialization * (`CanonicalCbor.encode` → `decode`) is the round trip, and structure is * preserved iff the canonical {@link contentAddressOf} of the decoded value * equals the original's. Inputs are sampled from the adapter's own schema via * the canonical `schemaToArbitrary` walker — NOT a hand-rolled deep-equal, NOT * a hand-built fixture. A real `it()` with a fast-check property. * - **host capability matrix → INTEGRATION lane** * (`tests/generated/integration/.test.ts`). Asserts each declared `site` * actually supports the adapter under a REAL host. The owner's rule is NO MOCKS * ON THE HOST PATH, so there is no in-process-double driver: the matrix is a * `declared-integration` waiver WITH TEETH that links each covered site to a * NAMED real-host lane that already exists (and asserts that lane's file exists * AND references the adapter, so the link fails RED if the proof rots). A * declared site with no real-host lane is recorded as an honest tracked GAP — * never papered over with a simulated host. * * Per the harness LAW (memory: "no placeholders ever", "no vanity tests"): an * `it.skip` shipping unwired work green and a `() => true` placeholder are BOTH * banned. Where a check genuinely cannot apply, it is recorded as a TYPED, * machine-readable exemption carrying its reason (the `not-applicable` / * `declared-integration` precedents), never a skip and never a silent omission. * * @module */ import type { CapsuleDef } from '../assembly.js'; import type { HarnessLane } from './scene-composition.js'; import type { HarnessOutput, HarnessContext } from './pure-transform.js'; /** * Resolution of one declared siteAdapter check. Either the check is WIRED real * into its lane, or it is a typed `declared-integration` exemption (a coverage * link to a real existing suite), or a `not-applicable` exemption with a reason. * There is no skip variant by construction — a skip is exactly the thing the * harness LAW forbids. */ export type SiteAdapterCheckDisposition = { readonly status: 'declared-integration'; readonly lane: HarnessLane; /** Real-host coverage links — each a named existing suite proving a site set. */ readonly coverage: ReadonlyArray<{ readonly sites: readonly string[]; readonly coverageRef: string; }>; /** Declared sites with no real-host lane — tracked gaps, never fabricated. */ readonly gaps: ReadonlyArray<{ readonly site: string; readonly reason: string; }>; } | { readonly status: 'not-applicable'; readonly lane: HarnessLane; readonly reason: string; }; /** * The two canonical siteAdapter checks and the lane each runs in. The `lane` * here is the DECLARATIVE lane model: round-trip is a pure unit check; the host * capability matrix is an integration check. The driver * (`scripts/capsule-compile.ts`) resolves each to a concrete disposition. */ export declare const SITE_ADAPTER_CHECKS: readonly [{ readonly id: "round-trip-equality"; readonly lane: "unit"; readonly title: "round-trip equality: native -> czap -> native preserves structure"; }, { readonly id: "host-capability-matrix"; readonly lane: "integration"; readonly title: "host capability matrix: each declared site supports the adapter"; }]; /** * The structural shape the driver resolves for a siteAdapter capsule (mirrors * {@link HarnessContext.siteAdapter}). Kept here as the named export the driver * imports; the inline copy in `pure-transform.ts` avoids a circular import. */ export type SiteAdapterDriver = NonNullable; /** * Generate the test + bench (+ integration) file contents for a `siteAdapter` * capsule. When the driver resolved a {@link HarnessContext.siteAdapter}, both * checks are emitted real-in-lane; without it (no binding wired) the capsule * falls back to a typed self-reporting form — never an `it.skip` placeholder. */ export declare function generateSiteAdapter(cap: CapsuleDef<'siteAdapter', unknown, unknown, unknown>, ctx?: HarnessContext): HarnessOutput; //# sourceMappingURL=site-adapter.d.ts.map