Curso visual · 4 lições

Appfy.local
rápido sem “limpeza mágica”

Como distinguir RAM saudável de churn de serviços, replicar o CLIProxyAPI com segurança e provar estabilidade.

How to distinguish healthy RAM from service churn, replicate CLIProxyAPI safely, and prove stability.

Memória livre
78%
na prova finalin the final proof
Swap
0 MB
sem paginaçãono paging
Modelos em paridade
13
configuração idênticaidentical configuration

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.

memory_pressureswapusageprocess churnproof
Sinal / SignalEstado / StateDecisão / Decision
Memory free81%Não purgar / Do not purge
Swap0 MBNão alterar / Do not alter
Watchdog runs28.964Pausar / 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.

60 s timermissing model4033 restarts
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.

t=0 ✓t=65 ✓t=130 ✓

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 configSHA paritylocal.cliproxyapi.mainHTTP 200 + chat
~/.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