Files
LLM-Server/docs/research/ponytail-audit-2026-09-09.md
T

65 lines
3.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Ponytail audit — repo-wide over-engineering scan, 2026-09-09
Whole-tree audit (ponytail-audit skill), not a diff review. The only real
code in this repo is `scripts/update.sh` (253L) and `scripts/switch-model.sh`
(50L), plus `docker-compose.yml` and `.env.example`; the rest is docs.
`switch-model.sh` and the compose comments (ROCm GID workarounds,
`GPU_MAX_HW_QUEUES` rationale, lazytainer label placement) are load-bearing
and lean — left alone. Scope: over-engineering and complexity only;
correctness/security/performance out of scope. Findings ranked biggest cut
first. One-shot report — nothing was applied.
## Findings
1. **`delete:` the `downloader-fast` line — it references a service removed
in `5d6a17f` ("feat: remove llama-server-fast") and no longer exists in
`docker-compose.yml`.** Under `set -euo pipefail`,
`docker compose run downloader-fast` errors on the unknown service and
**aborts every `update.sh` run** right after config sync, before omniroute
comes up. Dead code that also breaks the mandatory deploy flow.
*Remove the line.* [scripts/update.sh:235]
2. **`delete:` the entire gum path — `ensure_gum()` (~27L, L5985), the
`GUM_VERSION`/`GUM_DIR`/`GUM_BIN` vars (L5658), the vendored
`scripts/vendor/gum_0.14.5_Linux_x86_64.tar.gz` (4.4MB checked into git),
the download fallback, and the `if [ -n "$gum_bin" ]` branch (L123,
L127130).** The plain-bash fallback (L131148) already makes the
*identical* decision (which keys take the new value) whenever gum is
absent; the gum TUI is a speculative nicer prompt on top of a working
path. ~4.4MB in git + arch detection + a `.cache/gum` layer, all to
prettify a rare interactive conflict. *Replacement: nothing — always use
the plain-bash one-screen prompt.* [scripts/update.sh, scripts/vendor/]
3. **`delete:` stale `llama-server-fast` / `fastModel` references — the fast
model was removed but the docs still describe a two-model Qwen Code
setup.** `.env.example:98` comment still lists it;
`docs/coding-cli-setup/index.md:32` says "2 models: chat + `fastModel`";
and `docs/coding-cli-setup/qwen-code.md` carries a whole fast-model
section (11 refs: the `fastModel` config block, `LLAMA_FAST_CTX_SIZE`
notes, Qwen3-4B). *Rewrite to single-model.* [docs/coding-cli-setup/
qwen-code.md, index.md, .env.example:98]
4. **`shrink:` the 3× repeated `test -f … || curl …` blocks in
`downloader-comfyui` (YAML L8599, ~15 lines) → a `for` loop over the 3
model files (~5 lines).** *Low confidence:* the env var names are
non-uniform (`COMFYUI_DIFFUSION_MODEL_FILE` / `TEXT_ENCODER_FILE` /
`VAE_FILE`), so the loop needs a small `case` — marginal win, and it
matches the house "one-off downloader" style. [docker-compose.yml]
5. **`yagni:` (verify-first) qdrant + neo4j run with no consumer in the
stack yet** — added ahead of the RAG app via the `feat-rag-databases`
merge; nothing writes to them. Two always-on DBs for a feature that
isn't wired. *Confirm the RAG consumer is still on the roadmap before
keeping both; the compose comment already concedes neo4j "can absorb
qdrant's job later."* Low confidence — deliberate tracked decision, and
cheap to leave running. [docker-compose.yml]
## Net
`net: -45 lines script/compose (+~15 stale doc lines), -1 dep (gum, 4.4MB
vendored binary) possible.`
No out-of-scope (correctness/security/performance) findings. #1 is the one
to fix first — it's not just bloat, it's the deploy script halting on every
run.