Skip to content

fix: detect silent failures in gemini-cli by checking for invalid JSO… - #406

Merged
MJjainam merged 1 commit into
google-github-actions:mainfrom
megha1188:main
Dec 3, 2025
Merged

MJjainam merged 1 commit into
google-github-actions:mainfrom
megha1188:main

Conversation

@megha1188

@megha1188 megha1188 commented Dec 3, 2025 •

Copy link
Copy Markdown
Contributor

I have updated the run-gemini-cli action to detect silent failures where the gemini CLI command produces no output (or invalid JSON) but exits with success (0). This typically happens when API resource limits are exceeded in non-interactive mode.

Verification Results
Automated Verification
I created a reproduction script >_reproduce_issue.sh that tested two scenarios:

  1. Success Case: gemini exits with 0, produces valid JSON stdout, and empty stderr. -> PASSED (Action succeeded)
  2. Failure Case: gemini exits with 0, produces empty stdout, and empty stderr. -> PASSED (Action failed as expected)

This confirms that the action now correctly catches the silent failure mode without introducing false positives for normal success cases where stderr is empty.

Fixes #1088

@MJjainam
MJjainam merged commit ad893a2 into google-github-actions:main Dec 3, 2025
21 checks passed
parthasaradhie pushed a commit that referenced this pull request Dec 16, 2025
## What's Changed
* fix #371 use JSON output of gemini cli by @gsehgal in
#402
* fix: detect silent failures in gemini-cli by checking for invalid JSO…
by @megha1188 in
#406
* chore: Add Prettier and pre-commit hook for consistent formatting,
applying initial format fixes across documentation and examples. by
@parthasaradhie in
#409
* Rename `DEBUG` input to `GEMINI_DEBUG` and pass `--debug` flag to CLI.
by @parthasaradhie in
#407
* ci: auto update GitHub Actions using dependabot by @JamBalaya56562 in
#398
* Add job summary for Gemini CLI execution by @megha1188 in
#423

## New Contributors
* @megha1188 made their first contribution in
#406
* @parthasaradhie made their first contribution in
#409

**Full Changelog**:
v0.1.16...v0.1.17
parthasaradhie added a commit to parthasaradhie/run-gemini-cli that referenced this pull request Dec 16, 2025
parthasaradhie added a commit that referenced this pull request Dec 16, 2025
…alid JSON (#406)" (#426)

This reverts commit ad893a2.
Reverting this as its breaking v0.1.17 build
<!--
Thank you for proposing a pull request! Please note that SOME TESTS WILL
LIKELY FAIL due to how GitHub exposes secrets in Pull Requests from
forks.
Someone from the team will review your Pull Request and respond.

Please describe your change and any implementation details below.
-->
google-github-actions-bot added a commit that referenced this pull request Dec 16, 2025
## What's Changed
* Revert "fix: detect silent failures in gemini-cli by checking for
invalid JSON (#406)" by @parthasaradhie in
#426


**Full Changelog**:
v0.1.17...v0.2.0

---------

Signed-off-by: partha saradhi <[email protected]>
Co-authored-by: partha saradhi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants