Repository navigation
Let no decline the restart prompts, and check attach's publication first - #217
Merged
Merged
Conversation
Two follow-ups from #216, as Factory decided. A lone n or no, in any case, now declines attach's dead-session prompt and restart's running-session prompt, at a terminal and off one, and exits 0. The Node tool declines only on a lone n, so its no restarts; so did ours. At a terminal a typed no restarted the session, and off one it read as no answer and exited 1. attach now refuses a revoked or unverifiable managed launch before its Restart? [Y/n], as restart does, so it never asks a question whose yes it would then refuse. The refusal is the same with no answer, with y and with -r. The check under the locks before the respawn stays, as the second look after the answer. Decision 0020 gains two addenda, parity.md a row and the conformance ledger two intended Node entries.
Contributor
Author
|
Independent read GO at exact head Read:
Release note: typing Risks (low): the word |
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.
Two follow-ups from #216, as Factory decided. Both apply to
attach's dead-session prompt andrestart's running-session prompt (decision 0020).1.
nodeclines.norno, in any case, now declines at a terminal and off one, and exits 0.ask::declinedis shared by both prompts throughask_consent.ndeclined, as in Node (answer.toLowerCase() === "n"). At a terminal a typednorestarted the session;restartstopped a running one. Off a terminal,nocounted as no answer and exited 1.nstill don't decline:nope,no thanks,n.no. Decision 0020 has an addendum, parity.md a row, anddivergences.tomltwo entries (side node, intended).2.
attachchecks publication before it asks.attachnow refuses a revoked or unverifiable managed launch beforeRestart? [Y/n], asrestartdoes since Leave a running session alone when restart's prompt gets no answer #216. So it never asks a question whose yes it would then refuse.yand with-r: exit 1,operation-revokedon stderr, no prompt, the record unchanged, no daemon started.Release note.
nonow declinespty attach's andpty restart's restart prompts, asndoes.pty attachrefuses a revoked managed session before asking whether to restart it.Tests.
ask::tests:a_lone_n_or_no_declines:n,N,no,NoandNOdecline."",y,nope,no thanksandndon't.consent_needs_an_answer_and_off_a_terminal_a_yesnow countsnoas a decline at a terminal and off one. Both prompts ask throughask_consent, so this covers both.attach_no_restart::no_declines_the_restart_prompt: typesnoat a terminal, then pipesNo. Each exits 0, the stored command doesn't run, and the record is kept.restart_prompt::no_leaves_the_running_session_alone: typesnoat a terminal, then pipesNO. Each exits 0, and the same daemon keeps running.crates/pty/tests/publication_fence.rs:attach_refuses_a_revoked_dead_session_before_asking: a managed session that ran once and ended, then had its binding revoked. Attach runs with no answer, withyand with-r.attach_still_restarts_a_dead_managed_session_that_is_not_revoked: withyit prompts, restarts and runs the command again.Measured on Linux at this head, based on main
79b96c30:cargo test -p pty --no-fail-fast: all 47 test files ran. 478 passed and 1 failed:interactive::typing_filters_the_list_and_escape_clears_it, which fails in my checkout (the fuzzy filter matches the checkout path) and passes in CI.cargo test -p pty-conformance --no-fail-fastagainst this head's binary: 699 passed, 0 failed.scripts/conformance-both.sh attach_no_restart restart_promptagainst the pinned Node build:attach_no_restart10/4 andrestart_prompt2/3. Rust: 14/0 and 5/0.notests.notests and passes the rest.publication_fence.rsfailsattach_refuses_a_revoked_dead_session_before_asking, because it asks and then refuses. It passesattach_still_restarts_a_dead_managed_session_that_is_not_revoked, the unchanged behavior.