Skip to content

feat: cargo-fuzz scaffolding for parser + solver + codegen (#138)#142

Open
avrabe wants to merge 1 commit intomainfrom
fix/138-cargo-fuzz-targets
Open

feat: cargo-fuzz scaffolding for parser + solver + codegen (#138)#142
avrabe wants to merge 1 commit intomainfrom
fix/138-cargo-fuzz-targets

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented Apr 23, 2026

Summary

  • Adds fuzz/ with three libfuzzer-sys targets: parser, solver, codegen-roundtrip
  • New CI: fuzz-smoke (60s/target on PRs) + fuzz-nightly.yml (1h/target daily, corpus cached)
  • Rivet traceability in artifacts/verification.yaml

Targets

Target Calls into Bound
fuzz_aadl_parse spar_syntax::parse UTF-8 only, ≤64 KiB input
fuzz_scheduler_solver spar_solver::milp::solve_milp ≤8 tasks, ≤4 processors
fuzz_codegen_roundtrip spar_codegen::generate fixed AADL fixture, varied CodegenConfig

Notes

  • cargo fuzz build was not run locally (sandbox denied cargo). The fuzz-smoke CI job is the backstop.
  • verifications: was the originally-spec'd YAML key; the file actually uses artifacts: — entries added under the existing key.
  • IDs used: FUZZ-PARSER, FUZZ-SOLVER, FUZZ-CODEGEN linking to the real REQ-* IDs found in artifacts/requirements.yaml.

Test plan

  • fuzz-smoke CI job passes (compiles + 60s soak per target)
  • rivet validate clean
  • Three PR-checks (Format, Clippy, Test) green

🤖 Generated with Claude Code

Adds `fuzz/` with three libfuzzer-sys harnesses and the CI plumbing to
gate them:

- `fuzz_aadl_parse`         arbitrary bytes -> `spar_syntax::parse`
- `fuzz_scheduler_solver`   bounded `TaskSet` -> `solve_milp`
- `fuzz_codegen_roundtrip`  deterministic AADL + arbitrary knobs -> `generate`

CI:
- `fuzz-smoke` job in ci.yml runs 60s per target on PRs
- `fuzz-nightly.yml` runs 1h per target daily at 03:00 UTC, caches and uploads corpus

Traceability in `artifacts/verification.yaml`: `FUZZ-PARSER`, `FUZZ-SOLVER`,
`FUZZ-CODEGEN` link to existing REQ-PARSE-*, REQ-PARSER-*, REQ-SOLVER-*,
REQ-CODEGEN-* requirements.

Closes #138.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant