feat: modernization phase 4 PR4 B#49
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Modernization Phase 4 PR4(B): completes the receiver-vertical migration to Swift Concurrency by converting sACNReceiverRaw, sACNReceiver, and sACNReceiverGroup from GCD+delegates to actor types with AsyncStream-based outputs, aligning receiver behavior with the already-modernized source/discovery components and the Phase 4 runtime/isolation model.
Changes:
- Replaces receiver delegate APIs with
AsyncStream(data/events/debugLog) and introduces a synchronous on-event-loopRawReceiverSinkfor raw-to-merged delivery withoutTaskhops. - Refactors raw receiver lifecycle/timers to
LifecycleGate+ NIO scheduled tasks, and updates group orchestration to async fan-in via per-child drain tasks. - Migrates receiver-related test suites and public docs (README/DocC/modernization notes/AGENTS/rules) to the new async/stream model; removes now-dead delegate protocol files.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/sACNKitTests/TestSupport.swift | Adds StreamCollector to drain AsyncStream outputs for assertions in async tests. |
| Tests/sACNKitTests/ReceiverTests.swift | Migrates merged receiver tests from delegates/semaphores to stream-based collection and async APIs. |
| Tests/sACNKitTests/ReceiverRawTests.swift | Migrates raw receiver characterization to stream-based collection; adds gated socket-binding regression suite. |
| Tests/sACNKitTests/ReceiverGroupTests.swift | Migrates group tests to actor/stream APIs; adds regression for samplingStarted-on-add and reentrancy via consumers. |
| Tests/sACNKitTests/LoopbackTests.swift | Updates end-to-end loopback tests to observe via streams; adds new receiver-group and stop-race coverage. |
| Sources/sACNKit/Shared/sACNComponent.swift | Deletes obsolete delegate protocols previously used by the receiver stack. |
| Sources/sACNKit/Receiver/sACNReceiverRaw.swift | Converts raw receiver to an actor on sACNRuntime; replaces delegates with streams; moves timers to NIO scheduled tasks; adds RawReceiverSink. |
| Sources/sACNKit/Receiver/sACNReceiverGroup.swift | Converts group to an actor; replaces delegates with streams; implements child fan-in via drain tasks and serializes structural mutations. |
| Sources/sACNKit/Receiver/sACNReceiver.swift | Converts merged receiver to an actor; connects raw output via RawReceiverSink; replaces delegates with streams and async lifecycle. |
| Sources/sACNKit/Receiver/Delegate/sACNReceiverRawDelegate.swift | Removes obsolete raw receiver delegate protocol. |
| Sources/sACNKit/Receiver/Delegate/sACNReceiverGroupDelegate.swift | Removes obsolete group delegate protocol. |
| Sources/sACNKit/Receiver/Delegate/sACNReceiverDelegate.swift | Removes obsolete merged receiver delegate protocol. |
| Sources/sACNKit/Documentation.docc/sACNKit.md | Updates library overview to reflect actor + stream delivery across all components. |
| README.md | Updates “Receiving” examples/notes to the new async/streams receiver APIs. |
| docs/modernization/phase-4.md | Updates Phase 4 status and buffering/timer details for the receiver vertical migration. |
| AGENTS.md | Updates repository architecture/concurrency guidance to reflect receiver actors and removed delegates. |
| .claude/rules/timing.md | Updates timing rule references to the new receiver timer implementation names/mechanism. |
| .claude/rules/threading.md | Updates concurrency contract to actor/runtime model (and removes the old GCD/delegate guidance). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.