feat: implement retry loop for LLM API failures in community labeling#1312
feat: implement retry loop for LLM API failures in community labeling#1312matiasduartee wants to merge 7 commits into
Conversation
…ills/ instead of ~/.agents/ or ~/.gemini/skills/
…usively use global config path
|
Testing Results on Real-World Repositories To ensure the robustness of this PR, I ran the updated fork locally against three medium-to-large private enterprise repositories (ranging from backend APIs to frontend systems). The retry logic behaved exactly as expected across all scenarios. Test Subjects:
Behavior Observed (Stress Testing): With the new exponential backoff retry loop, we got this exact terminal output: [graphify label] batch 2/2 attempt 1 failed: Error code: 429. Retrying in 2s... [graphify label] warning: community labeling failed (Error code: 429); using Community N placeholders. The system gracefully handled multiple transient errors across different batches, backed off exponentially, and safely degraded to placeholders when the hard limit was hit without crashing the graph generation. The graph.json and graph.html were successfully generated. The fix is robust and production-ready! |
This PR adds a retry mechanism with exponential backoff to \label_communities\ to gracefully handle transient network errors, timeouts, or API rate limits, preventing entire batches of communities from being dropped silently.