Seed Exact is tested in layers: Bun unit tests for the TypeScript in src/, Contract UI tests that drive the built app on web or an iOS simulator, a compatibility suite against the repository's real vault server, and Exact's verify for visual checks. Only the Bun side runs in GitHub Actions; everything that needs a built app runs on a developer machine or the build Mac.
The pyramid
Layer | Command (from | Where it runs | What it proves | What it cannot prove |
|---|---|---|---|---|
| Laptop, CI, and the Clipper worker before every build | Package logic in Bun: parsing, Markdown, caches, signed bytes, vault store and merge, agents rows | Anything about Contract views, the Hermes turn budget, or native transport | |
part of | Laptop, CI; the Contract part in the host runtime | Bytes, signatures and CIDs match the original clients | That a server accepts them today | |
Worker unit tests |
| Laptop, CI | Ordering, skip and retry rules of the delivery worker | Signing, upload, App Store Connect |
| Laptop (headless Chrome) or simulator. Not CI | Screens, navigation and data flow of the real app with a controlled clock | Pixels, text size, real time races | |
| Laptop, CI |
| Native storage, Safari, passkeys | |
Real vault drives |
| Simulator (and web for | The built app completes a real browser approval, on real platform time in | Physical devices |
| Laptop or simulator. Not CI | All Contract tests plus light, dark and largest text checks and one relaunch | Behavior no test reaches |
Counts at this commit: 23 Bun test files with 221 test( sites, 11 Contract test files with 67 tests, 9 real vault tests and 7 worker tests.
What talks to what
Exact starts one server per app for tests: app.json names it in commands.server as bun tools/test-server/index.ts (app.json). That local test server listens on 127.0.0.1:4790, mounts the notify and vault mocks, starts the agents mock on port 3068, and proxies read only document requests to hyper.media.
flowchart LR
T["Contract test driver"] -->|"tap, type, clock"| A["App under test"]
T -->|"request steps"| S["Test server 127.0.0.1:4790"]
A -->|"server set to 4790"| S
S --> N["mock-notify /activity/*"]
S --> V["mock-vault /vault/*"]
S -->|"/dev/* forwarded"| G["mock-agents 127.0.0.1:3068"]
A -->|"signed CBOR and WebSocket"| G
S -->|"GET /hm/* and /api/*"| H["hyper.media"]
A -->|"read tests"| H
A -->|"write tests, test vector key"| D["dev.hyper.media"]
B["Bun tests"] -->|"handle called in process"| N
B -->|"handle called in process"| V
R["Real vault suite"] --> RV["Real vault server, temp SQLite"]
R --> C["Chromium via Playwright"]
C --> RVRules that hold across layers:
No test writes to hyper.media. Writes go to dev.hyper.media with the public BIP-39 test vector identity, or to a local mock.
The test server refuses any hosted notify path with 403, so a misrouted request cannot reach the real notify service.
Each Contract test launches the app fresh with its own empty store.
In this section
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime