Skip to content

Browser router phase 1 follow-ups from PR #121 review #122

Closed

Description

@chaodu-agent

Closed as done in #123 (squash 11cb965). Every box below was checked against main.

PR #121 (merged as 8037810) shipped the browser tool router and the external Playwright tier. This is phase 1, PR 1 of the browser tiers design in docs/adr/browser-tiers.md and docs/requirements/browser-tiers.md (issue #118). Review found no HIGH findings. This issue collects the MEDIUM and LOW follow-ups.

Out of scope here and tracked in #118: the stdio managed Playwright child (later phase 1 PRs), the wizard page, on-demand install, and the Apple Events tier.

MEDIUM

  • 1. PortOwnerProbe matches only the local port. It checks neither address family nor loopback address, so a same-uid listener on 127.0.0.1:<port> can approve a request to ::1:<port>. Pass the validated endpoint into the probe. Add a test with simultaneous IPv4 and IPv6 listeners.
  • 2. ExternalPlaywrightClient.healthCheck re-runs initialize every 30 s.

LOW

Original body

PR #121 (merged as 8037810) shipped the browser tool router and the external Playwright tier. This is phase 1, PR 1 of the browser tiers design in docs/adr/browser-tiers.md and docs/requirements/browser-tiers.md (issue #118). Review found no HIGH findings. This issue collects the MEDIUM and LOW follow-ups.

Out of scope here and tracked in #118: the stdio managed Playwright child (later phase 1 PRs), the wizard page, on-demand install, and the Apple Events tier.

MEDIUM

  • 1. PortOwnerProbe matches only the local port. It checks neither address family nor loopback address, so a same-uid listener on 127.0.0.1:<port> can approve a request to ::1:<port>. Pass the validated endpoint into the probe. Add a test with simultaneous IPv4 and IPv6 listeners.
  • 2. ExternalPlaywrightClient.healthCheck re-runs initialize every 30 s.
    • It overwrites the session id.
    • It never sends DELETE for old sessions.
    • It uses the 90 s request timeout, while R2 allows 2 s.

LOW

  • Health check timeout should be 2 s (R2), not 90 s (PlaywrightBackend / ExternalPlaywrightClient).
  • BrowserRouter does three owner probes plus an extra tools/list per tools/call. Reduce.
  • PlaywrightBackend.tools() turns a transient error into []. Propagate or keep the last known list.
  • R1.6 and R7.5.5 reporting is not wired up: mode and ownerSummary are missing from sys_info and the menu, and there is no structuredContent.backend.
  • The BrowserRouter guard map last is never pruned.
  • The browser upstream port is not range-checked in main.swift.
  • A repeated --upstream browser= flag is dropped silently. Reject it or take the last value, and say so.
  • The Host header for ::1 is sent without brackets. It should be [::1]:<port>.
  • The BrowserCatalogTests tailscale scan is case-sensitive, while the shell guard uses grep -i. Make the Swift scan case-insensitive.

Activity

  1. added
    enhancementNew feature or request
    p2Priority 2: real bug or scoped planned work
    on Nov 14, 2026
  2. chaodu-agent commented on Nov 16, 2026

    @chaodu-agent
    ContributorAuthor

    done in #123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestp2Priority 2: real bug or scoped planned work

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions