Skip to content

feat(browser): adblock on|off|status — the per-site off switch for pinned uBlock Origin Lite (DIVE-4516) - #83

Merged
lodar merged 1 commit into
mainfrom
dive-4516-adblock-dev
Sep 18, 2026
Merged

lodar merged 1 commit into
mainfrom
dive-4516-adblock-dev

Conversation

@5dive-bot

Copy link
Copy Markdown
Collaborator

What

5dive browser adblock on|off|status <site> — the per-site off switch for the
pinned uBlock Origin Lite that DIVE-4516's stack half installs into agent Chrome
profiles by managed policy. The plugin half of that row.

5dive browser adblock status                 # is it on, and which sites is it off for
sudo 5dive browser adblock off example.com   # this site breaks under filtering — stop filtering it
sudo 5dive browser adblock on  example.com   # filter it again

The premise was measured before it was built on

uBOL's own per-site switch lives in its popup and is not scriptable from a seat.
The one that is, is Chrome policy's ExtensionSettings.<id>.runtime_blocked_hosts
— and that key is documented against content-script injection and extension API
access
, while uBOL Lite filters through declarativeNetRequest, a static
ruleset evaluated in the network stack. Different mechanisms; the row said measure
it rather than assume it.

Measured on exact-swallow at Chrome 153 (receipt on the row, 2026-09-14): with the
key set for the host, the DNR block disappeared (0 → 3000 divs, 149 B → 65002 B)
and the content script stopped injecting; removing it restored both. It is a
real off switch, and it is total for that host.

Four decisions worth reviewing

  • Root, like setup. Chrome policy on Linux is machine-level only — there is no
    per-user policy path — so adblock joins setup as the second verb a root caller
    is not dropped out of at the bottom of bin/browser. T2c8 asserts no third
    verb quietly joins them.
  • The off list is the source of truth, not the policy file.
    /var/lib/5dive/browser/ubol/adblock-off. The nightly root converge re-renders
    the whole policy file; a site turned off at 14:00 that lived only in that file
    would be silently re-filtered at 03:00, with nobody to notice.
  • Both host patterns. *://*.example.com does not match example.com, so a
    wildcard-only off switch reports success and leaves the apex — the host the seat
    actually typed — still filtered. Mutating this to wildcard-only reds 3 arms.
  • Live pickup is not promised. Only fresh launches were measured, so the verb
    says shot/read take it on their next render and a browser already running
    under serve may need serve <site> --stop.

A box with no policy file still records the setting and says so plainly, rather than
reporting an off switch it did not apply.

Checked

tests/browser_plugin_unit.sh531 arms, 531 pass (513 before, 18 new).
Mutation-checked on this tree: a wildcard-only off switch reds 3; leaving an empty
array instead of deleting the key reds 1. The non-root refusal is covered by a
paired positive/negative (T91 refuses at exit 77, T93 succeeds under a root
caller), not by a mutant — the mutant patch for it did not apply cleanly and is not
claimed here.

Plugin version 1.6.0. README and the connect-site skill both say when to reach for
it. Not raising _BS_PLUGIN_MIN in 5dive-api: that is the fleet rollout knob,
and it should turn when the CRX this verb switches off is actually on the boxes.

🤖 Generated with Claude Code

…for pinned uBlock Origin Lite (DIVE-4516)

The stack half of this row installs ONE extension into agent Chrome profiles by
managed policy and blocks every other. Some sites break under filtering, and
uBOL's own per-site switch lives in its popup, which is not scriptable from a
seat. The one that is, is Chrome policy's
`ExtensionSettings.<id>.runtime_blocked_hosts`.

That key is documented against content-script injection and extension API access,
and uBOL Lite filters through declarativeNetRequest in the network stack — a
different mechanism — so it was MEASURED before the verb was built on it, on
exact-swallow at Chrome 153 (receipt on DIVE-4516): with the key set, the DNR
block disappeared and the content script stopped injecting; removing it restored
both.

- Root, like `setup`, because chrome policy on Linux is machine-level only.
- `/var/lib/5dive/browser/ubol/adblock-off` is the source of truth, so the nightly
  root converge that re-renders the policy file preserves a site a seat turned off.
- Both host patterns are written: `*://*.example.com` does not match
  `example.com`, and a wildcard-only off switch would report success while leaving
  the apex filtered.
- The verb says a running `serve` may need a restart rather than promising live
  pickup: only fresh launches were measured.

18 new arms in tests/browser_plugin_unit.sh (531 pass, 0 fail). Mutation checked:
a wildcard-only off switch reds 3 arms; leaving an empty array instead of deleting
the key reds 1. README and the connect-site skill say when to reach for it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@lodar
lodar merged commit e9d9e70 into main Sep 18, 2026
2 checks passed
@lodar
lodar deleted the dive-4516-adblock-dev branch September 18, 2026 00:12
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.

2 participants