test: close Gremlins-flagged gaps (surviving mutants + uncovered code)
I maintainer di solito rispondono entro 1 giorno
@ffumero2003 ci sta già lavorando.
Dal 4/11/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Context
After the test-integrity work landed, a refreshed Gremlins v0.6.0 run on main (c3b00f1, --timeout-coefficient 20 --workers 2, unit tests only, no -race) measured:
| Package | Test efficacy | Mutator coverage | Killed / Lived / Not-covered / Timed-out |
|---|---|---|---|
b2 |
96.54% | 96.66% | 754 / 27 / 27 / 17 |
base |
92.44% | 78.67% | 208 / 17 / 61 / 0 |
(Up from the #97 baseline of 64.05% / 71.88%.) This issue tracks closing the remaining gaps the run surfaced. Two kinds of work; do them as separate PRs.
Acceptance criteria
- R1. Part A: a re-run shows the targeted surviving mutants killed (or annotated equivalent); efficacy rises toward the high-90s. Each new test is proven to fail when its production line is reverted.
- R2. Part B:
monitor.gohas unit coverage; remaining not-covered lines are either covered or documented as live-only. - R3. Depends on the Gremlins CI adoption (#97) landing first so the numbers are reproducible.
In scope
Part A — kill the surviving mutants (tests exist but don't catch a change)
These lines have a mutant that survived — a change there passes every test. Each is a boundary/arithmetic/negation that needs a test asserting the exact behavior (break-per-claim: revert the fix, the new test must fail).
b2 (27 surviving), concentrated in:
writer.go: 516, 610, 621, 699, 731, 1017, 1022, 1023reader.go: 266, 269, 286, 459replication.go: 215, 219, 251iterator.go: 102, 108accountinfo.go: 162, 221b2.go: 774 ·baseline.go: 414 ·compose.go: 274 ·progress.go: 49 ·sync/sync.go: 351 ·copy.go: 162 ·backend.go: 101
Also resolve the 17 timed-out b2 mutants (mostly writer.go/reader.go) by raising --timeout-coefficient or trimming the slow test so they report a real killed/lived instead of timing out.
base has 17 surviving mutants; the per-line list was not captured (the baseline base run was not saved). Re-run gremlins unleash --timeout-coefficient 20 --workers 2 ./base to enumerate them before fixing.
Note: some survivors may be equivalent mutants (behavior-identical, uncatchable) — annotate and skip those rather than contorting a test. Target the real ones; 100% is not the goal.
Part B — cover untested code (no test reaches it)
b2 has 27 "not covered" mutants, dominated by:
monitor.go: lines 50, 144, 147, 199, 203–205, 226, 230 — the package has effectively no unit tests.lock.go: 65 — file-lock paths (may require live B2).sync/sync.go: 298, 414, 416 ·accountinfo.go: 167 ·backend.go: 1114 ·b2.go: 901 ·replication.go: 26
Add hermetic unit tests where possible (monitor.go first); where a path genuinely needs live B2, document that in docs/testing.md rather than forcing a fake.
Out of scope
- Unrelated work outside the components and behavior described in In scope.
Verification
Run the repository regression checks with live credentials unset:
unset B2_APPLICATION_KEY_ID B2_APPLICATION_KEY B2_ACCOUNT_ID B2_ACCOUNT_KEY
go build ./...
go vet ./...
go test -race -count=1 ./b2/... ./base
- Use Gremlins v0.6.0 without
-race, recording the measured ref and configuration. Preserve the issue's historical baseline as historical, rather than claiming it is a fresh measurement. - Apply each targeted mutation independently; record red output for the relevant test and green output after restoration. Explain equivalent mutants instead of contorting tests.
- Re-run the specified base enumeration:
gremlins unleash --timeout-coefficient 20 --workers 2 ./base; record per-package killed/lived/not-covered/timed-out results for the targeted run. - For Part B, record covered paths or the documented reason a path needs live B2.
- Gremlins runs must remain separate from the race-enabled Go regression run.
- Expected result: the checks above succeed and the observable outcomes in Acceptance criteria are demonstrated. If a check cannot run, report
Could not run because: ...; if it starts but fails, reportCould not complete because: .... A skipped check is not a pass.
Links
-
Related issues and pull requests referenced above: #97.
- Lingua principale
- Go
- Stelle
- 66
- Fork
- 18
- Merge medio
- 1g 10h
- PR unite (30g)
- 132
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Backblaze/blazer
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Bucket.Attrs never returns ReplicationConfig: replication configuration is write-onlyForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
test: skip the fuzz non-vacuity guard when replaying a single seedForse già presa @ffumero2003 l’ha presa 5 giorni fa. Apertatesting
Backblaze/blazer#330 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Backblaze/blazer
Issue simili
-
needs-triage typo
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
llm-d-incubation/llm-d-scaling-manager#122 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue severity: low tech-debt
Difficoltà 2/5 Mezza giornata Idoneità per principianti 75/100
TMHSDigital/subenum#329 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] Backend summarize min() / max() panics when a field has no numeric valuesForse già presa @weng5e l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
grafana/grafana-infinity-datasource#1832 ·
I maintainer di solito rispondono entro 1 giorno
-
tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
GillMacedo/godebugdiff#13 ·