SC-15: test suite, benchmarks, and CI/CD pipeline - #17
Merged
Conversation
Real-rsync comparison tests (basic recursive, filtered, attribute preservation) - behavioral equivalence against real rsync's output, not wire-protocol interop (grsync's gob-based wire format was already established as incompatible with real rsync's, per SC-6/SC-9/SC-13/ SC-16). Skip gracefully without rsync on PATH. 6 fuzz targets across sync/daemon/transport, each checking one explicit invariant: checksum roll-vs-scratch equivalence, delta round-trip correctness, filter matcher never panics, greeting parser never panics, line reader respects its length cap, frame decoder never panics or over-allocates. BenchmarkGenerateDelta (3 sizes x 4 change-percentages) and BenchmarkGenerateSignature. CI: new test job (Linux+Windows matrix, -race on Linux only, real rsync installed on Linux only), new fuzz job (6 explicit 15s bursts), new vulncheck job. Real findings: - ci.yaml had build/lint jobs but no actual go test step at all - every test written across every prior ticket was only ever run locally, never enforced as a merge gate. Fixed. - grsync has no trailing-slash sensitivity on source paths (src and src/ behave identically), unlike real rsync's well-known distinction - undocumented anywhere before this ticket's comparison tests surfaced it. Now disclosed in the README. - Lint caught 3 unused-parameter findings in fuzz closures that only check 'never panics' - fixed via _, no suppressions. Local environment (CGO_ENABLED=0, no gcc) can't compile -race here; enforcement happens on CI's Linux leg, same pattern as the already-established missing local rsync/govulncheck binaries. Clean gofmt/build/vet/lint/test on native Windows and cross-compiled Linux.
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.
Real-rsync comparison tests (basic recursive, filtered, attribute preservation) - behavioral equivalence against real rsync's output, not wire-protocol interop (grsync's gob-based wire format was already established as incompatible with real rsync's, per SC-6/SC-9/SC-13/ SC-16). Skip gracefully without rsync on PATH.
6 fuzz targets across sync/daemon/transport, each checking one explicit invariant: checksum roll-vs-scratch equivalence, delta round-trip correctness, filter matcher never panics, greeting parser never panics, line reader respects its length cap, frame decoder never panics or over-allocates.
BenchmarkGenerateDelta (3 sizes x 4 change-percentages) and BenchmarkGenerateSignature.
CI: new test job (Linux+Windows matrix, -race on Linux only, real rsync installed on Linux only), new fuzz job (6 explicit 15s bursts), new vulncheck job.
Real findings:
Local environment (CGO_ENABLED=0, no gcc) can't compile -race here; enforcement happens on CI's Linux leg, same pattern as the already-established missing local rsync/govulncheck binaries.
Clean gofmt/build/vet/lint/test on native Windows and cross-compiled Linux.