Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/Aquaticat/Monochromatic. TypeScript and Rust monorepo: Claude Code and Pi coding-agent plugins, a m
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091/** Deterministic coverage driver for the module-logger fuzz coverage gate.
Imports the runtime package's source through its `/ts` subpath, so V8 coverage attributes to `package/module/logger/src`, and replays fixed scenarios through every orchestration branch and every Node-reachable sink branch. Run under `NODE_V8_COVERAGE` (and `--localstorage-file`, so the localStorage sink elects) by the `fuzz:coverage` task, then summarized by `coverage-report.ts`.
A reachability harness, not an oracle: it asserts nothing, because the property suite owns correctness. Console output, breadcrumbs included, is silenced for the run so the gate's log stays readable; every breadcrumb this driver provokes is deliberate.
@module */
import { exerciseConsoleSink, } from './coverage-console.ts';import { exerciseKeysAndQuota, } from './coverage-keys-quota.ts';import { exerciseNodeSinks, } from './coverage-node-sinks.ts';import { exerciseOrchestration, } from './coverage-orchestration.ts';import { exerciseWebStorageSinks, } from './coverage-web-storage.ts';
/** Console methods the sinks and breadcrumbs can call. */const CONSOLE_METHODS = [ 'debug', 'error', 'info', 'trace', 'warn',] as const;
/** Stands in for every console method during the run. */function ignoreOutput(): void { // The gate reads coverage, not output.}
/** Replaces every console method with a no-op for the run; disposing restores them.
@returns Disposable restoring the original methods.
@example ```ts using _quiet = silenceConsole(); ``` */function silenceConsole(): Disposable { /** Original methods by name. */ const originals = new Map<string, unknown>(); for (const method of CONSOLE_METHODS) { originals.set( method, console[method], ); console[method] = ignoreOutput; } return { [Symbol.dispose](): void { for (const [method, original,] of originals) Object.defineProperty( console, method, { configurable: true, value: original, writable: true, }, ); }, };}
/** Console silence held for the whole run. */using _quiet = silenceConsole();await exerciseOrchestration();await exerciseConsoleSink();await exerciseNodeSinks();await exerciseWebStorageSinks();exerciseKeysAndQuota();