Repository navigation
fix(ci): fuzz-smoke fuzzes all 22 targets, and a test keeps the matrix complete - #591
Conversation
…x complete (#565) ci.yml's fuzz-smoke matrix named 10 of the tree's 22 fuzz targets. The other 12 ran only their seed corpus as unit tests and were never fuzzed, including FuzzWholeObjectResponse, which decides whether the SHA-256 verification runs at all. A 180s campaign over the twelve found two real defects in 1s and 7s (ValidateBucketName and ValidateKMSKeyID accepting control characters, fixed in #571), so at the existing 60s budget CI would have failed on the commit that introduced each. Add the twelve rows. TestFuzzSmokeCoversEveryFuzzTarget walks the tree for ^func Fuzz, including build-tagged files, and compares against the matrix in both directions: a target with no row, and a row naming a target that no longer exists. Floor of 20 targets. The shared workflow parser gains a typed strategy.matrix.include field for it. Mutations: a throwaway FuzzThrowaway565 is named with its file; deleting the FuzzWholeObjectResponse row names that target; a misspelled target reports both the missing target and the stale row. Renaming pkg: in every row first reported all 22 targets as missing, the right failure for the wrong reason; a row missing either key is now reported as malformed, and the empty-matrix check fires.
…ist's second hole (#565) The first CI run of FuzzValidateBucketName, added to the fuzz-smoke matrix in this PR, found a counterexample in 0.07s: ValidateBucketName("00`") accepted a name that makes an unparseable endpoint: invalid character "`" in host name The validator refused bucketNameForbiddenBytes (/\:@?#[]%& and space) and, after #571, control bytes, and accepted everything else. That is a deny-list, and its second hole: "<>^{|}!$'()*+,;=~ and the backtick all passed. Replace it with isBucketNameChar, an allow-list of ASCII letters of either case, digits, '.', '-' and '_'. That is the legacy us-east-1 set, the widest S3 has ever permitted, so no bucket that exists is refused; the existing MyBucket and my_bucket acceptance cases still pass. The control-character and non-ASCII checks keep their own messages, because both describe something invisible. The counterexample is committed as seed corpus (7e8429f5c2bfe6da), with table cases for a backtick, a pipe and a tilde. Mutations: removing the allow-list check, dropping '_', and dropping A-Z each fail named tests; the last two also fail TestParseStorageURI. Both FuzzValidateBucketName and FuzzParseStorageURI then ran clean for 120s through fuzz-smoke.sh.
The first CI run of the new cells found a real defect, in 0.07 s
This is the second hole in the same deny-list. #571 added control bytes to an enumerated list of URL characters; a backtick was in neither list, and neither were The counterexample is committed as seed corpus, as #565's acceptance criteria require, and both bucket-name fuzz targets then ran clean for 120 s locally through |
…ch protection now requires (#593) #591 added twelve targets to the fuzz-smoke matrix (#565), and branch protection on main now requires their contexts too: 39 required checks became 51, added with POST to required_status_checks/contexts so the existing 39 were not replaced. Verified by diffing the API's list before and after (12 added, none removed) and by each of the twelve having reported success on main's head under exactly that name first. requiredChecks transcribes branch protection verbatim, so it gains the same twelve names; the list and the API's contexts now diff clean at 51. Also drops the "orphans all nineteen" count from TestCIWorkflowIsReusable's failure message, which was already wrong at 39, in favor of pointing at requiredChecks.
Fixes #565.
Change
ci.yml'sfuzz-smokematrix named 10 of the tree's 22 fuzz targets. The other 12 ran only their seed corpus as unit tests and were never fuzzed. One of them isFuzzWholeObjectResponse, which decides whether the SHA-256 verification runs at all. Your 180-second campaign on #565 found real defects in two of the twelve, in 1 s and 7 s (fixed in #571), so at the existing 60-second budget CI would have caught both on the commit that introduced them.TestFuzzSmokeCoversEveryFuzzTarget(internal/config/fuzz_coverage_test.go) walks the tree for^func Fuzzand compares against the matrix in both directions. A target with no row means it's never fuzzed. A row naming a target that no longer exists would otherwise fail infuzz-smoke.shas "no tests to run", which looks like an infrastructure problem. Build-tagged files are included in the walk. Floor: 20 targets.strategy.matrix.includefield instead of another hand-rolled walk (Converge the two workflow YAML parsers in internal/config #504's direction).Branch protection pins the existing 10
fuzz-smoke (...)contexts by name. New matrix cells run and report, but a red one doesn't block a merge until they're added. That's a repository setting, so it isn't done here. After this merges and the cells have reported once, this adds exactly these 12.POSTto/contextsappends;PATCH/PUTwould replace all 39:requiredChecksinrelease_gate_test.gotranscribes branch protection verbatim, so it gets the same 12 names in the same change as that call.Verification
go test -race ./internal/config/is clean.FuzzThrowaway565added tointernal/cache(#565's acceptance criterion)FuzzWholeObjectResponserow deletedchecksum_verify_test.goFuzzParseBytepkg:renamed in every rowThat last row is the second try. The first version counted a row with no
pkgas a cell with an empty package, so the same mutation reported "22 targets missing". Red, but for the wrong reason.Watch this PR's fuzz cells. These 12 targets have never been fuzzed on CI's hardware. Your campaign was clean at 180 s for ten of them, but a counterexample found here is a real finding to commit and fix, not a flake.
🤖 Generated with Claude Code