Skip to content

MV3 parity upgrade: roadmap steps 2–8 - #3

Draft
kayurachann wants to merge 2 commits into
feature/compiler-honestyfrom
feature/mv3-parity-upgrade
Draft

kayurachann wants to merge 2 commits into
feature/compiler-honestyfrom
feature/mv3-parity-upgrade

Conversation

@kayurachann

Copy link
Copy Markdown
Owner

Stacked on #2 (feature/compiler-honesty), which is stacked on #1. Draft until every roadmap step below has landed.

Summary

Implements the roadmap of docs/MV3-LIMITS-RESEARCH-2026-09-24.md, one commit per step. Each step goes through design, implementation, a three-lens review (correctness, tests, security/UX), fixes, and a full verification before it is committed: every test, both lints, both builds and their validators, the new real-Chrome tests, and the auto-update end-to-end test.

Step Status
2. Free the DNR regex pool; exact strict blocking ✅ landed
4a. One compiler for stock, imported and personal lists ⏳
3. Per-site switches, $inline-script/$inline-font ⏳
4b. Provenance v2, $badfilter against stock, package size ⏳
5. Logger, picker and popup parity, $ipaddress ⏳
6. Experimental: classic network engine on blocking webRequest ⏳
7. Experimental: classic dynamic filtering, URL rules, switches ⏳
8. Firefox edition with the full engine ⏳
4c. Built-in list updates between releases (off by default) ⏳

Deferred on purpose: the native CNAME companion and the chrome.debugger body-filtering edition (roadmap steps 10–11). They are optional tiers with security costs, which the research recommends against enabling by default.

Step 2

  • Strict blocking uses plain redirects instead of regex rules. Strict-block rules are extensionPath redirects, so only regex filters need regex rules: 108 of the shared 1,000 slots at defaults, down from 1,000. The 278 strict-block rules that used to be dropped are installed again.
  • The warning page shows the exact blocked address. This holds after server redirects, Back/Forward, duplicated tabs and reloads. When the address is only approximate, the page says so. The low-memory profile avoids the listener that keeps the service worker awake.
  • Imported lists and My filters: their $doc filters show the warning page with Proceed, and they gain regex capacity.
  • Stock regex rules live in static rulesets, validated at build time with Chrome's isRegexSupported (473 of 607 valid on Chrome 153).
  • Diagnostics shows regex capacity, built-in regex rules the browser skips, and how the warning page learned the address.
  • Foundations for later steps: DNR namespace registry and a single write queue, the strict-block module, an exclusions provider, and sender checks.
  • Verification: 75/75 test programs; lints clean; both builds validate; test-strictblock-chrome (22 pages) and test-static-regex-chrome pass on Standard and Experimental; the auto-update e2e passes.

🤖 Generated with Claude Code

kayurachann and others added 2 commits September 24, 2026 19:24
Strict blocking no longer spends a regex rule per filter:
- Strict-block rules are plain extensionPath redirects to
  strictblock.html; only filters that are themselves regexes need a
  regex rule. With the default lists, 108 shared regex slots are used
  instead of 1,000, and the 278 strict-block rules dropped for lack of
  room are installed again.
- The blocked address is recovered from rule-match, webRequest (when
  granted) or navigation events and carried in the page's own history
  entry, so it is exact after server redirects, Back/Forward, duplicated
  tabs and reloads. When only the navigation start is known the page
  says the address is approximate; on the low-memory profile the
  matched-rule listener that keeps the worker awake is not used.
- $doc filters in imported lists and My filters get the warning page
  with Proceed when strict blocking is on and site access is granted.
- Stock regex rules move into each list's static ruleset (a separate
  1,000 pool), validated at build time with Chrome's isRegexSupported
  (Chrome 153: 473 of 607 valid); an offline RE2 check guards the load.
  Filters Chrome cannot run are counted as not converted.
- Imported lists and My filters get the freed regex capacity
  (regex-capacity.js accounts usage per owner); only imported regex
  rules are skipped when the pool is full.
- Diagnostics shows regex capacity, skipped built-in regex rules
  ("Check now") and how the warning page learns the address.

Shared foundations for later steps: dnr-namespaces.js (rule-ID ranges,
priority bands, one DNR write queue), strictblock-rules.js, an
exclusions provider that no longer erases exclusions when strict mode
or site access is turned off, and sender checks for extension pages and
user-script messages.

Tests: unit tests for every module, a package validator for static
regex, and real-Chrome tests (test-strictblock-chrome,
test-static-regex-chrome) run in CI. Compiled-cache revision 5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
re2-portable.js used the host JS engine as a syntax pre-check. Node 22
(CI) rejects RE2 flag groups such as (?i:abc) which Node 23+ accepts,
so the static regex rules packaged by a build depended on the Node
version. The JS check now gets a plain group for flag groups; the
parser still checks the flags. A bare (?i) stays outside the subset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant