SPB Git

Repository Public

SP-WALLET-TEST-REPORT.md 8.4 KB 103 lines markdown

1# SP Wallet NEXT — test report23What was run, on what, with what result — and what was not. A test with scripted chains or a fork is not proof on a real4network; each line says which kind it is.56## 1. Summary78| Layer | What ran | Result | Date |9|---|---|---|---|10| Backend + web unit / integration (vitest) | whole repository, release candidate `30467db` | **5 280 / 5 280** in 157 s | 2026-11-20 |11| Same, baseline before NEXT (`851e2fa`) | whole repository | 4 865 / 4 869 (4 time-outs under load) | 2026-11-19 |12| Web end-to-end (Playwright, real browser, local throwaway stack) | `next-web`, `next-web-safety`, `next-approve-outcome` | **15 / 15** | 2026-11-20 |13| Contract tests | 66 documented operations called on a real server, responses validated against the OpenAPI document | pass (part of the suite) | 2026-11-20 |14| Pre-production rehearsal | NEXT server on a restored copy of production, real chains read-only, stub signer | all steps ok; 4 findings fixed (§4) | 2026-11-19 / 20 |15| Compatibility | new API in front of a signer build byte-identical to the one then in production | 23 / 23 checks | 2026-11-20 |16| Swift shared package | `swift test` | 468 / 468 (9 live tests skipped: no stack configured) | 2026-11-19 |17| macOS app | unit tests; scripted self-test on a throwaway stack running the NEXT backend with a local fork | 61 / 61; 25 / 25 | 2026-11-20 |18| macOS release build 2.0.0 (2) | `verify-release.sh` (signature, hardened runtime, sandbox, no web engine, production endpoint, no secret) | all checks pass | 2026-11-20 |19| iOS app | unit tests; fixture UI tests on iPhone and iPad simulators; live UI tests on a throwaway stack with a local fork | 368 / 368; iPhone 40 run, 0 failures; iPad 37 of 40 green, 2 harness failures left; live 5 / 5 | 2026-11-20 |20| iOS release build 2.0.0 (4) | `check-release.sh` on the exported IPA (no test passkey, no fixture, no web view, production origin, distribution signature) | all checks pass; uploaded to TestFlight | 2026-11-20 |21| macOS notarisation | Apple notary service, app and disk image | Accepted, stapled, Gatekeeper: Notarized Developer ID | 2026-11-20 |2223## 2. Critical scenarios (brief §15)2425R = run and observed · S = run with scripted chains / signer or a local fork · C = compiled and unit-tested, not exercised26end to end · O = needs the owner (real passkey, real device, real funds).2728| # | Scenario | Web | macOS | iOS | Notes |29|---|---|---|---|---|---|30| 1 | Create a wallet (first passkey, setup token) | S | S | S | throwaway signer |31| 2 | Import a wallet | — | — | — | not a feature: one key, on the signer |32| 3 | Restore | — | — | — | signer restore from the phrase is designed, not built; database restore tested (`restore-test.sh` on a production dump) |33| 4 | Sign in with a passkey | S · O | O (confirmed on 1.0) | O | production sign-in after the release was seen in the audit log (owner) |34| 5 | Add a device (second passkey) | S | C · O | C · O | new protocol `SPW-CRED-v2`: 27 signer tests, 12 API tests with a real signer instance |35| 6 | Read balances | R (production copy, real chains) | S | S | two-source reads; rehearsal: 251 rows, complete |36| 7 | Receive | S (deposit scans on scripted chains; native EVM detection found a real deposit on Polygon read-only) | S | S | first real native receive: O |37| 8 | Prepare a send | R for Litecoin (prepared on the real chain, no signature) · S others | S | S | |38| 9–10 | Confirm, sign | S | S (self-test) | S | no real signature has gone through the new signer yet: O |39| 11 | Relay | S (fork) | S (fork) | S (fork) | |40| 12 | Chain confirmation | S | S (to `finalized` on a fork) | S | life cycle: 31 tests incl. lost answers, lagging endpoints, dropped, replaced, re-checks |41| 13 | Sync between devices | S (scripted event stream changes a row without reload) | C | C | two real devices at once: O |42| 14 | Revoke a device | S (session on the real route; passkey revoke with a fixture second passkey) | C | C | O |43| 15 | Recovery after a failure | S: API restart windows (signed ↔ relayed), RPC down, slow source, endpoint disagreement, stalled signer request, halt during a signature | — | — | |4445## 3. Per platform4647**Backend.** New test files: `lifecycle` (31), `events` (7), `prefs` (6), `next-chain-reads` (46), `next-portfolio` (23),48`next-serving` (8), `next-security` (12), `next-signer` (27), `credential` (2), `wallet-contract` (16+),49`wallet-api-unit` (15), `wallet-next-api` (21), `alerts-lifecycle` (11). A mutation check on the reconcile worker50(old behaviour restored) makes 4 life-cycle tests fail, as intended.5152**Web.** 30 unit-test files; 15 browser specs. Screenshots: 51 in `docs/next/screens/web/` (fixture-fed where the file53name says so). Not run: Safari, iOS Safari, a funded wallet, a real passkey. The automated redesign pass was interrupted54before its own final review; the merge was re-verified here (typecheck, unit tests, production build, the 15 specs).5556**macOS.** 45 screenshots in the app repository (42 fixture-fed, 3 from the real throwaway stack; about 18 inspected).57The XCUITest suite compiles but did not run (macOS asks for UI automation to be allowed at the keyboard). Compiled only:58passkey add / revoke, contact writes, second window, lock over sheets and on real sleep, notification delivery, VoiceOver.5960**iOS.** 368 unit tests (183 before). Fixture UI tests: iPhone 40 run with 0 failures; iPad 33 of 40 green in the full run,614 more green after fixes, 2 still failing in the test harness itself (a long-press context menu, opening the sidebar at the62largest text size); the last source change was followed by unit tests and partial iPad runs only. Live on a throwaway stack63(NEXT backend, local fork): sign-in, receive, invalid address, the ten extended sections, and a full send up to the tracker.6450 screenshots in the app repository (iPhone and iPad, light and dark, FR and EN, largest text size), all fixture-fed65except the two live send captures. Seen in the Simulator: the lock over an open sheet (the sheet survives), the privacy66cover in the app switcher above a sheet. Compiled or logic-tested only: camera scanner, confirmed / dropped / failed67tracker states, passkey add and revoke beyond the refusal, widgets inside WidgetKit, haptics. A release leak that predates68NEXT was found and fixed: the software test passkey and the fixtures were linked into Release builds (the old check missed69it); both are now linked in Debug only and the release check proves it.7071## 4. Faults simulated, and what the rehearsal found7273Simulated in tests: every endpoint down; one endpoint down; a lagging endpoint; endpoints disagreeing; truncated Solana74token list; a source refusing historical state; a relay answer lost (time-out, 5xx, unreadable body); an API restart between75signing and relaying; a stalled unauthenticated request to the signer; a halt recorded while a signature is computed; an76event stream resumed after a gap, a reset, duplicate ids; two approvals on one network at the same instant.7778Found by the rehearsal on real data and fixed before release: portfolio cold read 19 s (now served from a warm cache,79stale said); deposit scan 88 s per pass (now 16 s); one unreadable network emptied the value chart; Litecoin balance80unavailable with one source down. Found after release (owner: "22/23 networks"): the dead Litecoin source — replaced.8182## 5. Performance (measured)8384| Measure | Before | After |85|---|---|---|86| Public page, time to first byte | 50–110 ms | 95 ms (one sample after release) |87| First paint, code (gzip) | 81 kB | 80 kB |88| `GET /portfolio`, cold, 23 networks | not measured before NEXT | 1.5–2.6 s typical; 19 s seen once before the serving fix; warm 4–6 ms |89| Deposit scan pass | not measured before NEXT (sequential) | 16 s |90| Migration on production data | — | 1.2 s, then 5–40 ms |91| Full test suite | 21 min (baseline, under load) | 2.6 min |9293Not measured: load with several clients (single-owner wallet: three devices is the realistic maximum), memory and CPU of94the native apps, SwiftUI frame times.9596## 6. Not verified9798- A real signature through the new signer; a real ETH send on Arbitrum; a real native receive on an EVM network.99- Passkeys with Touch ID / Face ID on the new builds; widgets, notifications, camera, lock on real sleep.100- Two real devices synchronising live.101- The English text of the macOS app, proof-read on screen.102- Testnets: none were used (the dev stacks use a local fork of mainnet state with fake funds, or scripted chains).103
Files main
Menu

Theme