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.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120//! What://! Shared support for the `monochromatic-jsonc-edit` fuzz sidecar.//! Why://! Every target needs the same structured generator and the same invariant checks,//! so they//! live here once instead of being copied into each harness.//!//! Raw bytes almost never form valid JSONC,//! so the generator builds documents from unstructured//! input and the targets assert properties over the result rather than hoping for lucky parses.
/// What:/// Structured document and path generators built on `arbitrary`./// Why:/// Coverage comes from valid and near-valid JSONC shapes,/// not from random noise.////// In TS you'd write (pseudocode):/// ```ts/// export * as generators from './generators';/// ```pub mod generators;
/// What:/// Property checks shared by every fuzz target./// Why:/// One implementation of "canonical emission is stable" keeps the targets honest about/// asserting the same contract the unit and fixture suites assert.////// In TS you'd write (pseudocode):/// ```ts/// export * as invariants from './invariants';/// ```pub mod invariants;
/// What:/// Address selection over a parsed document./// Why:/// Edit targets must address members that exist,/// chosen by the fuzzer rather than guessed.////// In TS you'd write (pseudocode):/// ```ts/// export * as pathPick from './pathPick';/// ```pub mod path_pick;
/// What:/// Re-export the generated document type./// Why:/// Targets import one name instead of reaching into the module.////// In TS you'd write (pseudocode):/// ```ts/// export { GeneratedDocument } from './generators';/// ```pub use generators::GeneratedDocument;
/// What:/// Re-export the shared invariant checks./// Why:/// Targets read as a list of properties rather than a list of module paths.////// In TS you'd write (pseudocode):/// ```ts/// export { assertCanonicalStability, assertCommentsPreserved, assertDepthBound, assertTreesEqual } from './invariants';/// ```pub use invariants::{ assert_canonical_stability, assert_comments_preserved, assert_depth_bound, assert_trees_equal, collect_comments,};
/// What:/// Re-export address selection./// Why:/// Edit targets need it and nothing else from that module.////// In TS you'd write (pseudocode):/// ```ts/// export { randomPath } from './pathPick';/// ```pub use path_pick::random_path;
/// What:/// Generator unit tests./// Why:/// A campaign is only as trustworthy as the documents its generator produces.////// In TS you'd write (pseudocode):/// ```ts/// import './generators.test';/// ```#[cfg(test)]mod generators_tests;
/// What:/// Invariant unit tests,/// including the negative controls that prove each check can fail./// Why:/// An invariant that cannot fail turns a clean campaign into silence rather than evidence.////// In TS you'd write (pseudocode):/// ```ts/// import './invariants.test';/// ```#[cfg(test)]mod invariants_tests;
/// What:/// Address-selection unit tests./// Why:/// The edit campaign depends on drawn addresses resolving.////// In TS you'd write (pseudocode):/// ```ts/// import './pathPick.test';/// ```#[cfg(test)]mod path_pick_tests;