Skip to content

Fix Finder harness geometry, window guards and recovery ownership - #199

Closed
SSFSKIM wants to merge 8 commits into
mainfrom
fix/182-183-matrix-geometry
Closed

SSFSKIM wants to merge 8 commits into
mainfrom
fix/182-183-matrix-geometry

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Scope

Refs #182, Refs #183, Refs #184

  • Pin Finder to 920×520 at (80,80) after chrome toggles, through M4's approved-engine window-frame UserProbe. Require exact owned-window identity and CG read-back; retain the proof with later bind snapshots.
  • Judge Finder activation from one ordered CG snapshot, preserving strict obstruction refusal. Record the ordered prefix through the run window on binds/refusals; Claude/Chrome carry names only, never window contents.
  • Refuse begin when front/Finder recovery records remain, preserve the original record, and require matching restored PID/bundle plus successful activation before clearing it.
  • Prepare the post-M4 hold: six-sample route A/B, native-mac pair, one matrix pair. Reserve 116 minutes after M4, plus 10 minutes local reporting. The final-build triple remains M5 work.

Integration and live proof

Requires M4's engine build containing --probe window-frame. This branch does not touch native/, install, runtime, onboarding, surface.mjs or engine service files. Tests fake the probe boundary; the combined hold uses a clean merge of M4 and this branch.

No mini access was made. Live repeated geometry, A/B passage and clean paired put-back remain for the authorized hold; the exact historical hold-3 false-refusal cause cannot be recovered from its missing guard snapshot. No issue-closing keywords are used.

Runbook: docs/doperpowers/research/2026-10-18-own-native-engine/m2b/hold4-runbook.md.

Verification

  • TDD: observed failing guard, evidence, geometry-probe and recovery regressions before implementation.
  • Focused harness/parity suite: 517/517 passed.
  • Full local unit suite: 3962 passed, 203 skipped; 12 failures from the locked Mac's real engine (-10020), plus the existing global /tmp listing race. That file passed alone (12 passed, 1 skipped). Both environmental cases updated in friction tracker Friction tracker (moved to ~/.claude/friction-tracker/cua/) #177.
  • Window-order Swift probe typechecks; git diff --check passes.
  • Final hosted CI 39873872950 passed (test, plugin, verdict) on 4364bb0: https://github.com/SSFSKIM/cua/actions/runs/39873872950. Initial CI 39871124790 also passed.
  • Initial reviewer-medium found one P2 (probe settlement before goldens/native-mac recovery). Fixed in 4364bb0: every cleanup path settles owned/unresolved probes before restoration, retains recovery ownership on failure, and halts further scenes. PID identity is rechecked before each signal. Focused suite is 517/517; final hosted CI is green. Final reviewer-medium verdict: correct, no material findings, for d95261f..4364bb0; nine focused settlement regressions also passed in review. Live GUI behavior and M4’s separate native implementation remain outside this source/unit review. The 116-minute hold budget is unchanged.

Diagnostic-retention follow-up (e8c6b44)

The next M4 build emits safe frame-probe stage/reason/count diagnostics. This follow-up preserves that object in saved framePin and subsequent activation evidence, instead of losing it when the probe stdout scratch is removed. Frame-validity checks are unchanged.

  • TDD: the failed-probe persistence regression was RED (diagnostic undefined), then GREEN through scene state, activation result and JSONL evidence.
  • Focused evidence tests: 128/128. Full local suite: 3985 passed, 0 failed, 203 skipped.
  • reviewer-low: correct, no material findings; independently passed the focused file (37/37).
  • Pushed into diag/188 at 8f7517e4; rebuilt controller 966ca2bdff8fc7954ab6d658eccc3b32145fe887 is M4 5d8148fb merged with that diagnostic head. Engine build is unchanged: cffaf9d84ad12f111bbf2218b5b105a6f709b91dfe2e4bb51ba1f7f47932ddbc.
  • Final controller CI 39936531444 is GREEN6/6: plugin, sandbox-live, engine-swift, test, parity-browser and sandbox-denials. The first attempt’s browser gate failed at hosted SSH Node preflight, before parity rows; one failed-jobs-only rerun passed on the identical tested tree. Friction recorded in Friction tracker (moved to ~/.claude/friction-tracker/cua/) #177. https://github.com/SSFSKIM/cua/actions/runs/39936531444
  • No mini access occurred during this offline correction. Parity-checkout synchronization waits for the next GO.

Hold8 offline follow-up (f91d1e4)

Preserve the producer’s allowlisted top-level excludedEntries alongside diagnostic in framePin. The hold used its pinned controller unchanged and explicitly accepted that field’s omission; this change is for a future controller, not retroactive evidence.

  • TDD: expanded failed-setup/activation regression failed on missing excludedEntries, then passed through saved scene state, returned activation and JSONL evidence.
  • Focused128/128; full local suite3985 passed, zero failed,203 skipped.
  • reviewer-low: correct, no material findings; independently37/37 focused tests.
  • No native edits, no live controller merge, no further mini access. Hosted PR checks will run on this pushed follow-up.

Durable Finder phase diagnostics (0492867, 2392158)

Adds flushed, append-only <run>/finder-steps.jsonl: exact owned pid/window CG samples at setup entry, after list view and each chrome part, teardown entry, after restoration, and before close. Completed steps and pin results survive a final-pin exception; error replies carry partial progress. No frame restoration or acceptance changes.

TDD localizes a simulated teardown +28 to status-bar restoration, preserves partial progress on pin failure, and rejects substitute-window metadata. Low review’s initial journaling-failure finding was fixed in23921586 with a real filesystem regression. Final reviewer-low verdict: correct, no material findings; independently42/42 device-step tests. Final adjacent tests133/133; full pre-correction suite3988 passed, one known /tmp listing race,203 skipped; failing file passed alone12/12 with one skip. Existing friction entry updated. Hosted checks on the new head are not yet verified.

Collect the new sidecar alongside activation-guards.jsonl; the runbook explains grouping by invocation and timestamp. Native/M4 and live controller branches remain untouched.

Bounded convergence trace (99b89cf)

framePin.trace now preserves only the producer’s allowed stage/relative-time/frame fields and setter attribute/times/AX error, capped at25 samples and2 setters. Unknown enums, nonnumeric payloads and extra fields are omitted. Exit6 remains a refused pin: evidence is durable and no later setup action runs.

TDD RED/GREEN verified missing trace, bounded allowlisting and status6 refusal. reviewer-low: correct, no material findings, independently45/45 focused tests. Full local suite3975 pass/18 failures/203 skips:12 locked-engine cases plus6 load-related child deadline failures; the latter affected files passed91/91 isolated. Existing friction#177 updated. Hosted checks on this latest head are not yet verified. No native/controller edits or mini access; coordinator owns integration into diag/188.

Strict owned-window raise (e799979)

Finder’s exact recorded on-screen folder gets one raise attempt when below any layer-zero window, including a run-owned Electron fixture. A fresh CG reading must still put the target on top; no blocker exemption. The same activation path precedes teardown chrome/key actions, so no fixture reordering or premature scene stop is needed.

TDD RED reproduced bind/teardown obstruction. Final targeted196/196; reviewer-low correct, no material findings, independently121/121 changed-file tests. Full suite3997pass/one known global-/tmp race/203skip; isolated failing file12pass/1skip. Hosted checks on this latest head are not yet verified.

No frame restore. #182 retains the live status-bar +28 localization. Ten modeled successful pin/teardown cycles close at548pt each (y80 bottom628), below a1440pt display; this is a conditional model backed by actual setup/teardown logic, not ten live runs or a guarantee about novel Finder behavior. No mini access or controller merge performed.

Sminos-Session: cua_repl#1ea561bc (MAWS on macbook)

Pin Finder after chrome toggles through the approved-engine window-frame probe supplied by M4. Use one CG ordering for activation and preserve redacted bind/refusal evidence. Refuse unresolved recovery before begin and verify the restored process identity. Prepare the post-M4 hold runbook.

Sminos-Session: cua_repl#1ea561bc (MAWS on macbook)
Keep preparation ownership when probe settlement fails, recheck recorded process identity before signaling, and stop further scenes until explicit recovery succeeds. Charge the bounded wait to the existing hold reserve.

Sminos-Session: cua_repl#1ea561bc (MAWS on macbook)
@SSFSKIM
SSFSKIM marked this pull request as ready for review October 22, 2026 23:55
Retain the safe stage, reason and counts before a failed placement throws, so the saved scene and teardown evidence survive removal of the probe stdout scratch.

Sminos-Session: cua_repl#1ea561bc (MAWS on macbook)
SSFSKIM added a commit that referenced this pull request Oct 23, 2026
Sminos-Session: cua_repl#1ea561bc (MAWS on macbook)
Preserve the approved probe’s safe excluded-entry list beside its stage diagnostics, including failed setup and later activation journal evidence. The live hold controller remains unchanged.

Sminos-Session: cua_repl#1ea561bc (MAWS on macbook)
Persist exact CG frame samples around setup, list view, chrome restoration and close. Keep each completed step and pin result before final-pin failures, with an append-only evidence sidecar and partial error progress. Diagnostics only; do not restore frames or change acceptance.

Sminos-Session: cua_repl#1ea561bc (MAWS on macbook)
Attach the completed prefix before the best-effort failure record so an unavailable sidecar cannot replace the original exception or discard in-memory evidence.

Sminos-Session: cua_repl#1ea561bc (MAWS on macbook)
SSFSKIM added a commit that referenced this pull request Oct 23, 2026
…diagnostic branch

Sminos-Session: cua_repl#1ea561bc (MAWS on macbook)
Allowlist trace stages, relative timings, frame coordinates and setter outcomes; cap evidence at 25 samples and two setters. Preserve size-convergence status 6 as a refused pin with durable evidence and no later setup steps.

Sminos-Session: cua_repl#1ea561bc (MAWS on macbook)
SSFSKIM added a commit that referenced this pull request Oct 23, 2026
…l into the #188 diagnostic branch

Sminos-Session: cua_repl#1ea561bc (MAWS on macbook)
Reuse the exact recorded on-screen folder raise once for bind and teardown, then require a fresh strict top-window reading. Do not exempt owned blockers or restore frames. Cover teardown restoration and ten successful pinned cycles with the observed status-bar growth.

Sminos-Session: cua_repl#1ea561bc (MAWS on macbook)
SSFSKIM added a commit that referenced this pull request Oct 23, 2026
…ndow, before bind and teardown

Sminos-Session: cua_repl#1ea561bc (MAWS on macbook)
SSFSKIM added a commit that referenced this pull request Nov 23, 2026
…ne ordered snapshot, own recovery records (refs #117, #182, #183)

PR #199 (e799979) ported onto today's main beside the probe it calls:
- Finder's setup ends with the window-frame probe pinning 920x520 at (80,80) after the chrome toggles; a pin
  that is not exact on the run's own window stops setup. The pin's result, diagnostics, excluded entries and
  bounded trace are kept in the scene state, the activation evidence and finder-steps.jsonl.
- Finder's activation judges one ordered on-screen layer-0 snapshot (front-window.swift `order`), raises the
  run's window at most once, and names an obstructing owner (Claude and Chrome by name only).
- live-device begin refuses while a front or Finder recovery record remains; the front record is created
  exclusively and cleared only after the saved process is back in front.
- goldens and native-mac settle the run's probes before any restoration (goldens-device settle-probes).

Against main: `order` takes main's --skip-pid as `front` does, and Finder's activation passes over the
approved engine's own windows (the agent cursor's panel, #235), as every other front reading of the harness.

Sminos-Session: cursor235#b93055dd (cua on macbook)
SSFSKIM added a commit that referenced this pull request Nov 23, 2026
…d gate and records (#505) (#513)

* cua install builds and signs the macOS engine when selected or with --engine, left pending for cua engine approve (refs #117)

--engine now means one thing on both platforms: cua's engine is required, so only with it does the
engine step's failure fail the install. On macOS the step runs last, builds through buildEngine at
HOME's approved location when CUA_NATIVE_ENGINE or engine.json selects cua (or --engine asks), takes
--engine-sign adhoc and --sign-wait / CUA_SIGN_WAIT_MS as engine build does, and never approves:
approval stays cua engine approve's, with the owner at the console. The selection's
engine_not_installed sentence and doctor's fallback sentence now say exactly that. engine build's
text no longer reads "signed with signed with".

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

* Harness acquisition installs pin the vendor engine so they never build one (refs #117)

Now that cua install builds the macOS engine when it is selected, the parity and baseline harnesses'
acquisition-only installs (native-baseline preparation, the remote endpoint, the selection device,
the browser-parity capability home) set CUA_NATIVE_ENGINE=vendor on the install step alone, so an
inherited selection or a later default never builds an unapproved engine under a scratch HOME. The
sessions they then drive keep their own selection.

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

* Own native engine spec: the M4 re-cut's Decision Log block, with T1's install decisions (refs #117)

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

* macOS engine: permissionsPending names its permission and the by-hand grant steps (refs #117)

The Accessibility and Screen Recording refusals now say "cua Engine needs <pane>" with
doctor's grantSteps words (System Settings, the "+" button, the bundle's own path) and
carry meta.permission, which an input method's meta keeps. The system requests stay
(the owner's decision of 2026-10-24). Ported from feat/117-m4's a1af72e onto today's
DesktopGate-wrapped requests.

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

* Screen Recording recovery on the next screenshot, cua/permission, and the foreground approve (refs #117)

The engine client relaunches the engine once on the screenshot after a Screen Recording
permissionsPending (shutdown on the checked connection, busy keeps the engine and the
original sentence, the engine's close awaited, a launch through the relay), tied to the
failing engine's pid so an outside restart counts and a reconnect does not; end_task's
generation still stops it. The service carries meta.permission as cua/permission.
cua engine approve --foreground launches the first approve's engine in the foreground.
Ported from feat/117-m4 (a1af72e, c44e307) onto today's client.

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

* Own native engine spec: ruling 1118 (builds go beside the approved engine) and T2's permission-flow decisions (refs #117)

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

* macOS engine builds go beside the approved engine; cua engine approve promotes them and restores on failure (refs #117)

Design ruling 1118. buildEngine signs into the pending slot (engine/pending/cua Engine.app) and never touches the
approved bundle, approved.json or the running engine, so a busy engine no longer blocks a build. cua engine approve
promotes the pending build (stopping the engine, refusing while another connection is open), runs the approve flow,
and puts the previous bundle back with approved.json unchanged when it does not complete. Status, doctor and the
client's mismatch sentences name the pending build and cua engine approve. The no-approval proof now runs through
cua install, plain and --engine, with the real builder.

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

* Own native engine spec: T1's fix wave, the pending slot beside the approved engine (refs #117)

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

* Engine client: end_task during the screenshot's pid read cancels it; an unconfirmed replacement is not observed (refs #117)

The pid's status is read on a captured connection and the generation rechecked before the
pid is kept, before the relaunch goes on and before the screenshot is written, so an
end_task there is the ordinary Released, not a TypeError on a cleared connection. A launch
that brings back the failing pid answers the original permission error and keeps the
relaunch owed. Review findings 1 and 2 on 16a2762.

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

* cua engine approve's promote: rollback puts the approved build back first, survives Ctrl-C and kill -9, and keeps a build published meanwhile (refs #117)

The rollback parks the promoted bundle under this process's name, puts previous back, and only then returns the
promoted one to the pending slot if a newer build has not taken it; success clears only what it promoted. Ctrl-C at
cua engine approve aborts through the same rollback, and a promote left cut short (promoting.json naming a process
that is gone) is recovered by the next approve or build. A no-op build keeps a different pending build. A promoted
engine that refuses the rollback's stop is reported as still holding the socket, with cua engine stop as the remedy,
and a failed first approve no longer claims a previous build came back.

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

* Own native engine spec: T1's fix wave 2, the promote's rollback and recovery (refs #117)

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

* Engine client: no shutdown for a screenshot end_task cancelled after its pid read (refs #117)

With a relaunch owed, end_task could come after the pid read had checked the generation and
returned, before the request resumed: the relaunch then wrote shutdown on the pipe end_task
leaves open for endTask, and an idle engine would exit for a cancelled request. The
generation is now checked after each await of the pid read and at the relaunch's start.
Review finding on fda61df.

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

* Own native engine spec: the M4 re-cut's task list in Progress, T2 reviewed clean (refs #117)

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

* Engine probe: window-frame pins a harness-owned Finder window by exact AX identity and CG read-back (refs #117)

Ported from feat/117-m4 (M4.5-D, M4.6, M4.8 at 75c9123): `cua-engine --probe window-frame --pid <n>
--window <cgWindowID> --frame <x,y,w,h>` writes size once, waits for CG size convergence, writes position once,
and reads the frame back. Exit 0 matched, 2 identity refused (with bounded stage diagnostics), 3 no AX trust,
4 unsettable or write failure, 5 final read-back did not converge, 6 size did not converge (position not
written), 64 usage. Positively non-AXWindow entries are excluded and listed; the bounded geometry trace is
kept on every result.

Identity now uses AX.swift's axWindowNumber (the SPI alone, no frame fallback), which main added since M4.

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

* Finder harness: pin the frame through the window-frame probe, judge one ordered snapshot, own recovery records (refs #117, #182, #183)

PR #199 (e799979) ported onto today's main beside the probe it calls:
- Finder's setup ends with the window-frame probe pinning 920x520 at (80,80) after the chrome toggles; a pin
  that is not exact on the run's own window stops setup. The pin's result, diagnostics, excluded entries and
  bounded trace are kept in the scene state, the activation evidence and finder-steps.jsonl.
- Finder's activation judges one ordered on-screen layer-0 snapshot (front-window.swift `order`), raises the
  run's window at most once, and names an obstructing owner (Claude and Chrome by name only).
- live-device begin refuses while a front or Finder recovery record remains; the front record is created
  exclusively and cleared only after the saved process is back in front.
- goldens and native-mac settle the run's probes before any restoration (goldens-device settle-probes).

Against main: `order` takes main's --skip-pid as `front` does, and Finder's activation passes over the
approved engine's own windows (the agent cursor's panel, #235), as every other front reading of the harness.

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

* cua engine approve is exclusive, and a cut-short promote is recovered by build and signature (refs #117)

promoting.json is now the approve lock: created with O_EXCL before the pending slot is read and held until approve
returns, so a second approve is refused, naming the first's pid and Ctrl-C, and can neither approve a promoted bundle
in place nor promote over the first's previous. A marker whose pid is gone is taken over and its promote recovered;
builds never take the lock. Recovery judges previous and the approved path as approval() does, so a re-signed copy of
the same build no longer strands the approved bundle in previous.

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

* Own native engine spec: M4's own Decision Log and Surprises entries from feat/117-m4, as written (refs #117)

The 24 Decision Log entries and 9 observations feat/117-m4 added from
2026-10-22 to 2026-10-24 (head a8c3bc1, closed PR #211), text verbatim,
in each section's oldest-first order: the decisions as a dated block
before the M4 re-cut's, which supersedes them where they differ.

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

* Own native engine: M4's report from the closed feat/117-m4, as its record (refs #117)

Copied verbatim from a8c3bc1 (closed PR #211) under a note saying it is
the closed branch's record and that the re-cut's own account follows at
its finish.

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

* Own native engine spec: T1 fix wave 3 and T5 decisions; EngineInstall and the window-frame probe in Interfaces (refs #117)

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

* Own native engine spec: T1 reviewed clean (refs #117)

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

* M4's live evidence from the closed feat/117-m4, after an owner-content check (refs #117)

37 of the 47 files under docs/evidence/2026-10-22-own-native-engine-m4/
at a8c3bc1, byte-identical. The other 10 each name a home-directory
path and are left out, as the check's rule says; the directory's README
records the check and names each file left out with its reason.

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

* M4's live evidence: the 10 files with the account home path, after the design session's ruling (refs #117)

The design session ruled on 2026-11-23 that the bare account path
/Users/new/ is not owner content (ruling 1124 as precedent; the path is
in 4,045 public files on main). The 10 files left out for it are added
byte-identical to a8c3bc1, and the README records the ruling and that
the check stands otherwise. All 47 of the branch's files are now here.

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

* M2b hold 10's evidence: the last matrix run against the vendor, after an owner-content check (refs #117)

All 103 files of hold10-20261023-184-188 (2026-10-23, the mini, build
d0b2fa13), byte-identical, from the coordinator's job directory: the
matrix pair, the native-mac pair with acceptance 6's 0 unexpected
differences, route A/B, the #188 diagnostic and the Finder pin. Every
file was read for owner content; all passed, the account home path by
the design session's ruling of 2026-11-23. The README records the check.
The 9 logs are force-added past the repository's *.log ignore.

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

* engine-swift builds the real bundle with cua engine build --sign adhoc and verifies it in the pending slot (refs #117)

The gate now runs Node: cua engine build --sign adhoc --json under a scratch HOME, then
scripts/engine-gate/verify-bundle.mjs checks the answer and the bundle: pending in the slot,
this checkout's build and version, bundle id, LSUIElement, a strict ad hoc signature with
hardened runtime and no entitlements, pending.json, and nothing approved. Nothing approves,
launches or opens the bundle. The unit tests run on the build's scratch, and the control build
stays.

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

* sandbox-live publishes the verified download proof and installs with the vendor engine pinned (refs #117)

hosted-gate.sh's install pins CUA_NATIVE_ENGINE=vendor on that one command, so the gate never
builds cua's engine before or after the default flips; nothing in it needs a real engine.
download-proof.mjs prints only the verified pin metadata of a fresh download (outcome, source,
release, URL host, SHA-256, byte count), the hosted evidence acceptance item 2 cites.
M0's scratch root is read from the captures' provenance (recorded-root.mjs) instead of an
account's home written in the script; it resolves to the same root, so no fingerprint moves.
Ported from feat/117-m4 (ced790b, 24685bb).

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

* Own native engine spec: T7 reviewed clean (refs #117)

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

* accept-native: item 14 in its owner form, selections that carry their dependencies, the structured reporter, bounded TextEdit cleanup and the build-beside reinstall (refs #117)

Ported from feat/117-m4 at 4297d18 (M4.2, M4.5-A/B/C, M4.7, M4.9 and their fixes), leaving out M4.10's
coordinator current-display gates. Main had not changed these files since the branch point.

- Item 14: the capability-based fresh onboarding, the owner or an operator at the console revoking and re-adding
  cua Engine's grants; --owner-window-minutes kept. It refuses (BLOCKED) a build pending beside the approved engine,
  before the owner window and again before approve, which would promote it. Each cell's reply facts now keep its
  cua/permission; replyFacts and doctorFacts are exported for a driver that sets the stages another way (T3b).
- #197: --items must carry each item's dependencies (ITEM_DEPENDENCIES); optInGaps names the items a run leaves
  BLOCKED for a missing opt-in, on stderr before any item and in the report. Sitting D's selection (1-8, 10-13 with
  both live flags) resolves complete and without item 9; --live-textedit alone leaves item 6 BLOCKED.
- The structured suite reporter and its sanitized diagnostics; the secrets probe's orderly teardown and drained
  streams; the TextEdit fixture's RTF placeholder and exact readback; #196's bounded cleanup (any remaining window
  blocks the quit, evidence by number and bounds).
- Item 2's reinstall on cua's engine runs the engine step and must leave the approved bundle and approved.json
  untouched: either nothing changes (the approved build is this checkout's) or a pending build sits at the bundlePath
  the answer names. On the vendor's engine it stays acquisition-only.

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

* Own native engine spec: T3, T4 and T7 decisions in the M4 re-cut block (refs #117)

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

* Finder harness fix wave: the key guard passes over the engine's windows, pending probe launches are established, unusable recovery records are kept (refs #117)

- goldens-device's key-guard front reading skips the approved engine's pids, as Finder's activation does, so the
  agent cursor's panel no longer refuses teardown keys; any other process's window still does.
- A pending probe launch names its launcher in the journal. Settlement, recovery and the put-back wait (bounded)
  until each pending launch is resolved or its launcher and any open of a bundle probe are gone, and wait out this
  run's goldens-device setup steps by their --run; one still open at the bound is not settled, with the manual step.
- The put-back tells an absent recovery record from a valid one and from one present but unusable (null,
  unreadable, wrong shape): the unusable one is kept and the recovery is not ok, as begin refuses on it.
- The window-frame probe's AX list keeps an oversized count (limit-exceeded) without materializing the list.

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

* sandbox-live resolves M0's recorded root inside the replay step, and verify-bundle names its metadata check as such (refs #117)

Bad capture provenance now fails the two capture replays alone; install, the fingerprints,
own-sandbox, probe-secrets and the engine lanes still run and are reported. A test runs the
gate's own quiet, step and port_vs_capture under sh with scratch and publish stubbed.

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

* Own native engine spec: T4 reviewed clean (refs #117)

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

* Finder harness recovery: only the journal settles a pending launch, recover waits before it stops, records present by lstat (refs #117)

- A pending probe launch is over only once the journal holds its outcome row; an empty process table is no
  evidence. One still pending at the bound is not settled, and the manual step says how a person records it.
- recover awaits launches before its owned-process snapshot, as settleProbes does, so a probe that gets its pid
  meanwhile is stopped before any restoration; a launch left pending by a stopped CLI blocks the put-back.
- The put-back tests a record's presence with lstat, as begin does (a dangling symlink is kept as unusable), and
  takes a Finder baseline only with the window numbers and all three chrome keys finderCheck verifies.

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

* Probe journal: a launch neither identified nor answered by its deadline stays pending until its own final line (refs #117)

launchProbe journaled `-` when its scan found no process, even with no final line yet, and recovery read that as
an outcome. Such a launch is now journaled `unidentified`, which the checker reads as pending; awaitProbe writes
`-` once it reads the probe's own final line, and a person may write it by hand. Identified probes are unchanged.

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

* Own native engine spec: T5 fix-wave decisions, T5 reviewed clean (refs #117)

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

* Docs for cua's macOS engine: install, signing, approval and permissions in the README and onboarding, and the engine's own js rules (refs #117)

The README gains "cua's own macOS engine (opt-in)" under Install: the one approved place and its pending slot, the
signing identity and the keychain steps (partition list, Always Allow, signing outside the GUI session), the build
(install --engine, engine build), the approval with the owner at the console, the session's permission errors and
Screen Recording's relaunch, typing under each input source, status, stop and doctor. The Requirements, the REPL host
table, Secrets, Configuration (CUA_SIGNING_IDENTITY, CUA_SIGN_WAIT_MS) and acceptance item 14 follow. The vendor
engine stays the macOS default. docs/onboarding-new-mac.md's step 7 is the same sequence as owner steps, and step 8
selects the engine for serve.

On macOS the js rules now follow the selected engine, as on Linux: cua's engine replaces the vendor's typeText rule
with one on typing under any input source and entering secrets, and adds the permissionsPending rule naming
"cua Engine". Both fit the 2,048-character cut beside the runtime's 1,511-character description.

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

* T3 fix wave 1: item 2 reinstalls on the pinned engine, item 14 approves without promoting after a console-readiness check, fixture cleanup fails closed, bounded subprocess drain (refs #117)

- Item 2 moves to scripts/accept/install-item.mjs with releasePin and enginePin named apart. The archive pin no longer
  shadows the engine pin, so --engine cua reinstalls with cua selected. A regression test covers it at the item
  boundary, plus a guard that accept-native declares no other pin.
- The reinstall judge accepts buildEngine's discard of a redundant pending copy: the approved build under the approved
  identity, as pending.json records it. Any other slot change under a no-op answer still fails.
- approveEngine({promote: false, expectedBuild}): under the approve lock a pending build is refused
  (engine_pending_build), and a bundle of another build is refused before anything launches or prompts
  (engine_unexpected_build). Item 14 approves through it, and a refusal is BLOCKED.
- Fixture cleanup fails closed. front-window.swift's windows <pid> exits 3 when the window list cannot be read.
  readWindows accepts only a reading of that pid that carries its list. cleanUpFixtureApp reads the recorded pid alone
  and signals nothing on a failed read. pidsOf throws on any pgrep failure other than none-running.
- Item 14 asks at the terminal for console readiness, with a bound, before the owner window starts and before anything
  stops the engine. Its waits use a timer seam instead of MockTimers.
- accept-native's subprocesses run through scripts/accept/bounded-run.mjs. After exit, the pipes get a bounded drain,
  and incomplete output is a failed check of the item, never a hang.
- The structured reporter counts test-process warnings (# warnings n) without forwarding their text.

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

* Engine docs fix wave: rollback exceptions, the Node refusal for cua's engine, both sign-timeout paths, the capture confirmation's two outcomes, and model rules keyed to the sentence the model sees (refs #117)

The README and onboarding say what a failed approve leaves when a build was published meanwhile or the promoted
engine would not stop; that a macOS session selecting cua's engine without Node 24 is refused (CUA_REPL_HOST=vendor
changes the host, not the engine), the vendor-host fallback being for a session that selects nothing; that a console
sign times out as engine_sign_failed and a GUI-job sign as engine_sign_prompt_waiting, with a fresh build and Always
Allow as the recovery; and that engine_capture_confirmation means no answer at the terminal. The macOS js rules split
typing from secrets and quote "cua Engine needs …", the message the model receives, instead of the error's name.

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

* README: doctor's repl.host warns only on an actual fallback; a refused opt-in into cua's engine without Node 24 is a fail (refs #117)

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

* Own native engine spec: T6 reviewed clean (refs #117)

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

* cua's macOS engine 0.2.0: M4 changes the engine, and the version moves once per PR that does (refs #117)

The version is single-sourced in Version.swift: the bundle assembler reads it for
CFBundleShortVersionString and the engine answers it on ping and status. Node tests
pinning 0.1.0 are synthetic fixtures (fake Info.plists and identities), not the source's
version; PROVENANCE.md records the build the goldens were taken on. Linux's
MIN_ENGINE_VERSION and pins are untouched; macOS has no minimum yet (held for the flip).

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

* A failed engine build keeps its first error block beside the tail, so a compiler crash's assertion is not lost (refs #117)

buildEngine reported only the last 12 lines of swift build's output; a compiler crash
prints its assertion before a long stack dump, so the detail showed the dump's end and
the closing signal 6. The detail now keeps 20 lines from the first line naming an error
or a failed assertion, the counted gap and the tail, as one run when they meet, each
line cut at 300 characters.

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

* Engine help, comments and the prompt-waiting hint say what the code and README now do (refs #117)

- engine build's help: the 45 s wait bounds every sign, a console terminal's included,
  not only one over SSH.
- install.mjs: the macOS engine step builds into the pending slot beside the approved
  engine, which engine approve promotes (ruling 1118).
- server.mjs: the computer rules follow the selected engine on either platform
  (surface.mjs jsRulesFor), not only on Linux.
- engine_sign_prompt_waiting's hint: dismiss the left-over prompt and answer a rebuild
  with a long --sign-wait while it still waits, as the README says, instead of
  answering the orphaned prompt; the sign test pins that order.

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

* T3 fix wave 2: incomplete output fails its producer, preconditions re-read after readiness, redundant slot judged by real signatures, unfiltered window inventory for cleanup, stable session-test budgets (refs #117)

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

* Own native engine spec: T3 reviewed clean; the finishing commits and the merge of main (refs #117)

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

* The bundle gate names the kind of signer pending.json records, never the signer's fingerprint (refs #117)

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

* An engine that refuses this client's API version gets the same install-then-approve remedy as one answering another version (refs #117)

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

* The input-source restore guard holds behind a probe launch with no outcome in the journal, empty process table or not (refs #117)

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

* Approve promotes only the build it inspected, keeps a newer publication's record, publishes its lock with its holder, and tells the truth about a promoted engine left running (refs #117)

- The pending build is claimed out of the slot (claimed/cua Engine.app) and read there before approve waits for the
  running engine to stop, so a build published during that wait stays pending for its own approve; a claim a killed
  approve left is given back to the slot by the next approve or build.
- A successful approve removes pending.json only while it is the claimed publication's record (build, identity and
  builtAt), so a same-build publication made during the approve keeps its record.
- promoting.json is written whole under the approve's own name and hard-linked into place, so a second approve never
  reads a live lock as empty and takes it over.
- A promoted engine the rollback could not stop: the owner is told it keeps serving new sessions when it is the restored
  bundle's build (sessions check the build, not the signature), and candidate.json lets the next build or approve stop
  it once it is idle.

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

* Docs: Screen Recording's automatic recovery arrives with the 0.2.0 engine, what to do on a Mac still serving an older one, and what a promoted engine left running after a rollback serves (refs #117)

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

* A rollback puts the previous bundle back before it records a promoted engine left running, and promises the automatic stop only for one it recorded (refs #117)

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

* Own native engine spec: the whole-branch review fixes, M4 re-cut Progress and Outcomes; tech-debt rows for its accepted risks (refs #117)

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

* cua plugin 0.29.7: the M4 re-cut (refs #117)

The number is provisional; the coordinator sets the next free patch at merge (ruling 1129).

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

* probe-fake-sky-launch test: a vendor-only grant is refused on every call on today's host, not ended with exit 1 (refs #505)

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

SSFSKIM commented Nov 23, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #513 (M4 re-cut, #505), merged as d38630f (cua 0.29.6). The branch is kept.

@SSFSKIM SSFSKIM closed this Nov 23, 2026
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