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

Fix the test gaps found by mutation testing (13 triaged, ~180 untriaged)

Aperta
#198 1 commento 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
70/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
testing-qa

Direzione di ricerca

Read docs/evals/mutation-baseline.md to see the full list of gaps. Choose one of the 13 triaged items and find the corresponding function in agent_loop.rs, context.rs, llm_compaction.rs, provider/model.rs, or prices.rs. Write a test that would have detected the surviving mutant, then run cargo test to verify.

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

Descrizione

Follow-up to #163. The first full weekly mutation run (36480327733) left 202 of 797 viable mutants undetected. docs/evals/mutation-baseline.md has the per-module table and the full list.

Triaged real gaps (from the 1-in-10 sample)

These are confirmed test gaps: code that runs under test, but nothing checks what it does. Line numbers are at 9d060c7; the baseline page has the reasoning for each.

  • agent_loop.rs run_loop: turn_delay is never exercised by any test (turn_number > 0 → < survives).
  • agent_loop.rs run_loop: the loop never checks that compaction uses the headroom-adapted ratio (!= → == survives).
  • agent_loop.rs run_loop: steering messages queued during tool execution could be dropped undetected (delete ! in !steering.is_empty()).
  • agent_loop.rs stream_assistant_response: no test streams an SSE-embedded error and checks for MessageStart/MessageEnd. The GASP recorder depends on that MessageEnd.
  • context.rs message_tokens: extension-message estimate (+ 4 → - 4; could underflow).
  • context.rs level2_summarize_old_turns: no test checks what a level-2 summary says.
  • context.rs safe_head_end: the head boundary is never placed right after an assistant message that opens tool calls.
  • context.rs safe_turn_start: a split is never placed on a tool result to check that the turn stays together.
  • context.rs signature_hash: no session has two different repeated signatures (a constant hash survives).
  • llm_compaction.rs clip: nothing checks that a clipped block keeps its first max bytes (&& → || clips everything to "").
  • provider/model.rs ContextTier::is_configured: an all-zero tier is never tested.
  • provider/model.rs: preset max_tokens isn't pinned (claude_fable_5, claude_sonnet_5, and probably others). A test next to preset_prices_test would cover them all.

Two boundary cases are real but low priority: llm_compaction.rs choose_cut < → <=, and compact > → >=.

Untriaged

About 180 other survivors from the full run haven't been sorted into real gaps and equivalent mutants yet. Per module:

Module Missed
context.rs 69
llm_compaction.rs 45
provider/model.rs 40
agent_loop.rs 39
prices.rs 9

Triage them by module. Add acceptable ones to exclude_re in .cargo/mutants.toml with the reason, and fix the rest with assertions that fail for the stated reason. The weekly run's summary shows the effect.

🤖 Generated with Claude Code

Lingua principale
Rust
Stelle
327
Fork
46
Merge medio
2h 25m
PR unite (30g)
159

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 yologdev/yoagent

Tutte le issue di yologdev/yoagent

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.