feat(health): return structured probe outcomes - #665
Merged
Conversation
SunSi12138
marked this pull request as ready for review
September 12, 2026 05:04
SunSi12138
commented
Sep 12, 2026
SunSi12138
left a comment
Owner
Author
There was a problem hiding this comment.
整体 result/Hosting 方向符合 #655,但发现 1 个状态域 blocker:health preflight 仍把 legacy connection State.Faulted 当成 terminal lifecycle,导致合法 Running+NotReady 窗口异常泄漏。
SunSi12138
commented
Sep 12, 2026
SunSi12138
left a comment
Owner
Author
There was a problem hiding this comment.
补充同一 lifecycle/result 边界的另一处 race:probe 启动后本地 Stop/terminal shutdown 会被当前 catch 重新分类为普通 Unavailable,与 PR 文档声称的 terminal lifecycle exceptional contract 不一致。
This was referenced Sep 12, 2026
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.
Closes #655
Summary
SharpLinkHealthProbeOutcomewithSuccess,NotReady,Unavailable, andUnsupportedReady/Draining/Unhealthyin nullableSharpLinkHealthCheckResult.Status, populated only forSuccessSharpLinkRemoteHealthCheck;Unsupportedhas a documented stableUnhealthymappingValidation coverage
Ready/Draining/Unhealthy=>Success+ remote statusNotReady, with no connection side effectRunning+NotReady=> structuredNotReadyLifecycleState=Runningwhile legacy connectionState=Faulted=> structuredNotReadyUnavailableStopAsyncraces an in-flight probe => terminalConnectionClosedremains exceptionalUnsupportedand no health frame is sentOperationCanceledExceptionSharpLinkErrorCode.ProtocolViolationPre-PR self-check
devafter feat(api): add non-throwing multi-cluster status query #664 before opening the PR; current branch isahead 5 / behind 0devand existing test helpers/fakesStatuscall sites touched by this change; CI formatting gate passesHealthResponseCodecrefuses to serialize non-success local outcomes, so local outcome values cannot leak onto the protocol wireRpcChannel, pending-call terminal machinery, retry/admission, or ordinary RPC invocation files changedAcceptance self-review
NotReady/Unavailable/UnsupportedUnhealthyCI follow-up
Two initial
PR Fastfailures were followed to root cause and fixed before first review readiness. Both were setup defects in the new multi-cluster test, not production-code failures:DisableRequestTimeout()AllowDynamicContractsdynamic-only slot configurationReview follow-up
Review found two lifecycle-domain races after #658:
State == Faultedcan coexist with canonicalLifecycleState == Running; health preflight now usesLifecycleState, so zero-ready connectivity fault remains structuredNotReadyUnavailableRegressions freeze the actual
Running / connection Faulted / NotReadysupervisor window and race an in-flight health probe against localStopAsync.Latest exact head
4b1feb2d1cdfbb2c2e69916194f021c4c6f0d8d3is green on:PR Fast— success, including formatting, Release build, Unit Tests, generator/load tests, and allocation gatePR Quick— success, including Debug/Release builds, Unit/Integration tests, NativeAOT, pack/NuGet contract + smoke, load and chaos smokePending and codec validation— successExtension fault containment— successCodeQL— successBoth review threads were replied to and resolved. Ready for review.