Nine Bugs That Taught Me Reliability: Post-Mortem of a Zero-Cost Hybrid AI System
Описание и применение
Система AI‑агента, работающая на бесплатных виртуальных машинах, столкнулась с девятью критическими ошибками, которые выявили важность разделения конфигурации от кода, согласования версий, правильных индексов SQLite, стабильной идентификации записей в двунаправленном синхронизаторе и асинхронной обработки тяжёлых задач.
Задача
A zero‑budget hybrid local+cloud AI agent must never regress production while operating under free tier constraints.
Результат
Implemented a robust, zero‑cost hybrid AI agent that reliably runs daily tasks without regressions, by separating configuration from code, aligning runtimes, correcting database constraints, stabilizing sync identity, and decoupling heavy work from request paths.
Рабочий процесс
- Deploy code without overwriting real credentials by using .env files
- Source .env in cron commands
- Ensure Python runtime parity across local and cloud nodes
- Replace partial SQLite index with a full unique index
- Preserve original origin IDs and skip re‑exporting local records
- Move re‑embedding to a background task and return immediately from the sync endpoint
Доказательства
Credentials were living in source. "Deploy the latest code" therefore also meant "overwrite the real keys with placeholders."
The cron entry invoked python directly without sourcing .env first.
An f-string containing a backslash. Python 3.12 relaxed the f-string grammar and accepts it; 3.11 does not.
SQLite will not use a partial index as an upsert conflict arbiter.
On each export, records were re‑namespaced… identity changed every round‑trip.
Re‑embedding a few hundred chunks on a CPU‑only, memory‑starved box takes real wall‑clock time…
- Дата записи: 2026-10-07T04:56:04.827Z