test: add CsCheck property-based fuzz suite (#115) - #228
Merged
Conversation
Adds tests/Wolfgang.Etl.TestKit.Tests.Fuzz (CsCheck) + a scheduled fuzz.yaml. Properties over the doubles' public surface: identity round-trips (extractor / transformer / loader move an arbitrary sequence through unchanged) and the SkipItemCount/MaximumItemCount windowing arithmetic (== Skip(s).Take(m) for arbitrary s/m, exercising the clamping boundaries where off-by-one / negative- width bugs hide). Per-PR runs ~1000 cases/property via the solution test (seconds); the weekly fuzz.yaml runs 1,000,000 and auto-files an issue with the replayable seed on falsification. Verified locally: 200,000 cases/property pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
# Conflicts: # ETL-Test-Kit.slnx
The cross-platform differential (#128) caught ExtractAsync_does_not_allocate_ per_item failing on linux-x64 while passing on linux-arm64 and windows-x64. GC.GetTotalAllocatedBytes is process-wide, so background allocation landing in a measurement window could exceed the 4 B/item budget on a shared runner. Hardened: settle GC/finalizers before each measurement, raise the marginal denominator (BaseCount 20k -> 50k, so 450k marginal items amortize a stray 1 MB spike to ~2.3 B/item), take the min of 5 attempts instead of 3, and raise the budget 4 -> 8 B/item — still an order of magnitude below a real per-item regression (boxing is ~24 B/item). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jul 29, 2026
This was referenced Aug 5, 2026
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.
Correcting another too-quick N/A. I said "no untrusted-input parsing" — but #115 is about property-based testing of methods with meaningful invariants, and the doubles have them: identity round-trips and the
SkipItemCount/MaximumItemCountwindowing arithmetic (exactly the integer-boundary logic CLAUDE.md warns about).What it does
tests/Wolfgang.Etl.TestKit.Tests.Fuzz(CsCheck) + a scheduledfuzz.yaml. Four properties:TestExtractor/TestTransformer/TestLoadermove an arbitraryintsequence through unchanged.Skip=s, Max=myields exactlySkip(s).Take(m)for arbitrarys/m, deliberately allowed to exceed the item count so the clamping boundaries (skip past end, s+m past end) are hammered.How it runs
ETL-Test-Kit.slnx.fuzz.yaml, SHA-pinned): 1,000,000 cases/property; auto-files an issue with CsCheck's replayable seed on falsification, so the failing case can be pinned as a deterministic regression.Verified
Locally: 200,000 cases/property pass (50K × 4). The windowing semantics (
Skip(s).Take(m)) validated against 50K random boundary cases. Ported from ETL-FixedWidth's fuzz pattern.Closes #115 when the vNext cycle merges to main.
🤖 Generated with Claude Code