T-iOS-1: ios/ XcodeGen project (iOS 17, Swift 6 strict concurrency, ATS per PLAN §5.2), 5 SPM package shells, CI skeleton T-iOS-2: Origin spike vs real server — URLSessionWebSocketTask custom Origin CONFIRMED (no Starscream); 16MiB replay + EMSGSIZE(40) errno correction written back to plan T-iOS-3: WireProtocol frozen contract, 59 tests, 100% line coverage, cross-impl vectors vs src/protocol.ts via tsx T-iOS-4: FakeTransport/FakeClock/FakeHTTPTransport doubles Verify: independent agent re-ran all acceptance — 6/6 PASS
14 lines
672 B
Swift
14 lines
672 B
Swift
import Foundation
|
|
|
|
/// Thin HTTP I/O boundary (frozen contract, plan §3.1). `APIClient` builds
|
|
/// `URLRequest`s (Origin stamped iff the endpoint is a mutating `G` route,
|
|
/// plan §3.4 铁律) and sends them through this seam; the production
|
|
/// implementation wraps `URLSession`, `FakeHTTPTransport` (TestSupport)
|
|
/// queues canned responses.
|
|
public protocol HTTPTransport: Sendable {
|
|
/// Perform one HTTP exchange. Implementations throw on transport-level
|
|
/// failure; non-2xx statuses are returned, not thrown — classification
|
|
/// (e.g. `PairingError`) is the caller's job.
|
|
func send(_ request: URLRequest) async throws -> (Data, HTTPURLResponse)
|
|
}
|