Skip to content

Comments

t1189: Fix AI actions pipeline empty-response handling to prevent rc=1 cascade#1807

Merged
marcusquinn merged 1 commit intomainfrom
feature/t1189
Feb 18, 2026
Merged

t1189: Fix AI actions pipeline empty-response handling to prevent rc=1 cascade#1807
marcusquinn merged 1 commit intomainfrom
feature/t1189

Conversation

@marcusquinn
Copy link
Owner

Summary

  • Treat empty/non-JSON AI model responses as an empty action plan [] rather than a pipeline error
  • Both ai-reason.sh and ai-actions.sh now return rc=0 with executed=0 when the AI response is unparseable
  • A log_warn is still emitted so the issue remains visible in logs without causing false-positive pipeline errors

Root Cause

When the AI model returns plain text or an empty response (observed 6+ times on 2026-02-18 between 15:53-19:15), extract_action_plan returns empty, causing run_ai_reasoning to return rc=1. This propagated through run_ai_actions_pipeline as a pipeline error, generating noise in self-reflection analysis.

Changes

  • ai-reason.sh: Unparseable AI response now outputs [] + return 0 (was {"error":"no_action_plan",...} + return 1)
  • ai-actions.sh: Non-array plan_type (including empty string from failed jq parse) now outputs {"executed":0,...} + return 0 (was {"error":"invalid_plan_type",...} + return 1)
  • tests/test-ai-supervisor-e2e.sh: Added Test 2.3b verifying pipeline returns rc=0 with executed=0 when AI returns non-JSON text

Verification

bash tests/test-ai-supervisor-e2e.sh  # 36 passed, 0 failed
bash tests/test-ai-actions.sh         # 16/17 passed (pre-existing unrelated failure)
shellcheck -x -S warning ai-reason.sh ai-actions.sh  # 0 violations

Ref #1798

@gemini-code-assist
Copy link

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 18, 2026

Warning

Rate limit exceeded

@marcusquinn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 22 minutes and 19 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/t1189

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

When the AI model returns an empty or non-parseable response, the pipeline
previously returned rc=1 causing false-positive errors in the pulse cycle.
This occurred 6+ times on 2026-02-18 between 15:53-19:15.

Changes:
- ai-reason.sh: unparseable AI response now returns [] + rc=0 (was error + rc=1)
- ai-actions.sh: non-array plan_type now returns empty result + rc=0 (was rc=1)
- Both paths log a warning so the issue is still visible in logs
- Added test 2.3b to verify pipeline rc=0 on non-JSON AI response

Chose to treat non-JSON as 'no actions' rather than error — matches existing
empty-response handling at line 272 and aligns with t1182 precedent.
@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 27 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Wed Feb 18 22:13:02 UTC 2026: Code review monitoring started
Wed Feb 18 22:13:02 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 27

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 27
  • VULNERABILITIES: 0

Generated on: Wed Feb 18 22:13:05 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

@marcusquinn marcusquinn merged commit 2a0b472 into main Feb 18, 2026
11 checks passed
@marcusquinn marcusquinn deleted the feature/t1189 branch February 18, 2026 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant