Add test generation and changed-line coverage

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

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
22/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python, rust, typescript

Direzione di ricerca

Start with the existing harness verify step and the verify.toml step config, then find where the project markers (Cargo.toml, pyproject.toml, package.json) are detected. Build the changed-line mapping from the last commit or session baseline, and add fixtures for Rust, Python and TypeScript. Done means each fixture prints a changed-line coverage number, and a missing tool reports unknown with install guidance.

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

Descrizione

area: tools enhancement priority: P2

Problem

The harness can run tests and verify a change, but it cannot answer "is the new code covered?" or generate a focused test for a branch the model just added. The model writes a test only when the prompt happens to ask for one, and there is no coverage signal to catch a fix that is never exercised.

Aider's test loop and SWE-agent's verification both treat a failing-then-passing test as the proof of a fix. Coverage closes the gap for new code.

Inspiration

  • Aider's lint/test loop after edits.
  • SWE-agent: reproduction as the unit of proof.
  • cargo llvm-cov, pytest --cov, nyc/vitest --coverage as local coverage backends.

Proposal

Add a coverage tool and a test-gen workflow step:

  • Detect the project's coverage command from markers (Cargo.toml, pyproject.toml, package.json) or an explicit verify.toml step.
  • Run it, parse the report, and map coverage to the lines changed since the last commit or session start.
  • Report changed lines covered / total, uncovered ranges, and the command used.
  • test-gen proposes tests for uncovered changed branches, writes them only after review, runs them, and refuses to count a generated test as proof until it has been reviewed and passes.
  • Never claim coverage without a parsed report; missing tooling is unknown, not 100%.

Acceptance criteria

  • Rust, Python and TypeScript fixtures produce a changed-line coverage number.
  • A missing coverage tool reports unknown with install guidance.
  • Generated tests are shown for approval before writing.
  • A generated test that passes but asserts nothing is flagged.
  • The report names the exact command and the commit/session baseline.
  • Coverage failure does not silently block a turn unless configured to.
Lingua principale
Rust
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

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 GotinhaAzul/LocalHarness

Tutte le issue di GotinhaAzul/LocalHarness

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.