refactor(cli): fold Detach's server.port read into HealthProbe.resolvePort#148
Merged
Conversation
…ePort The `server.port` resolution was the third copy after #146 gave Status and Stop a shared HealthProbe. Route Detach's detached-launch readiness probe through HealthProbe.resolvePort too, so the one config key lives in one place. Behaviour-identical: application.conf defaults `port = 8080`, so the key always resolves and resolvePort's 8080 fallback (which Detach's bare getInt lacked) can never actually differ. Drops the now unused ConfigFactory import. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Route
Detach's detached-launch readiness-probe port throughHealthProbe.resolvePortinstead of its ownConfigFactory.load().getInt("server.port").Why
After #146 gave
StatusandStopa sharedHealthProbe,Detachwas the third copy of theserver.portresolution. This folds it in so the config key lives in one place.Behaviour-identical:
application.confdefaultsport = 8080, so the key always resolves —resolvePort's 8080 fallback (whichDetach's baregetIntlacked) can never actually differ. Also drops the now-unusedConfigFactoryimport.Testing
sbt testvia pre-push hook: passed.TestServeLifecyclegreen. The port path is behaviour-preserving (8080 either way), so no new test.Fixes
Closes the follow-up noted in the #146 review (3rd
server.portcopy).🤖 Generated with Claude Code