Skip to content

Conversation

@vdusek
Copy link
Collaborator

@vdusek vdusek commented Jan 30, 2026

When url_patterns was None, the code assigned it to the module-level _DEFAULT_BLOCK_REQUEST_URL_PATTERNS constant and then called extend() on it, permanently mutating the shared default list. This caused extra_url_patterns to accumulate across all subsequent calls that used the default patterns.

Fixed by creating a copy of the list before extending it.

Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

When url_patterns was None, the code assigned it to the module-level
_DEFAULT_BLOCK_REQUEST_URL_PATTERNS constant and then called extend()
on it, permanently mutating the shared default list. This caused
extra_url_patterns to accumulate across all subsequent calls that
used the default patterns.

Fixed by creating a copy of the list before extending it.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vdusek vdusek added t-tooling Issues with this label are in the ownership of the tooling team. adhoc Ad-hoc unplanned task added during the sprint. labels Jan 30, 2026
@vdusek vdusek self-assigned this Jan 30, 2026
@vdusek vdusek added t-tooling Issues with this label are in the ownership of the tooling team. adhoc Ad-hoc unplanned task added during the sprint. labels Jan 30, 2026
@github-actions github-actions bot added this to the 133rd sprint - Tooling team milestone Jan 30, 2026
@vdusek vdusek requested a review from Pijukatel January 30, 2026 14:05
@vdusek vdusek changed the title fix: Prevent mutation of default URL patterns list in block_requests fix: Prevent mutation of default URL patterns list in block_requests Jan 30, 2026
@codecov
Copy link

codecov bot commented Jan 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.43%. Comparing base (f895b11) to head (b65b3ee).
⚠️ Report is 9 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1702      +/-   ##
==========================================
- Coverage   92.45%   92.43%   -0.02%     
==========================================
  Files         157      157              
  Lines       10482    10489       +7     
==========================================
+ Hits         9691     9696       +5     
- Misses        791      793       +2     
Flag Coverage Δ
unit 92.43% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@Mantisus Mantisus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

@vdusek vdusek merged commit fcf9adb into master Jan 30, 2026
30 of 32 checks passed
@vdusek vdusek deleted the fix/block-requests-mutable-default branch January 30, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants