t1185: Fix AI Actions Pipeline 'expected array, got empty' parsing error#1802
t1185: Fix AI Actions Pipeline 'expected array, got empty' parsing error#1802marcusquinn wants to merge 1 commit intomainfrom
Conversation
- Add whitespace-only check before empty check in run_ai_actions_pipeline to catch responses that are all whitespace but not empty string - Add ANSI-strip recovery in array type check: if jq 'type' fails on action_plan, strip ANSI codes and retry before giving up — recovers arrays that were contaminated by opencode --format default output - Enhance debug logging: add hex dump of first 32 bytes alongside head/len to diagnose future parse failures (t1182/t1185) The ai-reason.sh already has ANSI stripping (t1182) but the pipeline adds a second layer of defence in case any ANSI codes slip through. Root cause: concurrent pulse runs can bypass the lock file race window, both call opencode, and the deployed version lacked ANSI stripping.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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)
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. Comment |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Wed Feb 18 21:41:39 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|



Fix AI Actions Pipeline 'expected array, got empty' parsing error.
Changes
jq 'type'fails on the action plan, strip ANSI escape codes and retry before giving upRoot Cause
The error
'expected array, got '(empty plan_type) occurs whenjq 'type'fails on the action plan returned byrun_ai_reasoning. This happens when:--format default)extract_action_planfails all parse attempts and returns emptyrun_ai_reasoningreturns rc=1 with error object — but in some cases ANSI-contaminated content slips throughThe
ai-reason.shalready has ANSI stripping (t1182). This PR adds a second layer of defence inrun_ai_actions_pipelineitself.Fixes
extract_action_plan(Try 2-5 in ai-reason.sh, t1182)Ref #1793