fix(ci): prevent infinite hangs in bot reasoning workflow

- Added a 60 minute timeout to the Reasoning job in the workflow.
- Updated the issue-fixer skill to instruct the bot to wrap 'npm run preflight' with the linux 'timeout' utility to prevent infinite loops from hanging the entire LLM agent.
This commit is contained in:
Christian Gunderman
2026-05-13 17:15:50 -07:00
parent 83d15895f1
commit 9b3fef4f68
2 changed files with 3 additions and 2 deletions
@@ -46,6 +46,7 @@ jobs:
reasoning:
name: 'Brain (Reasoning Layer)'
runs-on: 'ubuntu-latest'
timeout-minutes: 60
if: |
github.repository == 'google-gemini/gemini-cli' && (
github.event_name == 'schedule' ||
@@ -16,7 +16,7 @@ maintain existing PRs to reduce the repository backlog.
2. **Discovery**: Find open issues labeled `effort/small`. Prioritize those with clear reproduction steps. You are STRICTLY FORBIDDEN from using local commands (e.g., `npm run lint`, `npm run typecheck`, or grepping for TODOs) to find new work.
3. **Autonomous Implementation**: You are responsible for the entire fix: research, code changes, and test verification.
4. **Surgical Precision**: Changes must be minimal and strictly focused on the identified issue. Avoid "drive-by" refactoring.
5. **Local Verification**: You MUST run `npm run preflight` locally and iterate on any failures before finalizing your PR. Local commands are for VERIFICATION ONLY, never for discovery.
5. **Local Verification**: You MUST run `timeout 10m npm run preflight` locally and iterate on any failures before finalizing your PR. Local commands are for VERIFICATION ONLY, never for discovery.
6. **Expert Mentions**: Identify the domain expert for the affected files and CC them in the PR description.
7. **Focused Contributions**: Limit your active PRs to ~10 at a time. Try to complete existing PRs before opening new ones. If a maintainer closes a PR, that may be an indication that they are rejecting the fix.
@@ -28,5 +28,5 @@ maintain existing PRs to reduce the repository backlog.
2. **Search for Candidates**: If no PRs need attention, search for `effort/small` issues: `gh issue list --label "effort/small" --limit 10 --json number,title,url`.
- **CRITICAL**: `gh issue list` is your ONLY source for new tasks. If `gh` fails, you MUST diagnose the environment or abort the discovery phase. You are STRICTLY FORBIDDEN from using `google_web_search` to query GitHub, as it indexes closed issues. Do NOT run local discovery commands (e.g., `npm run lint`, `npm run typecheck`) to look for "easy fixes".
3. **Select ONE Issue** and implement a fix on a new branch.
4. **Verify** via `npm run preflight`.
4. **Verify**: You MUST run `timeout 10m npm run preflight` to verify. Wrapping test commands in `timeout` is mandatory to prevent hanging the CI environment if your changes introduce an infinite loop.
5. **Use the `prs` Skill** to stage changes and prepare the draft PR (labels: `bot-fix`, `issue-fixer`).