Skip to content

Hold ambiguous program input for explicit recovery - #514

Draft
raiseCatError wants to merge 1 commit into
devfrom
fix/input-ownership-race-20261028
Draft

raiseCatError wants to merge 1 commit into
devfrom
fix/input-ownership-race-20261028

Conversation

@raiseCatError

@raiseCatError raiseCatError commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

An echo-visible ownership lookup can replay an immediate answer and Enter into command approval before a macOS line reader is recognizable. Keep ambiguous program submissions in an ownership hold with an explicit recovery choice. Echo controls presentation; it does not authorize sending.

  • Ctrl+S sends the capture once to the same live command. Tab/Ctrl+Q reviews without replaying Enter. Later likely/visible reports never approve the capture.
  • Completion invalidates delivery and keeps hidden prompt review; cancellation, terminal handover and shutdown clear pending captures. Existing approval entries never auto-send.
  • Parse real editor keys and NMSh actions before guarding replayed program Enter; preserve queue-review privacy across later hidden-reader reports. No detector, protocol, dependency or CI-gate change.

Refs #473. Separate from test-only PR #513, whose exact head and failed comprehensive gate remain untouched. No automatic merge or release.

Validation: full npm run verify passed locally with the intended truecolor profile and shortest compliant T7 test root. Fixed two-round/two-worker real-PTY stress passed with no lifecycle leftovers. Deterministic coverage includes unknown/older lookups, late likely/hidden inference, completion, cancellation, native handover, editor actions and ordering. Exact-head hosted CI: normal PR run40630119387 PASSED; single comprehensive run40630147755 FAILED macOS1/3 in browserConsoleChrome.test.ts:106. Its Mermaid-render result was neither success nor syntax; the actual code/reason was not logged, so causation remains unconfirmed. Other test/platform/timing/Fedora gates passed; aggregate checks correctly failed. No retry. This PR stays draft/unmerged until that independent blocker is understood and the required gate is satisfied. Controlled old/current-dev source fails both immediate/delayed approval-enqueue assertions; corrected source retains the real read and recovers exactly once after explicit Ctrl+S. Independent review findings are addressed. Physical Ghostty/Zed QA remains NOT RUN.

Manual validation on Ghostty and Zed: run a prompt-less zsh read and type an immediate answer; when held, Ctrl+S should deliver it once without queueing. Check hidden reads show no answer; sleep plus Enter remains held; Ctrl+Q reviews for queueing; Tab does not submit; Esc/Ctrl+C cancel; completion keeps review-only typing; Fish/native and fullscreen handover receive only their own new input.

Do not integrate #513 yet: preserve its exact head and failed comprehensive evidence. After this gate is understood/corrected, use a separately pinned integration candidate containing current dev, the reviewed correction and exact #513 head, then run the unchanged comprehensive gate once. A normal green rerun does not clear either failure.

Deferred resource investigation plan preserves all prior performance benefits, CPU/RSS costs and measurement limits; no memory optimization was started.

This branch has not been deployed

No deployments
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