Skip to content

#171 M3: cua's own Linux service, the device mode, capabilities and the truncation line; linux-engine-v0.3.0 - #262

Merged
SSFSKIM merged 125 commits into
mainfrom
feat/171-m3
Nov 2, 2026
Merged

SSFSKIM merged 125 commits into
mainfrom
feat/171-m3

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Part of #171 (M3 of the own-Linux-engine spec; the ticket stays open until M6b).

M3 of the own-Linux-engine spec: cua's own Linux service, the device mode, the capability report and the truncation line, released as linux-engine-v0.3.0. The default Linux engine stays vendor. cua's engine and service run only when CUA_NATIVE_ENGINE=cua (or "engine": "cua" in ~/.config/cua/engine.json) selects them.

  • cua's own Linux service (src/services/engine/linux/). With the cua selection, no @oai/sky module is loaded for the Linux computer surface.
    • client.mjs refuses an engine older than MIN_ENGINE_VERSION (0.3.0), spawns cua-engine server --desktop <mode>, and keeps each process's capabilities. A method whose capability the receiving engine lacks is refused before anything is sent.
    • setup always answers. On a failure, every computer method refuses with the failure's sentence, and the next call retries the version check and the spawn.
    • Numbering, rendered trees, native ids and sentences equal the vendor service's on the same engine (25 of 25 rows). Sentences that named sky_linux name cua-engine, declared.
  • The device mode and capabilities in the engine. --desktop shared|dedicated. families.rs lists each family's input kinds with their condition: GTK 4, Gecko, Qt scroll, xterm keys, Chromium drags. Refusals send and activate nothing, and dedicated mode has a foreground route.
  • Chrome's HTML5 drag and drop:
    • In shared mode, a background drag into Chrome that starts a drag and drop is cancelled before the drop (Escape on the background route), answered by the order of events. A late one is cancelled at once, and the next acting request is refused with a notice; reads and releases still run.
    • Allowed drops land. The release comes at least 350 ms after Chrome's take, and with no take by the path's end the button stays down until press + 250 ms.
    • Every Chromium-family drag presses atomically: the press and the samples through Blink's 4 px threshold (at most 8) go under one server grab. A stray-event watch answers an error, never success, when a real pointer event could have reset the press.
    • A new preflight wire command delivers a pending notice before an app launch through the supervisor.
  • The truncation line (src/cua-api/bind-linux-app.mjs): Accessibility tree truncated: at least <n> elements not shown (<reason>), a declared deliberate difference in the facade scenarios.
  • Doctor and provisioning. Doctor's Linux row names the service and prints the engine's capabilities, and a new accessibility.enabled row checks org.a11y.Status IsEnabled. cua-provision.sh writes "desktop": "dedicated" unless set, and enables accessibility at session start.
  • The differential harness:
    • device cases and witnesses, with standing negative controls;
    • Acceptance 3's revised speed rule: 20 samples a side, the interval's upper bound, three labels, top-ups, frozen decisions;
    • the vendor bar rule, and the harness-fault resample rule with its caps;
    • the scene-text preparation: lane-neutral first-word restores counted per lane, a restore on cua's lane failing the run, and a scene backstop;
    • rejudge.mjs.
  • The release workflow:
    • fault-injection tests run on cargo's live build;
    • a new test cuts the after-release watch's X connection for real and runs on each shipped asset;
    • each asset is checked to carry no fault-injection code.
  • Plugin 0.21.0. The branch was merged with main five times rather than rebased, because the spec and evidence cite its commit SHAs. Those commits stay reachable through refs/pull/262/head after the squash.
  • Evidence: docs/evidence/2026-10-28-own-linux-engine/m3/, and the execution record in the report (M3 section).

What 0.21.0 changes on macOS

The plugin and marketplace version goes from main's 0.20.6 to 0.21.0. This branch makes no change to local macOS computer use.

  • src/services/sky.mjs, the shared Sky wrapper, gains a launch preflight that it calls only when the loaded service exports beforeLaunch. Only cua's Linux service does, so macOS and the vendor service are unchanged.
  • Linux targets only, including Linux devices controlled from a Mac: the new engine and service, device routing and drag safeguards, capability and doctor reporting, provisioning, and the truncation line.
  • Developer comparison tooling (scripts/native-baseline/, scripts/repl-parity/, scripts/linux-engine-diff/) changes Linux lanes only.

The whole-branch review checked this inventory against 18cad98..326456c. Everything after it is Linux-only or internal, and I checked it against the full changed-file list: the harness's scene-text preparation, the engine's tests, the release workflow, the evidence, the spec and report, tech-debt-tracker.md, and the merge of main 7aa1cbb, which brings main's own macOS change.

Validation Evidence

  • The gate: m3-gate-musl passed, exit 0 (m3/gate-musl/, m3/README.md). It is a fresh, full differential verdict run on head cd4c929, over every M3 scene and device case, 3 blocks, judging the bytes that ship.
    • The candidate is the release workflow's x64 musl artifact from the build-only run 41350086196: sha256 5f4a1600e66b7f7b458948462fc4701942583af9674ad41798188d1312687b60, static-pie, cua-engine 0.3.0 (cd4c929758ca). gh attestation verify passed before the run, with the subject digest equal to the file's sha256 and source commit cd4c929.
    • Verdict line: run valid; no verdict FAIL; declared refusal (a loss, not a pass): chrome-input drag cua; text restores (the first word put back before a sample): pinned 43, newest 0, cua 0.
    • 0 samples resampled and 0 invalid, of 4,956.
    • Speed: 66 series judged, 63 faster than the faster vendor build and 3 the same within noise (desktop get_screenshot cold, desktop launch_app warm, gedit clipboard_release warm). None within the bound. Examples: gedit tree read 85.2 ms warm against 700.9, clipboard_read 45.1 against 656.9, type_text 172.7 against 1,017.4.
    • Every device case and all 20 paste safety cases passed on every sample, including chrome_dnd_short_in_front_shared at 9 of 9.
    • The pinned build sets the bar for clipboard_read and clipboard_release again, and cua passes it.
    • The vendor engines are pinned sky_linux_x64 7ac3c2ae…f1cd and newest 88ce5e0a…2991, byte-identical to every earlier M3 gate run.
  • The PR head against the gated commit:
    • git diff --stat cd4c9297 <head> -- native/linux-engine runtime shows only runtime/engine/linux-engine.json, the release pin. native/linux-engine/ is identical to the gated sources.
    • Every other differing file is evidence, the spec and report, or the documentation listed in m3/README.md.
    • Nothing under scripts/linux-engine-diff/ or src/services/engine/linux/ differs.
  • The release: linux-engine.yml with publish: true, on release/linux-engine-v0.3.0, a branch at cd4c929. Run 41364541329 passed every job (version, both builds with the asset check and the engine's tests, attest, publish).
    • The published x64 asset is byte-identical to the gated candidate (5f4a1600…7b60). arm64 is 57e699b4…9e5f.
    • node scripts/linux-engine-pin.mjs linux-engine-v0.3.0 printed (attestation verified) for both assets. The pin commit 9bf9d3a changes only runtime/engine/linux-engine.json.
    • Toolchain: rustc 1.94.1 from native/linux-engine/rust-toolchain.toml; targets x86_64-unknown-linux-musl and aarch64-unknown-linux-musl.
    • The release build's resolved features, from cargo tree --offline --locked -e no-dev --target <musl target> before (380b132) and after task 26 (cd4c929), are identical on both targets (m3/release/feature-graph/). x11rb has no res. rustix has no process; its net comes from x11rb itself.
  • Acceptance 9 (x86-64), fresh CUA_HOME (m3/release/fresh-home.txt):
    • cua install --engine printed installed cua's Linux engine 0.3.0 (linux-engine-v0.3.0) at <home>/engine/linux/cua-engine.
    • file reports a static-pie, --version reports cua-engine 0.3.0 (cd4c929758ca), and sha256sum equals the pin.
    • CUA_NATIVE_ENGINE=cua cua doctor:
      • PASS engine reads "… the pinned cua-engine 0.3.0 (linux-engine-v0.3.0) … behind service cua (cua's own Linux service)", with the capabilities backend x11, capture.desktop true, capture.window retained, desktop shared, input.background true, input.desktop true, text.literal true, text.paste verified, tree at_spi, version 0.3.0;
      • PASS accessibility.enabled.
    • The arm64 install is M5's, on the arm64 VM.
  • Acceptance 1, on the installed engine (m3/release/): CUA_NATIVE_ENGINE=cua node scripts/accept/linux-native.mjs, with no CUA_LINUX_ENGINE_BIN, passed 11 of 11.
    • A 50 ms process sampler (3,370 samples) saw at most 0 sky_linux processes.
    • The one cua-engine was the installed ~/.local/share/cua/engine/linux/cua-engine, a child of the trusted worker.
  • The device-mode fixture, on the installed engine: scripts/accept/linux-device-mode.mjs (Acceptance 6's gnome-text-editor case and Acceptance 8, through the facade) passed 18 of 18, with both negative controls. The sampler saw 0 sky_linux over 570 samples, and each engine was the installed binary, the trusted worker's child.
  • Acceptance 10's facade suites, on the installed engine (m3/release/parity/, m3/release/baseline/). Both ran from 23d0b7c with no --engine-bin. Each harness's own cua install placed the pinned 0.3.0, which the installer accepts only at the pin's sha256 (5f4a1600…). Each run records the requested engine as the trusted worker's child, with service: cua on the cua lane.
    • repl-parity native: the vendor lane is RECORDED_VENDOR_DEFECT (31 covered; the two declared x64 text defects), and the cua lane is assertions PASS (33 covered). The diff against native-linux.json is ok: true with 0 differences beyond the two declared.
    • native-baseline compare --engines (3 runs a side): VERDICT: PASS. Medians, vendor against cua: getAXState 488.0 / 95.3 ms, getScreenshot 611.5 / 113.4, typeText 10,238 (threw) / 166.6, task total 18,891 / 9,556.
  • The two services on one engine (M3.2, m3/services/): 25 of 25 rows equal (rendered states, element numbers, native ids, sentences). Under strace, 0 @oai/sky files were opened with CUA_NATIVE_ENGINE=cua, against 60 on the vendor lane.
  • The drop-miss work (m3/drop-misses/):
    • the mechanisms and the sizing of the 350 ms floor;
    • the atomic press, with grab p99 1.688 ms;
    • the 8-sample cap: 8 samples in 1.1–1.6 ms, where a jittering path had held the server 88–100 ms;
    • the hold: 195 of 195 sized drags landed;
    • 240 undisturbed drags with 0 false errors after each change.
  • Tests:
    • The engine's unit and live tests run in the release workflow on each shipped asset, natively on both architectures: 229 + 19 + 20 passed on x64 and arm64.
    • The harness: node --test test/linux-engine-diff/*.test.mjs, 302 of 302.
    • The service, doctor and launch tests are in npm test, the hosted test gate.
  • CI: ci-gate on the PR head c47e597 is GREEN, with all six gates passing: plugin, sandbox-live, engine-linux, parity-browser, test and sandbox-denials. Run: https://github.com/SSFSKIM/cua/actions/runs/41371578615.
  • Reviews:
    • Every code change was reviewed clean by a task reviewer:
      • M3.1 after three rounds with two reviewers;
      • M3.2, the drop-miss follow-up, M3.3, the short-drop fix and the hold after one round each;
      • the scene-text preparation after two rounds, which closed six false-green or miscounting paths;
      • the workflow test fix with no findings.
    • The whole branch was reviewed by doperpowers:reviewer-high (18cad98..3f00e0d). Its first verdict was "incorrect", with three P2 findings at the joins between tasks, each reproduced. After the fixes (29276e4..326456c) the re-review was "correct" with no material findings.
    • The design session checked every design choice and fix shape (spec, Decision Log).

Known limits

Unresolved Review Findings

  • The M3.3 device fixture's cleanup (scripts/accept/linux-device-mode.mjs, near line 236): witness.stop's timeout does not kill the witness, and the scratch directory is removed while a process may still run.
    • A cleanup failure fails the run, so it cannot produce a false pass. Left because it touches only the fixture's failure path.
    • Raised by the M3.3 task review; logged in tech-debt-tracker.md.
  • The M3.2 respawn regression test's ordering (test/services-engine-linux/service.test.mjs and test/helpers/fake-linux-engine.mjs:59): it relies on a 20 ms fake exit landing before the 100 ms settle, timed rather than synchronized.
    • It passed in every gate run of this branch.
    • Raised by the M3.2 task review; logged in tech-debt-tracker.md.

Residue

  • The differential harness builds cua's engine for the host target by default. Two verdict runs, m2-final and M3's stopped m3-gate-t25, judged a VM build for glibc while the release ships musl. M3's gate used the workflow's artifact, by hand. The harness (or a small wrapper) should take the release workflow's attested artifact of the gated commit, or build x86_64-unknown-linux-musl the same way, and refuse a gnu candidate, so no future gate can judge bytes that don't ship.
  • The newest vendor build's gedit clipboard_write fails in every sample (99 of 99 across the gate runs, and again in m3-gate-musl), at the 10.2 s mark like the pinned build's paste. cua's series passes as a declared operation. Whether this is the newest build's defect or another harness condition, as the pinned Copy turned out to be, has not been checked. Worth one look before M4's gates lean on that series.
    Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)

…lear-race test's timed pause)

Carried from PR #233's Unresolved Review Findings into the tracker's
entry form, at the design session's request.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…he device-mode list; the drag-and-drop item to the design session)

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

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
The engine answers `capabilities` (caps.rs: the X11 backend's fixed values, the
device mode from --desktop, the version and the commit it was built from).

families.rs gains the clicks kind (a coordinate click into a window, chord
included, and an element's right click, the button-3 press at its visible
point): GTK 4 ignores it always (M0.4), Gecko unless its window is fully
unobscured (M0.4, M1a.3's 800x600 run). press_key, key_down and key_up now read
the keys kind beside type_characters and the paste chord, so xterm's and GTK 4's
keys are refused in shared mode with nothing sent and sent through the
foreground route in dedicated mode.

The foreground route is its own input target (route.rs Target::Foreground): its
window-relative points translate through the window, its holds are its window's,
and key_up releases a foreground hold on that route, the window activated again
first. A request whose input is refused (a bad key) activates nothing: the route
is chosen first, the window entered only once the input checks out.

Tests: the families table and the hold targets; a live suite of the device mode
on bare X windows of the test's own classed XTerm and firefox, which record
whether each event was synthetic or real (tests/live_device.rs), and the shared
engine helper moved to tests/support/.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…s device-mode measurement and cases

Engine: scroll (at a point, the window's centre or an element), drag and move
into a window now ask families.rs for their kind like clicks and keys do, and
take the shared refusal or the dedicated foreground route where a family lists
the kind. No family lists them yet: that waits on the measurement below.

Harness:
- `--experiment kinds` (kinds.mjs): per family of the matrix, scroll (and move
  and click where the family has a reader) on the background route, covered,
  visible or with the bottom half covered (`--occlusion partial`), with an XTEST
  control lane (the window activated, the request through XTEST) that shows the
  reader works, so "ignored" is a finding and not a broken reader.
- The drag experiment gains the same control lane (`--lanes`), the partial
  occlusion, GTK 4's scale (pages/gtk4-input.py, the harness's GTK 4 scene:
  status line, scale, button, scrolled list), VTE's selection and Writer through
  gen judged by its pixels.
- `--experiment dnd` (dnd.mjs) records what Chrome's HTML5 drop changes on the
  desktop in each engine and whether it is put back; xprobe selection-watch
  reports XdndSelection's owners.
- device.mjs: Acceptance 8's cases in the differential run (cua alone): each
  listed kind and condition refused in shared mode with an audit that finds
  nothing sent, foreground in dedicated mode with the window left active, the
  kinds a family takes on the background route, and `capabilities`' answer.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…red in every family

families.rs: GTK 4 ignores background scrolls and pointer moves (gnome-text-editor's
scroll bar and the harness's GTK 4 scene, 0/10 in the pinned build and cua, 10/10
through the XTEST control, covered: run m31-kinds-covered; visible run
m31-kinds-visible to confirm `always`); Gecko ignores them fully covered (0/10,
control 10/10) and takes them with half the window covered, so they take the
clicks' `unless_unobscured`. Both decided with the coordinator and the design
session.

The kinds experiment measures the pointer move in every family: the page's and
the GTK 4 scene's motion count, a terminal's mode-1003 motion report, and
elsewhere a toolbar button's hover highlight read as pixels. The input page
names its status lines (Firefox's tree carries a paragraph's text in no field
the engines read), and the occlusions gain `partial-deep` (the bottom 70%
covered). The device cases gain GTK 4's scroll and drag; the live device suite
checks Gecko's scroll and move refused under cover and the scroll's foreground
route.

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

families.rs, each decided with the coordinator and the design session on the
m3/kinds/ runs:
- GTK 4 ignores background drags (gnome-text-editor's selection, the GTK 4
  scene's scale: 0/10 pinned and cua, 10/10 through the XTEST control,
  covered): Drag `always`.
- Gecko ignores them fully covered and takes them with half the window covered:
  Drag `unless_unobscured`.
- Chromium (Chrome, Electron) ignores fully covered text-selection, thumb and
  drag-and-drop drags in every engine, range and canvas drags still landing:
  Drag `unless_unobscured`, the conservative predicate, since a drag cannot be
  told apart before it is sent. Covered range and canvas drags that land in the
  vendor are refused in shared mode: a recorded loss.
- Qt (any version) ignores background scrolls, covered (kate, qtcreator 0/10,
  control 10/10): Scroll `always`.

dnd.rs, the drag-and-drop candidate (to be decided on the recording): in shared
mode a background drag into a family whose drop changes the desktop (Chromium,
for now) watches XdndSelection through XFixes; when the target's client takes
it, Escape and the release cancel the drag and drop before the drop, and the
drag is refused.

Harness: a declared refusal (deviations.mjs REFUSALS) records an operation the
vendor lands and cua refuses in shared mode: listed apart, never a pass, held
only while every sample answers the Device mode sentence with the witness
unchanged (chrome-input's covered drag). The device cases gain Gecko's scroll
and move, Qt's scroll (kate) and GTK 4's move; the drag experiment's VTE cells
aim from the terminal widget's extents, its Writer gen cells get their pixel
reader's engine, and `partial-top` covers the targets with the window partly
visible.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…ath rule and the drop cancel

On the design session's call, a Chromium drag is refused in shared mode unless
every point it visits (its vertices and the segments between them, as the drag
samples them) is visible in the window: cover.rs `points_unobscured`, with the
window rule's stacking, override-redirect and outer-rectangle judgement and
any doubt counting as covered; families.rs `When::UnlessPathUnobscured`. A drag
across the visible half of a half-covered Chrome keeps the background route,
which the window rule would have refused. Gecko keeps the window rule for its
drags.

The loss is declared: a covered range or canvas drag into Chromium, which the
vendor lands, is refused (deviations.mjs REFUSALS).

Live tests on bare windows of the test's own: a Chromium-classed window takes
a drag along its visible half and refuses one under the cover with nothing
sent; a window whose client takes XdndSelection mid-drag gets Escape before the
release in shared mode and the drop in dedicated mode. The device cases gain
Chrome's visible-path and covered-path drags and Gecko's drags.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
Reading and translating the vendor's code, and taking code from
surveyed projects with their licences, is allowed where a measured gap
or a capability calls for it; translated code cites the vendor function;
decompiled listings stay on the VM; the library rule is unchanged.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…cts are no source (owner's correction)

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…e owner's note)

The vendor-code-only rule is about copying code or design from other
projects, not about the dependency graph the library rule already allows.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…ed; an honest answer when the cancel is late

families.rs splits Chrome (by its X11 classes), whose HTML5 drop activates,
focuses and raises its window, from the Chromium toolkit's other apps,
whose drop changes nothing (m31-dnd-visible). In shared mode a drag into
Chrome already active, focused and fully unobscured is not watched. After
a cancel, the drop's signature (the window newly active, focused or on
top within 300 ms) turns the answer into "the drop may have happened";
--dnd-cancel-after-release forces a late cancel for the harness's check.
The harness gains the Qt 5 style scenes (Breeze, Fusion) for the hover run.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…ed; the dnd lanes

device-chrome-dnd (Chrome on pages/drag.html) holds four cases: the shared
drag and drop cancelled before the drop with nothing dropped and the
witness unchanged; Chrome already in front, the drop let through on the
background route; the cancel forced too late, judged on the honesty of
every answer; and the covered drop through the foreground route in
dedicated mode. deviations.mjs declares the Chrome drop refusal with its
own sentence; the dnd experiment gains --lanes and the cua:active lane,
and reports cua's answers. The harness README gains M3.1's section.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…vations and cua's stats

Each drag-and-drop run now keeps the witness's changes (a notify that left
the value as it was marked), the activation requests, whether a managed
window was restacked, and cua's --stats route and dnd record: what the
candidate runs m31-dnd-candidate and m31-dnd-candidate-stats read.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
… in front, and its standing controls

Chrome's drop into its window already active, focused and on top asks the
window manager to activate that window again; Openbox rewrites the stacking
property with the same order (m31-dnd-candidate-stats). judgeInFrontSpan
judges such a span on its ordered event records: activations name the
target, restacks move only the target client's own windows and keep the
managed order with the frame on top, focus events stay with the target
(or the root under a grab), and a notify is excused only beside clean
records. It applies only to a case that declares it and a request whose
--stats dnd recorded in_front. inFrontNegativeCheck runs beside the stub
check in every verdict run: another window's activation and a coalesced
restack must fail it, the target's own activation pass.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
Gecko's entry names the deeper cover, the move in every family and the
covered drag and drop; GTK 4's the move run; Qt's the minimal Qt scenes;
Chrome's the drag-and-drop candidate runs. Comment and stats lines wrapped.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
… the dnd experiment

The engine writes the report's keys in its own order, so the case compares
the answer by content. The dedicated drop through the foreground route
restacks Chrome's own override-redirect drag windows beside its frame's
raise, which the foreground allowance does not excuse; its proof stays the
dnd experiment's dedicated lane (10/10 in m31-dnd-candidate).

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…-input's

device-chrome showed the same page as chrome-input under the same role, so
both scenes' windows had one title and the verdict run found the wrong one.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
… come and go; the dedicated drop back in Acceptance 8

Through the foreground route, Chrome's drop maps and restacks its own
override-redirect drag windows beside its frame's raise. judgeForegroundSpan
now leaves out of the order it judges the override-redirect windows of the
target's own X client (the resource-id base, as M2.1 attributes requests);
one may stay mapped at the end only where the input opens it (a right
click's menu). Every other client's window still fails, the strict and
in-front witnesses are unchanged, and foregroundNegativeCheck gains another
client's popup (xprobe popup), which must fail. The design session agreed
the change to M2.3's rule with these bounds.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…ugh the interval (design session)

The median-at-or-below-the-bar shortcut is removed; a series under 20
samples is topped up, not judged; undetermined at 20 is sampled to 40,
then fails or stands as a declared gap.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
… interval, topped up to 20 then 40

The design session's revision of Acceptance 3 after #235's review: a series
is judged only when cua and the bar build each have 20 samples, and only
through the interval guard, whichever way the medians point. The shortcut
that passed a median at or below the bar before the interval (stats.mjs
judgeOperation, events.mjs eventSpeeds) is gone, and so is the median
judgement of under-20 series. The differential run tops every undetermined
series up to 20 samples a side, then 40 (fresh engines for cold, more warm
samples for warm); one still undetermined at 40 fails. rejudge.mjs judges a
recorded run again offline. Also: GTK 4's scale dragged away from where it
stands, and the drag-and-drop cases spaced as the dnd experiment's drags.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…he re-judge

The design session may read an interval wholly above 0 but within the bound
either way; the verdict rows and rejudge.mjs keep each judged series'
interval and bound so a run can be judged again offline under either.
The harness README gains the revised speed rule.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…r within the bound (design session)

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…r within the bound

Acceptance 3 as the design session settled it (spec 948c30d): the pass
rule stays the interval's upper end within the bound, and each passing
series carries the label its interval gives, shown with the interval.
judgeOperation's verdicts carry labels, eventSpeeds' verdicts are the
labels, and both summaries list every within-the-bound pass in one table.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…e drop cases keep the page's counts

Chasing the third-drag misses of chrome_dnd_in_front_shared in the full
verdict run: pages/drag.html counts the source's presses, the click count
Chrome gave the last (event.detail), the page-clock gap from the press
before it, and the selections begun; the drag-and-drop cases record the
page's counts before and after each drag. judgeOperation's early return
carries its intervals and labels.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…ad-factor, an interrupted run ends its load

The engine's --drag-dnd-wait-ms (measurement only) holds a Chromium drag's
release up to its bound for the target client's XdndSelection take, then
nudges the last point, so a drag and drop that starts late can drop: the
event-driven option compared with a press dwell. The harness's
--load-factor raises stress-ng's workers per core, an interrupted
experiment ends its load (one left running skewed the next sitting), and
a dnd variant named active... activates its window like cua:active.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…ield, Chrome's selection and grab requests

The engine's --stats event_time records a background drag's event time
beside the server's time read after it; xprobe request-watch records every
client's SetSelectionOwner and GrabPointer and the grabs' replies through
RECORD (no proxy, so the person's Chrome stays on its display); selection-
watch adds the XFixes timestamps. A dry run on Chrome drops showed no
ignored request in isolation; the full run is where to use them.
drag-options.mjs tables a drag experiment's lanes as options.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…run, the re-judge, the open drop finding

kinds/ holds every measurement behind the listings and the drag-and-drop
item; diff/ the verdict run m31-verdict (run valid; every verdict passes
but two Chrome drop cases, the open finding); rejudge/ m2-final and the
M3 runs judged under the revised speed rule; drop-misses/ the three full
sittings' drop rows, the reproductions that land 36/36, the options
measured on the same data, and the instruments' dry run. The README
reads each.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…me's drop guard, the witness changes, the open drop finding)

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…e (design session)

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…eat/171-m3

Only the plugin version overlapped; this branch's 0.21.0 is kept, the next minor above main's 0.20.6. Main's change
is the macOS engine and its service (src/services/engine/service.mjs, observations.mjs) and the native matrix; it
touches none of native/linux-engine/, scripts/linux-engine-diff/ or src/services/engine/linux/, and the Linux
service imports neither changed module.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…once the harness-fault caps were exceeded

m3-gate-verdict ran on f3ad9db (main at 7aa1cbb merged, plugin 0.21.0) with a frozen release build,
cua-engine 0.3.0 (f3ad9db), sha256 88a647bc05530fd794a9efcd09e9a0dec3abc26539616d471bde815bf1e20bef, and
m3-gate-final's scenes and device cases. In block 1 the pinned lane's own gedit text window started failing the
harness oracle's selection: 28 invalid samples, over the caps in type_text_selection and clipboard_release. The
design session ruled to stop it; it was stopped with SIGINT and its scene windows closed.

The mechanism: the pinned build's failing type_text_selection deletes the selected first word and pastes nothing,
emptying its 54-character window after 9 samples; the same emptying is what earlier runs recorded as the pinned
build's failed Copy. A failed run, committed as it stood; no passing evidence.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…ane-neutral preparation ruled, the bar rule's reason corrected, #260

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…irst word restored, caret before selecting, scene backstop)

m3-gate-verdict was stopped over the harness-fault caps: the pinned build's failed paste over a selection deletes
the range and inserts nothing, so its run-long gedit window emptied after 9 type_text_selection samples and every
later selection was refused. A selection a lane's own clipboard_read left also made GTK 3 refuse the next one
(m3-gate-final's cua clipboard_write).

- Before each sample whose preparation selects the first word, the oracle checks it and puts it back through
  EditableText.InsertText when missing (text.mjs sceneTextBefore): the same for every lane, recorded on the sample
  (text_restored), counted per lane in the verdict line and the summary. A candidate's window is never put back:
  a restore it would need stops the run as a failure (text-lost).
- selectFirstWord puts the caret at the end before selecting, for every lane.
- The backstop: a refusal the restore cannot prevent restores the lane's scene before the one resample
  (restoreLaneScene: a fresh window once the old is gone, the cover back, a warm engine warmed with an untimed
  read), recorded as scene_restore. The caps and the never-resample rule for an engine's own failure are unchanged.
- stats.mjs: the bar rule's comment no longer blames the pinned build's Copy; the rule's code is unchanged.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…it buffer (a dated correction)

The record stays as it was; a 2026-11-01 note under it says the pinned build's gedit Copy succeeded on 30 of 30
samples on a buffer that held its first word and on 0 of 342 once its own failed type_text_selection had emptied
it, and points to m3/README.md.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…ixture's witness cleanup, the respawn test's timed exit)

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…ed; every scene-text restore counted (task 24 review)

The task review's four findings, all in the backstop and the restore accounting:

- A warm sample's fresh window is now brought to the series' state by the operation itself, run once untimed with its
  own preparation and witness (restoreLaneScene's warmUp, warmUpRecord), instead of a get_window_state read that
  left the window's retention unset. A cold sample still gets a fresh engine and a fresh window only.
- The warm-up's answer and witness are kept on the restore record (scene_restore.warm_up, on the failure's row and
  the counted resample). A candidate's warm-up that failed, with the engine's own error text, or whose witness saw a
  change, fails the run (prepare.mjs judgeWarmUps); the harness-fault allowance covers the oracle's steps only. A
  vendor's warm-up is recorded and judged nothing.
- A warm-up whose own preparation is refused leaves the sample invalid, with no further attempt.
- The audit's restores are recorded on its row (text_restores) and counted, with the warm-ups', in each lane's total,
  adding no sample.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…tores before a refusal are kept and counted once (task 24 re-review)

- judgeWarmUps: a candidate's warm-up carrying an engine-side prepare_error (its companion clipboard_read failed, so
  a handle no engine issued was sent, even when the request then answered ok) fails the run with that error; it is
  never charged to the oracle allowance. A vendor's is recorded only.
- A resample refused at the oracle keeps the restore it made first (resample.text_restored), and so does a warm-up
  refused at the oracle (warm_up.text_restored). judgeTextRestores counts every record from the one row that owns it,
  so the warm-up record a counted resample also carries is not counted twice.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
… backstop with the operation as warm-up), reviewed clean after two rounds

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…s engine a VM gnu build, not the shipped musl bytes)

m3-gate-t25 ran on head 380b132 with a VM release build, cua-engine 0.3.0 (380b132), sha256 0cd99eb3...,
targeting x86_64-unknown-linux-gnu, while the release ships the linux-engine workflow's x86_64-unknown-linux-musl
static-pie. The design session stopped it 9 minutes in (SIGINT, exit 130, scene windows closed): the gate must judge
the bytes that ship. Its 454 rows are committed as they stood, with no summary; the README records it as failed by
ruling. Observations only: no preparation failures, restores pinned 6 / newest 0 / cua 0, every cua sample ok.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…ost watch connection proved on the shipped binary

The release workflow's live tests run against the shipped asset (CUA_ENGINE_BIN), which is built without
the `live` feature, so CUA_ENGINE_FAULT did nothing there. The watch stayed connected and ended quiet, and
the two fault tests saw their click and preflight run (run 41348250418, both architectures). The engine
was right; the faults were never injected. Tests that inject a fault now always spawn cargo's live build.

The safety rule now has a test with no injection, so it is proved on the shipped bytes. It finds the
after-release watch's connection from outside: the one socket (/proc/<pid>/fd) and the one X client
(X-Resource, by pid) that a drag adds. It cuts that connection with pidfd_getfd and shutdown. A click and
a preflight are then refused with the watch-failure sentence and send nothing. Dev-only features of
crates the engine already links (x11rb res, rustix process and net): no new package, no lockfile change.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…fault injection, on both targets

The fault-injection code is compiled only with the `live` feature. The new step fails the build when the
asset contains either of its strings (CUA_ENGINE_FAULT, the late-watch-panic message), and it names the
string it found. It counts matches rather than using grep -q, since an early exit under pipefail would
hide a match.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…ed); task 26's test and workflow fix; the gnu/musl and injection-vs-asset corrections

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…engine (restores pinned 43, newest 0, cua 0)

m3-gate-musl ran the full differential verdict on cd4c929 with the linux-engine workflow's attested x64 musl
static-pie (run 41350086196), cua-engine 0.3.0 (cd4c929), sha256 5f4a1600..., on the scenes, device cases and
flags of the earlier gate runs, 3 blocks, 2026-11-01 21:21:25Z to 23:52:33Z. It exits 0: run valid, no verdict FAIL,
the chrome-input covered drag the declared refusal; 66 speed series, 63 faster and 3 same within noise, none within
the bound; 0 resampled and 0 invalid of 4,956 samples; scene-text restores pinned 43, newest 0, cua 0. The README
cites it as M3's verdict with its provenance and the three engines' hashes, and says what the earlier gate runs
became.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…fers in the spec (8aa4a63, committed during the run)

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
… the x64 asset is the gated bytes, 5f4a1600)

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…resh home, Acceptance 1, the device-mode fixture)

The published x64 asset (release run 41364541329 on cd4c929) is the gated binary byte for byte, sha256 5f4a1600...;
its feature graph, before and after task 26's dev-dependencies, is identical for both musl targets. On the VM at
9bf9d3a: a fresh home installs 0.3.0 at the pin's hash and doctor names service cua with the capabilities and passes
accessibility.enabled; on the default home Acceptance 1 passes 11/11 with 0 sky_linux over 3,370 samples and the
installed engine the trusted worker's child; the device-mode fixture on the installed engine passes 18/18.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…inux-engine-v0.3.0 released and pinned, Outcomes and the execution record)

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
…parity cua PASS, diff ok, compare --engines PASS)

M3.3's facade suites rerun at 23d0b7c on the installed, pinned cua-engine 0.3.0 (linux-engine-v0.3.0, sha256
5f4a1600...), no --engine-bin, CUA_NATIVE_ENGINE per lane: repl-parity native vendor RECORDED_VENDOR_DEFECT (31 covered,
2 declared), cua PASS (33), diff ok with 0 differences and the 2 declared; native-baseline cv/cc x3 and compare
--engines VERDICT: PASS. Every lane recorded its requested engine as the trusted worker's child behind its own service.

Sminos-Session: linux171#3c5ca588 (cua on dc-linux171-1e68)
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-02T01:34:37.465853Z
We couldn’t complete this review. Comment @codex review to try again.
c47e597 PR opened
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

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.

1 participant