Skip to content

test: render each candidate row on one line, so a known row cannot read as a catch - #245

Merged
CaffeinatedCoder merged 2 commits into
mainfrom
test/seed-verdict-one-line-rows
Oct 18, 2026
Merged

CaffeinatedCoder merged 2 commits into
mainfrom
test/seed-verdict-one-line-rows

Conversation

@CaffeinatedCoder

Copy link
Copy Markdown
Owner

Closes #235

Problem

SeedVerdict.Catches (#55) reads a Candidates.Verdict message as one row per line. A row whose text contained a newline put its continuation on a line without the [known candidate: prefix, so that line read as an unknown row, which counts as a catch. A string element holding \n or an exception message can produce such a row. The gate's seed proof could therefore count a seed as caught by a known disagreement alone. Today this is latent, because every current candidate is filed.

Change

test/oracles/Candidates.cs: Judge now writes every row on one line, with line breaks shown as ⏎. That covers failing rows, unfiled-candidate rows, the SKIPPED output and the header. Candidates still match against the row's original text.

Tests

  • SeedVerdictTests.AKnownRowSpanningLines_DoesNotCatch is the issue's repro: one unfiled candidate, "Int32Set whitespace {1,\n2}: …". It now reads as not caught, and the message shows {1,⏎2}. It fails with the flattening removed.
  • ARowSpanningLines_BesideAKnownRow_StillCatches: a multi-line real row beside a known one still catches. It passes either way, and guards against a fix that goes too far.
  • The solution builds (Candidates.cs is linked into four test projects). Conventions 397 passed.

🤖 Generated with Claude Code

…ad as a catch

SeedVerdict.Catches (#55) reads a Verdict message one row per line. A row whose text held a newline
(a StringSet element holding \n, an exception message) put its continuation on a line without the
[known candidate: prefix, which read as an unknown, caught row: the gate's seed proof could count a
seed as caught by a known disagreement alone (#235). Candidates.Judge now writes every row, and the
header, on one line, line breaks shown as ⏎; candidates still match the row's original text.

SeedVerdictTests: AKnownRowSpanningLines_DoesNotCatch (the issue's repro) fails with the flattening
removed; ARowSpanningLines_BesideAKnownRow_StillCatches holds the other direction.

Closes #235

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@CaffeinatedCoder CaffeinatedCoder added this to the 10.0.0 milestone Oct 18, 2026
@CaffeinatedCoder CaffeinatedCoder added tests Adds or changes tests only (oracles, harnesses); no library code area/release Versioning, changelogs, release wiring labels Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/release Versioning, changelogs, release wiring tests Adds or changes tests only (oracles, harnesses); no library code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Seed verdict counts a known candidate row as a catch when the row spans lines

1 participant