Skip to content

I1304 — The browser transport is the one this repository already drives

Implement the authenticated browser transport in the Node tooling layer beside scripts/lib/ui-audit.mjs: Playwright over the system Chrome, an explicitly named profile, observation scoped to the vendor's own origins, and sanitisation before anything is persisted.

BLOCKED wave 2 · p0 · deep-work profile · parallel safe

Part of external-workspaces — An external workspace is read the way this repository reads anything else, and its content never becomes public by accident.

Blocked. This issue cannot start until I1302 is done. The status is derived from that, not declared.

Objective

Implement the authenticated browser transport in the Node tooling layer beside scripts/lib/ui-audit.mjs: Playwright over the system Chrome, an explicitly named profile, observation scoped to the vendor's own origins, and sanitisation before anything is persisted.

Why

ADR 0025 withdrew the second Rust crate for this reason: scripts/lib/ui-audit.mjs:262 and scripts/lib/cockpit-probe.mjs:436 already launch Chrome through Playwright's CDP transport, deliberately the system browser and never a downloaded one, wired into CI and skipping cleanly where Chrome is absent. A hand-written CDP client would reimplement that in the language with the strictest dependency budget in the repository.

Current state

The two existing consumers each inline their own chromium.launch; no shared launcher was factored out. Neither targets an authenticated third-party session.

Desired state

One launcher, shared by the existing consumers and the new transport, takes the profile by explicit configuration outside the tree. The transport observes only requests whose origin matches the workspace declaration, redacts authorisation headers and cookies before any value leaves memory, and refuses to run against a profile it was not told to use.

Scope

  • scripts/lib
  • scripts
  • package.json

Out of scope

  • Any credential written to disk, including a copied cookie jar or a profile archive
  • Any interaction with authentication, multi-factor prompts or anti-abuse controls
  • DOM scraping where a network observation answers the same question

Dependencies

What waits on this

Acceptance criteria

  • The transport attaches to an explicitly configured, already-authenticated browser profile and refuses to guess one
  • Observation is scoped to the origins the workspace declaration names; traffic to any other origin is never recorded
  • Authorisation headers, cookies and set-cookie values are redacted before an observation is written anywhere
  • The existing UI and cockpit consumers use the same launcher, so the repository has one answer to how it starts a browser
  • Absent Chrome or absent node_modules, the command skips with the defined exit code the repository already uses rather than failing

Validation

  • bash test/run.sh
  • scripts/ui audit

Evidence required

  • profile_explicit
  • origin_scoped
  • redaction_before_persistence
  • one_launcher
  • skips_cleanly

Evidence

None recorded. Every token above needs a command or an artifact behind it before this issue can be completed; narrative is refused.

Risk

Refactoring the two existing consumers onto a shared launcher can break the site and cockpit gates, which are the slowest to run and the ones a laptop skips. The refactor lands with its own green run of both.

Timeline

started
verified
completed

Those three fields, the evidence above and the state of the dependencies are all the status is made of. There is no status field to disagree with them.

Canonical record: .ai/repo/project/issues/I1304.yaml. Read it back with majordomus plan show I1304.