Parent issue
#145
Problem
When Claude hits a rate limit during a review run, the workflow is designed to fall back to the Gemini engine. In run #715 this fallback silently failed:
##[warning]Claude rate limit hit but Gemini fallback unavailable
(CLI not installed or GOOGLE_API_KEY missing) — falling through to Copilot
The warning is emitted and the session continues to the Copilot engine, but:
- There is no validation step at workflow startup confirming Gemini is reachable.
- The
GOOGLE_API_KEY secret is not set (or not forwarded) in the runner environment, so every Claude exhaustion event silently skips Gemini and goes straight to Copilot — which may also be rate-limited (as happened here).
- Operators have no early signal that the Gemini buffer is non-functional.
Acceptance criteria
- Pre-flight check: at workflow startup (before processing any PR), the script validates that the Gemini fallback is configured (CLI present +
GOOGLE_API_KEY non-empty). If not, emit a ##[warning] and continue, but record the degraded state.
- Job summary: the run summary clearly states whether each engine (Claude / Gemini / Copilot) was available at startup.
- Secret documented:
GOOGLE_API_KEY is added to the workflow's env block (or secrets) with a comment explaining its role. Repo/org secret must be configured.
- No silent skip: if Gemini CLI is missing, the warning must include the exact install command so operators can fix it without reading docs.
- Existing behaviour when Gemini IS available is unchanged.
Expected tests
- Unit (bash/bats or shellcheck):
validate_engines() helper returns correct degraded-state flag when GOOGLE_API_KEY is unset.
- Unit:
validate_engines() returns healthy when CLI is present and key is set.
- Integration (dry-run): workflow invoked with
GOOGLE_API_KEY unset emits the expected ##[warning] line in job output.
- Integration (dry-run): job summary lists
gemini: unavailable when key is absent and gemini: ok when present.
Parent issue
#145
Problem
When Claude hits a rate limit during a review run, the workflow is designed to fall back to the Gemini engine. In run #715 this fallback silently failed:
The warning is emitted and the session continues to the Copilot engine, but:
GOOGLE_API_KEYsecret is not set (or not forwarded) in the runner environment, so every Claude exhaustion event silently skips Gemini and goes straight to Copilot — which may also be rate-limited (as happened here).Acceptance criteria
GOOGLE_API_KEYnon-empty). If not, emit a##[warning]and continue, but record the degraded state.GOOGLE_API_KEYis added to the workflow'senvblock (orsecrets) with a comment explaining its role. Repo/org secret must be configured.Expected tests
validate_engines()helper returns correct degraded-state flag whenGOOGLE_API_KEYis unset.validate_engines()returns healthy when CLI is present and key is set.GOOGLE_API_KEYunset emits the expected##[warning]line in job output.gemini: unavailablewhen key is absent andgemini: okwhen present.