Repository navigation
Report unsupported filters honestly and fix compiler mis-conversions - #2
Open
kayurachann wants to merge 1 commit into
Open
kayurachann wants to merge 1 commit into
kayurachann wants to merge 1 commit into
Conversation
Stock (build-time) compiler: - Count the filters that cannot become DNR rules instead of dropping them silently: per-list and total counts per reason in log.txt and ruleset-details.json (rules.rejectedReasons, filters.converted). The build log said "Unsupported: 0" for all 55 lists; the current snapshot has 1,213 (about 1,155 DNR cannot express, 58 invalid). - validate-mv3 checks the reported counts against the package. - ##^responseheader() keys on the response's hostname (requestDomains) with exceptions, as in uBlock Origin, instead of initiatorDomains. - removeparam=~name is reported instead of compiled into a rule that never matches. - Package every redirect resource the compilers can emit; click2load is reported as unavailable; the build fails on a missing resource. Runtime compiler (imported lists, My filters): - Reject $requestheader (was an unconditional block or allow). - $empty/$mp4 redirect like stock lists instead of blocking everything. - A bare $removeparam clears the query (was a no-op). - Reject @@...$uritransform, which compiled into a real redirect and bypassed the trusted-source check. - Fix $permissions joining, dropped important, and $to replacing the hostname pattern; removeparam page-load rules no longer widen to every page of domain= sites (both compilers). - Compiled-cache revision 4, so imported lists recompile once. Dashboard: each stock list's tooltip counts converted filters and adds the number that could not be converted (10 maintained locales). Docs: new docs/MV3-LIMITS-RESEARCH-2026-09-24.md (which MV3 limits can be lifted, measurements on Chrome 153, roadmap); stale statements in FEATURE-MATRIX, MV3-PARITY-IMPLEMENTATION, EXPERIMENTAL-WEBREQUEST and ROADMAP corrected; CHANGELOG Unreleased section. Tests: test-stock-compiler-honesty and test-runtime-filter-options, both shown to fail on the previous code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Step 1 of the roadmap in the new MV3 limits research: make the MV3 compilers honest about what they drop, and fix filters that compiled into the wrong rule.
Stock lists (build time)
Unsupported: 0for all 55 lists. With the current snapshot, 1,213 filters in 32 lists are reported, per list and per reason, inlog.txtandruleset-details.json:$redirect-rule530, entity or regex hostnames 337);validate-mv3rejects a package whose reported counts do not match its rulesets.##^responseheader()now removes headers from the responses of the named hostnames, with exceptions, as in uBlock Origin. It used to key on the initiator (verified on Chrome 153).removeparam=~nameis reported instead of becoming a rule that never matches.click2load.htmlcannot work through DNR and is reported as unavailable.Imported lists and My filters (runtime)
$requestheaderis rejected. It used to become an unconditional block, or an unconditional allow for@@.@@…$uritransform=…is rejected. It compiled into a real redirect and skipped the trusted-source check, so an untrusted imported list could redirect a site's URLs.$empty/$mp4redirect like stock lists instead of blocking every request type.$removeparamclears the query; it used to do nothing.$permissionsjoining, a droppedimportant,$toreplacing the hostname pattern, and$removeparampage-load rules widening to every page ofdomain=sites (both compilers).Dashboard
Each stock list's tooltip now counts the filters actually converted (uBlock filters: 7,847, not 10,498) and adds a line with the number that could not be converted, in the 10 maintained languages.
Docs
docs/MV3-LIMITS-RESEARCH-2026-09-24.md(Vietnamese). It covers:CHANGELOG.mdhas an Unreleased section.Not yet done (documented)
Testing
test-stock-compiler-honestyandtest-runtime-filter-options. Both were shown to fail on the previous code, file by file, and pass now.npm test: 66/66 test programs pass.npm run lintandnpm run lint:allare clean.validate-mv3 --release(55 rulesets, 70,310 DNR rules).🤖 Generated with Claude Code