feat(ios): W0 scaffold + day-1 spike + WireProtocol frozen contract + TestSupport doubles

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
This commit is contained in:
Yaojia Wang
2026-07-04 21:19:30 +02:00
parent 9b41ffa574
commit cbaa08daba
46 changed files with 3203 additions and 3 deletions

View File

@@ -0,0 +1,24 @@
// swift-tools-version: 6.0
// T-iOS-1 scaffold shell. Host / HostStore / KeychainHostStore / SecItemShim /
// InMemoryHostStore / LastSessionStore land in T-iOS-7.
// Dependency direction is strictly downward: HostRegistry WireProtocol only.
import PackageDescription
let package = Package(
name: "HostRegistry",
platforms: [.iOS(.v17), .macOS(.v14)],
products: [
.library(name: "HostRegistry", targets: ["HostRegistry"]),
],
dependencies: [
.package(path: "../WireProtocol"),
],
targets: [
.target(
name: "HostRegistry",
dependencies: [.product(name: "WireProtocol", package: "WireProtocol")]
),
.testTarget(name: "HostRegistryTests", dependencies: ["HostRegistry"]),
],
swiftLanguageModes: [.v6]
)

View File

@@ -0,0 +1,12 @@
import WireProtocol
/// T-iOS-1 scaffold placeholder.
///
/// Real modules land in T-iOS-7: Host, HostStore, KeychainHostStore (via
/// SecItemShim seam), InMemoryHostStore, LastSessionStore.
public enum HostRegistryPackage {
/// Package identity marker consumed by the scaffold smoke test.
public static let packageName = "HostRegistry"
/// Proves the single allowed dependency edge (HostRegistry WireProtocol) compiles.
public static let contractPackageName = WireProtocolPackage.packageName
}

View File

@@ -0,0 +1,13 @@
import Testing
import HostRegistry
@Test("脚手架:HostRegistry 包可编译且依赖边 HostRegistry→WireProtocol 成立")
func hostRegistryPackageIsImportableAndDependsOnWireProtocol() {
// Arrange / Act
let name = HostRegistryPackage.packageName
let contract = HostRegistryPackage.contractPackageName
// Assert
#expect(name == "HostRegistry")
#expect(contract == "WireProtocol")
}