Skip to content

Commit 618367b

Browse files
committed
Add PRODUCTION-PARITY.md, which lists what the iOS shell's tests prove about a shipped app and what they cannot
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012xYtaUjbkB1hwLtK4TEzhq
1 parent ad8b876 commit 618367b

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

‎ios-shell/PRODUCTION-PARITY.md‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# What these tests prove about a shipped app
2+
3+
Every difference between the test setup in this folder (CI on a GitHub macOS runner, iPhone
4+
simulator, iOS 26.5) and a signed App Store build on a real iPhone talking to https://my.open.bot.
5+
6+
- **Real backend**: tested against https://my.open.bot as deployed today (suite 1 in SUMMARY.md).
7+
- **Simulated**: tested here against something that stands in for production (how is said).
8+
- **Not tested here**: why, and what would test it.
9+
10+
| Difference | Status | Evidence or what would test it |
11+
| --- | --- | --- |
12+
| Signing in with Google end to end | Not proven | Google let the email and password through in the web view and in the sheet, then asked for the account's 2-Step Verification phone prompt; the tests stop there by rule. A test account whose default second step is an authenticator code would let the tests finish. Until then the signed-in journey runs on a session cookie (Debug hook) and the Release build is proven signed in only through the mock's hand-off (run 46092731869). |
13+
| Debug vs Release build | Real backend, and simulated | `RealBackendUITests` runs from a **Release** build, a fresh install per test, with no hook. CI fails if a DEBUG hook name is in the Release binary or if its Info.plist has any App Transport Security exception (`Build for testing (Release) and check what ships`). Hooks that need a Debug build (the session-cookie journey, the sheet opened on an arbitrary URL, the mock suite) say so in the summary. `OPENBOT_BASE_URL` and `OPENBOT_SHELL_DIAGNOSTICS` stay readable in Release: a launch environment cannot be set on a person's phone. |
14+
| http vs https, App Transport Security | Real backend | The Release suite talks only to https://my.open.bot with no ATS exception. `NSAllowsLocalNetworking` is added to Debug builds only (`project.yml` build phase), for the http mock and the probe. Run 46092731869 also ran the hand-off flow on a Release build over https through a TLS proxy with a throwaway CA (ATS accepted it with no exception); that proxy was then dropped by decision, so it is no longer re-run. |
15+
| Session cookie name and attributes | Real backend (partly), simulated | Production's cookie is `__Secure-better-auth.session_token`; the app looks for both names and deletes only those two. In run 46092731869 the https mock set the production cookie through the hand-off's `/enter` 303 inside WKWebView: stored as Secure, HttpOnly, SameSite=Lax, persistent, not visible to `document.cookie`, `isSecureContext` true, survived a relaunch of a Release build. On my.open.bot the session-cookie journey (Debug hook) shows the real cookie accepted. The mock suite uses the plain-name cookie over http. |
16+
| Sending a message and the Bot's streamed reply | Real backend | The session-cookie journey (Debug build only because of the cookie hook) sent one real message from Home through the software keyboard; the conversation opened and the Bot's whole reply was on screen within the first 3 s sample, so the increments of the stream were too fast to observe at that rate. |
17+
| Cloudflare in front of production | Real backend, from one kind of client | my.open.bot is behind Cloudflare: a `cf_clearance` cookie for `.open.bot` appears in the web view's store, and no challenge page was ever shown to the runner. That is a GitHub-hosted macOS runner's IP. A phone on a carrier, a corporate network or a VPN is a different client and may get a challenge page inside the web view. Test with TestFlight on cellular and on a corporate network. |
18+
| The hosted sign-in's real redirects | Real backend | In the web view: `my.open.bot/sign` → `/api/auth/hosted/sign-in` → `dashboard.operations.copilotkit.ai/intelligence/handoff` (the identity provider page: GitHub, Google, Microsoft, email and password) → `accounts.google.com/o/oauth2/auth` → `accounts.google.com/v3/signin/identifier`. Google did **not** refuse the embedded web view: the email and password steps went through in the web view and in the system sheet alike. Both then stopped at Google's 2-Step Verification phone prompt (the account's default second step), so a full Google sign-in was not proven end to end in either. |
19+
| The sign-in hand-off endpoint | Simulated | Not deployed: the probe gets 404 on my.open.bot (every production run), and the app falls back to the web sign-in, as designed. The hand-off itself (sheet, ticket, PKCE verifier, `/enter`, cookie in the web view) is tested against `app/workbench/mock-server.ts` (suite 2). |
20+
| Shell mode and /conversations | Simulated | Not deployed (web draft PR 2360). On production the web app draws its own sidebar toggle inside the tabs, sends no bridge messages, and the Conversations tab shows Home (there is no /conversations page). The shell copes: it notices signing in and signing out from the web view's URL. Suite 2 tests the real thing on this branch's web build. |
21+
| The hourly renewal of the hosted sign-in | Not tested here | The app intercepts `/api/auth/hosted/sign-in` while signed in and, when the server has the hand-off, renews in the sheet. Neither the renewal nor the hand-off is on production yet, and an hour is longer than a CI job. Test: deploy the hand-off, sign in on TestFlight, leave the app for over an hour, come back. |
22+
| Code signing, entitlements, associated domains | Not tested here | CI builds with `CODE_SIGNING_ALLOWED=NO` for the simulator. The app needs no entitlement today and registers no URL scheme (the sheet's callback needs none). Test: an archive signed for TestFlight. |
23+
| Push notifications, APNs | Not tested here | Not implemented in the shell; the web app turns web push off inside the shell. Needs a decision and a real device. |
24+
| Microphone and camera prompts | Not tested here | The app grants media capture only to the OpenBot origin; iOS still asks the person. The simulator has no microphone or camera to grant. Test on a device: dictation and a call. |
25+
| Software keyboard | Simulated | The simulator's software keyboard is on in CI (`ConnectHardwareKeyboard` off): the tab bar hides while it is up, the form-assistant bar is removed in our web view (`KeyboardAccessory.swift`, private WebKit class: a future iOS may bring the bar back), and dragging the page down closes the keyboard. Real-device feel (third-party keyboards, dictation) is not tested. |
26+
| Background suspension, the live socket on resume | Simulated (mock), real backend | `testResumeFromBackground` (mock) and the session-cookie journey (real backend, run 46096038737) send the app to the background for 40 s and check the page still routes. In the real journey the web app's WebSocket to `wss://my.open.bot` opened 7 times and closed twice (code 1005) across sending, the background and the relaunch, and every tab still worked afterwards. A real phone suspends harder and longer (minutes to hours, low power mode): test on TestFlight by leaving the app overnight. |
27+
| WebContent process killed under memory pressure | Not tested here | The app reloads the page when WebKit reports the content process ended. The simulator rarely does this. Test on an older device with many apps open, or with Xcode's memory pressure tool. |
28+
| WebKit storage policies (ITP), the server's 7-day sliding session | Not tested here | WKWebView in an app is not Safari: ITP's 7-day cap on script-writable storage applies to Safari-like browsing, while the session cookie is HttpOnly and set by the server, so it lives as long as the server says (7 days, sliding). A week is longer than CI. Test: TestFlight, do not open the app for 8 days, then open it (expect the native sign-in screen, not a broken page). |
29+
| Lockdown Mode | Not tested here | Lockdown Mode turns off some web features (JIT, some fonts and APIs) in WKWebView too. Test on a device with Lockdown Mode on. |
30+
| MDM, per-app VPN, corporate proxies, private VPC deployments | Not tested here | The lock screen copy names VPC and network settings for this case. Test with a managed device and a deployment reachable only on a private network. |
31+
| iPad, rotation | Not tested here | The app declares iPad and landscape; CI runs on one iPhone in portrait. |
32+
| Older iOS versions | Not tested here | The deployment target is iOS 17; the runner has only iOS 26.2, 26.4 and 26.5 simulator runtimes (no 17 or 18), and CI runs 26.5. The web view reports `iPhone OS 18_7` in its user agent even on 26.5 (WebKit froze it). Test: TestFlight on an iOS 17 device. |
33+
| Sign-in with the system sheet, consent alert | Simulated, real backend (partly) | The system consent alert ("wants to use … to sign in") and the sheet's page are reachable from XCUITest through the app's own tree. On production the sheet showed the identity provider, Google's page and, in the ephemeral session, iOS's own "Save Password?" prompt. |
34+
| App Review | Not tested here | A web view app needs native value to pass review (guideline 4.2). The native sign-in, tab bar, lock screen and (later) notifications are that value; only a submission tells. |
35+
36+
## Real-device checks for the first TestFlight build
37+
38+
1. Install, sign in with Google (sheet), use all three tabs, send a message and watch the reply stream.
39+
2. Leave the app in the background for an hour and overnight; open it: same page, socket back.
40+
3. Airplane mode on and off: the lock screen, then the app back by itself.
41+
4. On cellular and on a corporate network or VPN: no Cloudflare challenge page in the app.
42+
5. Dictation and a call: the microphone prompt names OpenBot and works.
43+
6. An iOS 17 device, an iPad in both orientations, and Lockdown Mode.
44+
7. Do not open the app for 8 days, then open it: the native sign-in screen.

0 commit comments

Comments
 (0)