Round 15 handoff and evidence (documentation only)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Dan
2026-11-21 16:12:31 -08:00
co-authored by Claude Fable 5.2
parent 9394c249ad
commit c8b4fb0310
2 changed files with 128 additions and 0 deletions
+73
View File
@@ -0,0 +1,73 @@
# Handoff for Cody, Round 15
From: Claude (implementation). Date: 2026-11-22 (UTC).
**Not reviewed.** Round 14: `15714bd848a7bf7230bb80d187de85af4b3fa66b`, SHIP / SHIP FOR TRIAL.
| Item | Value |
|---|---|
| Branch | `cody/droplet-deploy` |
| `main` | `f02715fb6487f4e2ff0adeccfaad2403e1724aa5` (unchanged) |
| Code change | `9394c24` |
| New head | the tip after this push (this file and evidence only on top of `9394c24`) |
## What this is
A new feature for trial: more than one agent through one bridge, chosen on the glasses with a
swipe at Ready. Dan's requests, quoted, are contract section G; G7 lists what the implementer
chose. Under the standing rule these are owner decisions pending the device trial.
Unlike the last few rounds this touches the **bridge**, the **contract package** and the
**database schema** (migration v3, one nullable column), as well as the client.
## Design in five lines
1. `config.agents`: default first, then `HERMEVEN_AGENTS`. Extra agents are profiles of the same
Hermes gateway at `<base>/p/<profile>`, each with its own key (Hermes refuses the default's).
2. `GET /v1/agents` returns ids and names. `POST /v1/conversations` takes optional `agent_id`,
checked against the list. `/v1/device` is untouched on purpose: installed 0.1.x clients reject
unknown response fields.
3. `conversations.agent_id` (NULL = default). A turn's adapter is looked up from its conversation
every time it is driven, including after a restart.
4. Client: `agents` and `agentId` in the reducer; the controller swaps the stored conversation
per agent; requests name an agent only when the bridge offered a list.
5. Old client with new bridge, and new client with old bridge, both behave as one agent.
## Where to push
1. **The id never builds an address.** The profile path comes only from configuration; the
client-supplied id is a map key, pattern-checked by the schema and then by `knowsAgent`.
`HERMEVEN_AGENT_<ID>_PROFILE` is pattern-checked too.
2. **One device token now reaches every listed agent**, each with its own tools. That is the
intent, and the list is the control. There is no per-device restriction.
3. **Idempotency keys** are still `hermeven-turn-<request id>`; Hermes scopes them per profile and
key. A request id cannot move between agents because a turn's conversation is fixed.
4. **Agent removed mid-turn**: `outcome_unknown` if anything may have been sent, otherwise
`agent_unreachable`. Re-adding the agent later does not revive the turn.
5. **`activeConversation` and `agent_reachable`** on `/v1/device` now describe the default agent
only. A non-default agent being down is discovered by asking it.
6. **Client storage** gained `agentId`, `others` and `agents`, written without waiting for
confirmation (like `lastTurnAt`). Losing them costs the reopen-on-last-agent convenience.
7. **A conversation created for the previous agent** while the user swipes away is dropped on the
client by epoch; the bridge keeps an unused conversation row for that agent.
8. HUD status at Ready with several agents: "Tap: ask · Swipe: agent · 2×: exit". Not measured on
the device or in the simulator.
## Production and account state
- Server, on Dan's go-ahead: `API_SERVER_KEY` added to the wendy and cody Hermes profiles; one
test question sent to Wendy. Details and what was verified: `docs/evidence/droplet/2026-11-21.md`.
- The bridge on the server is unchanged (`d90cd89`, one agent). The new keys are not in its
settings. Nothing of 0.2.0 is deployed.
- Even account: beta channel at 0.1.2 (uploaded on Dan's instruction after Round 14's SHIP).
0.2.0 is not uploaded.
- Dan has not reported a trial of 0.1.2, and F5 (ten-minute rule) is still undecided.
## Also in this push
CODY-020: the Round 14 control is now described as a stricter mutation, with the mutation text
and Cody's exact-prior result (7 failed, 62 passed) attributed to Cody.
## Checks
All pass on `9394c24`, nothing omitted: `docs/test-evidence.md`, "Round 15".
+55
View File
@@ -651,3 +651,58 @@ Negative control (stricter mutation): leave only after a `glassesMenu` launch so
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.