I Gave My Git History to a Free AI Bot. It Broke 7 Times in 3 Days
说明与用途
使用免费 LLM 机器人自动化 nightly Git 日志摘要导致 3 天内出现 7 次失败。通过增加超时、截断输入、解析 JSON、限制内存等修复后,机器人稳定运行。
问题
Automating nightly Git log summaries with a free AI bot caused repeated failures due to timeouts, rate limits, memory limits, and parsing issues.
结果
After seven iterations, the bot runs reliably, respecting free tier limits and handling edge cases, producing accurate daily commit summaries for Slack.
工作流
- 1. Schedule cron at 23:00 to run summarize.py
- 2. Retrieve last 20 commits via git log
- 3. Send commits to LLM with system prompt
- 4. Receive JSON summary, strip code fences, parse JSON
- 5. Post summary to Slack webhook
- 6. Monitor usage dashboard and adjust input size
- 7. Apply retry, timeout, and memory limits to avoid failures
证据
The first run died after 60 seconds.
openai.RateLimitError: Error code: 429 - quota exceeded
The process vanished. No error in the log. Just a Killed line.
- 记录日期: 2026-09-05T14:14:20.665Z