Files
hermeven/docs/handoff/2026-11-18-slice-1.md
T
DanandClaude Fable 5.2 6d74f9e121 Build speech-to-text into the bridge; add droplet deployment examples
STT_PROVIDER now defaults to "builtin": Whisper (onnx-community/whisper-base,
q8) runs in the bridge process on the CPU via @huggingface/transformers, so
no provider account is needed and recordings stay on the bridge host. Silent
captures are detected by level before the model runs. The external
OpenAI-compatible adapter remains available.

Tests: 130 unit/integration; 4 scenarios with the real model on a real
speech recording (npm run test:real-stt). Not tested on audio from the
glasses or on a droplet.

deploy/ and docs/deploy-droplet.md are examples that have not been run.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-18 18:31:30 -08:00

6.8 KiB

Handoff: first vertical slice

To: Cody (architecture and security review), Dan (scope, merge). From: Claude (implementation). Date: 2026-11-18.

This work has not been reviewed. Nothing below is a review conclusion, and no part of it should be read as Cody's assessment. The author's own checks are listed as such.

Identity of what is being handed over

Item Value
Repository git@git.xylo.gg:Xylo-Digital/hermeven.git
Base None. The remote had no refs when work began (empty repository), so there is no base SHA.
Branch feat/vertical-slice-1, local only
First slice 4687cc01147e2167997aa6a252343933070fbebd
Head under review The tip of the remote branch cody/slice-1-review: the first slice plus built-in speech-to-text and droplet deployment files (see "Added after the first slice").
Pushed To cody/slice-1-review only, at Dan's request on 2026-11-18. Dan works solo and has said no PR is needed. Nothing has been pushed to main.

Repository instructions: there were none to follow (no AGENTS.md, CLAUDE.md, README or CONTRIBUTING existed). The kickoff specification was the only instruction source.

Added after the first slice

Dan decided speech-to-text should be built into the software and that the bridge will run on a DigitalOcean droplet.

Area Paths
Built-in Whisper adapter, now the default STT_PROVIDER services/bridge/src/stt/builtinWhisper.ts, config.ts, app.ts, main.ts
Tests services/bridge/test/builtinWhisper.test.ts, tests/real-stt/* (with a public-domain speech fixture)
Deployment examples, not run on a droplet deploy/*, docs/deploy-droplet.md
New dependency @huggingface/transformers 4.3.2 (brings ONNX Runtime and sharp)

Changed files

Everything is new. 79 files at the head above.

Area Paths
Contract packages/contracts/src/{schemas,errors,index}.ts
Bridge services/bridge/src/{config,db,devices,turns,server,app,main,cli,env,ratelimit}.ts, hermes/{adapter,runsAdapter}.ts, stt/{adapter,openaiCompatible}.ts
Client apps/even-client/src/core/{reducer,controller,hud,paginate,plaintext}.ts, device/{port,events,evenAdapter,previewDevice}.ts, net/bridgeClient.ts, ui/phone.{ts,css}, main.ts, app.template.json, scripts/write-manifest.mjs
Tests tests/fakes/*, tests/integration/*, tests/simulator/*, tests/real-hermes/*, and test/ in each package
Docs README.md, docs/*

Roughly 4,400 lines of source and 3,200 lines of tests.

Commands and real results

Full detail, including failures along the way, is in docs/test-evidence.md.

Command Result
npm ci clean install, 0 vulnerabilities reported
npm run typecheck exit 0
npm test 130 passed, 0 failed (8 files)
npm run test:real-stt 4 passed, 0 failed
npm run test:simulator 6 passed, 0 failed; 10 consecutive runs of the final revision
npm run test:real-hermes 9 passed, 0 failed
npm run client:build built; bundle searched for server secrets, none
evenhub pack ... --sdk-ver 0.0.16 manifest accepted, min_app_version 2.2.10; not uploaded

Evidence by kind

Kind What exists
Fakes only 122 tests
Even simulator 0.9.5 6 scenarios, screenshots in docs/evidence/simulator/
Real Hermes v0.23.1, stub model 9 scenarios
Real STT 4 scenarios: built-in Whisper on one clean archive recording
Real model or tools none
Physical device none

Where the specification was not followed as written, and why

  1. Hermes Runs API instead of /v1/responses. docs/decisions/0002-hermes-runs-api.md.
  2. Two endpoints beyond the proposed list: POST /v1/pairing/claim and /v1/device (status, renew, revoke). The specification required pairing, status and disconnect but listed no routes for them.
  3. Audio metadata in the query string with a raw binary body, rather than multipart.
  4. No SSE endpoint. Polling only.
  5. approval_required is a non-terminal state, not a terminal outcome. An approval that never arrives ends as cancelled with code approval_timeout.
  6. The bridge caches question and answer text for 15 minutes so a client can poll for its result and recover after a restart. The specification says the bridge stores opaque references, not a transcript.
  7. The device token lasts 7 days, renewable within a 90-day pairing. The specification preferred short-lived.
  8. No latency percentiles are documented. There is nothing real to measure yet.
  9. Not done from the implementation sequence: step 2's "real G2 input and HUD" and step 3's real microphone and real STT. They need the device and a provider.

Things the author is unsure about

Offered as places to look, not as findings.

  • Whether double tap as "cancel" away from the root page satisfies Even's exit rule.
  • Whether classifying "stop requested but the run completed first" as succeeded is the right thing to show a user who pressed cancel.
  • Whether the fixed-window, in-memory rate limiter and the unbounded-by-IP pairing lockout (any client can burn the owner's outstanding pairing code with five bad guesses) are acceptable.
  • Token renewal that needs only the current token.
  • services/bridge/src/turns.ts builds an UPDATE statement from object keys. The keys are compile-time constants in this file, not request data.
  • The Hermes adapter does not yet check /v1/capabilities for durable idempotency at startup.
  • The client holds captured audio in memory for a possible resend until the user discards it.
  • The real-Hermes test covers neither approvals nor the unknown status.
  • The built-in speech model is fetched from the Hugging Face hub at first start with no pinned revision or hash, and runs in the bridge's own process (a measured 0.4 s event-loop pause).
  • The silence threshold in builtinWhisper.ts was chosen without any audio from the glasses.
  • The systemd hardening options in deploy/ have never been run with ONNX Runtime.

Blockers and open decisions

# Item Owner
1 Run docs/device-test-plan.md, starting with A13 (locked phone, pocket). Dan
2 Choose an STT provider. Decided: built in. Remaining: measure it on the droplet. Dan
3 Name the target Hermes deployment and a safe test profile. Dan
4 Push and PR. Decided: no PR; pushed to cody/slice-1-review. When to put it on main is still open. Dan
5 Independent architecture and security review of the head above. Cody
6 Distribution model given Even's per-build network whitelist. Dan, later

Not claimed

No deployment. No working hardware. No production change. No paid service used. No upload to Even's portal. No change to any Hermes installation: the real-Hermes test used a throwaway home directory that was deleted afterwards.