Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Effective gate treats missing coverage totals as 0% and can pass without measurements

Aperta
#15 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
74/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
testing-qa

Direzione di ricerca

Start with score_coverage/effective_coverage.py around the effective totals and zero-denominator fallback, then inspect score_coverage/generate_coverage_html.py where the gate reads the effective percentage. Reproduce the supplied archive and threshold cases with the real generate_coverage_html CLI. Done means missing or unusable HTML and LCOV measurements consistently exit 2, including at threshold 0, for both HTML backends.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

Found while reviewing the architecture documentation. Verified against upstream HEAD d99515b87bbe1dde89984403e9c330d640fc5d33 using synthetic report archives and the real generate_coverage_html CLI (no gate/justification mocks).

The effective coverage path converts missing/unparseable/zero HTML totals to a numeric 0% report. The gate treats this as an evaluated percentage. At the default threshold it exits 1; at threshold 0 it exits 0, although there are no usable measurements. The raw LCOV path rejects zero instrumented lines with exit 2.

Reproduction

Create a report zip containing html_report/index.html with no parseable LLVM Totals row, an empty html_report/style.css, and lcov_report/lcov.dat with LF:0 and LH:0. Supply a valid empty YAML:

version: 1
justifications: []

Run the real generate_coverage_html CLI with --yaml:

  • COVERAGE_THRESHOLD=100: warning about unparseable totals, effective 0%, exit 1.
  • COVERAGE_THRESHOLD=0: same warning, effective 0%, exit 0.

Without YAML the zero-line LCOV yields exit 2.

Expected

Unavailable measurements must produce exit 2 for every threshold, including 0. Validate usable totals before constructing/accepting an effective gate value. Cover missing/malformed HTML totals and zero instrumented lines in both HTML backends.

This violates tool_req__coverage_gate_exit_codes and tool_req__coverage_gate_no_verdict.

Relevant code
Lingua principale
Python
Stelle
0
Fork
3
Merge medio
21h 15m
PR unite (30g)
14

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di eclipse-score/coverage_tool

Tutte le issue di eclipse-score/coverage_tool

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.