Skip to content

JSONL: split lines at LF only and write U+2028/U+2029 escaped (#565) - #571

Merged
SSFSKIM merged 9 commits into
mainfrom
fix/565-jsonl-separators
Nov 24, 2026
Merged

SSFSKIM merged 9 commits into
mainfrom
fix/565-jsonl-separators

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

Closes #565.

What

On Node 24 and later, node:readline also ends lines at U+2028 (LS) and U+2029 (PS). JSON.stringify writes both raw, so cua's JSONL readers cut every message that carried one and silently dropped both halves. Live on Linux (#558's x64 check), an LS in a window title hung listWindows/getApp until the kernel reset, and that window could never be read. Any page or app could trigger it with its title, on macOS's own host too. Ruling 1190: fix both sides.

  • Readers: src/repl-host/jsonl.mjs lines() ends a line at LF only and trims one CR. It decodes UTF-8 across chunks, emits a final line without LF, resumes a paused input, and forwards error while open, detaching at EOF, as readline did. It replaces readline at kernel-child, supervisor, mcp/server, mcp/http, mcp/upstream, sandbox/app-server, verify.mjs and scripts/probe-runtime.mjs.
    • Left alone on purpose: the terminal prompts (cli.mjs, cua engine approve) and channels that are already LF-only or length-prefixed (worker stdin, the Linux engine client, the Chrome native host, the macOS engine client).
  • Writers: stringify/jsonLine escape LS/PS as 
/
, the same JSON value. They cover every MCP response and notification, the supervisor, upstream, kernel, worker, the app-server, HTTP/SSE lines, the Linux engine client, verify and the Chrome trace file. That also protects any reader of cua's output that uses readline, Claude Code's MCP client included.
  • Where the module lives: src/repl-host/. That directory is already a trusted code path on the own host, which Linux always runs, so no trust path widened. No sandbox fingerprint moved, and sandbox-live passed.

Node versions

  • Node 22.18 and 22.23 don't split.
  • Node 24.21 (the vendor's cua_node), 24.22 (cua's managed Node) and 26.7 split at both characters.
  • CI runs Node 24, so CI shows the bug and its fix.

Tests (red on main under Node 24.22 and 26.7, green after)

  • test/repl-host/jsonl.test.mjs: the splitter and the writer escape.
  • mcp-server.test.mjs: an MCP request carrying LS and PS reaches the runtime whole, and the response line carries them escaped.
  • mcp-upstream.test.mjs: LS and PS cross the runtime's stdio whole in both directions.
  • repl-host/line-separators.test.mjs, through the real supervisor, kernel and worker:
    • a cell whose code and output hold LS and PS completes;
    • a trusted service's answer holding them (a window or tab title) reaches the cell whole. On main this fails with "js execution timed out; kernel reset", the live symptom.
  • Focused set: 70 files, 830 tests on Node 22 (own host on 24.22), 809 pass, 1 fail, 20 skipped (Linux-only). The failure is the known serve-lazy environment failure (CUA_FEEDBACK_DIR), also red on main on this Mac. On Node 26: 55 of 55 pass.

Not changed / known

  • Readers still crash on a stream error. A stream error is still an uncaught exception at most readers, exactly as under readline. That is pre-existing and logged in tech-debt-tracker.md.
  • A lone CR is no longer a line break mid-stream. JSON never contains a raw CR.
  • The vendor host (measured, not guessed): node_repl's own readers carry LS and PS whole: its readers of the kernel and worker stdout, the kernel's stdin, and its MCP stdin. The vendor host's only break was cua's own proxy reader (src/mcp/upstream.mjs:72). On main, a cell whose result held LS/PS got no reply, because cua dropped node_repl's answer. At this PR it completes in 104–148 ms. The method and the table are in the hop list below. So until the macOS flip, a tab title with LS can't hang inside the vendor host after this PR.

Live checks

  • Linux, by linux171 (a development check on a private Xvfb display with its own D-Bus and AT-SPI, using Linux: the tree text's escapes (\r \n \t) are undocumented for the model, and VT/FF/NEL/LS/PS stay raw (a forging path) #558's GTK fixture). It ran at 97f606e against main 0e7f3de. Evidence is in ~/.local/share/cua-171/check565/ on dc-linux171-1e68.
    • Fix: LS and PS were placed in the name, value and description, in the title, in the app id with the drag notice raised, and in every part at once together with LF, NEL and VT. Every phase answered: bind took 47–73 ms and the tree reads 26–44 ms, with no timeout and no kernel reset. A plain cell after each phase answered in 15–27 ms.
    • Tree: LS and PS print as \u2028/\u2029 on one line, and the line counts at LF equal those at every break (6/6 and 7/7), so no line is forged.
    • Wire: cua serve's raw stdout held 0 raw LS or PS bytes in every phase, read by an LF-only MCP client.
    • Control (main): every LS and PS phase's bind hit about 60.1 s and then "js execution timed out; kernel reset" from cua's server.
    • Not exercised live: the MCP HTTP transport, the Chrome trace, the sandbox app-server, and macOS. The macOS live check is Live tab-title check for U+2028/U+2029 on the hosted parity-browser gate #573. cb3eac6 changes only the reader's lifecycle and a probe script.

Every hop a tab title crosses (ruling 1191)

Hop table, both hosts, with each hop's framing and the vendor-host measurement

Ruling 1191 on #571. Code citations are at branch fix/565-jsonl-separators head 97f606e; "main" means 0e7f3de.

The title starts in Chrome and ends at the MCP client (the model). A cell reads it with the facade (await tab.title()
and the like, src/cua-api/browser-client.mjs, which runs in the kernel). The facade asks the browser service through
nodeRepl.rpc. On both hosts the service is cua's own (src/services/browser.mjs wrapping src/browser-service/,
loaded as a trusted service; the vendor's own browser service is never selected, #79). The backend is cua's own Chrome
extension and native host.

Framing kinds used below:

  • jsonl.mjs reader: lines() from src/repl-host/jsonl.mjs. It ends a line at LF only, so LS/PS pass through whole.
    On main each of these sites was node:readline, which also splits at LS/PS on Node 24+.
  • LF-only already: the site splits at LF only, and did so on main too.
  • length-prefixed: a binary length header and then the body. Separators can't split it.
  • base64-in-JSONL: the bytes travel base64-encoded inside a JSON line, so they never hold a raw LS/PS.
  • vendor reader: a reader inside the vendor runtime, which cua can't change.
  • jsonLine/stringify writer: on the writer side, 97f606e escapes LS/PS as 
/
. Main wrote them raw.

The leg both hosts share: browser, extension, native host, backend socket

# Hop Framing Site
B1 Page/tab → Chrome extension (chrome.tabs, CDP through chrome.debugger) Chrome internal (object values, not lines) extension/
B2 Extension → native host (Chrome native messaging) length-prefixed: 32-bit native-endian length, then UTF-8 JSON src/chrome/host.mjs ~872, frameDecoder(MAX_FROM_EXTENSION_BYTES) from src/chrome/protocol.mjs
B3 Native host → backend client over its Unix socket (<name>.sock) length-prefixed: u32 frames (encodeFrame/frameDecoder, src/chrome/protocol.mjs 25–44) src/chrome/host.mjs ~921
B4 The socket's bytes → the browser service's backend transport length-prefixed u32 frames, decoded in src/browser-service/backend.mjs (#receive, encodeFrame ~38) the service runs inside the trusted worker; the socket itself is owned by the host process (next sections)

cua's own REPL host (macOS browser-only, Linux; also macOS with cua's engine)

# Hop Framing Site
O1 Supervisor (owns the socket) → trusted worker: socket bytes base64-in-JSONL (native_pipe_data {data_base64}), written by jsonLine src/repl-host/native-pipe.mjs:172; the worker reads its stdin with an LF-only byte splitter (src/repl-host/worker-runtime.mjs:431, 0x0a)
O1a (long socket paths only) connector process → supervisor Node IPC with serialization: 'advanced' (V8 serialization, length-prefixed) src/repl-host/native-pipe-directory.mjs:116, native-pipe-connector.mjs
O2 Trusted worker → supervisor: trusted_service_response carrying the title worker writes jsonLine (worker-runtime.mjs:350); supervisor reads with the jsonl.mjs reader src/repl-host/kernel-child.mjs:365 (the same reader serves the kernel and the worker). Main split here: the cell waited until its budget and the kernel reset (live on linux171; reproduced headless)
O3 Supervisor → kernel: the response relayed jsonLine writer (kernel-child.mjs:414); the kernel reads LF-only (worker-runtime.mjs:431) —
O4 Kernel → supervisor: exec_result holding the cell's output (the title) jsonLine writer (worker-runtime.mjs:350, and kernel.mjs:1504 for the fatal path); jsonl.mjs reader kernel-child.mjs:365. Main split here too
O5 Supervisor → runtime proxy: the MCP tools/call result jsonLine writer (supervisor.mjs:238); the anchor passes stdio through untouched (src/mcp/anchor.mjs:29, stdio: 'inherit'); jsonl.mjs reader src/mcp/upstream.mjs:72
O6 Proxy → MCP client (stdio, cua serve) jsonLine writer src/mcp/server.mjs:140. The client's own reader is not cua's (Claude Code reads with readline), so the escaping is what keeps the client from splitting.
O6' Proxy → MCP client over HTTP (cua agent, remote devices) the connection's output is read by the jsonl.mjs reader (src/mcp/http.mjs:275) and sent as an SSE data: line through stringify (http.mjs:187/191) or as a JSON body (res.end(JSON.stringify(...)), not line-framed) across the relay: WebSocket frames carrying the body as base64 (src/remote/relay-link.mjs); the remote client's SSE parser splits at CR/LF only (src/remote/client.mjs:75); then it is written to the local client by server.mjs:140

Request direction (the cell's code and nodeRepl.rpc arguments): client → server.mjs:400 (jsonl.mjs reader) →
upstream.mjs:180 (jsonLine) → supervisor.mjs:736 (jsonl.mjs reader) → kernel stdin (LF-only). Kernel →
worker (trusted_service_request): the same O4/O3 shape, worker stdin LF-only.

The macOS vendor host (node_repl 26.928.40906, its Node 24.21.0-cua.1)

The extension/native-host leg B1–B4 is the same. node_repl is a Rust supervisor (tokio/rmcp; research B,
docs/doperpowers/research/2026-10-14-own-repl-host/research-B-node-repl-host.txt:4). It spawns the vendor's
kernel.js and trusted-worker.js on its own Node.

# Hop Framing Site
V1 node_repl (owns the socket) → vendor trusted worker base64-in-JSONL (research, standalone spec Surprises "2026-10-02, M5"); written by a vendor writer, read by the vendor worker vendor
V2 Vendor trusted worker → node_repl: trusted_service_response with the title vendor writer (JSON.stringify(message)+"\n", raw LS/PS); vendor reader in Rust measured below: carries LS/PS whole
V3 node_repl → vendor kernel vendor reader in the kernel measured below: whole
V4 Vendor kernel → node_repl: exec_result vendor writer (raw LS/PS); vendor reader in Rust measured below: whole
V5 node_repl → cua's runtime proxy: the MCP result vendor writer (rmcp): it writes LS/PS raw (measured: main's proxy split it into three non-JSON lines); jsonl.mjs reader src/mcp/upstream.mjs:72. The one place it broke on this host
V6 Proxy → MCP client as O6/O6' server.mjs:140 (jsonLine)

Request direction: cua → node_repl stdin is jsonLine (upstream.mjs:180, escaped at 97f606e). A raw LS/PS (main)
was also read whole by node_repl (measured, cell 3 below).


Vendor-host fact: does LS/PS hang inside node_repl? (measured)

No. node_repl's own readers carry LS and PS whole in both directions: kernel stdout, trusted-worker stdout, kernel
stdin and its MCP stdin. The only break on the vendor host was cua's runtime proxy reader (src/mcp/upstream.mjs:72),
which dropped the result. 97f606e fixes it.

Harness. This is a scratch probe, not committed: ~/.local/share/cua-565/vendor-ls/probe.mjs.

  • It runs the installed, unmodified vendor node_repl (~/Library/Application Support/cua/runtimes/26.928.40906-darwin-arm64/cua_node/bin/node_repl), with NODE_REPL_NODE_PATH set to the vendor's own Node 24.21.0.
  • It goes through the checkout's own spawnUpstream (src/mcp/upstream.mjs) of the repo given as argv[2], so the commit under test supplies cua's proxy reader and writer.
  • The fixture trusted service titles answers {title: 'Inbox' + LS + 'draft' + PS + 'end'}. It is registered through NODE_REPL_TRUSTED_SERVICES / NODE_REPL_TRUSTED_CODE_PATHS with NODE_REPL_TRUSTED_RPC_ENABLED=1.
  • Everything runs in a scratch HOME, CODEX_HOME and TMPDIR. There is no GUI, no AX and no browser.
  • CODEX_CLI_PATH is unset, so node_repl runs its kernel and worker unconfined. That doesn't touch their stdio framing.
  • Three cells run, each with timeout_ms 10000. The probe waits up to 30 s for a reply.

Commands:

# main (a detached worktree at 0e7f3de4a)
/opt/homebrew/opt/node@26/bin/node ~/.local/share/cua-565/vendor-ls/probe.mjs <worktree at 0e7f3de4a>
"$HOME/Library/Application Support/cua/node/24.22.0/bin/node" ~/.local/share/cua-565/vendor-ls/probe.mjs <worktree at 0e7f3de4a>
# 97f606e02
/opt/homebrew/opt/node@26/bin/node ~/.local/share/cua-565/vendor-ls/probe.mjs /Users/new/Developer/GitHub/cua/.claude/worktrees/b93-565
"$HOME/Library/Application Support/cua/node/24.22.0/bin/node" ~/.local/share/cua-565/vendor-ls/probe.mjs /Users/new/Developer/GitHub/cua/.claude/worktrees/b93-565

(The Node named first runs cua's proxy. The vendor host always runs on its own Node 24.21.0.) The JSON reports are in
~/.local/share/cua-565/vendor-ls/{main,head}-node{24,26}.json.

Cell main, proxy on 26.7.0 main, proxy on 24.22.0 97f606e, proxy on 26.7.0 97f606e, proxy on 24.22.0
1. cell output holds LS+PS (nodeRepl.write("tab"+LS+"title"+PS+"end"): V4, V5) no reply within 30 s. The proxy logged "runtime wrote a non-JSON line to its MCP stream (71 / 5 / 72 characters); dropped". No kernel reset: node_repl answered, cua dropped the answer. no reply within 30 s (same three drops) completed in 148 ms; the text carries U+2028 and U+2029 completed in 104 ms; same
2. trusted service answer holds LS+PS, the cell returns its char codes (V2, V3) completed in 25 ms: [73,110,98,111,120,8232,100,114,97,102,116,8233,101,110,100] completed in 12 ms (same) completed in 4 ms (same) completed in 7 ms (same)
3. request code holds raw LS+PS (cua → node_repl stdin → kernel) completed: 12:114,101,113,8232,99,111,100,101,8233,101,110,100 completed completed (cua now sends the escapes) completed

What the cells show:

  • Vendor internals (cells 2 and 3 on main): node_repl's readers of the worker's and kernel's stdout, the kernel's stdin and node_repl's MCP stdin don't split at LS/PS. Even on main, a trusted service's answer holding them reaches the cell.
  • The proxy (cell 1 on main): a cell's result holding them leaves node_repl raw and was cut by cua's proxy. The tool call then never got an answer. There was no kernel reset: the vendor kernel had answered, and cua dropped the answer. On a real connection the call waits until the client gives up.
  • Effect of the fix: at 97f606e every cell completes under the proxy's Node 24 and 26.

So a vendor-host lane in the follow-up check would guard upstream.mjs:72 and server.mjs:140, not anything inside
node_repl.

Review

Plugin 0.29.20. main has merged in at cb9973e (M6a, 0.29.19). After the merge, M6a added no JSONL reader or writer under src/, so nothing new needed switching.

Sminos-Session: cursor235#b93055dd (cua on macbook)

…efs #565)

Ruling 1190. node:readline ends a line at U+2028 and U+2029 on Node 24
and later (measured: 24.21, 24.22, 26.7; not 22.18 or 22.23), and
JSON.stringify leaves both raw, so a readline-based JSONL reader cut a
message holding either in two and dropped both halves.

src/repl-host/jsonl.mjs is the one framing for cua's JSON-lines channels:
lines(input) ends a line at LF only, trims a trailing CR, decodes UTF-8
across chunk boundaries, reads a last line without LF at the input's
end, then emits 'close', and re-emits the input's error, as readline's
interface did. stringify/jsonLine write LS and PS as their \u escapes,
the same JSON value.

It lives in src/repl-host because the kernel, the trusted worker and
cua's Linux service load it, and the trusted worker refuses an import
from outside a trusted code path; src itself is not one.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…g (refs #565)

Ruling 1190, both sides. Readers: node:readline gives way to
lines() on the MCP client's stdio (src/mcp/server.mjs), the runtime's
stdout (src/mcp/upstream.mjs), the HTTP connection's output
(src/mcp/http.mjs), the own host's MCP input (supervisor.mjs) and its
kernel's and trusted worker's stdout (kernel-child.mjs), the sandbox
app-server and verify.mjs. Each keeps its error handling, close and
`ended` guards. Writers: jsonLine()/stringify() escape U+2028/U+2029 on
MCP responses and notifications, SSE data lines, the runtime's and the
children's stdin, the kernel's and worker's stdout, the Linux engine's
stdin, the app-server and the Chrome host's trace file.

Tests, red on main under Node 24.22 and 26.7: an MCP request carrying
LS/PS reaches the runtime and its response line holds the escapes; the
runtime's raw LS/PS answer crosses upstream.mjs whole; through the own
host, a cell whose code and output carry them completes, and a trusted
service's title carrying them (a window or tab title's path) reaches the
cell instead of resetting the kernel at the budget.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…splits at LS/PS (refs #565)

The living spec holds the entry because the framing spans the MCP
server, the runtime proxy, the HTTP transport and the sandbox app-server
as well as the own host's wires. Surprises records which Node versions
split (24.21, 24.22, 26.7; not 22) and what CI's Node 24 covers. The
tech-debt tracker keeps the pre-existing rethrow of a reader's input
error at sites without an error listener, which the ruling kept.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…e LS/PS (refs #565)

Sminos-Session: cursor235#b93055dd (cua on macbook)
…readline did (refs #565)

Review of 0e7f3de..97f606e, two findings in the reader:
- A 'data' listener does not restart a stream its owner paused, so a
  paused input was never read; readline's interface resumed its input.
  lines() now resumes it after installing its handlers.
- Readline removed its input listeners at EOF. lines() kept forwarding
  the input's errors after 'close', so a stream error during teardown
  threw from a closed reader with no listener, even where the stream had
  its own handler (kernel-child's stdout). lines() now removes its data,
  end and error listeners at the end; while open it forwards as before.

Each has a test, red before (the paused input never closed; the late
error threw) and green after, on Node 22 and 26.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…e shared JSONL framing (refs #565)

The direct vendor-runtime probe read JSON lines with node:readline,
which on Node 24+ cuts a message holding U+2028/U+2029. It now uses
lines() and jsonLine() from src/repl-host/jsonl.mjs.

Sminos-Session: cursor235#b93055dd (cua on macbook)
SSFSKIM added a commit that referenced this pull request Nov 24, 2026
…e read (#568)

* #171 M6a: the pre-flight, a draft for the design session

The plan a later build follows, from reading the code at da7585c: the module inventory, the Linux runtime record, resolution and launch, install and migration, tests and acceptance 12, the tasks, and nine forks to rule. No code was run.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a: the pre-flight, revision 2: the adversarial review's eleven findings folded in

The pinned parts become the ordinary path, with named overrides ruled apart and the vendor's Node excluded (F2, F2a). Install runs the common parts first and each lane on its own, its exit status following the requested lane (F4). The refusal names this cua's own installer (F9). The lock is authenticated against the vendor archive's lockfile at pin time, the closure is what is reachable from the six roots, tarballs are read by cua with their members checked, and the payload is recorded and verified. Item 6 is a fork of its own (F10). The browser-only check calls the browser service and witnesses each import's real path. The hosted venue is plausible, not established, with a shared environment and positive controls. The provisioner needs no deb by default, and the capability home joins T5. No code was run.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a: the pre-flight, revision 3: the re-review's four items

The engine lookup carries the Node lookup's exclusion: an override that is, or leads, under runtimes/ is refused before anything there is touched. The import witness names the six entries the kernel's resolver selects (three ES modules, three CommonJS) and requires each selected and opened. F2 now recommends a minimum for each part, the coordinator's view and mine, with what an open binds of the engine stated for both rulings: a compatible engine under the minimum, logged; an immutable directory per digest and two race tests under strict pins. sandbox.launcher is checked after each home's install, not before E0. No code was run.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a: the pre-flight ruled (1110): every fork as recommended, and the three additions folded in

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T6: the venue pilot's wrapper, confinement step, trace reader and dispatch workflow (task 143)

The wave-0 part of T6 (the M6a pre-flight §5.2, "The venue pilot"), on main's code:

- scripts/accept/linux-runtime-env.sh: the run's environment, the same on both venues (a home of the run's, a 0700
  XDG_RUNTIME_DIR, xvfb-run's private display with Openbox, a private dbus-run-session bus whose daemon logs to the run,
  accessibility on by doctor's A11Y_ENABLE_COMMAND, CUA_SHIM_SANDBOX refused).
- scripts/accept/linux-confinement.mjs: the confinement step the fixtures share. Its targets answer: the run's X socket,
  the bus's actual socket from DBUS_SESSION_BUS_ADDRESS, and a TCP and a Unix listener of the fixture's own. Positive
  controls first, then the kernel's cell, the listeners' counts, and the kernel's parents (the pinned helper, bwrap).
  linux-native.mjs runs it in place of its own socket checks (port 22, $XDG_RUNTIME_DIR/bus).
- scripts/accept/linux-trace.mjs: reads `strace -f --pidns-translation` and says whether it followed the helper's
  children into the kernel, which then went on calling.
- scripts/accept/linux-runtime-pilot.mjs: doctor's four environment rows, today's `cua install`, sandbox.launcher, the
  item 1 smoke plain and traced, and the four answers (userns, a11y, confinement, strace) as yes, no or unanswered.
- .github/workflows/linux-runtime.yml: dispatch-only, an arm64 leg on ubuntu-24.04-arm and an x64 control leg, the
  file's push registering it from the branch as linux-engine.yml's did.

Each judge's negative control is a test: a kernel that connects, a listener that accepted, a failed control, a kernel
outside the helper or bwrap, a trace without the kernel or with nothing after its exec, a warn on an environment row.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T6: the pilot workflow records bubblewrap's refusal before the remedy instead of stopping on it (task 143)

The step's shell is bash -e, so the expected refusal ended the step on the first dispatch (run 45140841963, both legs).

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T1: the ModuleTree, cua's own install of the packages cells import

The pin: runtime/modules/package.json names the six packages at exact versions and holds every
other package at the vendor lock's version with overrides; package-lock.json is npm's (version 3,
libc on the @img entries, every entry at its canonical registry URL); provenance.json is what
scripts/modules-pin.mjs wrote against both pinned vendor debs: each deb matched to its pin, only
.pnpm/lock.yaml taken out, and both architectures' closures equal to the vendor lockfile's own
closures by name, version and SHA-512, each tarball fetched, checked and read. 23 packages per
architecture; run twice, the same bytes.

src/runtime/module-tree.mjs: loadModuleLock, moduleClosure (reachable edges from the root,
optional branches pruned by os, cpu and libc), installModuleTree (fetch at the pinned length,
SHA-512 before any read, cua's reader, the payload recorded as written, one rename),
readModuleTree, checkModuleTree (the connection's stat) and verifyModuleTree (every digest,
nothing added). src/runtime/tarball.mjs reads gzip and tar itself and writes files and
directories only. verifyArchive takes a SHA-512 integrity; homeLayout gains modules.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T6: the venue pilot's evidence: all four answers yes on the hosted arm64 runner and its x64 control (task 143)

Run 45141056542 at 6d39cb0: bubblewrap gets its user namespace after the remedy doctor names (restrict=1 refused it
before), gedit's tree is served as at_spi on the private bus, the four controls connect while the kernel gets EPERM on
each and the listeners saw only the controls, and strace -f --pidns-translation follows the helper's children into the
kernel. Measured: 103 calls under runtimes/ in the traced serve tree on main's code, the reads E1 will judge.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T1: fix wave 1, the ModuleTree's integrity boundaries

The five Important findings of task 144's review, each test-first:

- The pin script snapshots each deb into private scratch and hashes, matches and reads that
  one copy, so a file replaced mid-run cannot pair a pinned hash with another lockfile.
- Module tarballs come from their canonical URL itself: both the pin script and the installer
  refuse redirects (the shared downloader keeps following them for every other asset), and the
  pin script streams each body under a 64 MiB bound.
- Damaged trees stay inside the real tree: modules/ and staging/ must be real directories,
  install.json a regular file, and every directory on the way to a checked file real; the full
  check reads each file once, by its walk, and never opens a link or a FIFO.
- A successful install means the recorded tree passes its checks: every package must carry its
  package.json, and the full check compares the complete native inventory with the record.
- The tar reader checks the whole structure before writing: the top directory's header once,
  two zero blocks with only zeros after them, and no NUL in a pax or GNU long name.

The pin-time run on both debs writes provenance.json byte-identical.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T6: task 143's review fixes: the pilot's verdict, proved refusals, the answering kernel, the serve's trace, the vendor-tree counter, the run's isolation, the artifact list

The task review's seven Important findings and one Minor, each test-first:

1. The pilot exits 0 only when every mandatory step passed (MANDATORY_STEPS) and all four answers are yes
   (pilotVerdict); the accessibility answer is yes only for a typing step that passed.
2. A kernel's connect is refused only by an errno that proves it for its target (REFUSALS); a timeout, a generic error
   or a malformed value proves nothing.
3. The kernel is the one that answered: its cell reports its namespace pid and start time, a 50 ms sampler of /proc runs
   across the cell, and the one process under this serve with that identity is bound. Executables are read from /proc
   only: an unreadable one certifies nothing. The userns answer takes bwrap only above that kernel.
4. The trace judge requires the worker and the calling kernel to descend from the serve it judges.
5. The vendor-tree counter counts attempted execs, resolves relative paths against their -y-decoded base, the
   descriptor or the working directory (chdir, fchdir, AT_FDCWD), counts a returned descriptor's path, and reports
   itself incomplete when a base is unknown. strace runs with -y and traces fchdir.
6. The wrapper takes its homes from linux-runtime-env.mjs: app-env.mjs's lists unset (AT_SPI_BUS_ADDRESS and
   SESSION_MANAGER among them), a fresh user HOME and XDG_RUNTIME_DIR, a run-owned fresh CUA_HOME.
7. Raw streams stay in the run's scratch; the artifact is ARTIFACT_FILES (pilot.json and the two smoke projections),
   which the workflow uploads by name.
8. Openbox not up after 50 checks fails the setup with its log.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T1: fix wave 2, pin and install accept the same packages

- One npm-package step, readPackageTarball (src/runtime/tarball.mjs): a valid archive whose top
  directory holds a package.json file. The installer's unpack and the pin script both use it,
  so a shape the install would refuse can no longer reach provenance.json; it is refused before
  any write in either path.
- The FIFO checks run in a child the parent kills at a deadline, so a regression to a
  synchronous FIFO read fails at the named assertion instead of hanging the test file.
- modules/ is still refused as a link before the lookup; staging/ only on the new-install path,
  so a tree already installed and verified stays a no-op.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T6: the kernel's identity from its own /proc/self/stat; a descriptor that is no file is no path (task 143)

Run 45147992954 at 629b31d failed closed on both legs: a kernel cell has no process global, so the cell's identity read
threw and the step bound no kernel (confinement no, userns unanswered, exit 1). The pid now comes from the sandbox's
/proc/self/stat, as the start time does; checked live here (pid 2, bound under the serve through helper, bwrap, helper).
The same run's counter left one call unresolved: the trusted worker's open of /proc/self/fd/5, whose returned descriptor
-y decodes as pipe:[...]. A decoded pipe, socket or anonymous inode is no path, and no longer unresolved; the local trace
then counts 125 calls under runtimes/ with none unresolved.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T6: the venue pilot's evidence regenerated under the corrected contract: verdict PASS, all four yes on both legs (task 143)

Run 45150450103 at 7dfc6af: every mandatory step passed and all four answers are yes on arm64 and x64. The kernel that
answered was bound by its identity under this serve, the trace's worker and kernel descend from the serve, and the
vendor-tree count is complete (125 calls, none unresolved). The files are the run's artifact as uploaded, exactly
ARTIFACT_FILES per leg.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T2: the Linux runtime record and resolution

runtime/linux-runtime.json names cua's own four parts by their pins (the
module lock's SHA-256, the managed Node, the sandbox helper's tag, the
engine), parsed strictly and bound to each pin at load (manifest.mjs:
parseLinuxRuntime, loadLinuxRuntime). Its release name is derived from it
(linuxRelease), so a change to any part is a new release.

On a Linux host locateRuntime and resolveRuntime answer that record: the
module tree this lock names, installed by cua for this host, checked by
checkModuleTree at resolution. The pointer is not read there and nothing
under runtimes/ is touched. vendorLinuxRuntime finds the vendor tree by
its pin, for CUA_NATIVE_ENGINE=vendor only. Every Linux remedy names
ownInstaller's command, this cua's own bin/cua.mjs by its absolute path
(F9), the module tree's recovery hint and the vendor tree's install hint
included.

scripts/linux-engine-pin.mjs rewrites the record's engine version with
the pin, so an engine release stays one command and the merge that
brings engine 0.4.4 here is one run of it.

Until T3 and T4: buildLaunch finds the vendor tree by its pin for a
Linux session on the vendor's engine, and doctor's Linux runtime rows
read the vendor tree through vendorLinuxRuntime. fakeInstalledHome and
forgeActiveRuntime lay down the own module tree for a Linux host.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T2: fix wave 1, the vendor lookup's states and the archive pins off the Linux path

- locateRuntime and resolveRuntime read the archive pins only where they
  select (darwin): a bad vendor pin no longer blocks the own Linux runtime.
  The recorder test now rules out any read of runtime/releases/*.json,
  apart from the managed Node's pins, and counts the module lock read once.
- Linux resolution binds the record and reads the tree against one parsed
  module lock (loadLinuxRuntime takes `lock`).
- vendorLinuxRuntime tells an absent tree (release_not_installed) from one
  present but damaged (release_damaged: a file or a link at its path, a
  path that cannot be stat-ed, a record not the pin's, a layout file
  missing), and every refusal carries context {release, home, root};
  CuaError gains `context`.
- The module tree's structural check at resolution names the derived
  release in its recovery hint (F9).
- The pin script's merge test seeds its old engine version itself, so it
  holds once 0.4.4 is the checked-in pin.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T6: task 143's re-review fixes: each syscall's pathname operands, CUA_HOME by its real path, the sampler stopped in finally (task 143)

1. The vendor-tree counter reads each traced syscall's pathname operands at their positions (OPERANDS): rename's and
   link's destinations, the at-forms' second pair, symlinkat's link name (a symlink's target is content). An absolute
   path stands whatever its descriptor decodes to. A NULL or empty path names its descriptor. A syscall form not
   listed, an operand strace did not print whole, or a relative path against a descriptor that is no directory is
   unresolved, so the count is incomplete, never zero. strace's padded return column no longer hides the arguments.
   The local x64 -y trace still counts 125 calls under runtimes/ with none unresolved.
2. The run and a named CUA_HOME are compared by their real paths (the nearest existing ancestor resolved), so a
   symlink in the run that leads out of it no longer carries CUA_HOME away; a run reached through a symlink spells its
   homes by its real path.
3. The confinement step stops its sampler in finally, so a rejected cell request leaves nothing sampling.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T6: the venue pilot's evidence from run 45169685893 at a0e4365: verdict PASS on both legs, the parser complete on arm64 (task 143)

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T3: launch and selection on cua's own Linux runtime

The Linux Node is the managed one or CUA_NODE, never the node running cua or PATH's; the Node lookup and the engine
lookup refuse any path that is, or leads, under the vendor's tree before touching it. Either engine selection takes an
installed engine at or above MIN_ENGINE_VERSION by its record, or is refused at the open (M5's fallback is gone). The
vendor selection resolves its tree once and the launch takes it from there; the ModuleTree is the module base under
either engine, protected but not trusted. The recorder test shows no read under runtimes/ with the tree present.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T4: cua install on Linux takes cua's own runtime first, each lane on its own

The record first, then the module tree, the sandbox helper and Node, the pointer to the derived release once they are in
place, then cua's engine and the vendor's tree (installed without taking the pointer), every step attempted; the exit
status follows a failed common part or a failed lane the home asks for (F4). `cua runtime use` on Linux verifies this
cua's own runtime and records it; a vendor release is refused, naming CUA_NATIVE_ENGINE=vendor. A runtimes/ that is a
file is refused as what blocks the vendor's install.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T4: doctor's Linux runtime rows are cua's own runtime; the vendor's tree is one row

platform names the release the record derives; runtime.installed the module tree and the pointer; runtime.modules the
tree's full check; runtime.node the managed Node against its pin; runtime.vendor folds runtime.files, vendor-manifest,
ipc and signatures, skipping an absent tree and failing a damaged one. The engine row fails every refusal of a
preference for cua's engine (F3) and a vendor selection whose tree is absent. Every fail, and every warn for a part
behind its pin, names this cua's own installer by its absolute path (ruling 1110), sandbox.launcher's too. A runtimes/
that is a file is named as what blocks the vendor's tree. The profile map's classic-level comes from the ModuleTree.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T4: the cloud provisioner reaches a working device with no deb

CUA_DEB gains `none`, render.sh's default: the VM installs and registers cua's own runtime and fetches or waits for
nothing. `pin`, a URL or `upload` ask for the vendor's tree: the own runtime and its registration come first, as under
none, then the deb (unless cua install already placed the tree from the pin's URL) and `cua install --archive`; a deb
that cannot be had stops provisioning there, with the device working. The install block is functions the test runs
with stub cua and curl; cua install's summary is {ok, release, changed, sessions}.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T4: a runtimes/ that leads to a directory still serves; what opens follows the parts, not the pointer

The vendor's install refuses a runtimes/ only where it is not a directory (a file, or a link that leads to none), as
before for a link to one. The last line and `sessions` follow the parts alone, since the pointer selects nothing; the
engine's line names the home's setting as the vendor's does, and --no-node is told apart from no pinned Node.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T4: runtime-node's install tests name their platform; the Linux helper step follows cua's own runtime

The two vendor-first install tests run macOS's install wherever the suite runs; the Linux helper step is a common part
after the module tree, and its failure fails the install with this cua's own installer as the remedy, the lanes still
attempted.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T3: the macOS runner's Linux-host tests follow F2 and F3

The linux-native sessions select the vendor's engine explicitly, its tree the fixture's; acceptance 9's fifth case
installs cua's engine and reads the Linux Node lookup on a Linux host.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T4: doctor and install hold against T3's selection

The engine row's tests take a pin above the minimum and the vendor's tree through the selection's own seam; the
default's refusals and the vendor's absent tree are the selection's, not injected. The engine row loses the branch
only M5's fallback reached. Doctor passes the host's platform and arch to replHostFor and ownHostNode. The install's
failure tests now see the default's own refusal of cua's engine and the vendor's engine_not_installed.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T3: fix wave 1, one resolved path from the vendor-tree guard to its use

outsideVendorTree walks a path as the kernel does, `..` and relative link targets included, refusing entry into
runtimes/ before touching it, and its resolved path is the one metadata, the version probe and the launch use. The
managed Node's pointer, record and binary and the installed engine's record are guarded before they are read; the
managed Node must be executable; CUA_LINUX_ENGINE_BIN is held to the minimum at the open; override refusals name the
override's fix, then this checkout's installer. The Linux selection oracle judges the Node on the managed one or
CUA_NODE. The engine-swap test renames real executables; runtime-node's macOS lookup row is pinned to darwin.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T3: fix wave 1, the sandbox helper's refusals name this checkout's installer

ownInstaller moves to src/runtime/installer.mjs, which depends on nothing of cua's; manifest.mjs re-exports it, and
src/sandbox/linux.mjs's verifyHelper names its absolute command in every remedy (F9, the pre-flight's C11).

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T4 fix wave 1: the provisioner fails a device it could not give cua's own runtime; an explicit deb source is honoured

A failed install of cua's own runtime stops before registration and exits nonzero, with the install's error and its
remedy in the checklist (stop_failed); only the vendor's deb, after registration, stops early with a working device. The
cua install of the pin's URL stands in for `CUA_DEB=pin` alone: a mirror or an upload is fetched and checked. (Review
items 1 and 2.)

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T4 fix wave 1: doctor's runtime rows judge every common part and name what to move aside

runtime.installed needs the module tree, the Node a session resolves and the helper (a disabled sandbox needs none);
runtime.node is the session's own Node lookup, its refusal and its correction; a module tree, a Node or a runtimes/ link
an installer will not replace is named to be moved aside before the installer and its release; a current.json that
cannot be read warns, naming it, and doctor goes on; vendor pins that cannot be loaded fail runtime.vendor alone; and
repl.host keeps its refusal's remedy. Tests for a changed JavaScript file and a removed, truncated or altered native file.
(Review items 3 to 7 for doctor, and c.)

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T4 fix wave 1: the engine row keeps the refusal's own cause and remedy

A preference for cua's engine that sessions refuse shows the selection's sentence and hint, not the installed engine's
facts, so a Node refusal never reads as an engine to reinstall. A setting or device mode no installer fixes names its
correction; a capability failure names its remedy (CUA_LINUX_ENGINE_BIN unset for an override). (Review item 8.)

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T4 fix wave 1: cua install reports what opens as a session would resolve it

`sessions` is resolved after the steps, apart from the lanes' exit accounting: the runtime, the Node lookup (CUA_NODE
honoured) and the helper unless the sandbox is disabled, each engine's selection, and the setting's own refusal, each
with its words. Vendor pins that cannot be loaded fail the vendor's lane alone; the leftovers scan goes on. A
current.json that is not a file is named to be moved aside. `changed` counts the lanes. The runtimes/ check is Linux's.
(Review items 3, 4, 7 for install, a and b.)

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T3: fix wave 1, the helper tests expect this checkout's installer

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T4 fix wave 2: install and doctor promise what the launcher and the installer do

- cua install resolves what opens as cua serve would: its settings, the REPL host's selection with the engine's, and
  cua's engine's device mode; the other engine is said under its override (sessions: {browser, computer, engine,
  alternate, why}), never as what opens.
- Vendor pins a directory the filesystem refuses are a pin error (manifest.mjs vendorPinsOf, pins_unavailable), kept in
  the vendor's lane, row and selection, each naming the checked-in pins to restore.
- runtime.installed asks the session's own module tree check; runtime.node names what node-install refuses to replace
  (a Node pointer that is not a file, a pinned path that is not its recorded install).
- One classification of current.json for install and doctor (manifest.mjs pointerObstruction): a directory or a link,
  to a pointer or to nothing, is named to be moved aside in the same words.
- The helper's refusal reaches install's output with this cua's installer and release, never a bare `cua install`.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T3: fix wave 2, the kernel's resolution carried from selection to preflight

The resolver moves to src/runtime/vendor-tree.mjs and walks as the kernel does: every component it passes through must
be a directory (ENOTDIR is refused, never reinterpreted), and it returns the links it followed. The installed engine is
checked, read and launched at that resolution, its record read at its own; the scoped preflight takes the links the
selection followed instead of re-walking the lookup lexically, and the lexical engineLookup is gone. The open's version
probe is killed with SIGKILL at its deadline and reads the line as the service's engineVersionOf does.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a: the Linux runtime record names engine 0.4.4 (scripts/linux-engine-pin.mjs linux-engine-v0.4.4)

The pin script rewrote runtime/engine/linux-engine.json as main already has it (attestations verified on both
architectures) and the record's engine.version, 0.4.3 to 0.4.4, so the derived release follows.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a: tests that main's merge and 0.4.4 met on T4

- runtime-launch (T3's): the Linux engine fixture records 0.4.4, the new minimum.
- runtime-linux-record: the engine version that moves the release name is one the record does not hold (it is 0.4.4 now).
- runtime-engine-install (main's): on Linux the module tree is stubbed, and the vendor's tree is the last lane.
- cli-linux-install: a macOS install now ends with main's macOS engine step, stubbed and reported.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a: the hosted test gate's 0.4.4 fixtures

The macOS runner's test gate (run 45210637500) found three more tests that the merge and the minimum 0.4.4 met:
- repl-parity/selection-oracle: its Linux engine fixture records 0.4.4, so the default selects cua's engine.
- services-engine-linux/client: an engine below the minimum is refused against 0.4.4.
- runtime-engine-install: on Linux the vendor's lane runs only where the fixture's pin is this host's, so the order
  is checked without it.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T5: repl-parity follows cua's own Linux runtime: the vendor engine's path, the runtime's Node, the vendor release

- engine-answered.mjs expectedEngine finds the vendor lane's sky_linux where the vendor selection does
  (manifest.mjs vendorLinuxRuntime, by the pin, never the pointer); its exported shape is unchanged, and an
  answer it cannot attribute is still never a pass (tested with the tree present, gone, and another tree's helper).
- provenance.mjs runtimeFacts: on Linux the runtime's Node is the managed Node the home recorded (null without
  one), and the run records the vendor release its checkout pins (vendorRelease); a preparation's runtimeNode and
  vendorRelease are compared whenever it recorded them, null included.
- The vendor engine's defects and the Linux declarations match the run's vendor release (vendorReleaseOf:
  vendorRelease, else a pre-M6a run's runtimeRelease); an M6a run without it fails closed. checkEnginePair holds a
  pair to one own runtime and one vendor release.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T5: the parity archive cache holds the module tree's tarballs; the capability home is cua's own runtime on Linux

- archive-cache.mjs caches each tarball of the host's module closure as the installer fetches it (canonical URL,
  no redirect, pinned length, SHA-512), under the names --modules-dir reads, and installArgs passes --modules-dir.
  A fresh home installs the tree from the cache and downloads nothing (tested through installModuleTree).
- capability-home.mjs on Linux takes its source from what the home resolves (resolveRuntime), never
  runtimes/<pointer>: a managed scratch is installed from the cache and must resolve to the source's release; a
  local one copies the own parts (module tree, Node, helper, engine) and is checked the same way. The whole managed
  preparation is tested with the derived pointer and no vendor tree. macOS is unchanged (its tests now name darwin).

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T5: native-baseline's runtime root and release follow cua's own Linux runtime; probe-secrets names the module tree

- remote.mjs servedRuntime: on Linux the release is what the home resolves (null, with why, when it does not) and
  the runtime root, which classifies sky_linux helpers, is the vendor tree's (vendorLinuxRuntime); the preflight
  reports both, and a run refused for no runtime says why. macOS keeps the pointer's release and tree.
- probe-secrets.mjs labels the module root it plants in "module tree" on Linux, where it is cua's own.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T5: the fallback part expects F3's refusal, by doctor and by a refused open; its homes' labels and PARITY_HOME

- linux-selection.mjs refusedSelectionProblem: doctor's default prefers cua's engine and refuses it for the home's
  own reason, its engine row a failure naming the reason and this checkout's installer with --engine.
  refusedOpenProblem: cua serve exits 1 without answering, naming both, and no engine runs below it. M5's kept
  vendor engine is a failure now.
- linux-fallback.mjs probes that: doctor, then one open over stdio; no session, no gedit, nothing asked.
- fallback-home.mjs: `previous` is linux-engine-v0.4.3 (main's pin before 0.4.4) and `released` 0.4.0 (main's
  before M5), both below MIN_ENGINE_VERSION; the stale labels the tracker named are gone.
- suites.sh: PARITY_HOME, optional, names the home the parity preparation starts from (prepare --home), since a
  Linux home serves only once this cua's install has run in it.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T5: the tracker's stale fallback-home labels, resolved

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T6: acceptance 12's driver, the item 6 witness and the browser-only fixture, and the workflow's acceptance legs (task 152)

scripts/accept/linux-runtime.mjs runs the pre-flight's cells (E0-E5 over an empty home, U0-U5 over a
home the cua before M6a installed), each judged by its own criterion (linux-runtime-cells.mjs), with a
50 ms watch of each fixture's process tree (linux-runtime-watch.mjs). linux-text.mjs types acceptance
6's string through cua serve and reads it back through the fixture's own AT-SPI reads; with
--read-only it is E5's rollback observation. linux-browser-only.mjs checks the handshake, the browser
service's liveness, where the kernel's resolver selects each of the six packages, their imports and
native uses, the mapped natives, and confinement. The trace reader names the watched paths each kernel
opened. linux-runtime.yml gains the acceptance suite, the default, beside the pilot.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T6: the watch reads no executable of an exiting process; sharp loads by require when the kernel refuses it by name; the six imports measured under both cuas (task 152)

The first pilots showed a cua-engine sampled only while it exited (a version probe), whose executable
link was already gone: such a process (PF_EXITING, or a zombie) is judged by the samples that saw it
alive, while a sky_linux still counts by its name in any state. The kernel's loader refuses
import('sharp') and import('playwright') by name, identically under the cua before M6a: the imports'
judge still fails them, and sharp is loaded by require from the same base so the mapped natives still
say where its code came from. The driver records the six imports under this cua (E) and under the older
one (U), measured beside the cells.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T6: the cells' pilot on both venues at 496a0ce (development run, not counted): E2-E4 and U3-U5 fail on the two imports the kernel refuses by name, as under the cua before M6a (task 152)

x64 on this VM's private display; arm64 and the x64 control by run 45230169281. Every other cell
passes on all three legs, and every other step of the browser-only runs passes.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T6: the browser-only imports as ruled: four by name, playwright and sharp as under the cua before M6a, playwright loaded through require from the module tree (task 152)

The coordinator's ruling on F7, with the design session's addition (ruling 1162): pixelmatch, pngjs,
jpeg-js and classic-level import by name; playwright's and sharp's by-name outcome must equal the older
cua's (the same refusal, the same message with paths set aside; #531 tracks the kernel's loader);
playwright loads through require from the kernel's base, its entry and playwright-core's (and every
file of either in the require cache) from modules/<lock>, and opened by the kernel under trace; sharp
runs through require, its addon mapped from the tree. The driver installs the upgraded home first and
takes the baseline from a browser-only session of the older cua there; each browser-only run's report
carries the comparison. A tracker line for the watch's 50 ms blind spot.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T6: the cells' second pilot at d9ec05c (development run, not counted): every cell passes on x64 here, arm64 and the hosted x64 control (task 152)

The browser-only imports as ruled (F7, ruling 1162). arm64 and the control by run 45235515356.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T5 fix wave 1: no vendor release without its record, no refusal on missing evidence, the installer's hint kept

- vendor-release.mjs vendorReleaseOf, the one lookup for defects and declarations: an own-runtime record must name
  its vendor release, and every connection's recorded provenance must bear it out with the same runtime; only a
  record whose runtime was the vendor's own release falls back to it. checkEnginePair refuses a run without one
  (the review's case: both fields removed from a pair). The runner assesses after the connections are recorded.
- The refused open needs answered === false and at least one sample; refusalSample, beside engine-answered's
  witness (unchanged), skips a process that ended while read and reports a live one it cannot inspect, which fails.
- capability-home keeps resolution's code and remedy (this checkout's installer, what to move aside) on Linux.
- Tracker: linux-probes.mjs main still reads the vendor tree through locateRuntime (M6b, or sooner if needed).

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T6 fix wave 1: the judges' eight false greens closed, test-first (task 152)

1. --phases is E, U or both, each once; a partial run that passes exits 3 and is never acceptance. A
   fixture passes only as itself, with every one of its mandatory steps run and passed.
2. A trace is whole only with every path resolved, no file call left unfinished (an unfinished open
   under runtimes/ still counts) and every process of the serve's tree ended (threads with their
   group). Opens count for a kernel only after its exec, threads and post-exec children included, and
   one kernel must account for all eight entries.
3. The by-name outcomes keep the error's code and message; only each side's install root is set aside;
   a malformed outcome or baseline compares equal to nothing; the older cua's reply is validated. Sharp
   runs through require whatever its import gave.
4. Playwright's load is witnessed by the entry require resolved, that module, and the graph it loaded,
   each by real path inside the module tree; absent evidence fails.
5. E3, U3 and U5 run the loader; every cell reads the vendor tree's presence or absence at its start
   and end.
6. The older checkout must be the approved 0d19fdf, clean; its install must place the arch's pinned
   vendor release, verified by doctor's runtime.vendor; U0 checks the tree whole; U1 needs all four
   explicit changed: false and the vendor record kept.
7. A refusal needs a spontaneous nonzero exit by no signal, no reply to initialize (an error is one),
   drained stderr, and exec evidence from the serve's trace that nothing was launched.
8. Counted runs inherit no CUA_*/OAI_*/NODE_OPTIONS/NODE_PATH override; the worker and kernel must exec
   the home's managed Node, by trace and at every sample.
Minor: runtime.json keeps module-root-relative witnesses of each browser-only run. The smoke's report
names its fixture; openSession takes a command.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T6 fix wave 1: the inherited-override check names the runtime's variables, not every CUA_* (the host lock's marker and the feedback directory name no part) (task 152)

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T5 fix wave 1: the blocking-tree hint test expects the path as resolution names it (macOS /private/tmp)

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T6 fix wave 1: the third pilot at ccfba5c (development run, not counted): x64 here all PASS; run 45248386560 fails three cells on the watch's unread engine executable (task 152)

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T6: the watch tells a vanished cua-engine from a live one it cannot read; every engine sighting recorded (task 152)

Pilot 3's three hosted failures were a short-lived cua-engine read alive in /proc/<pid>/stat and gone
by its /proc/<pid>/exe. The coordinator's ruling: when the executable cannot be read, the stat is read
again; a process gone (or its pid reused, by start time), exiting, a zombie or dead is skipped as
vanished, and one still alive keeps its unread executable, which fails. Each run's report now lists
every cua-engine the sampler saw: pid, start time, executable, and whether it was skipped and why.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T7: the README, deploy and plugin docs for cua's own Linux runtime

README: the two engines without M5's fallback; a new "cua's own Linux runtime" part
(the four parts, their minimums and named stand-ins, the install's order and lanes,
an install during a session swapping the engine file, the @oai/@statsig/corepack
difference); doctor's Linux runtime rows; "Updating on Linux" in the plugin part,
naming the updated cua's own installer by absolute path and the three kinds of Linux
home that need one install; Requirements, Use and Configuration's Linux Node and
engine statements; the licence note for the module tree. deploy/cloud-vm/README.md:
--deb none by default, the own runtime first. The plugin and marketplace
descriptions. The pre-flight's §4.1 --json shape folded to what T4 built.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T6: the fourth pilot at 37b40ad (development run, not counted): every cell passes on x64 here, arm64 and the hosted x64 control; 4, 3 and 1 short-lived cua-engines skipped as vanished (task 152)

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T7: the Linux service's remedy names this cua's own installer (F9)

client.mjs's three refusals (could not be run, no version, older than the minimum)
now say `run \`node <this cua>/bin/cua.mjs install --engine\``, spelled as
src/runtime/installer.mjs's ownInstaller spells it, instead of a bare
`run cua install --engine`. Text only; nothing else in src/services/engine/linux/.

It is spelled in client.mjs, not imported: the service loads in the trusted worker,
which refuses any import outside the launch's trusted code paths, and on Linux
src/runtime is none of them. A static import of installer.mjs fails every live
computer session while every other unit test passes. New
test/services-engine-linux/trusted-load.test.mjs loads the service under a copy of
the worker's hook with a Linux launch's exact trusted paths (and a negative control),
and failed against that import. The service's tests hold the two spellings equal by
computing the expected sentence from ownInstaller. The README's quoted sentence follows.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T6 fix wave 2: the re-review's four partial findings and two new false greens closed, test-first (task 152)

1. A trace's pending scan reads unfinished execs too; an exit ends its thread alone, and a thread group
   ends by exit_group, a kill, or the exit of its last thread, so a leader's own exit no longer ends the
   rest.
2. The older cua's baseline is taken only from a successful reply whose base is its vendor module base
   (baselineOf), and this cua's base must be its module root; roots are set aside only at path
   boundaries; messages are kept and compared whole, cut only for display.
3. A refusal's reply is read from the whole transcript after stdout drained (initializeAnswered); every
   exec under runtimes/, done or attempted, whatever its name, is a launch (a stat there is not: the
   vendor selection looks for its own tree before it refuses).
4. Every Node a worker or kernel pid exec'd (trace) or was seen running (sampler) is judged, not only the
   last or the first.
5. Every cua-engine sighting counts for absence, one skipped as vanished included.
6. Playwright's require must expose chromium.launch beside its graph.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a T8: acceptance 12 counted at H on x64 and arm64, with the x64 regression and F10's credit (task 155)

H = f41546d (feat/171-m6a). Every cell E0 to U5 passes on this VM's private display, on the hosted arm64 leg and on
the hosted x64 control (run 45273664518); each leg's verdict is acceptance: true. The x64 regression at H passes:
R1 (both lanes, diff ok with the 3 declarations), R3 and R4 in the default selection, and the fallback part's five
refusals. F10's credit holds: 0.4.4's engine diff leaves the text path untouched, the pin's hashes are the published
0.4.4 assets, and the service's diff from da7585c is only 0.4.4's MIN and F9's remedy. Serve start to first answer,
H minus the older cua: -41 ms (x64 VM), +22 ms (arm64), +5 ms (hosted x64).

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a: the spec's Decision Log and Surprises for M6a, and #117's line that the ModuleTree landed here

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a fix round (task 156): the four findings that broke "no vendor tree read"

- The secret store's project lookup ran `git` through the caller's PATH, so a serve with the vendor tree's bin on PATH
  executed a git there. On Linux git is now looked up with every PATH entry that is, or leads, into <home>/runtimes/
  skipped, and run by the path checked (vendor-tree.mjs executableOutsideVendorTree; serve passes its home and env).
- The sandbox helper was read and run through its installed path, a link into the tree included. The launch names the
  helper by its guarded resolution, and the preflight, doctor's row and install's readiness refuse one that leads into
  the tree before reading it, naming the link to move aside (sandbox.mjs guardedLinuxHelper).
- The guard's roots now include where <home>/runtimes leads when it is itself a link, so a relocated tree is refused by
  its physical path too. A refusal carries the links it followed, for remedies to name.
- `cua runtime use` on Linux checks current.json with pointerObstruction before it reads or writes it (a link is not
  followed, a FIFO does not block), and reads the vendor's pins only to classify a name other than this cua's own.

The recorder (test/helpers/vendor-tree-recorder.mjs) now notes each path as the call reaches it (through links, and a
bare command through PATH), and runs at the real `cua serve` entry point through a preload.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a fix round (task 156): the review's smaller findings, each with its test

- An engine, its record or its directory linked into the vendor's tree: the session's refusal names the link to move
  aside before the installer, and the engine's install and local build refuse it the same way rather than reading or
  writing through it (linux-engine.mjs assertEnginePathsOutsideVendorTree).
- The module tree records each package.json's size at install and the connection's check compares it, as it does the
  native files'; a file or directory the full check cannot read is a verification failure naming the tree to move
  aside, never a raw error or an empty directory.
- Install's readiness applies serve's CUA_BROWSER_BACKENDS check to the browser-only session only.
- Doctor's runtime.node names the mode fix, or the version directory to move aside, for a managed bin/node that lost its
  execute bit, which node-install refuses to repair.
- The provisioner tells an M6a checkout from an older one by runtime/linux-runtime.json: own-first for M6a, and for an
  older checkout the supplied deb first, its failure failing the provisioning.
- linux-runtime-env.sh passes doctor's module path to node as an argument, imported by its file URL.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a fix round (task 156): the guard learns a relocated tree from the home's listing, never by naming runtimes/

The x64 re-pilot of acceptance 12 failed E1 and E2: the guard's new root, where <home>/runtimes leads when it is a
link, was found by lstat-ing <home>/runtimes on every lookup, and the live judge counts a call naming the entry itself.
Whether the entry is a link now comes from the home's own listing, so an ordinary home has nothing at or under
runtimes/ named, and only a link is read. The unit recorder counts the entry itself too, as the live judge does, and
lets its lstat and readlink pass only for a relocated tree; it catches the regression (10 of 15 fail without the fix).

The provisioner's tests stub GNU's `sha256sum -c --status`, which macOS's sha256sum does not take.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a fix round (task 156), wave 2: the confirm-only review's three partials and three new findings

- The helper: a confined launch's construction refuses a helper path that leads into the vendor's tree, at every
  launch, since a connection's later launches repeat no preflight; and the scoped preflight walks each of the home's
  own protected directories (node, staging, sandbox, engine, modules) with the guard before it resolves any, so a
  <home>/sandbox (or staging, or engine) that is a link into the tree is refused, never resolved there.
- The relocated tree: a cua home that cannot be listed leaves the tree's boundary unknown, and is refused
  (layout_invalid) rather than read as "not a link"; an absent home has no tree.
- Install's last line says "no session opens" only when a shared prerequisite failed; a browser-only refusal of its
  own names the computer sessions that open.
- The module tree's full check compares each record's manifestSize with the package.json it walks, so what install
  calls verified the open accepts.
- The guarded git lookup keeps PATH's meaning: each candidate is spelled `<entry>/git` and walked with its own
  components (`..` after a link as the kernel takes it), and a relative entry is taken against the directory git runs in.
- Doctor's mode fix quotes the managed Node's path as one shell argument (installer.mjs shellWord).

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a: Progress ticks M6a, and its Outcomes & Retrospective

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a: version 0.29.18

The coordinator set the release version at merge (main is 0.29.17).

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

* #171 M6a: version 0.29.19

The coordinator corrected the version: #571 (#565) holds 0.29.18, so M6a takes 0.29.19.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…(refs #565)

Conflicts:
- .claude-plugin/plugin.json, marketplace.json: main's 0.29.19 and its
  rewritten descriptions taken; the branch bumps past it in its last
  commit.
- tech-debt-tracker.md: both sides' new Open entries kept (#565's
  reader-error entry, M6a's two).
src/mcp/server.mjs and src/services/engine/linux/client.mjs merged
cleanly; both keep the shared jsonl framing. M6a added no new JSON-lines
reader or writer under src, bin or verify.mjs.

Sminos-Session: cursor235#b93055dd (cua on macbook)
Ruling 1192. cua-engine writes a window title's U+2028/U+2029 raw
(wire.rs to_line, which 0.4.5 takes up under #512), and on Node 24+
node:readline ended the line there: the answer came apart into two
unparsable lines and its request went unanswered until its timeout.
The harness's Engine now reads stdout with lines() from
src/repl-host/jsonl.mjs; its stderr (--stats lines) stays on readline.

engine-stats gains the case: a fake engine answers list_windows with a
title holding LS and PS. Red before on Node 26 ("no answer within
5000 ms"), green after on 22 and 26.

Sminos-Session: cursor235#b93055dd (cua on macbook)
…e LS/PS, on main's 0.29.19 (refs #565)

Sminos-Session: cursor235#b93055dd (cua on macbook)
@SSFSKIM
SSFSKIM marked this pull request as ready for review November 24, 2026 03:30
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T03:33:15.464054Z bacc72d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@SSFSKIM
SSFSKIM merged commit f6a6002 into main Nov 24, 2026
11 checks passed
@SSFSKIM
SSFSKIM deleted the fix/565-jsonl-separators branch November 24, 2026 03:31
SSFSKIM added a commit that referenced this pull request Nov 24, 2026
The candidate and the reach are built on the merged head, so what is measured
is what merges.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JSONL readers split messages at U+2028/U+2029 on newer Node: an LS in a window title hangs every read of that window

1 participant