Commit d2289662 by PLN (Algolia)

docs(audio-api): reconcile SRE note with the paved-road platform (#34)

The platform moved under us between sessions. SRE.md now records the
landscape the audio service actually deploys into:

- nechapi got its own repo (git@git.nech.pl:pln/nechapi.git) with a
  golden base image (nechapi/py) + a `nechapi ship` CLI — the paved road.
  Onboarding is FROM nechapi/py:1 + NECHAPI_ROOT_PATH + `nechapi ship`,
  not the old hand-rolled docker save/load.
- A sibling tenant (geo/v1, Verniquet) is already live through it.
- Correction to the 2026-06-25 "CLAP is the wrong engine" line: CLAP is
  right, used the canonical way — embeddings precomputed OFFLINE, a compact
  ANN index shipped to erable, request-time = tiny text-embed + cosine.
  What's wrong is running CLAP at request time on a GPU-less 2GB host.

This closes the ops task (#34): observability shipped on the platform
side (per-call capture, /admin analytics, public uptime status page —
nechapi f89d7f9, now rebased onto the paved road and pushed), and the
systemd-restart / deploy-runbook half is subsumed by `nechapi ship` +
the golden base, owned in the SRE repo. No bespoke systemd units to
write here.
parent 213eb8ad
...@@ -188,15 +188,45 @@ Everything else (containerize, light CPU engine, `/healthz` + `/metrics` + ...@@ -188,15 +188,45 @@ Everything else (containerize, light CPU engine, `/healthz` + `/metrics` +
`/openapi.json`, 2 GB transient cache, X-Accel-Redirect for artifact serving) `/openapi.json`, 2 GB transient cache, X-Accel-Redirect for artifact serving)
stands. **The platform contract is now written** — read it before reshaping the stands. **The platform contract is now written** — read it before reshaping the
service: service:
- `~/Work/SRE/nechapi/RECIPE.md` — the contract you conform to (root_path, The platform now has its own repo: **`git@git.nech.pl:pln/nechapi.git`**
/healthz + /metrics + /openapi.json, trust `X-Tenant`/`X-Scopes`, loopback (https://git.nech.pl/pln/nechapi). Clone it and read:
bind, X-Accel-Redirect for artifacts, the compliance checklist). - `RECIPE.md` — the contract you conform to (root_path, /healthz + /metrics +
- `~/Work/SRE/nechapi/PLATFORM.md` — the full platform design + decisions log. /openapi.json, trust `X-Tenant`/`X-Scopes`, loopback bind, X-Accel-Redirect
- `~/Work/SRE/nechapi/nech-apis.json` — the registry; your `audio`/v1 entry is for artifacts, the compliance checklist).
already in it (port 9780). - `PLATFORM.md` — the full platform design + decisions log.
- `nech-apis.json` — the registry; your `audio`/v1 entry is already in it (port 9780).
Net for you: `root_path=/audio/v1`, drop #23 (auth) and per-token quota, expose Net for you: `root_path=/audio/v1`, drop #23 (auth) and per-token quota, expose
the three standard endpoints, keep the engine CPU-light. Ping SRE when the the three standard endpoints, keep the engine CPU-light. Ping SRE when the
container's ready and I'll wire the gateway + auth_request + your docs tab. container's ready and I'll wire the gateway + auth_request + your docs tab.
*SRE* 🛂 *SRE* 🛂
---
## ✅ Correction (2026-06-28): CLAP is RIGHT — used the canonical way (precompute → index)
My 2026-06-25 "CLAP is the wrong engine" line overstated it. Reconciled with the
canonical Douanier design (now in `git@git.nech.pl:pln/sre`
`Raspi5/05-douanier-audio-intelligence.md` + `nechapi-douanier-onboarding.md`):
- **CLAP stays the engine for the corpus/search features** (search-by-vibe,
similar, zero-shot auto-tags). What's wrong is *running CLAP at request time on
erable* (no GPU, ~2 GB RAM) — not CLAP itself. The design: **compute CLAP
embeddings OFFLINE** (XPS22, or the new **Raspi5** 16 GB home hub) → **ship a
compact read-only ANN index** (hnswlib/FAISS, or Algolia) to erable → request
time = embed a tiny text query + cosine/ANN lookup, ~0 model RAM. (Per-CHAPTER
embeddings via `set-chapters` beat per-file.) So my earlier "Corpus query"
bullet was right; disregard the absolute "CLAP is wrong" framing above.
- **Essentia/librosa** remains a fair CPU-native fallback ONLY for the
*novel-uploaded-clip emotion* path (nothing to precompute there); CLAP-grade
rides a future `precise=true` / GPU tier — same `/v1` shape.
Platform also moved since 06-25: there's a **golden base image (`nechapi/py`)** +
a **`nechapi ship`** CLI (the paved road), and a tenant (**geo/v1**) is already
live through it. **Onboard via the runbook `nechapi-douanier-onboarding.md`** in
the SRE repo (Dockerfile `FROM nechapi/py:1`, `ENV NECHAPI_ROOT_PATH=/audio/v1`,
`create_app(...)`, `require_scope(...)`, then `nechapi ship`). Net unchanged:
containerize, loopback `:9780`, trust `X-Tenant`/`X-Scopes`, CPU-light at request.
*SRE* 🛂
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment