# Persistent memory — eshpfi-management _Last updated: 2026-06-16_ ## Repo purpose Reference workspace for PFI infrastructure: server inventory, canonical Docker Compose stacks, ops playbooks, and conventions. Authoritative copies of compose files live on the servers under `/opt/docker/compose//`; this repo mirrors them for version control, editing, planning, and CI-driven deploys. ## Tools and conventions Sister repos (separate gitea repos, deployed by playbooks here): | Repo | Role | CI status | |---|---|---| | `vh/task-board` | MCP + web dashboard for assistant task state (port 7878) | push-to-main → CI deploys (2026-04-29) | | `vh/vor` | Inquisitor UI sidecar (port 7879) | push-to-main → CI deploys (2026-04-29) | | `vh/nevermore` | Twice-daily LLM-curated briefing (port 8181, replaces news-digest) | push-to-main → CI deploys (2026-04-30) | | `vh/asset-engine` | Internal control plane over inference services (port 8200, LAN-direct) | push-to-main → CI deploys (2026-05-12) | | `vh/althing` | Inter-agent message bus (chamber UI port 7881, forseti + agent-runner daemons, valkey IPC) | push-to-main → CI deploys (2026-05-14) | | `vh/mead-hall` | Bifrost tool-provider sidecar (port 5173 on dev VM 10.100.10.50) | push-to-main → CI deploys (2026-05-16) | | `vh/skaldsong` | Wizard + reader surface (port 8300, ana-docker, registry-pull pattern) | push-to-main → CI deploys (2026-05-19) | | `vh/worldtree` | Conversation API (corviduo-dev demo :8080 / personal :8081 / pinned :8082) — Heimdall auth, Bifrost integration | push-to-main → CI deploys | | `vh/yt-voice-clipper` | YouTube → diarized voice-clip dataset builder + audition console (irv-ml1 :8000) | push-to-main → **gitea-webhook auto-deploy** to irv-ml1 (2026-06-03) — see `docs/runbooks/ytvc-autodeploy.md` | | `vh/arbo` | Catalog-driven ComfyUI engine (irv-ml1 :8201, comfy-dev owns engine/catalog/image) | push-to-main → **gitea-webhook auto-deploy** to irv-ml1 (catalog-only restart; infra side = `stacks/arbo/`) | (`vh/volva` + Heid were re-architected from systemd daemons to Claude Code session orchestrators 2026-06-08; their nh3-dev `.service` units were removed — no longer deployed sidecars here. See Recent decisions.) - **Two-layer backups** — Backrest orchestrates restic for file+DB (5 fleet repos, daily 01:00 PDT); PBS-ANA primary + PBS-NH3 DR mirror for VM images. ana-nas is the SPOF for postgres + PBS-ANA datastore + cross-site restic targets — see `docs/runbooks/disaster-recovery.md` for the blast-radius matrix. - **`pull-hf-repo.yaml`** is the canonical "get a HuggingFace model/dataset onto ana-ml2's shared cache at `/tank/aimodels/huggingface/`" playbook. Supports `--var repo_type=model|dataset|space`. Replaces ad-hoc `huggingface_hub.snapshot_download` patterns. - **Worldtree admin auth — per-instance.** Each Worldtree deployment (demo :8080, personal :8081, pinned :8082) has its own Heimdall registry and its own bootstrap admin key. Infra-ops's stored long-lived admin key (`key_id 61419c92`) at `ana-docker:/opt/docker/conf/.secrets/worldtree-infra-ops-admin` auths against **demo only**. For personal-instance admin ops, fetch the bootstrap admin per-op via `docker exec worldtree-personal-worldtree-api-1 printenv WORLDTREE_BOOTSTRAP_ADMIN_KEY` on corviduo-dev. Used for `POST /admin/keys`, admin diagnostics (`/admin/sessions//{bifrost,tools}`, etc.). - **Per-project user keys against personal Worldtree** (issued 2026-05-19): `skaldsong:79744637` (nh3-dev iteration), `skaldsong:7c1dbbbe` (ana-docker prod), `althing:50d85460`, `mead-hall:a360822d`. Same `user_id=skaldsong` across both skaldsong keys → shared Heimdall agent slot; different `key_id` → independently rotatable. Pattern: mint via `/admin/keys`, drop value to `/tmp/wt-personal-.key` mode 600, dev collects + shreds (DO NOT cat to chat transcript). - **Skaldsong CD pattern (registry-pull).** Differs from althing / asset-engine which build-on-host. vh/skaldsong's CI builds and pushes `gitea.phasefinal.com/vh/skaldsong:` + `:latest`; `playbooks/deploy-skaldsong.yaml` on ana-docker pulls + recreates. SHA-pin only (no `:latest` health-gated advance yet). Prereq: host needs `docker login gitea.phasefinal.com` once (read:package PAT) — not currently in the workflow. - **gitea internal route for fleet hosts.** gitea is a container on **ana-docker** — git-SSH `10.250.50.70:222`, HTTP `:3000`. Fleet/colo hosts must use this internal route, NOT public `gitea.phasefinal.com` (`38.120.12.44`, ana-srv1) — the public path fail2bans the host egress IP and wedges webhook deploys. `:22` on `10.250.50.70` is ana-docker's HOST sshd, not gitea. Full gotcha in `docs/orientation.md` → Git/gitea. - **docker-as-root pattern** (for ops that have no admin API, e.g. `SqliteUserStore.set_bifrost_credentials`): on hosts where the SSH user is in the `docker` group but lacks passwordless sudo, run `docker run --rm -v :/wt -v /var/run/docker.sock:/var/run/docker.sock docker:cli sh -c "..."` to edit deploy-owned files without sudo. Documented with security warning in `servers/corviduo-dev/README.md`. docker-group membership is effectively root via bind-mount; treat as a sudo-equivalent grant. **Foot-gun: when running `docker compose` inside this sandbox, any relative path in compose.yaml (e.g. `${WORLDTREE_CONFIG_DIR:-./config}`) resolves against the sandbox CWD, but Docker daemon interprets the resulting path against the HOST filesystem. Always pass `-e VAR=/abs/path` to the docker run invocation for any relative-default config dir.** - **`scripts/elway` sudo handling** — elway prompts for the sudo password ONCE via `getpass` before the first `sudo: true` step. That prompt is interactive → elway can't run unattended from a non-TTY tool if any step needs sudo. For sudo-free playbooks (no `sudo: true` steps) it runs fully non-interactive over key SSH. To create root-owned dirs WITHOUT host sudo, use the docker-daemon-root trick: `docker run --rm -v /worktank:/mnt alpine sh -c 'mkdir -p /mnt/ && chown -R 1000:1000 /mnt/'`. ## Current state / in-flight _As of 2026-06-16:_ - **LitBench-RM stood up → now ON-DEMAND / DOWN.** `SAA-Lab/Llama8B-CreativeWritingVerifier` (R19 creative-quality reward judge for brokkr/Dvalin) served on irv-ml1 A6000 via vLLM `--runner pooling` (`http://10.100.79.3:8202/classify`, raw passage text → scalar). brokkr-validated (does NOT penalize explicit content). Taken DOWN to on-demand (operator) — resident it held ~19.6 GB crowding comfyui's A6000 slot; weights staged on irv-ml1, ~90s respin (command in auto-memory). (auto-memory `reference_litbench_rm_irv_ml1`) - **litellm gateway healthy; `strip_empty_tools` hook + `gateway-chat.html` shipped** (see Recent decisions). **arbo + brokkr litellm keys are already `all-proxy-models`** — verified, so "grant arbo/brokkr full access" was already done. claude-bot now has **admin on vh/arbo**; **arbo CI/CD Phase 1 is firing** (runner live; comfy-dev owns `deploy.yml`, fixed the change-detection in `9eb743a` — run #4 then failed-fast on their side, reading UI logs). - **ratatoskr Tier-3 MEMORY plane wired + live-smoke driven — persist+dispatch GREEN, recall-injection OPEN (handed off, OUT of loop per operator).** The missing server-side step was the per-PORT url-guard allowlist: added `10.100.10.50:8391` to personal's `BIFROST_CLIENT_ALLOWED_HOSTS` (affect `:8390` was already in; via `playbooks/wire-personal-worldtree-memory-allowlist.yaml`, c99aa49). Consumer key REUSED (plane-agnostic, no mint). Drove define→bind→persist(async `upsert_many` 200)→recall(`search` 200); ratatoskr's `memory.db` durable + 1024-dim indexed. **Promotion gate = a consumer agent defined WITH a `memory` block (`ctx.memory_config≠None`), NOT `agent_self_enabled`.** Cross-session recall-INJECTION root-caused to a SCORE-SHAPE seam: Worldtree's injector reads `score_breakdown.{similarity,salience}`, but ratatoskr's `search()` returns top-level `score` + `chunk.salience` (0.9, ≥0.85) → both gate-reads collapse to 0 → filtered AFTER a clean 200. Handed to worldtree-dev (#295 recall leg OPEN; their ADR-0009 wire-spec call — bifrost returns `score_breakdown`, or Worldtree reads existing fields). (auto-memory `reference_bifrost_plane_wiring`) — **[2026-06-16] FLIPPED →** worldtree-dev's re-triage + my `:8391`-log pull DISPROVED the score_breakdown-shape theory: the wire shape is FINE (Worldtree *synthesizes* `score_breakdown` from the `score`+`chunk.salience` ratatoskr emits). Real cause = the COLD cross-session recall sends `scope_filter` with an extra `agent_self` axis → ratatoskr's conjunctive INV-005 `_scope_matches` drops the `{end_user}`-only chunks → 0 hits. Now Worldtree-side, tracked **Worldtree #297**. (auto-memory `project_worldtree_295_recall_rootcause`) - **Worldtree demo + personal `character` model = mistral-small-4** (flipped from qwen3.6-35-a3b, 2026-06-16) — reordered `model_roles.yaml` `character.binds` mistral-first (first bind = default), qwen kept in the switch-allowlist; applied via pin-safe recreate, fresh-agent resolution verified. Backups `model_roles.yaml.bak-pre-mistral-character`. - **ana-ml2 GPU layout RESHAPED again (2026-06-15/16) — both cards now full with NVFP4 tenants.** **GPU 0 = Mistral Small 4** (`mistral-small-4` stack, `mistralai/Mistral-Small-4-119B-2603-NVFP4`, 119B/6.5B-active MoE, :8010, gateway `mistral-small-4` + `mistral-small-4-reasoning`@effort=high). Pinned **vLLM v0.22.0** — the LAST release with working Mistral *vision* (#44911 `fetch_images` regression breaks it on 0.22.1+/0.23.0). Serves the full native **256K context** (max-model-len 262144, max-num-seqs 32 — fits the tight card, ~5 GB free). Text + vision both work; reasoning via `reasoning_effort` (BINARY: none|high). Dedicated single-tenant; the operator's creative-writing model (abliteration planned → it succeeds llama-swap). **GPU 1 = qwen36 swapped FP8→NVFP4** (`nvidia/Qwen3.6-35B-A3B-NVFP4`, fp16 KV, util 0.34, :8007, gateway name `qwen3.6-35b-a3b` UNCHANGED + `-thinking` variant) — the ModelOpt NVFP4 MoE LOADS on 0.23.0 now (the 2026-06-14 "blocked" finding is RESOLVED). + **granite restored** (0.34/131072) + **Selene FP8 judge added** (`selene-1-mini-8b`, AtlaAI Selene-1-Mini-Llama-3.1-8B dynamic fp8, util 0.17, :8011, ctx 32768) + embed/rerank/reward. ~5.6 GB free. Prefix-caching ON on all 4 generative. **llama-swap is DOWN** (decommissioned from GPU 0 for Mistral; its qwen GGUF consumers migrated to the gateway). (auto-memory `reference_nvfp4_moe_loads_on_vllm_023`) - **arbo engine builds handed to comfy-dev; Gitea Actions runner LIVE on irv-ml1.** Operator approved comfy-dev owning arbo engine deploys (`deploy-engine.sh`, build-local). Runner = `irv-ml1-arbo` (act_runner v0.2.13, **host-executor as lkraven**, repo-scoped to vh/arbo, labels `self-hosted`+`irv-ml1`, systemd unit `act_runner.service`, polls the INTERNAL gitea route). comfy-dev to commit `.gitea/workflows/deploy.yml` — Phase 1 = engine-only auto-deploy (catalog stays on the :9009 webhook), Phase 2 catalog cutover later. infra-ops = box-level escalation only (runner, the `package:write` PAT once corviduo-org exists, webhook, the arbo-deploy.sh HEAD-baseline restart-detection bug still open). - **claude-bot Gitea service account STOOD UP** (credential-migration foundation) — user id=3, non-admin/scoped, token `arbo-ci`=write:package+read:repository, creds at `~/.config/claude-bot/{gitea-password,gitea-token}` (mode 600). Registry-push DEFERRED: vh is a USER not an org, so Gitea won't grant a scoped service account package-write to `vh/*`. (auto-memory `project_migrate_infra_access_to_claude_credentials`) - **Worldtree demo + personal MIGRATED to v0.35.10 capability-named profiles** — persona substrate moved qwen→Mistral (profiles `dialogue`/`classification`→ mistral-small-4, `deep-reasoning`→mistral-small-4-reasoning), Domari→selene; qwen heretic/heavy retired. Both green. The win: future model swaps (the abliterated Mistral) are now bind-mount-only `providers.yaml` edits — no image/agent/coupling. - **R18 clip+caption auto-assist models STAGED on ana-ml2** (brokkr/Eitri) — WhisperX + PANNs CNN14_DecisionLevelAtt + Qwen3-Omni-30B-A3B-Captioner at Eitri's `/srv/r18-clip-caption` path contract (symlink → /tank; dedicated `r18clip` user, `workspaces/` 0700). Stub-level offline smoke PASSED (lo-only netns); Eitri closed the scaffold deliverable. AWAITING: Eitri/brokkr's concrete model runners (replace the deterministic stubs) → re-smoke the real path; AND the **hard real-voice gate** — no real victim voice through the shared-box captioner until ephemeral-(b) controls (in-VRAM-only, no shared-disk persistence, access-logged + auditd stood up) are built AND explicitly confirmed to brokkr. (auto-memory `project-r18-clip-caption-staging`) - **MastMed prototype LIVE + public** — gated static-SPA container on ana-docker:8089 (caddy `basic_auth`, user `mastmed`) fronted by a cloudflared **quick tunnel** (ephemeral `*.trycloudflare.com` — dies on tunnel-container restart → new URL). Swap to a named tunnel (operator's scoped CF token + hostname) for a stable URL anytime; container + auth unchanged. - **comfyui (irv-ml1) VAE-decode SEGFAULT — RESOLVED 2026-06-15.** Root cause was `comfy_aimdo`'s cudaMalloc hooks conflicting with ComfyUI's load-bearing `--disable-cuda-malloc`: with the optimized backend disabled (cu129`. (auto-memory `feedback_compose_up_recreates_whole_stack`) - `[2026-06-15]` **A comfyui restart-loop with `exit 0` + `OOMKilled=false` is NOT OOM — suspect a native SEGFAULT.** `docker inspect` shows only the LAST exit code; a GPU OOM is a catchable `RuntimeError: CUDA out of memory`, NEVER `Fatal Python error: Segmentation fault`. Diagnostic: `RestartCount>0` = same container restarted in-place → the docker json-log ACCUMULATES across all cycles, so grep the full `docker logs` for the crash signature + the lines right before each restart banner. comfyui's was at VAE decode (sampling completes, then segfault loading `AutoencodingEngine`) — gen-triggered but native, not VRAM. Suspects logged: torch/cu130 mismatch, an injected `aimdo` cuda-funchooks lib, the VAE. - `[2026-06-15]` **NEVER blanket-kill `althing-light-monitor` by PID** — they're per-handle and MANY agents run their own on the shared nh3-dev box (heid / ratatoskr-dev / worldtree-dev / bifrost-dev each have one). A `kill $(pgrep -f light-monitor)` downs four peers' monitors (near-miss caught by checking `/proc//environ` `ALTHING_HANDLE` + cwd first). Recover your OWN via `althing-cli stop-monitor` (v0.14.1+); a raw `&`-backgrounded monitor is untracked (no harness fire-notification) — always arm via `run_in_background`. (extends the pkill-self-match lesson below) - `[2026-06-15]` **Manual `docker compose up` on corviduo Worldtree DOWNGRADES to a stale local `:latest` → crash-loop (config/image mismatch).** Compose `image:` is `…/worldtree:latest`, but local `:latest` lagged ~2wk (`21c90d5eeb2d`); CI/CD deploys NEWER SHA images, and a real pull 401s (daemon has no gitea-registry creds — that's CI/CD's). `--pull never` then used the stale latest → personal crash-looped on `ConfigurationError: echo.default_model missing` → **~2-3 min personal outage**. RECOVER: retag `:latest` to the image a HEALTHY SIBLING runs (`docker inspect worldtree-worldtree-api-1 --format '{{.Image}}'` → `docker tag …`), then `up -d --pull never`; verify `Application startup complete`. Don't manually recreate Worldtree on corviduo without pinning the correct image — image+config are CI/CD-coupled. (auto-memory `reference_corviduo_dev_emergency_ops`) - `[2026-06-15]` **`.claude.json` (Claude Code config) truncates on ENOSPC → invalid JSON → CC resets to defaults on next start.** nh3-dev hit 100% disk (a peer's R19 dataset pull staged ~147G to local /home instead of the 7TB NAS); the in-flight `.claude.json` write was cut mid-key. Repair = strip the dangling token + close the open braces, validate `json.load`. CC keeps its OWN rolling backups at `~/.claude/backups/` + writes a `.claude.json.corrupted.*` snapshot when it self-detects. After ANY ENOSPC on a box running CC/agents: integrity-check `.claude.json` (json.load) AND the althing bus DB (`PRAGMA integrity_check`). - `[2026-06-15]` **`pkill -f althing-light-monitor` SELF-MATCHES the killing shell** (the pattern is in the command's own argv) → kills itself mid-run (exit 144/truncated output). Stop the light-monitor via `althing-cli stop-monitor` or a captured PID — never `pkill -f `. The singleton lock can also RACE to 2 live monitors during re-arm churn; keep exactly one tracked (run_in_background) monitor, and a raw `&` monitor is untracked (no harness fire-notification — don't use it). - `[2026-06-14]` **vLLM ModelOpt-NVFP4-MoE loader is broken for current multimodal MoEs.** `nvidia/Qwen3.6-35B-A3B-NVFP4` fails weight-load: `KeyError: layers.0.mlp.experts.w2_input_scale` on 0.19.1, `lm_head.input_scale not registered` on 0.22.0 (vllm #44081); same class hits Gemma-4 MoE / Qwen3-30B-A3B NVFP4. The arch + quant ARE recognized (gets past arch resolution + vision-processor load) — it's the per-expert/lm_head scale-key mapping. Don't chase nightlies; use official FP8 until fixed. - `[2026-06-14]` **vLLM sampler-warmup OOMs on a shared GPU even when weights fit** — it warms the sampler with `max_num_seqs` (default **1024**) dummy requests, and a big vocab (Qwen3.6 = 248K) makes that a huge transient logits tensor. A vision endpoint doesn't need 1024-way concurrency: set `--max-num-seqs 32`. Separately, post-load `ValueError: No available memory for the cache blocks` means util is too thin (weights+activation+graph ate it) — for 34 GB FP8 weights, util ≥ ~0.45 to leave KV room. - `[2026-06-14]` **Recreating multiple vLLM services concurrently races the memory-profiling assertion** — `AssertionError: Error in memory profiling. Initial free memory X / current Y … other processes … release GPU memory while vLLM is profiling`. Recreate co-tenant vLLM services ONE AT A TIME (force-recreate one, wait healthy, next). - `[2026-06-14]` **embed/rerank (0.6B) at util 0.05 reserve ~5.5 GB each — mostly util-reservation WASTE, not need.** A 0.6B model needs ~1.2 GB weights + ~2.5 GB CUDA/torch context; util 0.03 (~3.6 GB) fits with room, reclaiming ~4 GB (vLLM reserves the util fraction regardless of actual KV; embedding models barely use KV). Real-need floor ~3 GB — don't go to 0.02. - `[2026-06-14]` **Fleet/colo hosts must reach gitea over the INTERNAL route, NOT the public IP.** `gitea.phasefinal.com` = public `38.120.12.44` (ana-srv1); gitea is a container on ana-docker, git-SSH `10.250.50.70:222` + HTTP `:3000`. A fleet host egressing to public `:22` gets fail2ban-banned after any retrying git loop → silently wedges webhook auto-deploys (`git fetch` times out under `set -euo pipefail`, aborts before reset). Bit irv-ml1's arbo deploy. `:22` on `10.250.50.70` is ana-docker's HOST sshd (deploy key → Permission denied), NOT gitea. Documented `docs/orientation.md` (`6e58e57`). - `[2026-06-14]` **Chatterbox-Turbo decode-knob foot-guns** (R16 v1-polish + emergent probes): the turbo length cap is `max_gen_len` (default 1000) on `t3.inference_turbo`, NOT `max_new_tokens` — and `tts_turbo.generate` does NOT forward it (wrap inference_turbo to cap). `rep_pen 2.0 / temp 0.5` BACKFIRES (degenerate 24 s run-on). Soft decode tamers cut the NVV ITSELF, not just the run-on tail (operator: "p1 trims the moaning too") — gen-time polish can't beat v1's defaults. Inline base-NVV tokens DEGENERATE (moan-cascade + gibberish), they don't modulate the surrounding words. _65 older entries archived to archival-memory.md._