Repository navigation
Description
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.mjsandtest/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:
- Opens the fixture page (
setup: {page: '/counter.html'}). - Sets the title through the facade:
await tab.playwright.evaluate('document.title = "Inbox" + String.fromCharCode(0x2028) + "draft" + String.fromCharCode(0x2029) + "end"'). - Reads it back with
await tab.title(). - Also reads the tab listing's title (whatever exposes tab titles on both hosts).
- 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'sadd()throws for an idcaseSchedule()doesn't know (scripts/repl-parity/registry.mjs). The new id (sayapi/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.evaluateandtab.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
- At JSONL readers split messages at U+2028/U+2029 on newer Node: an LS in a window title hangs every read of that window #565's merge, the case passes on both hosts in
parity-browser, with no undeclared difference. - A recorded run at 0e7f3de shows it failing: own host kernel reset, vendor host no answer.
Activity