Measure test strength with mutation testing and stop encoding current behavior as specification
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- go
- Ambito
- ci-cd, testing-qa
Direzione di ricerca
Start with pkg/reportdiff/compare_test.go and TestLanguagePercentagesRetainTheirDenominatorAndLimits, then review the core package list and the Enry and go-git paths named in the proposal. Run the existing reportdiff and CLI tests to identify behavior-as-spec and silence assertions. Done means on-demand and pre-release mutation runs, tracked package results, audited tests, and diagnostic-code tables including valid-input-no-warning cases.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Why
82.6% statement coverage says which lines ran, not whether any assertion would notice them being wrong. Two findings from 2026-09-22 show the gap:
- Tests that encode current behavior as the specification.
TestLanguagePercentagesRetainTheirDenominatorAndLimits(pkg/reportdiff/compare_test.go) assertsUnavailable == 1when a language appears only in the newer report. That is exactly the #10 defect (added languages reported as "unavailable"), so fixing the bug would fail the test. - "Silence" assertions. Many CLI tests check
stderr == ""rather than asserting the specific warning codes the contract promises. A wrong warning, such as the falseunsupported_gitattributesfor a pattern-only line, can only be caught by an assertion that expects particular diagnostics.
Proposal
- Mutation testing (e.g.
gremlinsorgo-mutesting) on the core packages:pkg/scanner,pkg/declarations,pkg/projects,pkg/reportdiff,pkg/environments;- the Enry fork's strategy chain and heuristics (
third_party/go-enry/common.go,data/); - the go-git fork's patched read path.
- Publish mutation scores per package, and triage surviving mutants into new assertions.
- Spec-referenced tests. Every test that pins behavior modeled on an external system (Linguist, Git, Cargo, npm, PEP 508/440, MSBuild, SARIF) cites the governing source: gem file and line, Git docs, the Cargo reference. A test that encodes a known limitation must say so and link its issue, so that fixing the limitation is an expected test change, not a surprise.
- Diagnostics are contract. For each module, table tests assert exact warning and diagnostic codes, both positive and negative, including "this valid input produces no warning".
Acceptance
- Mutation testing runs on demand (
workflow_dispatchor a local make target) and before releases, with results tracked over time. Nothing runs on a schedule (#92). No hard gate at first; set a floor per core package once there's a baseline. - An audit of existing tests for behavior-as-spec assertions, starting with the reportdiff language test above, with each one either re-specified or linked to its issue.
- Every module has diagnostic-code table tests, including valid-input-no-warning cases (a pattern-only
.gitattributesline; Cargo{ workspace = true, default-features = false }).
Part of the 1.0 quality program: #83. Epic: #81.
- Lingua principale
- Go
- Stelle
- 0
- Fork
- 0
- Merge medio
- 5h 8m
- PR unite (30g)
- 54
Preparare l'ambiente
- Include un Dockerfile o un 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 war-and-code/dircue
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
war-and-code/dircue#200 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement follow-up
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
war-and-code/dircue#201 ·
I maintainer di solito rispondono entro 1 giorno
-
follow-up
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
war-and-code/dircue#179 ·
I maintainer di solito rispondono entro 1 giorno
-
follow-up
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
war-and-code/dircue#178 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement follow-up
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
war-and-code/dircue#172 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di war-and-code/dircue
Issue simili
-
agent-review-finding bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
jordansmall/spindrift#5281 ·
I maintainer di solito rispondono entro 1 giorno
-
unbounded value for n in `/v1/logs` can panic/OOMForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertasmall item
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
canonical/pebble#1127 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[schema-coverage] elasticstack_elasticsearch_synonym_set (data source)Forse già presa @github-actions l’ha presa oggi. Apertaacceptance-tests phase-coding schema-coverage testing triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 81/100
elastic/terraform-provider-elasticstack#5211 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 89/100
open-policy-agent/opa#9366 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
defect
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
nats-io/nats-server#8752 ·
I maintainer di solito rispondono entro 1 giorno