Conversation
…#274) Replace two separate weak substring checks with a single atomic assertion that verifies the exact rendered HTML element structure. Old approach (weak): - assert "5 tool calls" in content # could match anywhere (comment, body text) - assert 'class="tool-call-count"' in content # could match CSS definition New approach (strong): - assert '<span class="tool-call-count">5 tool calls</span>' in content The single combined assertion confirms that both the count value and CSS class appear together in the correct element, ruling out false positives from unrelated matches in the CSS block or document body.
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
Strengthens the weak assertion in
test_tool_call_count_shown_when_presentintests/test_report_html.py.Before (weak):
These two separate checks could each pass independently in the wrong places — e.g., the class name appears in the
<style>block (as.tool-call-count { ... }), and the count text could appear in a comment or other element.After (strong):
This single atomic assertion verifies both the count value and the CSS class appear together in the correct HTML element, exactly matching the Jinja2 template output. This eliminates false positives from independent substring matches.
Acceptance Criteria
Review Results
Refs #274
Assisted-by: Claude Opus 4.6 (1M context) noreply@anthropic.com
Assigned-by: decko