Conversation
…port Add three tests to TestStructuredDetailSections: - test_verify_command_fail_shows_cross: exit_code=1 + passed=True → ✗ - test_verify_command_pass_shows_check: exit_code=0 → ✓ - test_verify_command_no_exit_code_uses_passed: no exit_code, falls back to passed Fix report.html.j2 line 1300: check exit_code first (exit_code == 0 → ✓, exit_code != 0 → ✗), fall back to cmd.passed when exit_code is absent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a bug in the HTML report template where verify-phase commands that returned a non-zero exit code (e.g. FAIL ./... [setup failed]
FAIL failing) but had set by the adapter were incorrectly displayed with a ✓ checkmark instead of ✗.
Root cause: Line 1300 in
report.html.j2usedcmd.passedto determine ✓/✗. Some adapters setpassed: truefor commands that ran (didn't crash) even when they returned non-zero exit codes.Fix: The Jinja2 condition now checks
exit_codefirst:exit_codeis present →exit_code == 0determines ✓/✗exit_codeis absent → falls back tocmd.passedChanges
report.html.j2(line 1300): Updated condition to prioritiseexit_codeoverpassedTestStructuredDetailSections):test_verify_command_fail_shows_cross—exit_code=1+passed=True→ must show ✗ (the actual bug case)test_verify_command_pass_shows_check—exit_code=0→ must show ✓test_verify_command_no_exit_code_uses_passed— noexit_code, falls back tocmd.passedchanges/288.fix: Towncrier changelog fragmentAcceptance Criteria
exit_code != 0show ✗ even whenpassed: trueexit_code == 0show ✓exit_codefall back tocmd.passedfor ✓/✗changes/288.fixReview Results
Refs #288
Assisted-by: Claude Opus 4.6 (1M context) noreply@anthropic.com
Assigned-by: decko