test: YAML + CLI fuzzer targets + empirical evidence for 5 silent-accept bugs#160
Merged
test: YAML + CLI fuzzer targets + empirical evidence for 5 silent-accept bugs#160
Conversation
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Rivet Criterion Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: 8738aad | Previous: 571816f | Ratio |
|---|---|---|---|
store_insert/100 |
80746 ns/iter (± 914) |
65346 ns/iter (± 499) |
1.24 |
store_insert/1000 |
854892 ns/iter (± 7696) |
702590 ns/iter (± 3980) |
1.22 |
store_insert/10000 |
16034908 ns/iter (± 897633) |
10122271 ns/iter (± 362822) |
1.58 |
store_lookup/100 |
2142 ns/iter (± 76) |
1475 ns/iter (± 9) |
1.45 |
store_lookup/1000 |
25382 ns/iter (± 855) |
18463 ns/iter (± 37) |
1.37 |
store_lookup/10000 |
349342 ns/iter (± 7974) |
265125 ns/iter (± 1804) |
1.32 |
store_by_type/100 |
95 ns/iter (± 0) |
75 ns/iter (± 0) |
1.27 |
store_by_type/1000 |
95 ns/iter (± 0) |
75 ns/iter (± 0) |
1.27 |
store_by_type/10000 |
95 ns/iter (± 0) |
75 ns/iter (± 0) |
1.27 |
schema_load_and_merge |
999222 ns/iter (± 16246) |
769017 ns/iter (± 2168) |
1.30 |
link_graph_build/100 |
164599 ns/iter (± 756) |
129223 ns/iter (± 877) |
1.27 |
link_graph_build/1000 |
1921416 ns/iter (± 12074) |
1472888 ns/iter (± 15526) |
1.30 |
validate/100 |
112358 ns/iter (± 580) |
83228 ns/iter (± 360) |
1.35 |
validate/1000 |
948522 ns/iter (± 4774) |
732151 ns/iter (± 3463) |
1.30 |
traceability_matrix/100 |
4254 ns/iter (± 48) |
3199 ns/iter (± 7) |
1.33 |
traceability_matrix/1000 |
58903 ns/iter (± 339) |
34614 ns/iter (± 355) |
1.70 |
traceability_matrix/10000 |
799409 ns/iter (± 27154) |
560685 ns/iter (± 6804) |
1.43 |
diff/100 |
62566 ns/iter (± 369) |
47444 ns/iter (± 80) |
1.32 |
diff/1000 |
688686 ns/iter (± 3265) |
515789 ns/iter (± 2510) |
1.34 |
diff/10000 |
9149866 ns/iter (± 582888) |
6011153 ns/iter (± 47701) |
1.52 |
query/100 |
808 ns/iter (± 27) |
568 ns/iter (± 3) |
1.42 |
query/1000 |
7413 ns/iter (± 44) |
5042 ns/iter (± 10) |
1.47 |
query/10000 |
109151 ns/iter (± 773) |
69334 ns/iter (± 172) |
1.57 |
document_parse/10 |
23343 ns/iter (± 376) |
16739 ns/iter (± 69) |
1.39 |
document_parse/100 |
164344 ns/iter (± 561) |
117089 ns/iter (± 327) |
1.40 |
document_parse/1000 |
1524974 ns/iter (± 10656) |
1082997 ns/iter (± 5475) |
1.41 |
This comment was automatically generated by workflow using github-action-benchmark.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
1701302 to
c859444
Compare
5 tasks
6061095 to
06642ed
Compare
Adds three libfuzzer-based targets under fuzz/ that empirically measure
the arxiv:2604.13108 "YAML silently corrupts ~50% of structural errors"
claim against rivet's actual artifact-ingest pipeline, plus a CLI argv
target and an id-roundtrip target.
Targets:
* yaml_footguns — Arbitrary-driven adversarial mutations of a known
valid seed YAML (Norway, version-coercion, leading-zero-id,
unquoted-date, duplicate-key, tab-indent, multi-doc, null-shorthand
link, unknown top-level key, anchor cycle, deep nesting, control
chars in id). Five oracles: source-substring invariant for ids /
types / link targets, phantom-link detection, null-ish target
detection, serde-rejected-but-hir-accepted detection, and
multi-document truncation detection.
* cli_argv — structured argv for rivet-cli subprocess; oracle
fails on signal-death or when --format json returns success with
non-JSON stdout. Gated on $RIVET_BIN env var so it skips silently
if no binary is configured.
* artifact_ids — arbitrary bytes as id: scalar; oracle requires
Store::insert → Store::get to round-trip byte-exact.
Also adds fuzz/examples/oracle_smoke.rs — a non-libfuzzer harness that
runs the same oracle logic against a fixed set of Mythos-predicted
footgun inputs. Running `cargo run --release --example oracle_smoke`
(before cargo-fuzz is available in CI) produces five findings on
current main, empirically confirming:
- null / tilde / empty-string link targets produce phantom links
(yaml_hir.rs:530-549 bug class)
- multi-document YAML is silently truncated by the HIR path
(yaml_cst.rs:517 bug class)
- renaming `artifacts:` to a sibling key causes the HIR path to
return Ok(vec![]) with zero diagnostics (formats/generic.rs:138)
CI: .github/workflows/fuzz.yml runs each target for 15 min on push to
main and nightly at 06:17 UTC. continue-on-error so new crashes do
not block merges; crashes upload as workflow artifacts and the evolved
corpus is cached between runs.
REQ-052 is scoped to variant-solver fuzzing; these YAML/CLI fuzzers
verify the broader parser surface (REQ-028) and CLI surface (REQ-007).
Verifies: REQ-028, REQ-007
Refs: REQ-052
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
06642ed to
8738aad
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this ships
`cargo-fuzz` + `Arbitrary` targets for rivet's artifact ingest + CLI surface:
Empirical findings on current main
The oracle smoke harness ran and found 5 silent-accept bugs, matching every Mythos-predicted failure mode:
These settle the arxiv:2604.13108 50%-silent-corruption claim empirically on our own corpus. 5 of 12 curated footguns silently pass.
Test plan
🤖 Generated with Claude Code