Skip to content

Align fork with upstream: adopt src/ base, force-exclude cloud/telemetry, port recorder#2

Open
wbogusz-poolside wants to merge 6 commits into
will/upstream-basefrom
will/align-upstream
Open

Align fork with upstream: adopt src/ base, force-exclude cloud/telemetry, port recorder#2
wbogusz-poolside wants to merge 6 commits into
will/upstream-basefrom
will/align-upstream

Conversation

@wbogusz-poolside

@wbogusz-poolside wbogusz-poolside commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Why

Our fork branched from browser-use/browser-harness back around PR browser-use#190 and added the polling Recorder, but upstream has moved 273 commits ahead since — it restructured into a src/ package, hardened the daemon and helpers, and fixed real bugs we still carry (e.g. current_tab() returning the browser-level target instead of the page, js() silently swallowing errors, a PID-reuse race in restart_daemon). This re-founds our fork on that newer base and re-applies our poolside delta on top, so we pick up the fixes and packaging while keeping our own identity and staying strictly local — no cloud, no telemetry.

Note on the base: this PR targets will/upstream-base (pinned at upstream/main @ 4d75f11), so the diff below is exactly our poolside delta, not the 273-commit upstream import. Adopting it re-points our fork onto that newer upstream base.

What

  • Re-founded on upstream's src/browser_harness/ layout (branch based on upstream/main @ 4d75f11).
  • Restored the browser-harness skill identity (frontmatter name + H1) and re-added the Recording Axiom section to SKILL.md.
  • Switched all docs/invocation from the retired -c flag to stdin (browser-harness < file.py / <<'PY' … PY), including install.md, interaction-skills/profile-sync.md, and domain-skill examples.
  • Force-excluded cloud + telemetry in code (not just via config):
    • __init__.py hard-sets BH_TELEMETRY=0 and drops BU_AUTOSPAWN in-process, so exclusion holds even if an env var says otherwise.
    • run.py removes the telemetry capture call, the cloud auto-bootstrap block (now a bare ensure_daemon()), the PyPI update banner, and the auth / telemetry CLI + script surface.
    • run_doctor no longer calls PyPI or shows a cloud-auth row; the daemon handshake error no longer references Browser Use Cloud.
    • Deleted the browser-use-cloud domain skill.
    • Added tests/unit/test_no_egress.py — a contract test asserting no outbound calls to PostHog / Browser Use Cloud / PyPI, that the forced telemetry-off beats an explicit BH_TELEMETRY=1 opt-in, that cloud bootstrap cannot fire even with BU_AUTOSPAWN=1 + a key, and that cloud names are absent from the script/CLI surface.
  • Preserved the poolside console skill-ingestion contract (the reason skills/browser-harness/ exists as its own directory):
    • The console scans the repo for **/SKILL.md, skips symlinks on upload, and requires the SKILL.md's parent directory name to equal its frontmatter name. Upstream made skills/browser-harness/SKILL.md a symlink to the repo-root file, which would have silently failed to register (and a root-level or src/browser_harness/-nested SKILL.md can never match the contract). Inverted the symlink direction so the real file lives at the discoverable skills/browser-harness/SKILL.md, with the repo-root and packaged (src/browser_harness/) copies pointing to it — DRY preserved, content byte-identical.
    • Made the delivered skill self-contained: the console tars the whole skills/browser-harness/ dir, so bundled the 17 guides SKILL.md lists into skills/browser-harness/interaction-skills/ (real files) and switched its two github.com/poolsideai URLs to relative paths (references/install.md, interaction-skills/). No runtime fetch; profile-sync.md intentionally excluded (remote-sync doc).
    • Added tests/unit/test_skill_bundle.py guarding that the discoverable SKILL.md stays a real file, references no fetch URLs, and that every listed guide is bundled and byte-identical to the canonical interaction-skills/ copy.
    • Removed upstream's .claude-plugin/ marketplace files (a separate Claude Code plugin mechanism) which still referenced "Browser Use cloud" and the Browser Use identity.
  • Ported the polling screenshot Recorder (src/browser_harness/recording.py), exposed in script globals, with the recording interaction skill and tests.
  • Re-applied the session_id() / set_session() helper wrappers.
  • Declared the imageio-ffmpeg encoder dependency in pyproject.toml (kept upstream's websockets==15.0.1 pin and pillow).
  • Left auth.py / telemetry.py dormant on disk (unreferenced from the CLI/script surface) rather than deleted, to minimize conflicts on future upstream syncs — the in-process guard and the no-egress test keep them inert.

…Recording Axiom

Restore the skill name/H1 to browser-harness on the upstream base, switch docs from the retired -c flag to stdin (heredoc/redirect), and re-add the Recording Axiom section to SKILL.md.
Hard-disable telemetry and cloud auto-bootstrap in-process, remove the cloud/auth and telemetry CLI/script surface and the PyPI update banner, and add tests/unit/test_no_egress.py as a contract that fails if any phone-home path returns. Drop the browser-use-cloud domain skill.
Add the polling screenshot Recorder (recording.py) exposed in script globals, re-apply session_id()/set_session() helper wrappers, declare the imageio-ffmpeg encoder dependency, and add the recording interaction skill + tests.
…mlink

The poolside console ingests skills by recursively scanning the repo for
`**/SKILL.md` and requiring the SKILL.md's parent directory name to equal
the frontmatter `name`. The only path that can satisfy that contract here
is `skills/browser-harness/SKILL.md`: a repo-root SKILL.md resolves its
parent to the ingestion's `data/` prefix (never matches), and
`src/browser_harness/` has an underscore that can never match a hyphenated
skill name.

Upstream's layout makes `skills/browser-harness/SKILL.md` a symlink to the
repo-root SKILL.md, but the git-clone ingestion skips symlinks during
upload — so the file never lands in S3 and the browser-harness skill would
silently fail to register in the console.

Invert the symlink direction: the real file now lives at the
console-discoverable path `skills/browser-harness/SKILL.md`, and the
repo-root and packaged (`src/browser_harness/`) copies symlink to it.
Content is byte-identical; a single source of truth is preserved.
…contained

The poolside console tars the whole `skills/browser-harness/` directory and
delivers it to the agent. Upstream's SKILL.md pointed at
`github.com/poolsideai/browser-harness` URLs for install steps and the
interaction-skills guides, so the delivered skill depended on that repo being
reachable (and public) at runtime.

Bundle the 17 guides SKILL.md lists into
`skills/browser-harness/interaction-skills/` as real files (symlinks are
dropped by ingestion) and switch the two URL references to relative paths
(`references/install.md`, `interaction-skills/`). `profile-sync.md` stays out
-- it documents remote profile sync, which this local-only build does not do.
A new guard test asserts the discoverable SKILL.md is a real file, references
no fetch URLs, and that every listed guide is bundled and byte-identical to the
canonical `interaction-skills/` copy.
These Claude Code plugin-marketplace files are a separate mechanism from the
console skill ingestion and still carried upstream's identity and a cloud
reference ("local Chrome or Browser Use cloud", owner "Browser Use"). We keep
the browser-harness identity and force-exclude cloud, and we don't distribute
this repo as a Claude Code plugin, so remove them rather than rebrand.
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