Diagnostic category comment disagrees with its tests

Ouverte Adaptée aux débutants
#666 1 commentaire 0 réactions 1 personne assignée Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@woohsin y travaille déjà.

Depuis le 13/11/2026.

Évaluation

Difficulté
2/5
Temps estimé
1-3 heures
Accessibilité débutants
66/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
rust
Domaine
backend, testing

Piste de recherche

Lis le commentaire du sanitizer dans src/agent/integrity.rs:150-157 avec diagnostic() dans src/agent/evidence/run_signals.rs:53-68 et les trois tests épinglés dans tests/unit/agent/evidence.rs. Décide s’il faut modifier le commentaire ou le comportement ; l’issue indique que corriger le commentaire est l’option la plus limitée. Le travail est terminé lorsque le comportement choisi et ses tests concordent avec le commentaire.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.
Langage dominant
Rust
Étoiles
228
Forks
150
Merge moyen
1 j 3 h
PR mergées (30 j)
226

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de sysprog21/codetrial

Toutes les issues de sysprog21/codetrial

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.