Skip to content

test(repo): replace string assertions with typed checks - #192

Merged
mrcsin merged 1 commit into
masterfrom
test-suite-cleanup
Nov 18, 2026
Merged

mrcsin merged 1 commit into
masterfrom
test-suite-cleanup

Conversation

@mrcsin

@mrcsin mrcsin commented Nov 18, 2026

Copy link
Copy Markdown
Member

Problem

About 40 test files asserted on message text: Russian UI sentences, English error wording, log text and resource values typed out again in the test. Any wording change broke them, and the Cyrillic literals blocked the ASCII-only source rule. Many tests checked nothing real: duplicates, tautologies, wording pins and tests of test-only code.

What changed

  • Tests check the error type and its public properties, message severity and counts, or a relation between two production outputs. They no longer check wording.
  • One data-driven test replaces 11 English parity tests and covers every enumerated reason type.
  • Pointless tests are deleted. Six members that were internal only for tests are private.
  • No C# file contains Cyrillic.
  • Config loader tests keep their message checks: those errors have no typed surface. Typing them is a follow-up.
  • Docs/architecture/error-reporting.md states the assertion rule; CLAUDE.md points to it.

Four defects found during the audit are fixed:

  • A duration of 24 hours or more was rejected on edit. Hours 00 to 99 now parse; the property max decides the range.
  • Every text column turned hh:mm input into seconds (a comment 12:30 was stored as 45000). Only time_hms columns parse durations, in both grids.
  • The unclosed For and unmatched EndFor warnings named 0-based steps. They now count from 1.
  • The start-time column used a seconds label hard-coded in C#. It now shows the units of the property behind step_duration.

Verification

  • dotnet build SemiStep.slnx: 0 warnings, 0 errors.
  • dotnet test SemiStep/SemiStep.Tests/SemiStep.Tests.csproj: 1408 passed, 0 failed.
  • LC_ALL=C.UTF-8 git grep -lP '[\x{0400}-\x{04FF}]' -- 'SemiStep/*.cs': no output.
  • Each defect fix has a test that failed before the fix and passes after it.
  • Manual test in the app by the operator: 12:30 stays in a comment cell, a duration cell still parses, start-time units match the duration column.
Per-task commits before collapse
55d0d7c2 docs(plans): record exec branch and verify steps
2c71039f fix(tests): address review findings
acea4731 docs(tests): document error assertion rules
6672410d docs(plans): verify test cleanup acceptance
ee16cc7e fix(grid): take start-time units from configuration
959a5505 fix(grid): parse durations only in time columns
967e9e4e fix(grid): accept durations of 24 hours and more
201813e2 fix(recipes): count loop warning steps from 1
e06ee14b refactor(ui): make test-only internals private
9041edee test(grid): assert widths by relation, drop wording
98d2a2bd test(csv): assert typed errors in domain and CSV tests
a4c5f2d6 test(reporting): assert severity, not wording
11f60435 test(localization): assert structure, not wording
fb7e4513 docs(plans): add test suite cleanup plan

🤖 Generated with Claude Code

About 40 test files asserted on message text: Russian UI sentences,
English error wording, log text and resource values typed out again in
the test. Any wording change broke them, and the Cyrillic literals
blocked the ASCII-only source rule. Many tests checked nothing real:
duplicates, tautologies, wording pins and tests of test-only code.

Those tests now check the error type and its public properties, message
severity and counts, or a relation between two production outputs. One
data-driven test replaces 11 English parity tests and covers every
enumerated reason type, so swapped format arguments still fail it. The
pointless tests are deleted, six members that were internal only for
tests are private, and no C# file contains Cyrillic. Config loader tests
keep their message checks, because those errors have no typed surface.

Four defects found during the audit are fixed:
- a duration of 24 hours or more (the 86400 s maximum shows as 24:00:00)
  was rejected on edit; hours 00 to 99 now parse and the property max
  decides the range
- every text column turned hh:mm input into seconds, so a comment typed
  as 12:30 was stored as 45000; only time_hms columns parse durations
- the unclosed For and unmatched EndFor warnings named 0-based steps;
  they now count from 1 like every other step reference
- the start-time column carried a seconds label hard-coded in C#; it now
  shows the units of the property behind the step_duration column

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mrcsin
mrcsin marked this pull request as ready for review November 18, 2026 11:54
@mrcsin
mrcsin merged commit 86ca3a8 into master Nov 18, 2026
1 check passed
@mrcsin
mrcsin deleted the test-suite-cleanup branch November 18, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant