Repository navigation
Conversation
This was referenced Oct 27, 2026
Collaborator
Author
|
This moved to the monorepo as anomalyco/opencode#59700 (merged). |
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.
Summary
daemon::Controlholds a private stop flag and the ownership mutex, and is now the only way to stop the daemon or mutate ownership.request_stoptakes the ownership lock, so the next PR can wake the accept loop under that same lock.runis split into bind →Control→serve. Ownership is still created after bind, as before.doneflag set by a drop guard in the handler thread (the reap check still also acceptsis_finished()). The next PR adds a wake there.Ownership::with_timeoutslets tests use short starting/handoff deadlines.src/daemon/server.rs, using aTestDaemonfixture that runsserveon a temp socket:shutdown_request_stops_immediatelyowner_shutdown_stops_immediatelyowner_disconnect_without_handoff_stops_immediatelystarting_deadline_fires_on_timewaiting_deadline_fires_on_timehandoff_claim_transfers_without_spurious_stopValidation
cargo fmt --checkandcargo clippy --locked --all-targets --all-features -- -D warningspass (toolchain 1.90.0).cargo test --locked --lib --test service --test runtime --test ownership --test rows --test ghostty-effects(lib 47, ghostty-effects 5, ownership 8, rows 1, runtime 8 + 1 ignored, service 9).-D warningspasses forx86_64-pc-windows-msvcandx86_64-unknown-linux-gnu(--all-targets --all-features, ghostty-vt link libs stubbed). Windows and Linux tests rely on CI.