Skip to content

tests: Add shared cargo-fuzz runner#37381

Merged
def- merged 1 commit into
MaterializeInc:mainfrom
def-:fuzz-suite-split-01-infra
Jul 1, 2026
Merged

tests: Add shared cargo-fuzz runner#37381
def- merged 1 commit into
MaterializeInc:mainfrom
def-:fuzz-suite-split-01-infra

Conversation

@def-

@def- def- commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Replacement stack for #36982. This is part 1 of 10.

Summary:

  • Adds the shared cargo-fuzz workspace under test/cargo-fuzz.
  • Adds the mzcompose runner, shared proto dictionary, and root workspace notes.
  • Does not enable release-qualification CI yet.

Review notes:

  • The runner lists the full intended fuzz crate set. Later PRs in the stack add those crates.
  • Focus review on runner behavior, corpus handling, sharding, failure annotations, and workspace policy.

Verification:

Stack:

  1. tests: Add shared cargo-fuzz runner #37381 tests: Add shared cargo-fuzz runner
  2. tests: Expose fuzz-only internals #37382 tests: Expose fuzz-only internals
  3. sql-parser: Add cargo-fuzz targets #37383 sql-parser: Add cargo-fuzz targets
  4. expr, transform: Add cargo-fuzz targets #37384 expr, transform: Add cargo-fuzz targets
  5. repr, pgwire: Add cargo-fuzz targets #37385 repr, pgwire: Add cargo-fuzz targets
  6. avro, interchange: Add cargo-fuzz targets #37386 avro, interchange: Add cargo-fuzz targets
  7. storage-types: Add proto cargo-fuzz targets #37387 storage-types: Add proto cargo-fuzz targets
  8. persist-client: Add cargo-fuzz targets #37388 persist-client: Add cargo-fuzz targets
  9. storage: Add upsert cargo-fuzz targets #37389 storage: Add upsert cargo-fuzz targets
  10. ci: Run cargo-fuzz in release qualification #37390 ci: Run cargo-fuzz in release qualification

The original monolithic PR is #36982.

@def- def- force-pushed the fuzz-suite-split-01-infra branch from d5ce8c3 to 5e0b221 Compare July 1, 2026 09:56

@bosconi bosconi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@def- def- merged commit 4637c74 into MaterializeInc:main Jul 1, 2026
124 checks passed
@def- def- deleted the fuzz-suite-split-01-infra branch July 1, 2026 12:19
def- added a commit that referenced this pull request Jul 3, 2026
Replacement stack for #36982. This is part 5 of 10.

Summary:
- Adds repr fuzz targets for row, proto, strconv, JSONB, numeric,
interval, and range properties.
- Adds pgrepr, pgcopy, pgtz, and pgwire fuzz targets.
- Adds pgwire corpus preparation and dictionaries.

Review notes:
- Focus review on parser and codec assumptions for externally supplied
bytes or text.
- The pgwire target depends on the fuzz-only exports from part 2.

Verification:
- Split from original commit 082e197 and reapplied onto current
upstream/main.
- Top of stack has the same touched-file set as #36982 and passes git
diff --check.

Stack:
1. #37381 tests: Add shared cargo-fuzz runner
2. #37382 tests: Expose fuzz-only internals
3. #37383 sql-parser: Add cargo-fuzz targets
4. #37384 expr, transform: Add cargo-fuzz targets
5. #37385 repr, pgwire: Add cargo-fuzz targets
6. #37386 avro, interchange: Add cargo-fuzz targets
7. #37387 storage-types: Add proto cargo-fuzz targets
8. #37388 persist-client: Add cargo-fuzz targets
9. #37389 storage: Add upsert cargo-fuzz targets
10. #37390 ci: Run cargo-fuzz in release qualification

The original monolithic PR is #36982.
def- added a commit that referenced this pull request Jul 6, 2026
Replacement stack for #36982. This is part 2 of 10.

Summary:
- Adds fuzzing Cargo features for pgwire, persist-client, and storage.
- Adds cfg-gated fuzz_exports modules for fuzz targets.
- Switches two storage Inspect uses to InspectCore to avoid the macOS
trait-solver overflow hit by fuzz builds.

Review notes:
- This is the production-code review unit in the stack.
- The new APIs are feature-gated and documented as not being stable
public API.

Verification:
- Split from original commit 082e197 and reapplied onto current
upstream/main.
- Top of stack has the same touched-file set as #36982 and passes git
diff --check.

Stack:
1. #37381 tests: Add shared cargo-fuzz runner
2. #37382 tests: Expose fuzz-only internals
3. #37383 sql-parser: Add cargo-fuzz targets
4. #37384 expr, transform: Add cargo-fuzz targets
5. #37385 repr, pgwire: Add cargo-fuzz targets
6. #37386 avro, interchange: Add cargo-fuzz targets
7. #37387 storage-types: Add proto cargo-fuzz targets
8. #37388 persist-client: Add cargo-fuzz targets
9. #37389 storage: Add upsert cargo-fuzz targets
10. #37390 ci: Run cargo-fuzz in release qualification

The original monolithic PR is #36982.
def- added a commit that referenced this pull request Jul 10, 2026
Replacement stack for #36982. This is part 3 of 10.

Summary:
- Adds sql-parser cargo-fuzz crate.
- Adds the grammar target and the SQL parse, print, and reparse
round-trip target.
- Adds the grammar source used by the structured generator.

Review notes:
- Focus review on the SQL round-trip oracle and the generated statement
families.
- This PR intentionally contains only sql-parser fuzzing code.

Verification:
- Split from original commit 082e197 and reapplied onto current
upstream/main.
- Top of stack has the same touched-file set as #36982 and passes git
diff --check.

Stack:
1. #37381 tests: Add shared cargo-fuzz runner
2. #37382 tests: Expose fuzz-only internals
3. #37383 sql-parser: Add cargo-fuzz targets
4. #37384 expr, transform: Add cargo-fuzz targets
5. #37385 repr, pgwire: Add cargo-fuzz targets
6. #37386 avro, interchange: Add cargo-fuzz targets
7. #37387 storage-types: Add proto cargo-fuzz targets
8. #37388 persist-client: Add cargo-fuzz targets
9. #37389 storage: Add upsert cargo-fuzz targets
10. #37390 ci: Run cargo-fuzz in release qualification

The original monolithic PR is #36982.
def- added a commit that referenced this pull request Jul 10, 2026
Replacement stack for #36982. This is part 7 of 10.

Summary:
- Adds proto round-trip fuzz targets for catalog-protos and
storage-types.
- Adds external table-desc proto round-trip targets for MySQL,
PostgreSQL, and SQL Server utilities.
- Adds a CSV decode target in storage-types.

Review notes:
- Focus review on round-trip invariants and decode error handling for
serialized metadata.

Verification:
- Split from original commit 082e197 and reapplied onto current
upstream/main.
- Top of stack has the same touched-file set as #36982 and passes git
diff --check.

Stack:
1. #37381 tests: Add shared cargo-fuzz runner
2. #37382 tests: Expose fuzz-only internals
3. #37383 sql-parser: Add cargo-fuzz targets
4. #37384 expr, transform: Add cargo-fuzz targets
5. #37385 repr, pgwire: Add cargo-fuzz targets
6. #37386 avro, interchange: Add cargo-fuzz targets
7. #37387 storage-types: Add proto cargo-fuzz targets
8. #37388 persist-client: Add cargo-fuzz targets
9. #37389 storage: Add upsert cargo-fuzz targets
10. #37390 ci: Run cargo-fuzz in release qualification

The original monolithic PR is #36982.
def- added a commit that referenced this pull request Jul 10, 2026
Replacement stack for #36982. This is part 9 of 10.

Summary:
- Adds storage cargo-fuzz crate.
- Adds upsert consolidation, runtime, state consolidation, and value
round-trip targets.

Review notes:
- The targets use the fuzz-only upsert hook from part 2.
- Focus review on the modeled upsert state machine and the generated
command sequences.

Verification:
- Split from original commit 082e197 and reapplied onto current
upstream/main.
- Top of stack has the same touched-file set as #36982 and passes git
diff --check.

Stack:
1. #37381 tests: Add shared cargo-fuzz runner
2. #37382 tests: Expose fuzz-only internals
3. #37383 sql-parser: Add cargo-fuzz targets
4. #37384 expr, transform: Add cargo-fuzz targets
5. #37385 repr, pgwire: Add cargo-fuzz targets
6. #37386 avro, interchange: Add cargo-fuzz targets
7. #37387 storage-types: Add proto cargo-fuzz targets
8. #37388 persist-client: Add cargo-fuzz targets
9. #37389 storage: Add upsert cargo-fuzz targets
10. #37390 ci: Run cargo-fuzz in release qualification

The original monolithic PR is #36982.
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.

2 participants