refactor(stages): unify client and server connection stage logic structure#64
Merged
Conversation
st0o0
force-pushed
the
refactor/connection-stage-alignment
branch
from
July 5, 2026 05:06
0dd3970 to
ea740c9
Compare
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.
Summary
Behavior-neutral structural alignment of the client and server HTTP connection stage
logics, so a side-by-side read shows only the real semantic differences instead of
naming and layout noise.
HttpConnectionStageLogic→HttpClientConnectionStageLogic,HttpConnectionServerStageLogic→HttpServerConnectionStageLogic(files renamed viagit mv, all 9 instantiation sites + CLAUDE.md updated)_inNetwork/_inRequest(was_inServer/_inApp),OnServerPush→OnNetworkPush;trace wording aligned; fixed the misnamed
ServerConnectionShapeconstructor parameters(
outResponse/inRequestfedOutRequest/InResponse)TryPushOutbound/TryCoalesceOutbound(65 lines)lost their last caller in 758300f; the coalescing added later in cdaf83b never
executed. Re-introducing outbound coalescing deliberately is a possible separate perf task.
ctor → PreStart → handlers → interface impls → helpers → CloseAllPorts → PostStop),
verified move-only via sorted-line comparison
Http10/Http11ClientStateMachineflipped to(options, ops)like all other client/server state machines (~79 call sites, almost all tests)Explicitly not changed (real, intentional asymmetries): completion strategies (client
drain-timer vs server complete-after-flush), server-only metrics/tracing/DI/connection
features, eager vs demand-driven
PreStartpull, HTTP/1.x dispatch gating, clientcancellation-token handling.
All touched types are
internal— no public API change.Test plan
Release build: 0 errors, no new warnings
Full unit+stage suite: **5933 passed
Roslyn diagnostics on both logic files: zero
Task 4 reorder proven move-only (sorted removed/added line multisets identical)
Branch diff verified to touch exactlles)
Ran 2 shell commands
Ran 2 shell commands
The shell's working directory moved to src/ — repeating the commit with correct paths:
ully loaded skill
I'm using the finishing-a-development-branch skill to complete this work. Tests are verified (full suite 5933/0/0; the trailing cosmetic commit was rebuilt and its covering spec re-run 2/2), this is a normal repo (no worktree), and the base is main (branch sits directly on origin/main at 9d57510).
The work is done. Summary of what's on refactor/connection-stage-alignment (7 commits):
Implementation complete. What would you like to do?
※ recap: The connection-stage refactor (unifying client/server stage logic naming, layout, and dead-code cleanup) is complete on refactor/connection-stage-alignment: 7 commits, all 5933 tests green, final review says ready to merge. Next: tell me merge locally, open a PR, keep, or discard. (disable recaps in /config)
❯ Pr title und description
Pushing the branch and creating the PR:
Ran 2 shell commands
The branch is pushed, but gh isn't authenticated, so I couldn't open the PR myself. You can either run ! gh auth login in the prompt (then tell me and I'll create it), or open it manually with this title and description:
Title:
refactor(stages): unify client and server connection stage logic structure
Description:
utral structural alignment of the client and server HTTP connection stage
logics, so a side-by-side read shows only the real semantic differences instead of
naming and layout noise.
HttpConnectionStageLogic→HttpClientConnectionStageLogic,HttpConnectionServerStageLogic→HttpServerConnectionStageLogic(files renamed viagit mv, all 9 instantiation sites + CLAUDE.md updated)_inNetwork/_inRequest(was_inServer/_inApp),OnServerPush→OnNetworkPush;trace wording aligned; fixed the misnamed
ServerConnectionShapeconstructor parameters(
outResponse/inRequestfedOutRequest/InResponse)TryPushOutbound/TryCoalesceOutbound(65 lines)lost their last caller in 758300f; the coalescing added later in cdaf83b never
executed. Re-introducing outbound coalesle separate perf task.
ctor → PreStart → handlers → interface impls → helpers → CloseAllPorts → PostStop),
verified move-only via sorted-line comparison
Htflipped to(options, ops)like all other client/server state machines (~79 call sites, almost all tests)Explicitly not changed (real, intentional asymmetries): completion strategies (client
drain-timer vs server complete-after-flush), server-only metrics/tracing/DI/connection
features, eager vs demand-driven
PreStartpull, HTTP/1.x dispatch gating, clientcancellation-token handling.
All touched types are
internal— no public API change.Test plan