Repository navigation
refactor(client): share the registered service decision between clients - #53241
Merged
Merged
Conversation
kitlangton
force-pushed
the
share-contender-pool
branch
from
October 5, 2026 04:00
d9defe8 to
42dc009
Compare
kitlangton
force-pushed
the
share-service-decision
branch
from
October 5, 2026 04:01
c35132c to
dfebef9
Compare
This was referenced Oct 5, 2026
kitlangton
force-pushed
the
share-contender-pool
branch
from
October 5, 2026 04:54
42dc009 to
8d52db1
Compare
kitlangton
force-pushed
the
share-service-decision
branch
from
October 5, 2026 04:54
dfebef9 to
d8c3ab1
Compare
kitlangton
force-pushed
the
share-contender-pool
branch
from
October 5, 2026 06:00
8d52db1 to
9907f16
Compare
kitlangton
force-pushed
the
share-service-decision
branch
2 times, most recently
from
October 5, 2026 06:08
10b3cb7 to
b4b9816
Compare
kitlangton
force-pushed
the
share-service-decision
branch
from
October 5, 2026 15:19
b4b9816 to
61808b2
Compare
kitlangton
force-pushed
the
share-service-decision
branch
from
October 6, 2026 04:18
61808b2 to
167dffa
Compare
3 of 6 tasks
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.
Why
When a registered service answers, both
ensure()loops decide what to do with the same chain ofmatchesVersion/compatible/statechecks. #50825 had to add the protocol guard to both copies. The rules are easier to review, and to test without child processes, as one function.What Changes
decide(service, options)inservice-probe.tsreturns what to do. Each client performs it in the same order as before.decide()compatible: false)fail(incompatible health protocol)replace,pty: "handoff"reusewaitfail("Background service failed to start")replace,pty: "handoff"only when ready, otherwise"clear"Error messages are byte-identical.
Scope
Stacked on #53240, with no behavior change intended. That completes the shared lifecycle core: the probe, startup attempts, and this decision.
terminate()andstop()stay in each client because they are almost all IO.Verification
service-decision.test.tscovers the table above as plain unit tests.decide()fails fix(client): preserve service on protocol-only reconnect mismatch #50825's three reconnect tests in both the Effect and Promise suites, plus the unit test.Stack