Repository navigation
Hold ambiguous program input for explicit recovery - #514
Draft
raiseCatError wants to merge 1 commit into
Draft
raiseCatError wants to merge 1 commit into
raiseCatError wants to merge 1 commit into
Conversation
Owner
Author
|
Cross-reference from #541. I didn't change this branch.
This PR makes Enter during a command that isn't reading a hidden confirmation hold, which pulls the opposite way from Queue Mode. Before either merges, we should decide whether this PR is still needed with #541, and if so, how the two compose. I'd suggest rebasing it onto #541 and keeping the hold only when Queue Mode is off. |
raiseCatError
added a commit
that referenced
this pull request
Nov 11, 2026
…input An Enter pressed before NMSh can see that the running command reads (an echoing terminal is no evidence, see #514) reaches the queue as a command, and in Queue Mode without approval. The session service now holds every entry queued since the command was submitted as soon as the command is first reported asking for input, before any frontend hears of it, so the next dispatch can never overtake the hold. Hidden input also hides the held text. Adds a deterministic dispatcher test for a reader that ends right after it was seen, and a live zsh test of #514's controlled race with Queue Mode on (the fixture files are byte-identical copies of #514's). Refs #426 Refs #473
raiseCatError
added a commit
that referenced
this pull request
Nov 11, 2026
raiseCatError
added a commit
that referenced
this pull request
Nov 11, 2026
A standing "Enter queues" mode cannot be made safe: on macOS nothing reports that a program reads with no prompt, so no setting can tell a reply from a command, and it would weaken #514's boundary for every command. Ctrl+Q on an empty line while a command runs now opens the queue composer for that command only: each line entered in it is queued as typed, without approval, until Esc, a second Ctrl+Q on the empty line, or the end of that command. Plain Enter keeps #514's rules. Hidden input closes the composer before anything is drawn: its first key is looked at like the composer's, and a request reported while it is empty closes it. A line already begun in it stays a queued command. Removes the Start in Queue Mode setting and /queue mode. The owner-side hold on late-detected readers stays. Documents the remaining limit: a reader NMSh never sees before it ends. Refs #426 Refs #473
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
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 verifypassed 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 inbrowserConsoleChrome.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.