Repository navigation
feat(berth): resume a seat after the herdr app's core restarts - #135
Merged
Merged
Conversation
herdr-core brings a kept terminal back as a bare shell and does not resume agents. The app adapter now keeps every berth, keeps its command where only its user can read it, and on the next call types the command back with --resume in place of the prompt, then has sign-on pass the startup gate.
Two berth calls at once could each type the resume line into the same restored shell, sending the second into the agent the first had started. The restore now holds a per-yard lock, sends nothing to a program that reports itself blocked, and names each kept command for its terminal's creation as well as its id.
# Conflicts: # bin/berth-herdr-app # docs/design.md # nix/berth/default.nix
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.
When herdr-core restarts, it brings each kept terminal back as a bare shell, so a seat's agent was lost. The herdr app adapter now keeps each berth's command in a file only its user can read. On the next berth call after a restart, it types that command back with
--resumeand the session id the plugin recorded, then starts sign-on to get the seat past its startup gate. A command whose shape the adapter does not know is left at its shell, and berth says why. A lock per yard keeps two calls from resuming the same seat.