From 39de9586a0cc318721d2b404a9cf39004e794ef9 Mon Sep 17 00:00:00 2001 From: Christian Gunderman Date: Fri, 1 May 2026 14:37:19 -0700 Subject: [PATCH] feat(bot): increase loop iterations and enforce memory of failures --- .github/workflows/gemini-cli-bot-brain.yml | 6 +++--- tools/gemini-cli-bot/brain/metrics.md | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/gemini-cli-bot-brain.yml b/.github/workflows/gemini-cli-bot-brain.yml index a11aa3ee09..b731798ca0 100644 --- a/.github/workflows/gemini-cli-bot-brain.yml +++ b/.github/workflows/gemini-cli-bot-brain.yml @@ -151,10 +151,10 @@ jobs: gh issue view "$TRIGGER_ISSUE_NUMBER" >> trigger_context.md 2>/dev/null || gh pr view "$TRIGGER_ISSUE_NUMBER" >> trigger_context.md echo "" >> trigger_context.md fi - - MAX_ITERATIONS=2 + + MAX_ITERATIONS=4 ITERATION=1 - + while [ $ITERATION -le $MAX_ITERATIONS ]; do echo "========================================" echo "Starting Iteration $ITERATION" diff --git a/tools/gemini-cli-bot/brain/metrics.md b/tools/gemini-cli-bot/brain/metrics.md index c3d72c1c46..17319f9943 100644 --- a/tools/gemini-cli-bot/brain/metrics.md +++ b/tools/gemini-cli-bot/brain/metrics.md @@ -33,7 +33,9 @@ synchronize with previous sessions: 3. **Update Ledger Status**: - If an active PR has been merged, mark it `DONE`. - If it was rejected or closed, mark it `FAILED` and investigate the reason - (CI logs or system errors) to inform your next hypothesis. + (CI logs, system errors, or critique feedback) to inform your next + hypothesis. **Crucially, you MUST record the specific reasons for failure + in the Decision Log so future runs do not repeat the same mistakes.** - **Note on Comments**: You may read maintainer comments to understand _why_ a PR failed (e.g., "this logic is flawed"), but you must formulate your own technical fix based on repository evidence, not by following the