Skip to content

Acceptance tooling: TextEdit cleanup, warm parity runtimes, accept-native items 1 and 10, mini harness residue (#157) - #165

Merged
SSFSKIM merged 23 commits into
mainfrom
fix/157-acceptance-tooling
Oct 18, 2026
Merged

SSFSKIM merged 23 commits into
mainfrom
fix/157-acceptance-tooling

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Closes #157

Fixes the acceptance and parity harness defects that #115's live runs on the Mac mini surfaced: the four items in #157's body and the ones its two comments added. The full account is in docs/evidence/2026-10-18-acceptance-tooling/README.md.

  • TextEdit fixture cleanup.

    • scripts/accept/fixture-app.mjs captures the run's own launch right after open returns. It polls, bounded and timed, for a new pid and records the pid with its UTC lstart launch time. More than one new pid is treated as ambiguous; a reading past the bound is a miss, never a guess.
    • At cleanup it quits only that recorded process. The process must still have the same launch time, and the fixture's close step must have confirmed that TextEdit has no window open.
    • It then gives the front back to the app that held it before the run.
    • A TextEdit that was running before the run is never quit.
  • Paused parity cells. Every repl-parity lane serve runs with CUA_RUNTIME_IDLE_MS=0 on both hosts, set in ownNodeEnv and again in the rebuilt cellsServeEnv and boundaryServeEnv. A CI pause past the 15-minute idle stop no longer restarts the runtime, so the cell gets no restart notice and keeps its REPL state.

  • accept-native item 1. The two failing tests were not specific to the mini. accept-native puts the TAP reporter in NODE_OPTIONS, and verifyUnitProofs added a second --test-reporter; with two reporters and one destination, node --test refuses to start. The proof children now take the reporter from NODE_OPTIONS alone.

  • accept-native item 10.

    • The clean clone now works from a detached checkout.
    • Fixtures use a made-up home. The mini's own layout is a declared exception, for the home rule only.
    • A PEM fixture header is assembled at run time instead of written out.
    • Three parity tests use the vendored Meriyah, so npm test runs without node_modules.
    • Research-tree citations in comments no longer count as dependencies.
  • Declared skips (approved by the dispatching session). accept-native's suite verdict accepts a fixed list of exact skip reasons, each only while its gate is truly absent:

    • a research tree that is unset or missing;
    • a platform-only test on another platform;
    • an npm package missing from the checkout.

    Each accepted skip is listed with its count. Any other skip still BLOCKS.

  • Mini harness residue.

    • The gate's frontmost reader accepts both lsappinfo spellings.
    • gated --hold ignores the queue inside a CI-opt hold.
    • scripts/mini-watch.mjs lands the untracked /tmp watch with a required --log.
    • Parity connections write a bounded stderr tail to <out>/diagnostics/ only when a connection ends abnormally.
    • ~/Developer/GitHub/cua-parity on the mini was reset to main.
  • Last-tab guard (comment 1). Nothing added. Every harness close is a cell in a cua session and reaches Chrome as Target.closeTarget through cua's host, the only Chrome route. Ending a session can close the user's Chrome window and kill the profile's extension host: no last-tab guard when closing agent tabs #148's keepWindow already guards that path.

Validation Evidence

Claim Command Result
accept-native items 1 and 10 pass on the mini in accept-native's env -i environment, from a detached checkout node scripts/mini-rules.mjs gated -- … node scripts/accept-native.mjs --items 1,10 at 8318fe3 overall PASS. Item 1: 2892/2963 passed, 0 failed, 71 declared skips listed. Item 10: every check PASS; clean clone 2857/2963. Report: docs/evidence/2026-10-18-acceptance-tooling/accept-native-items-1-10/acceptance.json
The TextEdit cleanup quits only its own launch, keeps one running before, and gives the front back node scripts/mini-rules.mjs gated --hold -- … node scripts/accept/textedit-cleanup-witness.mjs at c46afe6, inside a CI-opt hold PASS 11/11. New pid listed 16 ms after open. Pid running before (1650) survived the harness cleanup. Run's pid (1924) recorded and quit. No TextEdit left; Terminal in front (checked independently). textedit-witness/witness-c46afe6.json; the e9cdc1f run was 10/10
Item 1's root cause, reproduced off the mini NODE_OPTIONS="--test-reporter=tap --test-reporter-destination=stdout" node --test test/repl-parity/coverage.test.mjs test/repl-parity/inventory.test.mjs before: 2 fail (--test-reporter must match the number of specified --test-reporter-destination); after: 11/11
Paused cells keep a warm runtime node --test test/repl-parity/topology.test.mjs test/repl-parity/fixture-launch.test.mjs pass. The lane commands carry CUA_RUNTIME_IDLE_MS=0, and both rebuilt envs give settingsFrom(...).runtimeIdleMs === 0
Touched suites node --test test/accept-*.test.mjs test/mini-*.test.mjs "test/repl-parity/**/*.test.mjs" test/cli.test.mjs test/secrets-project.test.mjs 638 pass, 0 fail, 1 skipped (platform)
Mods suite (fixtures edited) npm run test:mods 133 pass, 0 fail
CI GitHub Actions ci (plan, plugin, test, verdict) green

Review: doperpowers:reviewer-medium, two rounds.

  • Round 1 found 2 P1 and 2 P2: ownership evaluated at cleanup, a process that might hold an owner's document, DST-ambiguous lstart parsing, and keep-warm dropped by the rebuilt envs. All four fixed.
  • Round 2 found 1 P2: a poll reading past the bound was accepted. Fixed with a test. The review converged there.

Residue

…dleID or "CFBundleIdentifier"), through key-guard's parseFrontmost (#157)
… absent before the run, launched after it began) and hands the front back; a cua-free witness of that path for the mini (#157)
…oof children take the TAP reporter from NODE_OPTIONS alone; the clean clone checks out the checkout's HEAD commit (detached too); fixtures use a made-up home, the mini's own layout is a declared home-rule exception; research-tree citations in comments are not dependencies
…h its log, mode, pause and hold files as arguments; the decision is a tested function (#157)
…iagnostics/<connection>.stderr.log only when a connection ends abnormally (#157)
…ernel's vendored Meriyah, so npm test runs without node_modules as the clean clone does; shell-exec's PEM fixture header is assembled; the research-tree pattern lives only in accept-native
…osts): a cell held by a CI pause past the 15-minute idle stop no longer restarts the runtime and differs (#157)
…xtEdit survives the harness cleanup and is quit only by the witness's teardown), then the started-by-run case; mini-rules gated --hold ignores the queue inside a CI-opt hold (#157)
…asons, only while the research tree is absent or on another platform, each listed with its count; any other skip still blocks. Evidence: the TextEdit witness on the mini (10/10) and the sitting log
…package (acceptance 10's clean clone, which proves npm test runs without node_modules); accepted only while the package is absent from the checkout (#157)
…nv and boundaryServeEnv set CUA_RUNTIME_IDLE_MS=0 themselves (they rebuild the env and dropped ownNodeEnv's value, so settingsFrom took the 15-minute default); a test feeds both builders into settingsFrom
…=UTC beside LC_ALL=C and lstart parses with Date.UTC, so a fall-back hour no longer picks the earlier occurrence and rejects the run's own launch; the parse tests compare UTC instants, including both occurrences of a fall-back hour
…s its own TextEdit as {pid, launch time} right after its open (exactly one new pid launched in or after its first second; none or several record none, and several are reported as ambiguous), and the cleanup quits only that recorded pid while it still has the same launch time. Nothing is re-scanned at cleanup, so a TextEdit the owner starts mid-run or relaunches, or a reused pid, is never selected. The witness captures identity the same way after its own opens
…irmed to hold no window but the fixture's (#157): cleanUpFixtureApp takes an explicit alone flag (exactly true); textedit.mjs passes it only when its close step saw TextEdit report no window at all and no GUI stop or identity loss happened. Unconfirmed, nothing is signalled, the quit step is BLOCKED naming the pid left running, and the front is still handed back. The witness, which owns every document its TextEdits hold, confirms it explicitly
…n returns (awaitLaunch): past the bound it is recorded as a miss, never guessed; the witness records how long the new pid took to appear (#157)
@SSFSKIM
SSFSKIM merged commit d12edf0 into main Oct 18, 2026
4 checks passed
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.

Acceptance tooling: accept-native's fixture TextEdit, paused-cell restart notice, main's item 1 and item 10 on the mini

1 participant