Test a call into the Rust core and run tests in CI

The existing tests only check Swift types, and CI only built the package, so a framework that doesn't match ed_agent_ffi.swift went unnoticed until the first call in an app aborted with UniFFI's checksum mismatch. Add a test that creates an EdAgent and reads its state through the FFI, and a macOS job that runs swift test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Seto Elkahfi committed Oct 8, 2026 at 19:24 UTC ea52069bee5d510823a2b77202b3e7df4b9048ca
2 files changed +22
.github/workflows/ci.yml
+8
@@ -33,6 +33,14 @@ jobs:
33 - uses: actions/checkout@v6
34 - run: swift build
35
36 + test-macos:
37 + name: Test (macOS)
38 + needs: validate
39 + runs-on: macos-26
40 + steps:
41 + - uses: actions/checkout@v6
42 + - run: swift test
43 +
44 build-ios:
45 name: Build (iOS)
46 needs: validate
Tests/EdTests/FfiRoundTripTests.swift new
+14
@@ -0,0 +1,14 @@
1 +import Testing
2 +@testable import Ed
3 +
4 +// The other tests only touch Swift types. This one crosses into Rust, so a
5 +// framework built from different bindings fails here with UniFFI's checksum
6 +// check instead of at the first call in an app.
7 +@Test func newAgentReachesTheRustCore() async {
8 + let agent = EdAgent()
9 + #expect(await agent.isLoaded() == false)
10 +
11 + let info = await agent.info()
12 + #expect(info.modelName == nil)
13 + #expect(info.historyLength == 0)
14 +}