Skip to content

refactor(whatsrust): split event registration families #354

Description

@Andiveli

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:approvedIssue approved for implementation

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions