Skip to content

storage: Add upsert cargo-fuzz targets#37389

Merged
def- merged 1 commit into
MaterializeInc:mainfrom
def-:fuzz-suite-split-09-storage
Jul 10, 2026
Merged

storage: Add upsert cargo-fuzz targets#37389
def- merged 1 commit into
MaterializeInc:mainfrom
def-:fuzz-suite-split-09-storage

Conversation

@def-

@def- def- commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

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:

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-09-storage branch from bfc24d7 to 96eff49 Compare July 1, 2026 07:55
@def- def- force-pushed the fuzz-suite-split-08-persist-client branch from 2845250 to 9a09e37 Compare July 1, 2026 07:55
@def- def- force-pushed the fuzz-suite-split-09-storage branch from 96eff49 to 63d7e6f Compare July 1, 2026 08:01
@def- def- changed the base branch from fuzz-suite-split-08-persist-client to main July 1, 2026 09:39
@def- def- changed the base branch from main to fuzz-suite-split-08-persist-client July 1, 2026 09:39
@def- def- force-pushed the fuzz-suite-split-09-storage branch from 63d7e6f to 96a0536 Compare July 1, 2026 09:58
@def- def- force-pushed the fuzz-suite-split-08-persist-client branch from 9a09e37 to 4e451d9 Compare July 1, 2026 10:21
@def- def- marked this pull request as ready for review July 1, 2026 10:47
@def- def- requested a review from a team as a code owner July 1, 2026 10:47
def- added a commit that referenced this pull request Jul 1, 2026
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:
- 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 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-

def- commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

ready for review

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.

@martykulma martykulma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm, thanks @def- !

@def- def- force-pushed the fuzz-suite-split-09-storage branch from 96a0536 to 1642cb0 Compare July 10, 2026 15:37
@def- def- requested review from a team as code owners July 10, 2026 15:37
@def- def- changed the base branch from fuzz-suite-split-08-persist-client to main July 10, 2026 15:44
@def- def- requested review from a team as code owners July 10, 2026 15:44
@def- def- force-pushed the fuzz-suite-split-09-storage branch from 1642cb0 to 38b6200 Compare July 10, 2026 15:45
@def- def- enabled auto-merge (squash) July 10, 2026 15:46
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- def- merged commit ad9b00a into MaterializeInc:main Jul 10, 2026
123 checks passed
@def- def- deleted the fuzz-suite-split-09-storage branch July 10, 2026 16:07
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