Files
hermeven/docs/test-evidence.md
2026-11-28 12:07:12 -08:00

54 KiB

Test evidence

Recorded 2026-11-18 on the development machine (Linux x64, Node 22.23.2). The first slice was recorded at commit 4687cc0; the built-in speech-to-text section was added afterwards and all suites were re-run with it in place. 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
npm run test:real-stt The bridge and its built-in Whisper model, on a real speech recording Glasses, Hermes Speech uploaded as a capture is really transcribed and the words reach the agent The G2 microphone, noise, accents, other languages, a droplet's speed

Results

Type check

$ npm run typecheck

Exit 0, no diagnostics, for contracts, bridge, client and tests.

Unit and integration (fakes)

$ npm test
 Test Files  8 passed (8)
      Tests  131 passed (131)

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
services/bridge/test/builtinWhisper.test.ts 8 Built-in STT adapter with a stand-in recogniser: silence gate, language, ordering, cancel, load failure
apps/even-client/test/reducer.test.ts 25 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.

Built-in speech-to-text, real model, real speech

$ npm run test:real-stt
      Tests  7 passed (7)

onnx-community/whisper-base, 8-bit weights, run on the CPU in a worker thread of the bridge. The input is tests/real-stt/fixtures/jfk.wav, 11.0 s of clean archive speech, uploaded through POST /v1/turns as raw PCM exactly as the client uploads a capture.

Scenario Result
Real speech is transcribed and the transcript is what the (fake) agent receives pass
Three seconds of digital silence: stt_empty, the agent is not called pass
Three seconds of very quiet noise: stt_empty pass
A second recording with the model already loaded pass
Two devices submit recordings at the same moment: both transcribed, in turn pass
A model id that does not exist: speech is unavailable, the bridge keeps answering pass
Closing the adapter stops the worker; a closed adapter refuses work pass

Transcript produced: "And so my fellow Americans, ask not what your country can do for you, ask what you can do for your country." That matches the recording.

Measurements from this run, one sample each, on an Intel i7-13850HX desktop:

Measurement Value
Model load (files already cached) 1.2 to 3.8 s
11.0 s of speech 1.6 s
Memory (resident) after loading / after transcribing about 0.5 GB / 0.8 GB
Longest event-loop pause during transcription 0.39 s with the model in the bridge's main thread; 3 ms after moving it to a worker thread
Same clip with the process pinned to one core 1.7 s (no slower)

Things this run also showed that are worth knowing:

  • When the same clip was cut off mid-sentence at 6 s, the model wrote "ask not what you are coming" for the truncated ending. A recording that stops mid-word (for example at the capture cap) can end in invented words.
  • Whisper produces short invented phrases for silent input, which is why silence is detected by level before the model runs. The level threshold (-55 dBFS) was chosen without any G2 audio and may be wrong for the real microphone in either direction.
  • Nothing here measures a droplet. See docs/deploy-droplet.md.

The bridge process was also started with default settings: it logged stt.loading, then stt.ready, and answered /healthz throughout.

Polling intervals

Shortened at Dan's request. These are settings, and their effect on a real answer has not been measured on a phone.

Loop Before Now
Bridge asks Hermes for run status every 500 ms every 150 ms (HERMES_POLL_INTERVAL_MS)
App asks the bridge for the turn every 700 ms every 200 ms for the first 8 s, 400 ms until 30 s, then 1 s

Worst-case delay added by polling to an answer that arrives within 8 s: about 0.35 s, down from about 1.2 s. The app's schedule eases off for long agent runs to limit radio use; battery impact is unmeasured.

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.
  • Speech-to-text on audio from the glasses, with background noise, or in any language but English.
  • The external (openai-compatible) STT adapter against a real provider.
  • Anything on a DigitalOcean droplet: docs/deploy-droplet.md and deploy/* are untested.
  • 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.

Round 3: after Cody's review (2026-11-18)

Cody reviewed 3d5691d and returned NEEDS CHANGES with ten findings. This section records what was run after the fixes. Everything above this heading describes the code before them; where a number differs, this section is the current one.

$ npm run typecheck            exit 0
$ npm test                     Test Files 10 passed (10)   Tests 182 passed (182)   (4 consecutive runs)
$ npm run client:build         built; the development pairing hook is absent from the bundle
$ npm run test:real-stt        Tests 11 passed (11)
$ npm run test:real-hermes     Tests 9 passed (9)
$ npm run test:simulator       Tests 6 passed (6)          (3 consecutive runs)
$ git diff --check             clean

No check was omitted. The offline speech test needs unprivileged network namespaces (unshare -rn); they were available here and the test ran. Where they are not, that test prints "OFFLINE CHECK NOT RUN" rather than passing silently.

Regression tests added, by finding

Finding Test (file) What it proves
CODY-001 tests/integration/clientSecurity.test.ts 15 public, private-LAN and look-alike HTTP addresses rejected; HTTPS accepted; HTTP accepted only for localhost, 127.x.x.x, [::1]; the HTTP client refuses a remote HTTP base URL; manifest generation exits 1 and writes nothing for remote HTTP
CODY-002 same file, fake timers and a host whose calls settle on command Start times out, host opens the microphone late: a stop follows and the microphone ends closed; at most one host call in flight throughout; stop requested during a pending start waits its turn; calls queued behind a stuck call are sent one at a time
CODY-003 tests/integration/client-bridge.test.ts Every reply dropped after the bridge admitted the turn, then a client restart: one Hermes execution for that request, re-attached under the same request id, the HUD never said "not sent"; a request that truly never arrived is reported only after the bridge confirms it has no record; an undeliverable cancel is retried on the next start
CODY-004 tests/integration/bridge.test.ts Revoking over HTTP during a hanging run: one stop request reaches Hermes, the turn settles as cancelled, every later request is 401; the same through the CLI path (database only); revocation during transcription aborts it within 250 ms, in-process and via the sweep; another device's turn is untouched
CODY-005 services/bridge/test/modelStore.test.ts, tests/real-stt/realStt.test.ts Branch, tag and short revisions refused; unknown model without a manifest refused; a hub serving different bytes fails the fetch and leaves nothing behind; a changed or missing file refuses to load, with no network request; real pinned artifacts fetched from the real hub and verified; one flipped byte in the real model refuses to load; transcription from a read-only store; transcription inside a network namespace with no interfaces
CODY-006 services/bridge/test/units.test.ts In a child process under umask 0022: directory 0700, database, WAL and SHM 0600, and none of the three was group- or world-accessible at any point observed during creation
CODY-007 tests/integration/client-bridge.test.ts Credential expires during a live session: asking, waiting for an answer, status refresh, renew and new conversation each clear the stored pairing and return to the pairing screen; pairing again works
CODY-008 tests/integration/bridge.test.ts Restart before the original agent deadline: approval timeout still fires 700 ms after the approval was first seen, not after the restart; restart after the original agent deadline: still classified approval_timeout; approved after a restart: the paused deadline is stored and survives a second restart; a run that never finishes afterwards ends as agent_timeout
CODY-009 tests/integration/client-bridge.test.ts, apps/even-client/test/reducer.test.ts "New conversation" twice plus an immediate question with the reply delayed: one create, one stored id equal to the bridge's active conversation, the question succeeds; cancel-and-ask-again during a pending lazy create: one create; a reset during a pending create with the first reply arriving late: its result is dropped before persistence, the second create is not sent until the first settles, app and bridge agree
CODY-010 tests/integration/bridge.test.ts 40 wrong guesses, then the real code still pairs; every failure (wrong, expired, used) is byte-identical; a client is cut off after its 5 attempts per minute

Did the new tests have teeth?

Each fix was removed or broken in turn, 20 ways, and the default suite re-run. 16 were caught at once. Two more exposed missing coverage (the CLI-path sweep during transcription; a database file created loose and tightened a moment later); tests were added and both are now caught. The remaining two are redundant safeguards whose removal changes nothing observable: the directory chmod after mkdir with mode 0700 (a umask can only remove permissions), and the final permission pass after a file that was already created owner-only.

Real deployment sequence, run by hand on the development desktop

verify-model on an empty store exited 1 ("missing"). The bridge started without the model, answered /healthz, and logged stt.load_failed with reason: missing and the command to run. fetch-model downloaded 7 files (79 MB) from huggingface.co at the pinned commit in 4 s and verified them. verify-model then exited 0, and the bridge logged stt.ready in 1.1 s. The state directory was 700 and the database, WAL and SHM files 600.

This was not a droplet. deploy/ and docs/deploy-droplet.md remain unrun.

Still not tested

Unchanged from the list above: no physical G2, no audio from the glasses, no real model or tools behind Hermes, no approval prompt from a real Hermes, no droplet, no HTTPS termination.

Round 4: after Cody's Round 3 review (2026-11-18)

Cody reviewed e1c02d5: eight findings resolved, CODY-003 and CODY-006 still open. This section records what was run after correcting those two.

$ npm run typecheck            exit 0
$ npm test                     Test Files 11 passed (11)   Tests 194 passed (194)   (3 consecutive runs)
$ npm run client:build         built
$ npm run test:real-stt        Tests 11 passed (11)        (all 11 existing tests, including the no-network run)
$ npm run test:real-hermes     Tests 9 passed (9)
$ npm run test:simulator       Tests 6 passed (6)          (3 consecutive runs)
$ git diff --check             clean

No check was omitted.

CODY-003: request identity durable before submission

tests/integration/durableRequestId.test.ts uses the production EvenDevice adapter with a stand-in Even host whose setLocalStorage completes only when the test releases it. The bridge is real; Hermes is the test fake.

Scenario Result
Host write stalled past the adapter timeout: zero POST /v1/turns, no turn on the bridge, no Hermes run, the durable copy does not hold the id; a retry while still stalled is held back again under the same id pass
Host completes the write: the id becomes durable and that alone sends nothing. Deliberate retry: admitted, every reply dropped. Page restart: re-attached under the same request id, exactly one Hermes run for it, and no HUD text after admission says "not sent" pass
Same sequence with a hanging agent, restart, then double tap: Hermes is asked to stop and the turn settles as cancelled pass
Cancel while still held back for storage: nothing is sent, nothing exists on the bridge pass
Host answers the write with false: held back; succeeds on retry once the host accepts pass
Page dies during the stall and the host writes late: the next start finds no such turn on the bridge and says so pass
Storage unreadable at start: not treated as "not paired"; pairing over it is refused and the code is not spent pass
Pairing that the phone cannot save: revoked on the bridge, not kept in memory pass
Adapter unit test (fake timers): only a timely true is success; timeout and false are "not confirmed"; a stalled read is "unknown", not "empty" pass

In the simulator, the real SDK host answered storage writes with a confirmation, so questions were sent normally (the simulator suite would otherwise fail). Whether the Even phone app confirms setLocalStorage the same way, and how quickly, is unknown until it runs on a phone. If the phone never confirms a write, no question can be sent; the HUD would say "Could not save your request on the phone".

One consequence worth knowing: host calls are sent strictly one at a time, so while a storage write is stuck, HUD updates queued behind it are not drawn until it completes.

CODY-006: state directory permissions

services/bridge/test/units.test.ts:

Scenario Result
Child process under umask 0022, state directory pre-created at 0755: after opening the database and creating WAL and SHM, directory 0700, database, WAL and SHM 0600 pass
Pre-existing directories at 0750, 0777, 0711 and 0701 all end at exactly 0700 pass
A directory that cannot be secured (/tmp, owned by another user): StateDirectoryError naming the directory, the required mode and the fix; no file created; the directory left unchanged pass
A path whose parent is a file: refused pass
Retained: new directory under umask 0022, and the check that no state file is ever group- or world-accessible during creation pass

Did the new tests have teeth?

Eight ways of removing these two fixes were tried against the default suite; all eight were caught (between 1 and 6 failing tests each).

Round 5: after Cody's Round 4 review (2026-11-18)

Cody reviewed 1507cea: CODY-003 resolved; CODY-006 still open because secureStateDir() accepted a directory already at 0700 that belonged to another user (reviewer proof: secureStateDir('/root') returned successfully for uid 1000).

$ npm run typecheck            exit 0
$ npm test                     Test Files 11 passed (11)   Tests 198 passed (198)   (3 consecutive runs)
$ npm run client:build         built
$ npm run test:real-stt        Tests 11 passed (11)
$ npm run test:real-hermes     Tests 9 passed (9)
$ npm run test:simulator       Tests 6 passed (6)
$ git diff --check             clean

No check was omitted, and none of the new tests printed "NOT RUN" on this machine.

Cody's reproduction, re-run on the corrected code as uid 1000:

secureStateDir('/root')
StateDirectoryError: The state directory /root is owned by uid 0, not by the bridge, and has
been left untouched. The bridge keeps device credentials there and needs a directory of its own,
owned by uid 1000, the user it runs as, with mode 0700. ...

New tests in services/bridge/test/units.test.ts:

Scenario Result
The real /root (uid 0, mode 0700) as uid 1000: StateDirectoryError from both secureStateDir and openDb; mode, owner, mtime and ctime of /root unchanged pass
Deterministic, any machine: a 0700 directory whose owner differs from the bridge's uid (the uid is injected, the directory is real): StateDirectoryError; the directory stays empty (no database, WAL or SHM); mode, owner and timestamps unchanged. With an existing empty database file present: not opened, still 0 bytes pass
Foreign-owned directory at 0755: refused, and still 0755 afterwards (not "fixed" for someone else) pass
Isolated user fixture: in a user namespace (unshare -r), with the unmodified production code path and the process's real uid, a foreign-owned 0700 directory is refused and unchanged pass

Retained and passing: new directory under umask 0022; pre-existing 0755 directory tightened to 0700 with database, WAL and SHM at 0600; the loose-mode matrix (0750, 0777, 0711, 0701); the transient-permission check; the cannot-secure refusal with its operator message; the parent-is-a-file refusal.

Three ways of removing the ownership check were tried against the suite; all three were caught (2 to 4 failing tests each).

Round 7: after Cody's Round 6 review of the deployment documents (2026-11-21)

Cody reviewed 98c7b03 (deployment record and examples): REVIEW BLOCKED, with CODY-011 (install sequence not executable on a clean host), CODY-012 (static client never installed) and CODY-013 (README contradicted the deployment evidence). The block also requires an independent acceptance contract, which only Dan can supply; none is included here.

$ npm ci                        exit 0
$ npm run typecheck             exit 0
$ npm test                      Tests 205 passed (205)
$ npm run client:build          built
$ npm run test:real-stt         Tests 11 passed (11)
$ npm run test:real-hermes      Tests 9 passed (9)
$ npm run test:simulator        Tests 6 passed (6)
$ git diff --check              clean
$ tests/deploy/runbook-proof.sh exit 0   (on a disposable Ubuntu 24.04 host with systemd)
    caddy 2.6.2: validate "Valid configuration"; fmt --diff 0 changed lines
    systemd-analyze verify: ok (run on the disposable host, where /opt/node exists)

systemd-analyze verify on the development desktop reports only that /opt/node/bin/node does not exist there, which is expected. No check was omitted.

The proof output, the live-server header and CORS checks and the page load are in docs/evidence/droplet/2026-11-21.md. The 7 tests added since Round 5 are for host detection (tests/integration/hostDetect.test.ts).

Round 9: after Cody's Round 8 review, and the first device session (2026-11-21)

Cody reviewed 09e21f6: REVIEW BLOCKED for lack of a contract, with CODY-014 open (blank page during host detection). Since then the branch also gained changes that came out of the first session on a physical G2. All checks below were run on fb0a6b9.

$ npm ci                          exit 0
$ npm run typecheck               exit 0
$ npm test                        Tests 224 passed (224)
$ vitest hostDetect + entryPoint  Tests 15 passed (15)
$ npm run client:build            built
$ npm run test:real-stt           Tests 11 passed (11)
$ npm run test:real-hermes        Tests 9 passed (9)
$ npm run test:simulator          Tests 7 passed (7)
$ bash -n deploy/install.sh tests/deploy/runbook-proof.sh   ok
$ tests/deploy/runbook-proof.sh   exit 0 (disposable Ubuntu 24.04 host with systemd)
    Caddy 2.6.2: "Valid configuration"; fmt --diff 0 changed lines
    systemd-analyze verify: ok; unit active, running as hermeven
    app tree: 0 files not root-owned, 0 group/other-writable
$ git diff --check                clean

No check was omitted.

Change Tests Negative control
CODY-014: start-up status, no eager fallback tests/integration/entryPoint.test.ts: the real index.html, the real boot() and the real Even SDK in a DOM. Status visible before any script; still waiting just before the timeout; preview only after it; a callable host appearing mid-wait selects the Even adapter, initialises the SDK bridge and creates the HUD page; status removed on mount. 6 ways of undoing it, all caught
Glasses input diagnostic Same file: events pushed through the SDK's own entry point show up by type; audio is counted and its payload never appears.
Long press and hold-to-talk tests/integration/client-bridge.test.ts (5 tests), apps/even-client/test/events.test.ts, and the simulator's long_press / long_press_release actions.
Loopback any-port origins tests/integration/bridge.test.ts (4 tests) and services/bridge/test/units.test.ts: any port on a configured loopback host is echoed; 17 look-alike, LAN, https and foreign origins are refused; no other wildcard is accepted by configuration; an allowed origin without a credential still gets 401. 5 ways of loosening it; 4 caught, 1 is an equivalent change (an empty list already refuses)

What happened on the device is in docs/evidence/device/2026-11-21.md; what was changed on the server, and with whose approval, is in docs/evidence/droplet/2026-11-21.md.

Round 11: leaving the glasses when idle, version 0.1.1 (2026-11-21)

Run on 8171aee.

$ npm ci                          exit 0
$ npm run typecheck               exit 0
$ npm test                        Tests 233 passed (233)
$ vitest entryPoint + client-bridge + bridge + hostDetect   Tests 111 passed (111)
$ npm run client:build            built
$ npm run test:real-stt           Tests 11 passed (11)
$ npm run test:real-hermes        Tests 9 passed (9)
$ npm run test:simulator          Tests 7 passed (7)
$ bash -n deploy/install.sh tests/deploy/runbook-proof.sh   ok
$ tests/deploy/runbook-proof.sh   exit 0 (Caddy 2.6.2 "Valid configuration", fmt 0 changed
                                  lines; systemd-analyze verify ok; unit active as hermeven)
$ git diff --check                clean

No check was omitted.

New tests, all in tests/integration/client-bridge.test.ts (9):

Behaviour Proven by
After an answer sits untouched, the app leaves once, with the immediate exit and not the confirmation dialog exit counter 1, dialog counter 0, microphone closed
Any gesture restarts the countdown six page turns, each inside the timeout, across more than three timeouts: no exit; then exit once left alone
Never leaves while recording, transcribing, thinking, or awaiting approval each held for more than two timeouts: no exit
Leaves from Ready, and from an error screen
Opened from the phone with no gesture: stays; first glasses gesture arms it
Touching the phone page holds it open for the grace period
Can be switched off
A question soon after the last continues the conversation across a relaunch; after the gap it starts a new one the fake agent's session count: 1, then 2

Six ways of breaking it were tried; five were caught. The sixth removed a line that restarts the countdown on a gesture, which is redundant because every gesture already passes through dispatch(), which restarts it.

The simulator suite runs with ?idleExit=off (a development-only switch, compiled out of production builds) because it drives the app for longer than the idle timeout between steps. The exit itself (shutDownPageContainer(0)) has not been run in the simulator or on a device.

Round 12: CODY-016, 017, 018 (2026-11-21)

Run on bbde3c8.

$ npm ci                          exit 0
$ npm run typecheck               exit 0
$ npm test                        Tests 251 passed (251)
$ vitest --project integration entryPoint + client-bridge + bridge + idleExitHost + clientSecurity
                                  Tests 134 passed (134)
$ npm run client:build            built
$ HERMEVEN_BRIDGE_ORIGIN=https://hermeven.xylo.gg npm run -w @hermeven/even-client pack
                                  Stamped hermeven.ehpk (99923 bytes); not uploaded
$ npm run test:real-stt           Tests 11 passed (11)
$ npm run test:real-hermes        Tests 9 passed (9)
$ npm run test:simulator          Tests 8 passed (8)
$ bash -n deploy/install.sh tests/deploy/runbook-proof.sh   ok
$ tests/deploy/runbook-proof.sh   exit 0 (Caddy "Valid configuration", fmt 0 changed lines;
                                  systemd-analyze verify ok; unit active as hermeven)
$ git diff --check f02715f...HEAD ; git diff --check 1ae105e HEAD     clean

No check was omitted. The production bundle was searched for the development-only ?idleExit= switch and its short timings: absent.

Finding Where Proven by
CODY-016 tests/integration/idleExitHost.test.ts, production adapter, stand-in host glassesMenu pushed while start-up is parked on a stalled storage read and before the HUD exists: armed, one exit. Under a fake clock with the default times: pushed before the controller starts, and pushed after it subscribed, each gives no exit at 29.9 s, one at 30.1 s, still one after ten more minutes. appMenu pushed early: no exit in ten minutes; after one gesture, one exit 30 s later. A stopped controller hears nothing.
CODY-018 same file, plus client-bridge.test.ts and clientSecurity.test.ts Host answers false, throws, or does not answer, then succeeds: retried and left exactly once. A held call is never joined by a second one (calls in flight never exceed 1), a late success after every attempt ran out is remembered and no further call is sent, a late refusal is followed by one fresh call. The exit waits behind an unfinished storage write. Bounded: a host that always refuses is asked 3 times (as configured), then again only after a gesture. A system_exit or abnormal_exit event stops both the exit and its retries. No unhandled rejection in any of these. No exit while recording, transcribing, thinking, awaiting approval, disconnected with a request outstanding, or in the phone grace period.
CODY-017 README.md Read the status table and the paragraph beneath it.

Deliberate breakages, each run against the new tests: launch source not replayed (6 tests fail), a failed exit treated as final (7), a second shutdown call issued while one is in flight (2), a late success forgotten (1), retries unbounded (2), the exit bypassing the host-call queue (first run: not caught; a test was added and it is now caught, 1).

Simulator (0.9.5), new eighth scenario, run with the development-only ?idleExit=fast (5 s at Ready) and without idle exit disabled: opened by URL with no gesture, nothing happens for 6.5 s; after one swipe the app logs "leaving the glasses: idle on ready", the simulator's shutDownPageContainer(0) answers true, the app logs "left the glasses", and the display is empty (docs/evidence/simulator/08-after-idle-exit.png). This shows what the simulator does. It is not evidence of what the Even app or the glasses do.

Round 13: CODY-019 (2026-11-21)

Run on d8582e9.

$ npm ci                          exit 0
$ npm run typecheck               exit 0
$ npm test                        Tests 257 passed (257)
$ vitest --project integration idleExitHost + client-bridge + clientSecurity + entryPoint
                                  Tests 85 passed (85)
$ npm run client:build            built
$ HERMEVEN_BRIDGE_ORIGIN=https://hermeven.xylo.gg npm run -w @hermeven/even-client pack
                                  Stamped hermeven.ehpk (99934 bytes); not uploaded
$ npm run test:real-stt           Tests 11 passed (11)
$ npm run test:real-hermes        Tests 9 passed (9)
$ npm run test:simulator          Tests 8 passed (8)
$ bash -n deploy/install.sh tests/deploy/runbook-proof.sh   ok
$ tests/deploy/runbook-proof.sh   exit 0 (Caddy "Valid configuration"; systemd-analyze verify ok)
$ git diff --check f02715f...HEAD ; git diff --check 3d0edeb..HEAD    clean

No check was omitted.

Six new tests in tests/integration/idleExitHost.test.ts ("activity during a pending exit keeps its full countdown"), production adapter, default times, fake clock. In each, the first exit call (30 s after Ready) is held by the stand-in host, then:

Activity while held Host then Proven
swipe at Ready (generation asserted unchanged) answers false no call for 29.8 s after the swipe; then one call, which succeeds; left once
swipe at Ready call rejects same
swipe at Ready never answers in time no "will try again" is logged; after the full countdown the retry waits on the same call; late success: one host call ever, left once
touch on the phone page answers false no call for 149.5 s (120 s grace plus 30 s); one call by 150.5 s; left once
swipe at Ready refuses every time four further attempts, then "staying until the next activity", no more
none (control) answers false retried after 3 s

Calls in flight never exceed one in any of them, and no unhandled rejection is raised.

Negative control: with the activity-epoch guard removed, four of the six fail (the three swipe cases and the bounded case). The phone-activity case does not fail without the guard: the timer callback's own phone-grace check already protected it. It is kept as a regression test, not claimed as a control.

Round 14: idle exit starts however the app was opened, 0.1.2 (2026-11-21)

Run on 344a228.

$ npm ci                          exit 0
$ npm run typecheck               exit 0
$ npm test                        Tests 262 passed (262)
$ vitest --project integration idleExitHost + client-bridge + clientSecurity + entryPoint
                                  Tests 90 passed (90)
$ npm run client:build            built
$ HERMEVEN_BRIDGE_ORIGIN=https://hermeven.xylo.gg npm run -w @hermeven/even-client pack
                                  Stamped hermeven.ehpk (99881 bytes); not uploaded
$ npm run test:real-stt           Tests 11 passed (11)
$ npm run test:real-hermes        Tests 9 passed (9)
$ npm run test:simulator          Tests 8 passed (8)
$ bash -n deploy/install.sh tests/deploy/runbook-proof.sh   ok
$ tests/deploy/runbook-proof.sh   exit 0 (Caddy "Valid configuration"; systemd-analyze verify ok)
$ git diff --check f02715f...HEAD ; git diff --check 3e04688..HEAD    clean

No check was omitted.

Behaviour Proven by
No launch source and no gesture (what the real G2 gave on a voice launch): one exit, 30 s after Ready idleExitHost.test.ts, fake clock, production adapter; and with short times in client-bridge.test.ts
appMenu: leaves the same way both files
A glassesMenu that arrives late neither restarts nor doubles the countdown no call at 29.9 s from Ready, one at 30.1 s, one after ten more minutes
Phone page touched after opening: full 120 s grace, then 30 s no call at 149.5 s from the touch, one by 150.5 s
Never paired: nothing leaves in 30 minutes, even with a gesture and a glassesMenu source both files
Simulator: opened by URL with no gesture, leaves from Ready after the shortened wait; exit confirmed; display empty eighth simulator scenario

Correction (CODY-020, Round 14): the mutation described next is stricter than the previous implementation, which also armed after any gesture. It is || this.launchSource !== 'glassesMenu' added to the guard in scheduleIdleExit(). Cody restored the exact previous controller from 3e04688 and reported 7 failed, 62 passed of 69; the implementer did not re-run that.

Negative control (stricter mutation): leave only after a glassesMenu launch source, 11 of the 69 tests in the two files fail, including all five new cases above except "never paired". The CODY-019 control was not re-run; activityEpoch and its tests are unchanged and pass.

Round 15: choosing an agent, 0.2.0 (2026-11-21/22)

Run on 9394c24.

$ npm ci                          exit 0
$ npm run typecheck               exit 0
$ npm test                        Test Files 15 passed; Tests 296 passed (296)
$ vitest --project integration agents + idleExitHost + client-bridge + clientSecurity + entryPoint + bridge
                                  Tests 174 passed (174)
$ npm run client:build            built
$ HERMEVEN_BRIDGE_ORIGIN=https://hermeven.xylo.gg npm run -w @hermeven/even-client pack
                                  Stamped hermeven.ehpk (100769 bytes); not uploaded
$ npm run test:real-stt           Tests 11 passed (11)
$ npm run test:real-hermes        Tests 9 passed (9)   (default agent only; see below)
$ npm run test:simulator          Tests 8 passed (8)   (one agent: screens unchanged)
$ bash -n deploy/install.sh tests/deploy/runbook-proof.sh   ok
$ tests/deploy/runbook-proof.sh   exit 0 (Caddy "Valid configuration"; systemd-analyze verify ok)
$ git diff --check f02715f...HEAD ; git diff --check 15714bd..HEAD    clean

No check was omitted.

New: tests/integration/agents.test.ts (29 tests) and five reducer tests. The Hermes in them is the test fake, extended to imitate multiplexed profiles: /p/<profile>/..., a separate key per profile, runs and idempotency keys invisible from any other profile, 404 for an unserved profile.

Behaviour Proven by
The list: ids and names only, default first; needs a credential; one agent when none are configured response compared whole; searched for keys, /p/ and the Hermes address
/v1/device has exactly its previous fields key list compared
A Wendy conversation is submitted and polled only at her prefix, with her key every /v1/runs request recorded by the fake carries profile wendy
An id not on the list (including real profiles that are not listed) or a malformed one: 400, no conversation row, nothing sent to Hermes
Per-agent conversations: a new one with Wendy closes only her earlier one; Pepper's keeps its history fake session count and turn numbers
Lost Hermes reply, and bridge restart mid-run, for a non-default agent: one execution, same key, same agent execution counter, posted keys
Wrong key, or the default's key, at another agent: agent_rejected, nothing ran, other agents unaffected
Agent removed while its turn is in flight: outcome_unknown after restart, not sent to anyone else
Keys never in the bridge log log searched
Configuration errors refused seven cases
Glasses: opens on the default with its name; swipe moves through the list and wraps, sending nothing
Question, spoken or typed, goes to the chosen agent; name on listening, thinking and answer screens; follow-up continues with it
A swipe chooses only at Ready (pages on an answer, nothing while busy) integration and reducer tests
Reopen: within the window on the last agent and its conversation; after it, or if never asked, or if removed, on the default; list unavailable at start: last known list
One-agent bridge, and a bridge without /v1/agents: screens and requests exactly as before request bodies compared

Eight ways of breaking it were tried against agents.test.ts; seven failed tests there (13, 2, 2, 6, 3, 2 and 1). The eighth (letting the reducer accept a selection on any screen) passed there because the controller refuses it too; a reducer test was added and now fails under it.

Not covered by an automated test against a real Hermes: profile multiplexing. The real-Hermes suite's isolated gateway serves one profile. What exists instead is one manual request on the server (docs/evidence/droplet/2026-11-21.md): Wendy's profile answered through /p/wendy with her own key, an identical resubmit returned the same run, and the keys were refused crosswise. The simulator suite runs with one agent; the agent screens have not been drawn in the simulator.

Round 16: CODY-021, CODY-022 (2026-11-22)

Run on bb3a309.

$ npm ci                          exit 0
$ npm run typecheck               exit 0
$ npm test                        Test Files 15 passed; Tests 299 passed (299)
$ vitest --project integration agents + idleExitHost + client-bridge + clientSecurity + entryPoint + bridge
                                  Tests 176 passed (176)
$ npm run client:build            built
$ HERMEVEN_BRIDGE_ORIGIN=https://hermeven.xylo.gg npm run -w @hermeven/even-client pack
                                  Stamped hermeven.ehpk (100903 bytes); not uploaded
$ npm run test:real-stt           Tests 11 passed (11)
$ npm run test:real-hermes        Tests 9 passed (9)
$ npm run test:simulator          Tests 8 passed (8)
$ bash -n deploy/install.sh tests/deploy/runbook-proof.sh   ok
$ tests/deploy/runbook-proof.sh   exit 0 (Caddy "Valid configuration"; systemd-analyze verify ok)
$ git diff --check f02715f...HEAD ; git diff --check c8b4fb0..HEAD    clean

No check was omitted.

CODY-021, two integration tests in tests/integration/agents.test.ts and one reducer test:

Step Asserted
Pepper is asked once; Wendy is chosen; a turn that never finishes is started with her executions: default, wendy
Wendy is removed from the list, the bridge restarts, the page is reopened the app re-attaches to the same request id
Her turn settles outcome_unknown on screen; still exactly one execution at Wendy
At that moment state agentId is default; storage agentId becomes default
Back to Ready HUD Pepper\n\nReady.
Another question goes to the default agent in the default agent's OWN conversation (turn 2, containing the first Pepper question); executions: default, wendy, default; one POST ever under Wendy's prefix
Variant: the next question is asked straight from her result screen same routing; the conversation created names default
Reducer the fallback applies on a resting screen and keeps what is on it; ignored while listening or in flight

Negative controls, each run against those tests: reconciliation removed (the reviewed behaviour): 2 failed, 63 passed of 65. Reconciling while her turn is still in flight: 2 failed. Relabelling her conversation as the default's instead of restoring the default's own: 2 failed. Reducer applying the fallback while busy: 1 failed.

Round 17 (2026-11-28): menu and hands-free mode, on e1d183b54dc5aeb94822d8efeeeb358b6b14a664

$ npm run typecheck               clean
$ npm test                        Test Files 18 passed (18); Tests 341 passed (341)
$ npm run client:build            built
$ npm run test:real-hermes        Tests 9 passed (9)
$ npm run test:real-stt           Tests 11 passed (11)
$ npm run test:simulator          Tests 8 passed (8)   (launched with ?wake=off&menu=off)
$ git diff --check                clean

Omitted: pack (nothing is being uploaded), tests/deploy/runbook-proof.sh (no deploy file changed except a comment block in deploy/bridge.env.example). No negative controls were run.

Everything about the menu and hands free is fakes only: a 440 Hz tone for speech, a scripted recogniser for what it "said", the fake glasses. New tests: services/bridge/test/wake.test.ts (9), apps/even-client/test/vad.test.ts (8), tests/integration/wake.test.ts (24), one HUD test and more variants in apps/even-client/test/layout.test.ts.

Asserted in tests/integration/wake.test.ts
/v1/wake match with text, name alone, greeting, alias; unaddressed speech returns empty text and appears in no log line; near miss is one word; 401 / 400 / 415; failed transcription is "not matched"; 404 with no speech-to-text or no named agent; one check at a time and a per-minute budget separate from turns; no run is posted to Hermes
Menu opens on it with Hands free first, microphone closed, nothing sent; one tap is hands free; double tap at Ready returns to it and closes the microphone; double tap on it requests the system exit; Agents behaves as 0.2.0 including idle exit; an untouched menu leaves, hands free does not; Agents only where hands free cannot work; a turn in flight at relaunch is shown instead of the menu
Hands free one-breath question reaches the named agent as text with "Heard:" shown; microphone closed while in flight and reopened at rest; agents switch by name and keep their own conversations; name alone records and sends on a 1.2 s pause without reopening the microphone; a question finished before the name was recognised is not lost; name then silence sends nothing; a tap during a check wins; 404 from the bridge ends hands free and says so; refused or silent microphone is retried; closed on disconnect and stop

Round 19 (2026-11-28): live preview, on f9946a027a92da79d9321bc7ca7e4555b8ba900f

$ npm run typecheck               clean
$ npm test                        Test Files 18 passed (18); Tests 349 passed (349)
$ npx vitest run (the Round 18 list: wake, vad, layout, integration wake)   Tests 66 passed (66)
$ npm run client:build            built
$ HERMEVEN_BRIDGE_ORIGIN=https://hermeven.xylo.gg npm run -w @hermeven/even-client pack   (twice)
                                  hermeven.ehpk 105146 bytes, SHA-256
                                  eba2103df81e0e7c35e5684fcd07915f03af1015f5f9c5acae730e25039f8d8f both times; not uploaded
$ npm run test:real-stt           Tests 11 passed (11)
$ npm run test:real-hermes        Tests 9 passed (9)
$ npm run test:simulator          4 runs with the ninth scenario: 9 passed (9) three times;
                                  once 1 failed | 8 passed (see below)
$ bash -n deploy/install.sh tests/deploy/runbook-proof.sh   ok
$ systemd-analyze verify deploy/hermeven-bridge.service     exit 0; one message: /opt/node/bin/node
                                  "is not executable" (it does not exist on the development desktop)
$ git diff --check origin/main...HEAD    clean (run on the committed SHA)

Everything except the last line was run on the working tree immediately before it was committed as the SHA above, not on a fresh checkout of it. npm ci was not re-run.

The failed simulator run. The first run after adding the ninth scenario failed in the existing eighth scenario (idle exit with short waits), at waitConsole('leaving the glasses: idle on ready', 15_000): the line never appeared. The next three runs passed all nine. The cause was not found. That scenario launches with wake=off&menu=off&preview=off, where none of this round's client code runs (afterChange and maybePreview return at once), but that is an argument, not a diagnosis.

Not run: caddy validate (caddy is not installed here), tests/deploy/runbook-proof.sh (no file under deploy/ changed in this round). No negative controls were run.

New tests, all in tests/integration/wake.test.ts (fakes: a tone, a scripted recogniser):

Asserted
/v1/transcribe returns trimmed text; posts nothing to Hermes; the text is in no log line; 401, 400 (wrong format, odd byte count); failed transcription gives empty text; 404 without speech-to-text; one at a time per device and its own per-minute budget, separate from wake checks
Words while recording the HUD shows each preview as the recording grows; after sending, the last preview stays under "Transcribing…"; "Heard:" then shows the turn's own transcript (which differs from the previews in the test); exactly one turn and one execution
Long text the newest words are kept, with a leading "…", within nine measured lines
Stale preview one that returns after a cancel, during the next recording, is not drawn
Fallbacks without speech-to-text nothing is requested and recording works; a typed question never shows "Heard:"
Hands free the question after a name alone shows its words and reaches the named agent

Round 20 (2026-11-28): preview for Agents only, CODY-023, on 2a63b7796a41280a27491039fcaa95e49ada5630

$ npm run typecheck               clean
$ npm test                        Test Files 18 passed (18); Tests 349 passed (349)
$ npx vitest run (the Round 18 list)   Tests 66 passed (66)
$ npm run client:build            built (as part of pack)
$ HERMEVEN_BRIDGE_ORIGIN=https://hermeven.xylo.gg npm run -w @hermeven/even-client pack   (twice)
                                  hermeven.ehpk 105155 bytes, SHA-256
                                  311078550ed1a176b9a1530cced0c81a322b40e83ecdc9b21402fb08b1ebe58d both times; not uploaded
$ npm run test:real-stt           Tests 11 passed (11)
$ npm run test:real-hermes        Tests 9 passed (9)
$ npm run test:simulator          11 runs, see below
$ bash -n deploy/install.sh tests/deploy/runbook-proof.sh   ok
$ git diff --check origin/main...HEAD ; git diff --check 31ae4ef HEAD    clean (on the committed SHA)

Simulator runs, in order. Runs 1 to 5 were on the tree with the Agents-only guard and the README change but before the screenshot-polling change; runs 6 to 11 after it (the committed tree).

Run Result
1, 2 9 passed
3 2 failed, 7 passed: "the answer is drawn" (expected 790 to be greater than 2000 lit pixels, 800 ms after the answer) and, following from it, the page-turn comparison
4, 5 9 passed
6 to 11 9 passed, six times

real-stt, real-hermes, npm test and the first five simulator runs were made before the screenshot-polling change to tests/simulator/simulator.test.ts, which touches no other file; npm test, typecheck and the two packs were repeated after it. npm ci was not re-run.

Not run: caddy validate (not installed here), systemd-analyze verify and tests/deploy/runbook-proof.sh (no file under deploy/ changed since Round 18). No negative control was run for the Agents-only guard beyond the test having asserted the opposite, and passed, on the previous commit.

Negative coverage kept from Round 19, all still in tests/integration/wake.test.ts: stale preview completion; final transcript differing from the previews; old-bridge and no-STT fallback; per-device busy and rate limits for both routes; no transcript in any log line; exactly one turn and one execution. Added: zero preview requests in hands free.