Skip to content

fix(standard_files): addIssue signature mismatch crashes test 9 on unreachable sites#1469

Merged
7h3Rabbit merged 1 commit into
mainfrom
fix/addissue-signature-mismatch
May 18, 2026
Merged

fix(standard_files): addIssue signature mismatch crashes test 9 on unreachable sites#1469
7h3Rabbit merged 1 commit into
mainfrom
fix/addissue-signature-mismatch

Conversation

@marcusosterberg
Copy link
Copy Markdown
Contributor

Fixes #1468

What this changes

Two minimal edits in tests/standard_files.py:

  1. addIssue() accepts an optional fourth parameter text=None, stored on the sub-issue when provided
  2. The call site in run_test()'s failure branch passes arguments in the correct order: (result_dict, rule_id, url, text)

Backward compatibility

All ~25 existing 3-argument addIssue calls in this file work unchanged thanks to the default text=None. No other files need to be touched.

Testing

Verified locally against:

  • https://bolagsverket.se (previously crashed with TypeError) — now returns a graceful no-network result with the localised TEXT_SITE_UNAVAILABLE text attached to the sub-issue
  • A normally responding site — output unchanged

…path

addIssue() was defined with three positional arguments but called with
four in the failure branch of run_test(). The extra argument was a text
string carrying site-unavailable context that was never actually stored
on the sub-issue.

This commit adds `text` as an optional fourth parameter on addIssue and
stores it on the sub-issue when provided. The call site is updated to
pass arguments in the correct order: (result_dict, rule_id, url, text).
All ~25 existing 3-argument call sites continue to work unchanged.

Triggered by any site where the initial HTTP request raises
ConnectionError, e.g. WAF-protected sites that drop python-requests at
the TLS handshake (bolagsverket.se and other Swedish government sites
confirmed).
@7h3Rabbit 7h3Rabbit merged commit bb1e05c into main May 18, 2026
22 of 26 checks passed
@7h3Rabbit 7h3Rabbit deleted the fix/addissue-signature-mismatch branch May 18, 2026 15:31
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.

fix(standard_files): addIssue() crashes with TypeError when site is unreachable

2 participants