Batch 4: FFI boundary & memory coverage#254
Merged
Merged
Conversation
c0d18b3 to
2cd8da6
Compare
4b2ba78 to
402df21
Compare
ladvoc
approved these changes
Apr 24, 2026
| } | ||
|
|
||
| [UnityTest, Category("E2E")] | ||
| public IEnumerator PerformRpc_NearLimitPayload_EchoesRoundTrip() |
Contributor
There was a problem hiding this comment.
question: Should this go in a separate RPC test suite?
Contributor
Author
There was a problem hiding this comment.
Agreed, will do that now.
ff54eae to
a4b9e83
Compare
cloudwebrtc
approved these changes
Apr 27, 2026
a4b9e83 to
219a093
Compare
Adds 5 tests covering FFI boundary behaviors that previously had no coverage: EditMode (2 tests, Tests/EditMode/RoomDisconnectTests.cs): - Disconnect on a never-connected Room (no FFI handle) does not throw - Disconnect called twice on an unconnected Room is idempotent These exercise the `RoomHandle == null` early-return at Room.cs:186 so client-side cleanup code can safely call Disconnect without tracking connection state. PlayMode (3 tests, Tests/PlayMode/FfiBoundaryTests.cs): - Disconnect called twice on a connected Room is idempotent - PerformRpc with a 14 KiB ASCII payload round-trips correctly (tests large-payload marshaling in both directions: request payload and response string) - Three concurrent PerformRpc invocations dispatched without yielding between them all complete with their own distinct payloads, exercising the FFI request memory pool and confirming request_async_id uniqueness Validation: EditMode 2/2 pass; PlayMode -n 5 * 3 tests = 15/15, zero flakes. Originally-planned items from the coverage-expansion plan that were dropped after inspection: - Request cancellation path: CancelPendingCallback is internal cleanup API and cannot be triggered deterministically from tests without instrumentation. - Isolated memory-pool behavior under sequential requests: no observable signal without instrumentation; concurrent RPC above exercises the pool indirectly and asserts correctness at the API level. - Handle release variants: all touch FfiHandle disposal, which is CLT-2773 territory and explicitly out of scope for this pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
402df21 to
71d7245
Compare
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.
Adds 5 tests covering FFI boundary behaviors that previously had no coverage:
EditMode (2 tests, Tests/EditMode/RoomDisconnectTests.cs):
PlayMode (3 tests, Tests/PlayMode/FfiBoundaryTests.cs):