Problem
whatsrust/lib/event_wiring.go currently combines lifecycle registration, event-family dispatch, view-once deduplication, diagnostics, and callback plumbing. That makes the registration boundary harder to review and extend.
Proposed solution
Keep event_wiring.go as the lifecycle registration orchestrator and extract cohesive connection, presence, message/view-once, receipt, and synchronization handling families into named Go files/functions. Preserve handler ordering, one stable lifecycle client snapshot, view-once deduplication, diagnostics, and callbacks.
Acceptance criteria
event_wiring.go owns only lifecycle registration orchestration.
- Existing event-family behavior, ordering, stable snapshot use, deduplication, diagnostics, and callbacks remain unchanged.
- Focused tests cover the extracted boundary and preserved view-once behavior.
gofmt, go test ./..., go vet ./..., and git diff --check pass.
- No Cargo commands are run.
Chain context
Child of PR #353, targeting refactor/go-client-media-identity-callers. Additional event-family extraction remains follow-up work if the 400-line review budget is reached.
Problem
whatsrust/lib/event_wiring.gocurrently combines lifecycle registration, event-family dispatch, view-once deduplication, diagnostics, and callback plumbing. That makes the registration boundary harder to review and extend.Proposed solution
Keep
event_wiring.goas the lifecycle registration orchestrator and extract cohesive connection, presence, message/view-once, receipt, and synchronization handling families into named Go files/functions. Preserve handler ordering, one stable lifecycle client snapshot, view-once deduplication, diagnostics, and callbacks.Acceptance criteria
event_wiring.goowns only lifecycle registration orchestration.gofmt,go test ./...,go vet ./..., andgit diff --checkpass.Chain context
Child of PR #353, targeting
refactor/go-client-media-identity-callers. Additional event-family extraction remains follow-up work if the 400-line review budget is reached.