Skip to content

docs(browser): clarify attach coverage and Chromium setup - #2287

Merged
morluto merged 2 commits into
morluto:mainfrom
0xRafie:docs/browser-observation-practicalities
Oct 13, 2026
Merged

morluto merged 2 commits into
morluto:mainfrom
0xRafie:docs/browser-observation-practicalities

Conversation

@0xRafie

@0xRafie 0xRafie commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Three practical gaps in docs/browser-observation.md that an agent or user runs into the first time they attach to a page:

  1. Attach coverage. The doc already says network and console coverage starts at attach. It does not say that scripts the page parsed before attach are still reported. Because of that, a capture can list export.js under scripts while network.requests has no request that fetched it, which looks contradictory until you know why.
  2. Starting a browser that is not google-chrome. It was not clear that any Chromium-family browser works, or where the executable lives on macOS (inside the .app bundle). Fedora's binary name is chromium-browser. There is also a container pitfall: headed Chromium under Xvfb keeps running, but its DevTools port never opens when GL libraries are missing.
  3. Browsers without an HTTP discovery endpoint. An agent browser that drives CDP internally (over --remote-debugging-pipe or a private channel) gives list_browser_targets nothing to attach to. The doc now says to reproduce the flow in a Chromium-family browser started with --remote-debugging-port.

No linked issue. This only corrects and clarifies documentation within existing boundaries. Related design discussion about attaching without an HTTP discovery endpoint: #2288.

Problem and expected behavior

  • Without click: inspect-web-page --include-script-sources on the notes-web demo returns export.js in scripts, network.requests: [], and prior_activity_available: false. The current text explains the empty network array but not why the script is there. Expected: the doc explains both.
  • Pointing REA at a loopback port with no discovery endpoint reports endpoint_unreachable. A browser driven over a pipe or a private channel has no such endpoint at all. Expected: the doc says REA needs the HTTP discovery endpoint and what to do instead.

Change and scope

The change is documentation only, with 20 added lines in docs/browser-observation.md:

  • "Start a browser": a Chromium-family note with macOS .app executable paths, Fedora's chromium-browser, the HTTP discovery endpoint requirement with the workaround, and the minimal-container GL libraries note.
  • "Completeness and limits": two sentences next to the prior_activity_available paragraph saying that pre-attach scripts are still reported under scripts, unlike network and console.

Intentionally not included: any runtime change, and any attach path that does not use HTTP discovery (that would be a separate feature discussion).

Contribution scope: documentation correction within existing boundaries; maintainer scope decision not applicable.

Contract and boundary impact

  • Semantic owner and earliest changed stage: browser observation docs (docs/browser-observation.md); no code stage changed.
  • Contribution scope fit and linked maintainer decision: not applicable (documentation correction within existing boundaries).
  • CLI and MCP/tool-catalog contract: none.
  • Provider, bridge, target-format, or platform compatibility: none. Documents existing Chromium-family behavior.
  • Evidence, artifact, provenance, or reconstruction contract: none. Describes existing scripts / network / prior_activity_available output.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): not applicable.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact: none. Skill metadata.version untouched (no skill change).

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added or updated: none (documentation only).
  • Base reproduction or other evidence (executed with the CLI built from main at d96550f, REA 6.4.0, macOS 26). The demo was website/public/examples/notes-web/, served on 127.0.0.1. Browsers ran headless with a fresh profile each:
    • Chrome 154.0.8037.99, --remote-debugging-port=9242. With the page fully loaded and no click, I ran rea inspect-web-page http://127.0.0.1:9242 <target> --include-script-sources --observation-ms 1000 --json:
      • scripts.items[0].url = .../notes-web/export.js, source included (length 925).
      • network.requests = [], so there is no notes.json request and no request for export.js itself.
      • network.prior_activity_available and console.prior_activity_available are both false.
      • completeness.attach_limited_sections includes network_requests and console_events.
    • Brave 155.1.97.56 (product Chrome/155.0.8059.40), --remote-debugging-port=9244: rea list-browser-targets http://127.0.0.1:9244 --json listed the notes-web page target, the same as Chrome.
    • Nothing listening on 127.0.0.1:9246 (checked with lsof). rea list-browser-targets http://127.0.0.1:9246 --json exited 1 with:
      {"error":"Browser observation failed","code":"provider_unavailable","category":"unavailable","message":"list_browser_targets could not reach the selected loopback debugging endpoint. Verify that the target process is running with debugging enabled and that the endpoint's port matches it, then retry.","retryable":true,"remediation":{"action":"list_browser_targets could not reach the selected loopback debugging endpoint. Verify that the target process is running with debugging enabled and that the endpoint's port matches it, then retry."},"details":{"operation":"list_browser_targets","reason":"endpoint_unreachable"}}
    • Minimal-container note: verified earlier on Fedora 44 (Docker) + Xvfb + headed Chromium 154. The browser process stayed up but the DevTools port never listened until libglvnd-gles, mesa-libEGL and mesa-dri-drivers were installed. That check used plain CDP scripts against the port, not REA itself. The chromium-browser binary name comes from the same Fedora setup.
  • User-visible CLI/MCP output (if applicable): the error above, quoted for reference. No output changes.
  • Remaining proof gaps:
    • I did not launch a browser with --remote-debugging-pipe. The pipe statement relies on that flag providing no TCP discovery endpoint. The endpoint_unreachable result was observed for a port with nothing listening.
    • I did not run REA itself on Fedora or inside a container.
    • On macOS, Brave was only checked with list-browser-targets, not a full inspection.

For evidence-bearing changes: not applicable (documentation only).

Validation performed

  • npm run check: passed (6/6 turbo tasks; module boundaries and architecture guards passed).
  • npm run docs:check: passed.
  • npm run docs:build: passed (only the existing chunk-size warning).
  • The REA CLI runs listed under Evidence were all executed as described.
  • Base: rebased onto main ec2d251 before opening. npm run check and npm run docs:check re-ran there and passed. docs:build and the CLI runs ran on the previous base d96550f; the four commits in between do not touch this page or the browser provider.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: macOS 26 headless Chrome 154 and Brave 155 with REA. The Fedora 44 container finding was checked without REA (see above).
  • Package or release metadata impact: none. Skill metadata.version left at its current value, because no skill file changed and no check required a bump.
  • Security, privacy, process, or containment review: none. The added text keeps the existing advice to use a dedicated profile and loopback-only debugging.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths. (Not applicable: documentation only.)
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output. (Not applicable: no CLI/MCP change; the existing error output is quoted above.)
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@morluto

morluto commented Oct 13, 2026

Copy link
Copy Markdown
Owner

@greptileai review

@greptile-apps

greptile-apps Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

This PR is set for a Plus review. TREX isn't supported with Plus or Apex reviews yet, so Greptile reviews this PR at Base while TREX is on.

@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Low impact] This documentation-only PR appears safe to merge.

Summary

Clarifies existing browser setup and capture behavior in docs/browser-observation.md.

  • The setup guide shows which Chromium browsers REA can attach to.
  • Pages can show scripts parsed before REA attaches.

No new actionable issues were found. Remote supersession status could not be checked because GitHub access was unauthenticated.

Reviews (2) · Last reviewed commit: "docs(browser): distinguish discovery tra..." · Reviewed by Greptile

Comment thread docs/browser-observation.md Resolved
@morluto
morluto merged commit f63674c into morluto:main Oct 13, 2026
1 check passed
@morluto morluto added documentation Improvements or additions to documentation area: setup Setup, packaging, upgrade, install, Doctor, and client registration labels Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: setup Setup, packaging, upgrade, install, Doctor, and client registration documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants