Skip to content

refactor(stages): unify client and server connection stage logic structure#64

Merged
st0o0 merged 8 commits into
mainfrom
refactor/connection-stage-alignment
Jul 5, 2026
Merged

refactor(stages): unify client and server connection stage logic structure#64
st0o0 merged 8 commits into
mainfrom
refactor/connection-stage-alignment

Conversation

@st0o0

@st0o0 st0o0 commented Jul 4, 2026

Copy link
Copy Markdown
Member

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.

  • Symmetric class names: HttpConnectionStageLogicHttpClientConnectionStageLogic,
    HttpConnectionServerStageLogicHttpServerConnectionStageLogic (files renamed via
    git mv, all 9 instantiation sites + CLAUDE.md updated)
  • Unified port vocabulary from the shapes: client logic and wrappers now use
    _inNetwork/_inRequest (was _inServer/_inApp), OnServerPushOnNetworkPush;
    trace wording aligned; fixed the misnamed ServerConnectionShape constructor parameters
    (outResponse/inRequest fed OutRequest/InResponse)
  • Dead code removed: the client's 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.
  • Identical canonical member layout in both logic classes (consts → ports → state →
    ctor → PreStart → handlers → interface impls → helpers → CloseAllPorts → PostStop),
    verified move-only via sorted-line comparison
  • Consistent SM constructor order: Http10/Http11ClientStateMachine flipped 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 PreStart pull, HTTP/1.x dispatch gating, client
cancellation-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):

  • HttpClientConnectionStageLogic / HttpServerConnectionStageLogic — symmetric names, identical canonical member layout
  • Unified port vocabulary from the shapes (_inNetwork/_inRequest, OnNetworkPush) incl. the misnamed ServerConnectionShape ctor params
  • Dead never-executed coalescing code removed (65 lines)
  • H10/H11 client SM constructors standardized to (options, ops) (~79 call sites)
  • Final whole-branch review: Ready to mergtant; the 2 cosmetic Minors are alreadyfixed in the trailing commit

Implementation complete. What would you like to do?

  1. Merge back to main locally
  2. Push and create a Pull Request
  3. Keep the branch as-is (I'll handle it l

※ 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.

  • Symmetric class names: HttpConnectionStageLogicHttpClientConnectionStageLogic,
    HttpConnectionServerStageLogicHttpServerConnectionStageLogic (files renamed via
    git mv, all 9 instantiation sites + CLAUDE.md updated)
  • Unified port vocabulary from the shapes: client logic and wrappers now use
    _inNetwork/_inRequest (was _inServer/_inApp), OnServerPushOnNetworkPush;
    trace wording aligned; fixed the misnamed ServerConnectionShape constructor parameters
    (outResponse/inRequest fed OutRequest/InResponse)
  • Dead code removed: the client's 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.
  • Identical canonical member layout in both logic classes (consts → ports → state →
    ctor → PreStart → handlers → interface impls → helpers → CloseAllPorts → PostStop),
    verified move-only via sorted-line comparison
  • Consistent SM constructor order: Ht flipped 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 PreStart pull, HTTP/1.x dispatch gating, client
cancellation-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 exactly the planned file set (24 files)

@st0o0
st0o0 force-pushed the refactor/connection-stage-alignment branch from 0dd3970 to ea740c9 Compare July 5, 2026 05:06
@st0o0
st0o0 merged commit 171de8e into main Jul 5, 2026
5 checks passed
@st0o0
st0o0 deleted the refactor/connection-stage-alignment branch July 5, 2026 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant