fix: isolate console and agent lifecycle ownership - #13
Merged
h3zh1 merged 3 commits intoOct 2, 2026
Merged
Conversation
# Conflicts: # runner/console.go
A multi-channel server (tcp+udp+ws) spawns one Console per channel from the same RunnerConfig. Per-console ownership rejected channel attaches arriving at sibling consoles, breaking connhub load_distribution. Move the owned set into a consoleScope shared per RunnerConfig; consoles from different runners stay isolated. Also remove a redundant unconditional Agents.Delete in the connhub reconnect loop (Agent.Close already removes the exact pointer) and use CompareAndDelete in the FFI CleanupAgent teardown.
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.
What changed
This fixes REM lifecycle ownership so independent Consoles and Agent generations do not close or remove one another.
Validation
The full Runner race matrix is not claimed as green. The clean base reproduces the simplex address race, memory helper race/failure, and Unix listener readiness failures. The full matrix also has an unresolved timeout and another Bridge race that were not individually compared with the base; those are outside this focused lifecycle change.
The change is limited to lifecycle ownership and regression tests. It does not add protocol or network features.