Skip to content

Refactor: split eventBus and signalRHub god objects into cohesive collaborators - #7

Merged
mamonth merged 1 commit into
mainfrom
refactor/god-object-split-eventbus-signalr
Sep 6, 2026
Merged

Refactor: split eventBus and signalRHub god objects into cohesive collaborators#7
mamonth merged 1 commit into
mainfrom
refactor/god-object-split-eventbus-signalr

Conversation

@mamonth

@mamonth mamonth commented Sep 5, 2026

Copy link
Copy Markdown
Owner

eventBus drops from 25 to 14 methods: it is now a pure orchestrator owning the subscription broker and interval scheduler, delegating message rendering, recipient partitioning, delayed-emission cancellation and push side effects to a new messageDelivery type. The delivery engine owns the MessageRenderer/ConsumerBus contracts and the push observer; the bus owns event firing, registration, scheduling and shutdown.

signalRHub drops from ~25 to 15 methods: it keeps the HTTP transport (negotiate/upgrade), protocol framing and document model, while all connection, token and open-stream state plus payload delivery moves to a new signalRConnRegistry. The registry owns the hub mutex, so transport handling no longer reaches into connection state directly. The unused signalRConnection.server back-pointer is dropped.

Behavior preserved: full suite green, lint clean, 100% scenario coverage, 82.6% statement coverage. Tests updated to drive the new registry/delivery surfaces instead of reaching into hub.conns / hub.mu.

…laborators

eventBus drops from 25 to 14 methods: it is now a pure orchestrator owning
the subscription broker and interval scheduler, delegating message
rendering, recipient partitioning, delayed-emission cancellation and push
side effects to a new messageDelivery type. The delivery engine owns the
MessageRenderer/ConsumerBus contracts and the push observer; the bus owns
event firing, registration, scheduling and shutdown.

signalRHub drops from ~25 to 15 methods: it keeps the HTTP transport
(negotiate/upgrade), protocol framing and document model, while all
connection, token and open-stream state plus payload delivery moves to a
new signalRConnRegistry. The registry owns the hub mutex, so transport
handling no longer reaches into connection state directly. The unused
signalRConnection.server back-pointer is dropped.

Behavior preserved: full suite green, lint clean, 100% scenario coverage,
82.6% statement coverage. Tests updated to drive the new registry/delivery
surfaces instead of reaching into hub.conns / hub.mu.
@mamonth
mamonth merged commit 9466315 into main Sep 6, 2026
6 checks passed
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