fix(honcho): read Honcho 3.0.x response schema — memory reads were silently empty
Nightly Build / build (push) Successful in 3m48s

Against a self-hosted Honcho 3.0.11 every read path came back empty while
the server was healthy and full of derived facts: the plugin parsed a
`conclusions`/`summary` shape the API no longer emits.

- honcho-client: typed models for the real schema — `PeerContext`
  (`representation` markdown + `peer_card`), `SessionContext` (`summary` as
  an object, `peer_representation`), wrapped `PeerCard` (a bare array on PUT
  is a 422, which also broke `honcho_profile` writes).
- plugin: the turn-time injection and `honcho_context` read the
  representation; `honcho_search` and the page's /search now use
  `conclusions/query` (observer/observed scoping inside `filters`) — a real
  ranked semantic search with fact ids, which `peer_context?search_query`
  never provided; /overview returns card + representation + conclusions.
- compose: pin the Honcho image by digest (3.0.11) — ghcr publishes no v3
  semver tags, and an untracked `:latest` pull is what drifted the schema.
- tests: fixture tests from payloads captured on the live server, plus an
  env-gated live smoke test (HONCHO_E2E_URL/_WS/_PEER, `cargo test
  -p honcho-client -- --ignored`) — run it before any future Honcho bump.
This commit is contained in:
Daniele
2026-09-09 19:15:11 +01:00
parent 9c24b02e42
commit 7e3fa3caad
15 changed files with 519 additions and 149 deletions
+12 -6
View File
@@ -1,8 +1,8 @@
# Honcho — self-hosted Docker package
This folder contains a ready-to-run Docker Compose setup for [Honcho](https://honcho.dev),
the memory server used by the personal-agent's Honcho plugin
([`src/plugin/honcho/`](../src/plugin/honcho/)).
the memory server used by the Honcho plugin
([`crates/plugin-honcho/`](../crates/plugin-honcho/)).
---
@@ -10,11 +10,16 @@ the memory server used by the personal-agent's Honcho plugin
| Service | Image | Port | Role |
| --- | --- | --- | --- |
| `api` | `ghcr.io/plastic-labs/honcho:latest` | **8000** | REST API (the endpoint personal-agent talks to) |
| `api` | `ghcr.io/plastic-labs/honcho@sha256:59f0…8c6b` (**3.0.11**, digest-pinned) | **8000** | REST API (the endpoint the app talks to) |
| `deriver` | same image | — | Background worker: extracts conclusions, summaries, peer representations |
| `db` | `pgvector/pgvector:pg17` | 5432 (internal) | PostgreSQL + pgvector (vector search) |
| `redis` | `redis:7-alpine` | 6379 (internal) | Cache for session context |
> The Honcho image is **pinned by digest** because ghcr publishes no v3 semver
> tags (only `latest`), and the plugin parses a version-specific API schema —
> a silent `:latest` bump already changed response shapes once. Upgrade
> deliberately: pick the new digest, verify the plugin against it, then edit.
Data is stored in named Docker volumes (`honcho_db`, `honcho_redis`) and survives container restarts.
---
@@ -140,7 +145,8 @@ docker compose restart api
# Stop and wipe all data (destructive!)
docker compose down -v
# Upgrade to a newer Honcho image
# Upgrade Honcho: bump the pinned digest in docker-compose.yml (deliberately —
# the plugin's API parsing is verified against the pinned version), then
docker compose pull
docker compose up -d
```
@@ -181,5 +187,5 @@ docker compose up -d --build
- [Honcho GitHub](https://github.com/plastic-labs/honcho)
- [Honcho docs](https://docs.honcho.dev)
- [Self-hosting guide (official)](https://docs.honcho.dev/v3/contributing/self-hosting)
- [personal-agent Honcho plugin docs](../docs/honcho.md)
- [personal-agent Memory architecture](../docs/memory.md)
- [Honcho plugin docs](../docs/plugins/honcho.md)
- [Memory architecture](../docs/memory.md)
+8 -3
View File
@@ -13,6 +13,11 @@
#
# The API will be available at http://localhost:8000
# Interactive docs: http://localhost:8000/docs
#
# The Honcho image is PINNED BY DIGEST (ghcr publishes no v3 semver tags, only
# `latest`): this digest is Honcho 3.0.11. The plugin parses a version-specific
# API schema (`representation`/`peer_card`, wrapped card, `conclusions/query`
# filters) — bump the digest deliberately and re-verify, never via `:latest`.
services:
@@ -20,7 +25,7 @@ services:
# Applies Alembic migrations before the API starts.
# Exits with code 0 when done; Docker Compose marks it "completed".
migrate:
image: ghcr.io/plastic-labs/honcho:latest
image: ghcr.io/plastic-labs/honcho@sha256:59f099ad85713105608c9b239a4f1386fbebd8647323d3a04646bb3c975d8c6b # Honcho 3.0.11, pinned — see header
env_file: .env
environment:
DB_CONNECTION_URI: postgresql+psycopg://${POSTGRES_USER:-honcho}:${POSTGRES_PASSWORD:-honcho}@db:5432/${POSTGRES_DB:-honcho}
@@ -33,7 +38,7 @@ services:
# ── API ────────────────────────────────────────────────────────────────────
api:
image: ghcr.io/plastic-labs/honcho:latest
image: ghcr.io/plastic-labs/honcho@sha256:59f099ad85713105608c9b239a4f1386fbebd8647323d3a04646bb3c975d8c6b # Honcho 3.0.11, pinned — see header
restart: unless-stopped
ports:
- "${HONCHO_PORT:-8000}:8000"
@@ -65,7 +70,7 @@ services:
# Without a working LLM key this service will fail to process messages;
# the API itself will still work but no long-term memory will be built.
deriver:
image: ghcr.io/plastic-labs/honcho:latest
image: ghcr.io/plastic-labs/honcho@sha256:59f099ad85713105608c9b239a4f1386fbebd8647323d3a04646bb3c975d8c6b # Honcho 3.0.11, pinned — see header
restart: unless-stopped
command: ["/app/.venv/bin/python", "-m", "src.deriver"]
env_file: .env