[READ-ONLY] Mirror of https://github.com/Aquaticat/Monochromatic. TypeScript and Rust monorepo: Claude Code and Pi coding-agent plugins, a m
README.md

@monochromatic-dev/module-jsonc-edit.fuzz #

Fuzz and coverage-gate sidecar for @monochromatic-dev/module-jsonc-edit, kept out of the runtime package so its src/ stays pure production code (and a whole-package mutation run stays scoped to real runtime files).

It holds:

  • Fast-check property tests (*.property.unit.test.ts): round-trip idempotency, and the STB comment-safety guard proving an arbitrary comment body always emits parseable, fixpoint JSONC.
  • fuzz-budget.ts: the per-property run count, overridable with JSONC_EDIT_FUZZ_RUNS.
  • The deterministic V8 coverage-reachability gate (coverage-driver.ts, coverage-report.ts, coverage-baseline.json): counts covered functions per runtime source file and fails on any per-file regression.

Run #

# Property tests at the default run budget (also runs under test:unit):
mise run //package/module/jsonc-edit.fuzz:test:unit

# Longer fast-check campaign (default 5000 runs per property):
mise run //package/module/jsonc-edit.fuzz:fuzz
mise run //package/module/jsonc-edit.fuzz:fuzz --runs 20000

# Coverage-reachability gate (check against the frozen baseline):
mise run //package/module/jsonc-edit.fuzz:fuzz:coverage
# Refreeze the baseline after intentionally adding reachable runtime functions:
mise run //package/module/jsonc-edit.fuzz:fuzz:coverage --write

The gate measures the runtime package's src/ reachability, not this sidecar: its SOURCE_MARKER targets package/module/jsonc-edit/src.