Repository navigation
fix: add structured runtime configuration update results - #667
Conversation
SunSi12138
left a comment
There was a problem hiding this comment.
整体 structured-result 方向与 #654 对齐,Server publication/stop seal、custom implementation fallback、参数/回调异常边界目前没有发现新的阻塞问题。这里有 1 个 Client 状态域 blocker:新的稳定 LifecycleClosed contract 仍把 legacy connectivity State.Faulted 当作 local lifecycle closure。
SunSi12138
left a comment
There was a problem hiding this comment.
补充 1 个 coverage blocker:#667 声明为 built-in Client/Server runtime controls 提供 structured Try... path,但现有 Client/Server UpdateRpcSessionFlushPolicy(...) 完全遗漏。两边当前都把 Stop/Draining/Faulted 作为 InvalidOperationException,custom implementation 也以 NotSupportedException 表达 unsupported,正属于 #654 要结果化的 expected runtime publication rejection。请为 Client 和 Server 的 RPC-session flush policy 补对应 non-throwing Try...(参数验证仍 exceptional、Stop/lifecycle closed 返回 LifecycleClosed、custom implementation 返回 UnsupportedByImplementation),并加 success + stopped/unsupported regression;Client 侧同时要遵守另一条 review 提到的 canonical lifecycle 状态域,不能把 transient connectivity State.Faulted 当 lifecycle closed。
|
已处理本轮剩余 coverage blocker,修复 commit 为
|
SunSi12138
left a comment
There was a problem hiding this comment.
复审通过。两条 blocker 均已在 exact head 9b274943d95a6ec27712ecba6b72e6663c7f0b21 收敛:Client structured runtime publication 改用 _stopStarted + canonical LifecycleState,并以确定性 Running / State.Faulted / NotReady 回归证明 transient connectivity fault 不会误报 LifecycleClosed;Client/Server RPC-session flush 已补 TryUpdateRpcSessionFlushPolicy,覆盖成功原子 publication、invalid input、Stop 后 generation 不变以及 custom implementation UnsupportedByImplementation。当前 dev 仍是 PR merge base,behind_by=0;exact-head Quick/Fast/CodeQL/Pending+codec/Extension containment/RPC Session Flush Performance Evidence 全绿。未发现新的实质 blocker。
Summary
SharpLinkRuntimeConfigurationUpdateResultwith machine-readable failure codes for expected runtime-control rejectionTry...runtime configuration paths across built-in Client and Server controls while keeping existing throwing APIs compatibleUnsupportedByImplementationfor custom Client/Server implementations that do not expose the built-in structured capabilitydoc/control-plane-results.mdAcceptance coverage
LifecycleState+ stop seal; transient connectivityState.Faultedwhile lifecycle isRunningstill accepts runtime publicationModeConflictLifecycleClosedand never publishes the prepared candidateTryUpdateRpcSessionFlushPolicy; success publishes atomically, Stop returnsLifecycleClosed, and custom implementations returnUnsupportedByImplementationISharpLinkClient/ISharpLinkServerimplementations receive an explicit non-throwing unsupported resultInvalidOperationExceptionhandling to the structuredTry...contractValidation
Final head
9b274943is synced withdev(behind 0). All GitHub Actions workflows passed:Review regressions include the deterministic
LifecycleState == Running / State == Faultedconnectivity window and Client/Server RPC-session flush success, lifecycle rejection, invalid-input, unsupported-implementation, and unchanged-generation cases.Closes #654