Skip to content

DO NOT MERGE: r2 Apple probe - #55

Closed
tmm wants to merge 19 commits into
mainfrom
r2-apple
Closed

tmm wants to merge 19 commits into
mainfrom
r2-apple

Conversation

@tmm

@tmm tmm commented Oct 27, 2026

Copy link
Copy Markdown
Member

Temporary probe for round-2 hardening of the Apple layer (URLSessionTransport, AppLifecycle). Do not merge; it will be closed.

ampagent and others added 19 commits October 27, 2026 21:34
… platforms and probe transports against browser WebSocket behavior

NIOTransport now reports a connection that ends without a close frame as 1006 and an empty close frame as 1005, as a browser does, and accepts frames up to 64 MB like URLSessionTransport.

Amp-Thread-ID: https://ampcode.com/threads/T-01a17664-8fd0-76be-8fd5-75ac6e7aa0d8
Co-authored-by: tmm <tmm@tmm.dev>
A redirect of the WebSocket upgrade was followed, sending the auth token in Sec-WebSocket-Protocol to wherever it pointed. A browser WebSocket never follows one; the upgrade now fails instead.

Amp-Thread-ID: https://ampcode.com/threads/T-01a17664-8fd0-76be-8fd5-75ac6e7aa0d8
Co-authored-by: tmm <tmm@tmm.dev>
…onnection's end

URLSession delivered the part of a frame it had when the server went away mid-frame, which the client read as an invalid message and stopped in the error state. A browser drops it and reports an abrupt close, after which the client reconnects.

Amp-Thread-ID: https://ampcode.com/threads/T-01a17664-8fd0-76be-8fd5-75ac6e7aa0d8
Co-authored-by: tmm <tmm@tmm.dev>
URLSession reports the task running when it returns the part of a cut frame, so the message waits up to 10 ms for the next receive instead: when the connection ended without a close frame by then, the message is dropped.

Amp-Thread-ID: https://ampcode.com/threads/T-01a17664-8fd0-76be-8fd5-75ac6e7aa0d8
Co-authored-by: tmm <tmm@tmm.dev>
Task.sleep(10 ms) took up to 90 ms on CI, which every message without another right behind it waited.

Amp-Thread-ID: https://ampcode.com/threads/T-01a17664-8fd0-76be-8fd5-75ac6e7aa0d8
Co-authored-by: tmm <tmm@tmm.dev>
… the lifecycle tests on macOS

A job next to the macOS one runs the e2e and chaos tests against a real zero-cache with the shipped transport, the transport probes, and the app lifecycle tests on macOS and the iOS Simulator (about 13 minutes).

Amp-Thread-ID: https://ampcode.com/threads/T-01a17664-8fd0-76be-8fd5-75ac6e7aa0d8
Co-authored-by: tmm <tmm@tmm.dev>

tmm commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

Superseded by #58.

@tmm tmm closed this Oct 28, 2026
@tmm
tmm deleted the r2-apple branch October 28, 2026 00:18
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.

2 participants