Repository navigation
Native baseline: sky performance before the REPL host and engine are replaced (#114) - #133
Merged
Merged
Conversation
… summariser (#114) scripts/native-baseline.mjs drives the pinned runtime's native surface through cua serve on the device over ssh, as the browser parity harness does: cold connections labelled by the handshake record they found, warm no-op, getState, listApps, the first getApp (approval timed apart), full-tree getAXState, screenshot and a TextEdit observe-act-verify task, each sample journaled with harness wall time and in-cell performance.now() time. The summariser pools run-* directories into summary.md. StdioClient takes an elicitation answer policy and a client name; the parity harness keeps accept-all.
…uitting from the scratch document; helper ages Measured on the mini: TextEdit launched with no document shows its Open panel, served out of process, which takes no keys sent to TextEdit; the scratch document comes from its New Document button. Closing an edited untitled document raises a sheet as the front window, answered with super+BackSpace; TextEdit the run launched is quit from the unedited scratch document. A first getApp that times out while launching is retried and both are recorded. The helper's age attests whether the run launched it.
This was referenced Oct 14, 2026
- The keep-or-delete sheet is identified (save panel, its Delete button, the task document's name) and only its Delete button is clicked; any other window after super+w gets no input. - Window transitions wait on a 10 s wall-clock deadline, not a count of observations, so a faster engine is not penalised. - A full-tree sample of another window is invalidated; the screenshot series is bracketed by a scratch guard and invalidated when the guard fails; the summariser lists invalidated samples apart and keeps string details such as the screenshot format. - cua serve is launched by its absolute path, which the leftover and preflight detectors match; the old pattern never matched the harness's own serve. - A failed end_task after a cold start is its own row, not a second total.
Three runs on the mini at 2a59052 replace the first recording: 663 rows, no failed or invalidated sample, 30/30 tasks deleted through the identified keep-or-delete sheet, nothing left running. README describes the sheet identification, the deadline, the invalidation and the JPEG screenshots.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Records the native (sky) performance baseline #114 requires before the REPL host (#116) and the native engine (#117) are replaced. None existed under
docs/evidence.Method
scripts/native-baseline.mjs run --device mini --out <dir>drives the real pinned runtime (26.928.40906) as the browser parity harness does:cua serveof the parity clone on the mini over an ssh stdio pipe, an MCP client, js cells, every sample journaled (results.jsonl,meta.json). The surface is native only (CUA_SHIM_SURFACES=computer, session approvals, secrets off). The serve is started by its absolute script path, and the leftover and preflight checks match on that path.performance.now()time separately. Cells return counts, lengths, booleans and hashes only. No AX text, window title or screenshot leaves a cell, and every observation passesemit:false.end_taskafter a cold start gets its own row.getStateandlistApps.getApp(TextEdit): launch, plus the vendor approval timed separately.getAXStateandgetScreenshoton an empty scratch document. A tree sample of any other window is invalidated. The screenshot series is bracketed by scratch-guard cells, outside the samples' timing.typeTexta fixed sentence, verify in the full tree, then delete it. The keep-or-delete sheet is identified byID: save-panelandID: DontSaveButtonand by naming the task document; only its Delete button is clicked, and any other window gets no input.end_task.scripts/native-baseline.mjs summary <dir>pools therun-*directories intosummary.md: median, p95 and max per operation, with OK, invalidated and error counts listed apart, observed sizes (including the screenshot format), and a problem list for incomplete or inconsistent runs.docs/evidence/2026-10-14-native-baseline/(three sequential runs, after checking that nocua-116-spikeprocess was running; the parity clone was at this branch's 2a59052). The mini is a Mac14,12 (M2 Pro, 16 GiB) on macOS 27.0 (26A428), with a virtual display of 2560 × 1440 points at scale 2. The helper that answered was the pinned runtime'sCodex Computer Use.app, started by each run.Result
All 3 runs complete: 663 rows, 0 failed and 0 invalidated samples, 30/30 tasks verified and deleted unsaved, nothing left running. Medians in ms:
ssh mini true)1+1)cua.getState({emit:false})cua.listApps({emit:false})cua.getApp(TextEdit), launch and approval includedgetAXStatefull tree (empty document: 2,810 chars, 53 elements)getScreenshot(window, 1172 × 976 JPEG, 49,975 bytes)task.close(super+w, the sheet's Delete button, back to the scratch document)end_taskFull table (p95, max, observed sizes):
docs/evidence/2026-10-14-native-baseline/summary.md.Caveats
ssh.roundtrip, about 500 ms), which a localcua servewould not pay.initializeis answered without a runtime (674 ms, mostly ssh andcua servestart) and the runtime launches at the firstjscall (470 ms); without it,initializelaunches the runtime (813 ms) and the first call is 272 ms. End to end the two are within noise of each other here (1,123 vs 1,165 ms median); what the record saves is a runtime for a session that never callsjs.getStateof each run includes starting the computer-use helper (none was running at any run's start; the helper that answered was started by the run, 6 to 8 s old when checked), up to 825 ms wall. That is whygetState's max is far above its p95.cua-116-spikework had finished; the resident agent's serves stayed idle).getAppof a not-running TextEdit failed after about 5.5 s withComputer Use server error -10005: timeoutReachedand the next call bound in about 1.6 s; in the three recorded runs it bound first time (about 1.5 s). The harness retries once on that error and records both calls (bind.getApp,bind.getApp.retry), so a later run that hits it shows it.Computer Use server error -10005: invalid configuration: invalid type: map, expected a boolean in featureswhile a helper started by another client was running. The owner's~/.codex/config.toml(changed 2026-10-14 22:56 KST) has a[features]entry with a dotted key (context_management.…), which the pinned release's parsers reject (the pinnedcodexCLI fails on it too); the helper launched through cua's runtime reads cua's ownCODEX_HOMEand works. The runs record the helpers at start and after binding; a run that meets a misconfigured helper fails every inventory call and stops before touching any app.elementscounts AX lines that start with an element index;charsandlinesare also recorded. Nothing of the text is.super+BackSpaceon whatever window followedsuper+wand closed in about 1.8 s; that path did not check which window it answered, so it is not the baseline. Compare a replacement engine on this harness, not against that number.Changes
scripts/native-baseline.mjsandscripts/native-baseline/{cells,remote,summary}.mjs; tests intest/native-baseline/:No runtime is needed for the tests.
scripts/browser-parity/mcp.mjs:StdioClienttakes an elicitationanswerpolicy and aclientName. The parity harness keeps its accept-all default.Gates:
HOME=/tmp/cua-scratch-home npm test1704 pass / 0 fail / 8 skip (main 1688 + 16);npm run test:mods32 pass;claude plugin validate .passes with the known warning.