/** * Harness template for the `receiptedMutation` assembly arm. * * A receipted mutation declares an `input`/`output` schema pair (the receipt * CONTRACT) and optionally a typed `mutate` invocation handler plus a `faults` * table. The harness emits ONLY checks it can make real against what the * capsule actually exposes — never an `it.skip` stand-in: * * - **contract round-trip** — emitted when both schemas are * arbitrary-derivable (probed at compile time). Samples the input and * output arbitraries and asserts each survives a `decode(encode(x))` * round-trip. This proves the receipt contract is well-formed without any * runtime channel. * - **idempotent** + **audit receipt** — emitted ONLY when the capsule * exposes a `mutate` handler. The harness drives it twice with the same * sampled input (idempotency) and inspects the declared capabilities * (audit). A receipted mutation that instead declares the TYPED escape * hatch `receiptKind: 'effect-outcome'` (its receipt is the outcome of an * effect with no pure core to drive) records these as a documented, * machine-readable EXEMPTION carrying the declared `reason` — a waiver with * teeth, never a green `it.skip`. The receipt CONTRACT is still proven by * the round-trip above. (Under the mandatory-`mutate` rule a receipted * mutation must do ONE of these two — `defineCapsule` rejects neither.) * - **fault injection** — emitted ONLY when the capsule declares `faults`. * A capsule that declares no faults has no faults to prove reachable, so * the check is non-emitted (not skipped). * * Per memory: "no vanity tests" — a `() => true` stand-in pretending to * verify behavior, and a green `it.skip` shipping unwired work, are BOTH * banned. Every check here is either a real probe or an absent one with a * written reason. * * @module */ import type { CapsuleDef } from '../assembly.js'; import type { HarnessOutput, HarnessContext } from './pure-transform.js'; /** * Generate the test + bench file contents for a `receiptedMutation` capsule. * * The generated checks are gated on compile-time probe results carried in * {@link HarnessContext}: `contractRoundTrippable` (both schemas sampleable), * `mutatePresent` (typed invocation channel), and `faultsDeclared` (a faults * table). Each gate either emits a REAL `it(...)` block or emits nothing with * a documented reason — never `it.skip`. */ export declare function generateReceiptedMutation(cap: CapsuleDef<'receiptedMutation', unknown, unknown, unknown>, ctx?: HarnessContext): HarnessOutput; //# sourceMappingURL=receipted-mutation.d.ts.map