Skip to content

Add property/fuzz tests, Go -race and a coverage report to the gate #54

Closed

Description

@sinkog

The gate (.github/workflows/gate.yml) runs rustfmt, clippy -D warnings, cargo test --workspace, gofmt, go vet and go test. It has no property/fuzz testing, no Go race detector and no coverage report. #52 (a panic and a silent duplicate-key corruption reachable through the public API) is exactly what a generator over Value finds in seconds.

Proposal

  1. Property / differential fuzzing: arbitrary YAML/JSON → reader → canonical → digest in Rust, compared with the Go result on the same input (extends the existing conformance/differential/ corpus idea with generated inputs). Properties to assert: no panic for any input the reader accepts and for any Value constructible through the public API; canonical output is valid JSON with sorted unique keys; canonical(canonical(x)) == canonical(x); Rust digest == Go digest.
    • Rust: proptest (runs in the normal cargo test, fixed case count in CI) and/or cargo-fuzz targets run on a schedule.
    • Go: native testing.F fuzz targets plus a seed corpus shared with Rust.
  2. Go -race: go test -race ./... in the gate.
  3. Coverage report (cargo llvm-cov / go test -cover) published in the job summary first; add a floor only after seeing the baseline, and ratchet it up, never down.
  4. Counterexamples found by the fuzzers are added to the differential corpus as vectors.

Depends on #52 so the first fuzz run is not red on a known bug; #53 (private fields) will shrink the fuzz surface further but is not a prerequisite.

Acceptance

Activity

  1. sinkog commented on Oct 17, 2026

    @sinkog
    MemberAuthor

    Resolved by #59 (merge 463ffde). Property/fuzz tests, Go -race and the coverage report are part of the gate. The first manual fuzz.yml run on main (20 000 cases per property, 30 s Go fuzz) succeeded; the scheduled run is Mondays 03:17 UTC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions