Skip to content

Live tab-title check for U+2028/U+2029 on the hosted parity-browser gate #573

Backlog

Description

@SSFSKIM

Live tab-title check for LS/PS on the hosted parity-browser gate

Spawned by #565 (ruling 1190; ruling 1191 on #571).

Problem

#565 makes every JSON-lines channel cua owns end a line at LF only (src/repl-host/jsonl.mjs) and escape U+2028/U+2029 on write. Headless tests prove the framing:

  • test/repl-host/line-separators.test.mjs: through the own host's real supervisor, kernel and trusted worker, with a fixture trusted service standing in for the browser service.
  • test/mcp-upstream.test.mjs and test/mcp-server.test.mjs: the runtime proxy and the MCP server.

On the vendor host, a headless probe of the real node_repl showed its own readers carry LS/PS whole. The one break there was cua's proxy (src/mcp/upstream.mjs), which #565 fixed. See #571's hop table.

No test reads a real tab title holding LS/PS through the browser facade. The hops before the trusted worker are length-prefixed or base64, so by construction they can't split. Still, nothing has run the whole chain live: page → extension → native host → backend socket; the browser service in the trusted worker; kernel → proxy → client.

Check

Add one browser case to repl-parity's api suite, so parity-browser runs it on both hosts against the harness Chrome for Testing (sh scripts/repl-parity/hosted/hosted.sh browser). The cell:

  1. Opens the fixture page (setup: {page: '/counter.html'}).
  2. Sets the title through the facade: await tab.playwright.evaluate('document.title = "Inbox" + String.fromCharCode(0x2028) + "draft" + String.fromCharCode(0x2029) + "end"').
  3. Reads it back with await tab.title().
  4. Also reads the tab listing's title (whatever exposes tab titles on both hosts).
  5. Returns the char codes, [...title].map(c => c.charCodeAt(0)), so the comparison doesn't depend on how a result prints separators.

Expected on both hosts: [73,110,98,111,120,8232,100,114,97,102,116,8233,101,110,100], the cell answered well inside its budget, and no undeclared difference between the hosts.

Run it once at #565's base (0e7f3de) to record the red, then at #565's merge:

  • Own host at 0e7f3de: expected to time out with "kernel reset", because the kernel's stdout reader splits the line (src/repl-host/kernel-child.mjs:365).
  • Vendor host at 0e7f3de: expected to get no answer, because cua's proxy dropped node_repl's result line.

Wiring it needs

hosted.sh browser already registers cua's extension on Chrome for Testing, installs and binds the harness profile, and serves both hosts through test/repl-parity/serve-production.mjs, with the real backend discovery. Still to do:

  • A case id in repl-parity's plan. facade-api.mjs's add() throws for an id caseSchedule() doesn't know (scripts/repl-parity/registry.mjs). The new id (say api/tab/title-line-separators) needs its inventory entry (test/repl-parity/inventory.json) and the coverage and registry checks that follow it.
  • The facade calls on both hosts. tab.playwright.evaluate and tab.title() are used by existing cases (browser-facade-behaviors.mjs, facade-api.mjs). Confirm the tab-listing title on both hosts first.
  • No local headless variant needed. The local harness (test/repl-host/supervisor-harness.mjs) has no browser service behind a fake extension. The hosted case makes building one optional.

Acceptance

Activity

  1. added
    enhancement
    status:ready-for-implementer
    priority:P2
    on Nov 24, 2026
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

    enhancementpriority:P2status:ready-for-implementer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions