Add test evidence record and review handoff for slice 1

Documentation only. Head under review remains 4687cc0.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Dan
2026-11-18 18:23:06 -08:00
co-authored by Claude Fable 5.2
parent 4687cc0114
commit 3c9e094977
2 changed files with 300 additions and 0 deletions
+188
View File
@@ -0,0 +1,188 @@
# Test evidence
Recorded 2026-11-18 on the development machine (Linux x64, Node 22.23.2) at commit `4687cc0`.
These are the results of commands that were actually run. Nothing here is device evidence.
## What kind of evidence each suite is
| Suite | Real | Fake or stubbed | Shows | Does not show |
|---|---|---|---|---|
| `npm test` | Client and bridge code, HTTP between them, SQLite, Even's `pretext` measurement, the SDK's event parser | Glasses, STT, Hermes | Hermeven's own logic and failure handling | Anything about Even hardware, real STT or real Hermes |
| `npm run test:simulator` | The client running in Even's simulator 0.9.5 through the real SDK bridge; the bridge | STT, Hermes; audio is ALSA's silent null device | The app boots, draws, takes gestures and uploads audio in Even's own simulator | Hardware behaviour, real audio pacing, lock screen, lifecycle |
| `npm run test:real-hermes` | The bridge and a real `hermes gateway` v0.23.1 | The language model behind Hermes | Hermes's admission, idempotency, session continuity and stop behave as the adapter assumes | A real model, tools, approvals, or Dan's deployment |
## Results
### Type check
```
$ npm run typecheck
```
Exit 0, no diagnostics, for contracts, bridge, client and tests.
### Unit and integration (fakes)
```
$ npm test
Test Files 7 passed (7)
Tests 122 passed (122)
```
Run after a clean `npm ci`. Six consecutive full runs were green after the fix described under
"Problems found" below.
| File | Tests | Covers |
|---|---|---|
| `packages/contracts/test/contracts.test.ts` | 4 | Schema acceptance and rejection, error-code retryability |
| `services/bridge/test/units.test.ts` | 13 | Config guards, credential expiry and renewal, pairing codes, adapter helpers |
| `apps/even-client/test/reducer.test.ts` | 24 | State transitions, cancellation, stale and late results, connection loss |
| `apps/even-client/test/layout.test.ts` | 16 | Pagination, Unicode, long answers, plain-text conversion, HUD frames fit |
| `apps/even-client/test/events.test.ts` | 8 | Gesture mapping through the SDK's parser, the tap-has-no-eventType quirk |
| `tests/integration/bridge.test.ts` | 40 | Auth, device binding, limits, rate limiting, STT and Hermes outcomes, duplicates, cancel, restart, redaction |
| `tests/integration/client-bridge.test.ts` | 17 | Whole software path: capture to paged answer, follow-up, cancel, loss, restart, revocation |
Requirements from spec section 9 and where they are tested:
| Requirement | Test |
|---|---|
| State machine, cancellation, stale-response races | `reducer.test.ts`; `client-bridge` "late answer never reaches the HUD" |
| Layout, pagination, Unicode, long answers | `layout.test.ts` |
| Contract validation, auth, device/profile binding, body limits, rate limiting, redaction | `bridge.test.ts`, `units.test.ts`, `contracts.test.ts` |
| STT failure and timeout | `bridge.test.ts` "STT failures" |
| Hermes failure, cancellation, incomplete, approval | `bridge.test.ts` "turn lifecycle" |
| Duplicate submit | 8 concurrent identical submits: 1 execution |
| Retry after network loss | Lost Hermes reply retried under one key; client resend of an undelivered request |
| Bridge restart | Mid-run re-attach; crash between send and recording the run id; restart during transcription |
| Repeated cancel | 5 concurrent cancels: one stop sent to Hermes |
| Unknown downstream outcome | Unanswered submit; Hermes `unknown`; run forgotten; unconfirmed stop |
### Did the tests have teeth?
Because the suites passed on first run, ten deliberate faults were injected one at a time and
the suite re-run. Eight were caught immediately. Two survived, which exposed two missing tests;
both were added and both faults are now caught.
| Injected fault | Caught |
|---|---|
| Client accepts stale turn results | Not at first; test added; now 2 failures |
| Bridge skips request-id deduplication | 3 failures |
| New idempotency key on every Hermes attempt | 3 failures |
| Cancel does not ask Hermes to stop | 5 failures |
| Turn lookup ignores device ownership | 1 failure |
| Unanswered submit treated as safely retryable | Not at first; test added; now 1 failure |
| Recovery discards an in-flight run | 2 failures |
| Microphone reopens on glasses reconnect | 2 failures |
| Transcript written to the log | 1 failure |
| Pagination ignores the line budget | 5 failures |
### Simulator
```
$ npm run test:simulator
Tests 6 passed (6)
```
Even Hub simulator 0.9.5, launched with `--automation-port`, `--no-glow`, `--aid alsa:null`.
Ten consecutive runs passed in the final form of the test.
| Scenario | Result |
|---|---|
| Boots through the SDK bridge, creates the HUD page (with the menu declaration), pairs | pass |
| Tap opens the microphone; frames arrive; capture is uploaded as 16 kHz mono 16-bit WAV; answer is drawn across pages | pass |
| Swipe down changes the page; swipe up returns a pixel-identical first page | pass |
| A second question continues the same Hermes session (fake) | pass |
| Double tap while recording cancels with no upload; double tap again returns to Ready | pass |
| No uncaught errors, unhandled rejections or failed fetches in the WebView | pass |
Screenshots from the simulator (not from glasses) are in `docs/evidence/simulator/`.
Caveats, all of them material:
- **Audio pacing was not tested.** The silent null device was chosen so the test would not open
the machine's real microphone. It is not paced in real time: between 19 and 120 "seconds" of
silence arrived within a few hundred milliseconds. So "tap again to stop" is sometimes pre-empted
by the capture cap in this test, and the elapsed-time display was never seen counting in real
time. The test asserts what holds on either path.
- **The simulator test was flaky before it was fixed.** Across three earlier revisions of the
test, 10 runs were made: 6 passed fully and 4 had one or two failing scenarios (the cap fired
before the scripted second tap; an instant second tap recorded nothing). Those were faults in
the test's timing assumptions, corrected as above; the app's behaviour in both cases was the
designed one. The 10 consecutive passes are of the final revision only.
- **The contextual menu was declared but no item was selected.**
- **Status events are not emitted by the simulator**, so glasses connect/disconnect is untested here.
- The simulator's event source is always the right temple. Ring and left temple are untested.
### Real Hermes, stub model
```
$ npm run test:real-hermes
Tests 9 passed (9)
```
hermes-agent v0.23.1 (`/health` reported `"version":"0.23.1"`), started with a throwaway
`HERMES_HOME` and pointed at a local stub model. The operator's own Hermes home was not read or
written (its `state.db`, `config.yaml` and `gateway_state.json` modification times were unchanged).
| Scenario | Result |
|---|---|
| Capabilities advertise run submission, status, stop, and durable idempotency (86,400 s retention) | pass |
| Device status reports the agent reachable | pass |
| Typed question answered through Hermes; Hermeven's per-request instructions reach the model's system prompt | pass |
| Follow-up: the model was handed both user turns by Hermes although the bridge sent only the new one; a new conversation starts clean | pass |
| Six concurrent identical submits reach the model once | pass |
| Hermes replays an identical keyed request and answers 409 to a changed one | pass |
| Cancel during a slow turn settles as cancelled with no answer | pass (about 200 ms to confirm) |
| Bridge restart mid-turn re-attaches; the model is called once | pass |
| Wrong Hermes key: rejected, nothing runs | pass |
Two of the nine failed on the first run because the stub model mistook Hermes's background
"name this chat" request for an agent turn. That was a fault in the stub, fixed.
Timings seen here (stub model, loopback, one sample each): first turn about 1.4 s in Hermes;
later turns well under 1 s. These are not performance figures for anything real.
### Build and packaging
```
$ npm run client:build # 291 kB JS (88 kB gzip), 2 kB CSS
$ HERMEVEN_BRIDGE_ORIGIN=https://bridge.example.invalid node apps/even-client/scripts/write-manifest.mjs
$ evenhub pack dist-manifest/app.json dist --sdk-ver 0.0.16
Stamped ... (95914 bytes) min_app_version 2.2.10
```
The official CLI accepted the generated manifest. The package was not uploaded anywhere. The
production bundle was searched for server key names and the development-only pairing hook; none
were present.
### Process smoke test
`npm run bridge` started, `/healthz` answered `{"status":"ok","schema_version":1}`, an
unauthenticated `/v1/device` answered 401, `bridge:cli -- pair` printed a code, and starting with
`HERMEVEN_HOST=0.0.0.0` was refused with the configuration error.
## Problems found while testing
| Problem | Kind | Resolution |
|---|---|---|
| A stopped client controller kept polling and could draw or emit afterwards | Product bug | `Controller.stop()` is now final; found by an intermittent cross-test failure |
| Two faults not detected by the suite | Test gap | Two tests added |
| `evenhub-simulator` command link missing after `npm ci` | Tooling quirk | `npm run simulate` calls the package directly |
| Simulator test timing assumptions | Test fault | Described above |
| Stub model counted housekeeping calls as turns | Test fault | Fixed |
## Not tested at all
- A physical G2, the R1 ring, the Even phone app, any phone.
- The microphone with the phone locked or the app in the background.
- Real speech-to-text, in any language.
- A real language model, real tools, a real approval prompt.
- Hermes `waiting_for_approval`, `unknown`, `interrupted` and stopped-short runs against real
Hermes (fake only).
- Dan's target Hermes deployment and any multi-profile routing.
- HTTPS termination, reverse proxy, or any network other than loopback.
- CORS from the real WebView origin; the network whitelist on a packaged build.
- Battery use, latency percentiles, legibility.
- Selecting a contextual-menu item.
The checklist for the hardware items is `docs/device-test-plan.md`.