Lição 1 · Diagnóstico / Lesson 1 · Diagnosis
RAM livre não é um número isolado
O limite real é pressão de memória, swap e throttling. No Appfy: 16 GB instalados, 76–81% livres, swap zero e nenhuma página throttled. RAM não era o gargalo.
Free RAM is not an isolated number
The real boundary is memory pressure, swap, and throttling. Appfy had 16 GB installed, 76–81% free, zero swap, and no throttled pages. RAM was not the bottleneck.
| Sinal / Signal | Estado / State | Decisão / Decision |
|---|---|---|
| Memory free | 81% | Não purgar / Do not purge |
| Swap | 0 MB | Não alterar / Do not alter |
| Watchdog runs | 28.964 | Pausar / Disable |
Lição 2 · Causa raiz / Lesson 2 · Root cause
Um watchdog quebrado criava churn a cada minuto
O watchdog exigia qwen3.7-max. O modelo não estava disponível e o endpoint devolvia HTTP 403. O script então reiniciava CLIProxyAPI, warp-compat e o proxy HTTPS.
A broken watchdog created churn every minute
The watchdog required qwen3.7-max. The model was unavailable and the endpoint returned HTTP 403. The script then restarted CLIProxyAPI, warp-compat, and the HTTPS proxy.
launchctl disable "gui/$UID/local.cliproxyapi.warp-watchdog" launchctl bootout "gui/$UID" ~/Library/LaunchAgents/local.cliproxyapi.warp-watchdog.plist
Regra: pausar o detector defeituoso, não os serviços úteis.
Rule: disable the faulty detector, not the useful services.
Lição 3 · Prova / Lesson 3 · Proof
Estabilidade exige tempo e identidade
Foram coletadas amostras em 0, 65 e 130 segundos. Os PIDs permaneceram idênticos, o log não cresceu, os endpoints responderam e a memória ficou verde.
Stability requires time and identity
Samples were collected at 0, 65, and 130 seconds. PIDs stayed identical, the log did not grow, endpoints responded, and memory stayed green.
Quick check / Teste rápido
Lição 4 · Paridade durável / Lesson 4 · Durable parity
Copiar configuração não basta
O Mac mini recebeu o mesmo binário 7.2.50-local, credenciais, política e 13 modelos da máquina principal. Para impedir regressão pelo Homebrew, o runtime foi fixado fora da Cellar e iniciado por um LaunchAgent próprio.
Copying configuration is not enough
The Mac mini received the same 7.2.50-local binary, credentials, policy, and 13 models as the primary machine. To prevent Homebrew regression, the runtime was pinned outside the Cellar and started by an independent LaunchAgent.
~/.local/bin/cliproxyapi-7.2.50-local ~/Library/LaunchAgents/local.cliproxyapi.main.plist # 8317: 13 models · 8318/8321: 7 compatibility models
Proof Gate: três portas HTTP 200, chat real APPFY_FINAL_OK, PID estável e swap zero.
Proof Gate: three ports returned HTTP 200, real chat returned APPFY_FINAL_OK, stable PID, and zero swap.
Checklist operacional
- Watchdog disabled
- Independent runtime and LaunchAgent
- Stable PIDs beyond the old 60 s restart cycle
- Authenticated endpoints return HTTP 200
- Memory pressure green
- Swap zero
- Do not delete tool caches for a RAM problem