diff --git a/remote.md b/remote.md index 1aaf1bc..176792e 100644 --- a/remote.md +++ b/remote.md @@ -681,6 +681,45 @@ the dedicated harness supplied the six new native results. No full reader suite, installed/active-reader replacement, physical input/Braille, audible speech or real NVDA/Orca acceptance was performed. No release gate is complete. +Thirty-third implementation increment (2026-11-05): based on reader `cd9ae05` +(`testing`) and Tentacles `b88565a` (`master`), synchronized with their upstreams. +Matching reader implementation: `21d8904`. +The source-built `cthulhu-input-helper` now hosts the quarantined Xorg target in +its own process, with fixed-size private IPC, one immutable epoch, strictly +increasing sequences and a separate empty EOF lifeline. Lifetime cancellation +does not wait for buffered or incomplete key data to drain. Only explicit valid +heartbeats renew the three-second watchdog; key traffic cannot postpone expiry. +Inherited pipes are direction-checked and adopted as interruptible nonblocking +duplicates. A bounded ACK writer cannot postpone native cleanup; terminal ACKs +report cleanup status, with a bounded flush and joined I/O workers. SIGTERM and +SIGINT attempt orderly retirement. See [the helper contract and limits](../cthulhu/docs/testing/remote-input-helper.md). + +Eight private native process scenarios verify explicit close, writer SIGKILL, +writer SIGSTOP/watchdog expiry, SIGTERM with a partial frame, replay, wrong epoch, +heartbeat renewal beyond the initial deadline and a full real ACK pipe. A +separate X connection verifies owned Shift/Control release. The supervisor owns +helper and writer separately to reap both: this models writer/descriptor death, +not an actual production reader launch/SIGKILL. Six existing destination-target +native tests remain passing regressions. Pure helper tests cover exact frames, +fragmentation, lifetime EOF/data, cancelled queued downs, blocked ACKs, key-only +expiry, cleanup failure reporting, private errors and inherited pipe shutdown. + +The helper/input/wire/Xorg race suites, extended native helper/target harness, +existing ten-experiment/six-native-test input harness, full external Remote race +suite, affected-package vet, separate reader build, existing speech regression +harness and Tentacles `make check` passed. Repository checks include private +helper protocol/lifecycle tests and compile the helper command. No full reader +suite, active/installed-reader replacement, physical keyboard/Braille, audible +speech or live NVDA/Orca acceptance was performed. + +No production reader launcher, mailbox owner or retirement barrier is attached, +and the ordinary build/install script does not install this third executable. +Helper SIGKILL, blocked Xlib/server calls, later physical same-code collisions, +source provenance, native lock/AltGr/group/repeat policy and capture/escape/bypass +remain unresolved. Missing/failed cleanup confirmation must block replacement +input. The source command still discards keyboard traffic and offers no keyboard +grant; no release gate is complete. + ## 1. Intended result and recommended approach Build a native Go Tentacle named **Remote**, with package ID `remote`, in this @@ -1143,8 +1182,10 @@ controller or `slave` for controlled. Present plain-language role labels in UI. `xdotool`, a root daemon, `/dev/uinput`, or a Wayland portal fallback. A [quarantined Go destination backend](../cthulhu/docs/testing/remote-key-target.md) now resolves native codes and performs explicitly owned XTEST effects in private - tests. Production helper supervision, crash cleanup, provenance and physical - collision safety remain absent; it is not attached to reader input or Remote. + tests. Its [source-built helper](../cthulhu/docs/testing/remote-input-helper.md) + now has fixed IPC and separate EOF/watchdog cleanup. Production supervision, + actual reader crash acceptance, provenance and physical collision safety + remain absent; it is not attached to reader input or Remote. - [ ] Verify remote keys reach both ordinary applications and Cthulhu command handling exactly once. If physical/injected held-key collisions cannot be resolved safely, suspend input and report the limitation; do not clear all diff --git a/remote/README.md b/remote/README.md index de3ae02..6fbe624 100644 --- a/remote/README.md +++ b/remote/README.md @@ -48,8 +48,10 @@ Implemented: control remains unavailable. See [the reader contract](../../cthulhu/docs/tentacle-remote-keyboard.md). - A quarantined reader destination ledger/backend now preserves native keycodes through layout/Num Lock changes and retains failed cleanup for retry, with - private Xvfb race checks. It has no production caller or independent crash - cleanup; physical collisions and native repeat/lock policy remain open. + private Xvfb race checks. A source-built independent helper now supplies + bounded private IPC, EOF/watchdog cleanup and explicit cleanup acknowledgements. + No production reader launcher is attached; helper death, physical collisions + and native repeat/lock policy remain open. See [the native prerequisite](../../cthulhu/docs/testing/remote-key-target.md). - TLS with normal certificate/hostname validation or an already-approved, endpoint-bound SHA-256 certificate pin. Authentication sends no channel key diff --git a/remote/implementation.md b/remote/implementation.md index e9d2810..937f338 100644 --- a/remote/implementation.md +++ b/remote/implementation.md @@ -100,7 +100,11 @@ must never mint consent. A [quarantined destination ledger/backend](../../cthulhu/docs/testing/remote-key-target.md) now retains resolved native codes through layout/Num Lock changes, uncertain effects and cleanup retry. It has private native checks but supplies no - independent helper, physical collision safety or production input attachment. + physical collision safety or production input attachment. The subsequent + [source-built helper](../../cthulhu/docs/testing/remote-input-helper.md) now + provides bounded inherited-pipe IPC and separate EOF/watchdog cleanup, with + private process tests. Reader launch/supervision and cleanup barriers remain + pending, along with helper-death/blocked-server and hardware acceptance. Record physical keyboard, audible speech and physical display results separately from private automated checks. 6. Add the manifest, catalog and package tooling only after required reader APIs diff --git a/remote/keyboard.md b/remote/keyboard.md index 1a7432b..fba2dd9 100644 --- a/remote/keyboard.md +++ b/remote/keyboard.md @@ -122,11 +122,21 @@ for up and retains uncertain effects/failed releases for retry. A private Xorg backend resolves fresh group-zero XKB snapshots and rejects unavailable or ambiguous mappings and lock-key downs. Native tests inspect owned key state across layout and Num Lock changes and preserve preexisting synthetic keys. -There is no production caller, mailbox attachment or independent helper cleanup. -Later physical same-code collisions, native repeat policy, crash recovery and +The [source-built helper](../../cthulhu/docs/testing/remote-input-helper.md) now +provides private process-lifetime, EOF and watchdog cleanup with bounded ACK +handling. There is no production reader launcher or mailbox attachment. +Later physical same-code collisions, native repeat policy, actual reader crash recovery and input provenance still block production use. Failed native cleanup must block replacement input; an old release cannot be sent into a replacement helper. +Private helper tests use separate writer and helper process groups, exclusive +control/lifetime write ends and a separate X connection to inspect owned keys. +Writer death/hang, explicit close, graceful signals, wrong epochs, replay, +heartbeat renewal and stalled stdout retire the source-built helper without +claiming a physical-key or blocked-X-server guarantee. Failed/missing cleanup +confirmation blocks replacement; helper death itself still can leave keys held. +No helper is launched by the source Remote command or ordinary reader startup. + These helpers have no callers in the live coordinator. Before connecting them to production keyboard services, the reader must provide exclusive capture, trusted routing, delivery-time lease checks, a core escape and independent injection cleanup. diff --git a/tools/check.py b/tools/check.py index e446ad1..718e655 100644 --- a/tools/check.py +++ b/tools/check.py @@ -175,8 +175,9 @@ def check_remote(repoRoot): "-count=1", "-timeout=90s", ], cwd=readerRoot, env=environment, timeout=120, check=True) subprocess.run([ - "go", "test", "./internal/input", "./internal/tentacle", "./internal/tentaclewire", - "-run", "^TestRemote(Speech|Background|Key)|^TestSessionSDKLifecycleConformance$", "-count=1", "-timeout=60s", + "go", "test", "./internal/input", "./internal/remoteinput", "./internal/tentacle", "./internal/tentaclewire", + "./cmd/cthulhu-input-helper", + "-run", "^TestRemote(Speech|Background|Key)|^TestSessionSDKLifecycleConformance$|^TestHelper|^TestAdoptPipe", "-count=1", "-timeout=60s", ], cwd=readerRoot, env=environment, timeout=90, check=True)