Diagnostic category comment disagrees with its tests

Aberta Para iniciantes
#666 1 comentário 0 reações 1 responsável Ver no GitHub

Mantenedores costumam responder em até 1 dia

@woohsin já está trabalhando nisso.

Desde 13/11/2026.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
66/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
rust
Domínio
backend, testing

Direção de pesquisa

Leia o comentário do sanitizador em src/agent/integrity.rs:150-157 junto com diagnostic() em src/agent/evidence/run_signals.rs:53-68 e os três testes fixados em tests/unit/agent/evidence.rs. Decida se o comentário ou o comportamento deve mudar; a issue diz que corrigir o comentário é a opção menor. O trabalho estará concluído quando o comportamento escolhido e seus testes estiverem de acordo com o comentário.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Observed behavior

The comment above the diagnostic sanitizer in src/agent/integrity.rs:150-157 says a category is counted as other only when the run carries a setup error, and that a category on a run that did not fail to start is counted as nothing. The code does otherwise.

diagnostic() in src/agent/evidence/run_signals.rs:53-68 returns a result whenever the runner names a valid category, with or without setupError, using structured:<Category> as its material. a_structured_category_is_recorded_without_setup_text (tests/unit/agent/evidence.rs:1470) and a_runner_naming_other_without_prose_is_still_a_diagnostic (tests/unit/agent/evidence.rs:2257) pin that.

So a run that executed and passed everything still counts as a runner failure when it names a category, and the prompt can print 1 runs failed to start (src/agent/evidence.rs:580) beside 5 of 5 passing.

Expected behavior

The comment and the behavior agree. Either of these resolves it:

  • Correct the comment to say a runner-named category is counted without prose, and keep the code and tests.
  • Stop counting a category on a run that executed, and change the two tests above with it.
Reproduction
  1. Call record_test with {"passed":5,"total":5,"diagnostic":{"category":"syntax"}}.
  2. Read the ledger's diagnostics: the syntax counter is 1 and the compile or runner failure count is non-zero.

Read from the code and the pinned tests, not run against this exact payload.

CodeTrial version

desktop-latest-25-g55597864

Environment

Not environment specific.

Sanitized evidence

The line is labelled as browser-reported and unverified, so the impact on the report is small.

Dropping the fallback also fails test_claims_keep_browser_provenance_in_every_prompt_view (tests/unit/agent/evidence.rs:3150) in addition to the two tests above, so the intended behavior should be decided first. Deciding which of the two is intended is the whole task; the first option is the smaller change.

Public data confirmation
  • I removed credentials, session tokens, candidate recordings, and personal interview content from this public report.
Linguagem predominante
Rust
Estrelas
228
Forks
150
Merge médio
1d 3h
PRs com merge (30d)
226

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de sysprog21/codetrial

Todas as issues de sysprog21/codetrial

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.