Repository navigation
test(b2): kill surviving Gremlins mutants in reader cancellation (#290) - #294
Merged
ffumero2003 merged 1 commit intoNov 5, 2026
Merged
Conversation
Assert that the first download error is retained and cancels once, while a later error neither replaces it nor cancels again. Run this deterministic check before transfer tests in unshuffled mutation runs. Part of #290
ffumero2003
deleted the
test-b2-issue-290-reader-replication-iterator-mutants
branch
November 5, 2026 22:38
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.
Context
Address the reader/replication/iterator targets from Part A of #290 on
origin/main(59104c6). ReversingReader.setErr's first-error guard preventscancellation and can strand existing download tests. The other nine specified
mutants are behaviorally equivalent and are skipped below, not suppressed.
Changes
b2/a_reader_error_test.go, with no network, credentials, timers, or workergoroutines. The first error must be retained and cancel the context exactly
once; a later error must neither replace it nor cancel again.
the timeout target reports a prompt assertion failure.
reader.go:111,CONDITIONALS_NEGATION== nil→!= nilfails immediately.reader.go:266,CONDITIONALS_BOUNDARYavailable == 0, assigning zero to zero changes nothing.reader.go:269,CONDITIONALS_BOUNDARYavailable == r.length, assigningr.lengthpreserves the same value.reader.go:286,CONDITIONALS_BOUNDARYcr == 1, assigning 1 to 1 preserves the worker count.reader.go:459,CONDITIONALS_BOUNDARYreplication.go:215,CONDITIONALS_BOUNDARYreplication.go:219,CONDITIONALS_BOUNDARYmax == maxReplicationPriority - 5, fallthrough adds 5 and returns the same maximum as the cap branch.replication.go:251,ARITHMETIC_BASElen(mapping)+1→len(mapping)-1changes only a map allocation hint; all entries are copied unchanged.iterator.go:102:29,CONDITIONALS_BOUNDARY> 1000→>= 1000comparison assigns 1000 to an existing 1000. The separate< 0comparison is not this survivor.iterator.go:108,CONDITIONALS_BOUNDARYNo tests manufacture unreachable backoff values or assert map allocation details
to claim kills for the equivalent targets. No Part B coverage changes.
Verification
All commands used empty
B2_APPLICATION_KEY_ID,B2_APPLICATION_KEY,B2_ACCOUNT_ID, andB2_ACCOUNT_KEY.Hand-applied the exact
reader.go:111mutation alone, then restored it. The firstbranch red proof from the new test:
The existing-error branch rejects that same mutation too:
The mutated full package also fails promptly with
go test -count=1 -failfast -timeout=20s ./b2:After restoring the production guard, the focused test passes:
go build ./...: PASS, no output.go vet ./...: PASS, no output.go test ./b2/...: PASS (b211.482s;b2/sync2.761s).gofmt -l .: clean.make ci: PASS, including lint (0 issues), race/shuffle tests, modulechecks, b2keys, cross-compiles, changelog check, and script tests. The b2 race
suite passed in 20.021s.
green run. Equivalent mutants were reviewed and skipped, not reported killed.
cancellation without changing production request behavior or harness scenarios.
Actual
make citail (exit 0):Part of #290