Skip to content

Comments

t1201: Fix AI supervisor pipeline 'expected array' parsing errors#1829

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

t1201: Fix AI supervisor pipeline 'expected array' parsing errors#1829
marcusquinn merged 1 commit intomainfrom
feature/t1201

Conversation

@marcusquinn
Copy link
Owner

Fix AI supervisor pipeline 'expected array' parsing errors.

Changes

  • ai-actions.sh: Make new_priority required in adjust_priority validation (t1126, t1201). Previously optional with executor inference — tests from t1126 expected it required. Fixes regression from t1187. Invalid values (e.g. 'urgent') are also rejected.

  • ai-reason.sh: Replace full-prompt retry with simplified JSON-only prompt (t1201). When first AI call returns empty/unparseable output, retry with stripped-down prompt explicitly reinforcing 'respond with ONLY a JSON array, no markdown fencing'.

  • ai-reason.sh: Fix single-line array extraction in Try 4 (t1201). Bracket-based fallback parser failed to extract single-line JSON arrays like [{...}] embedded in preamble text. Added Try 4a using grep before multi-line awk fallback.

  • tests/test-ai-actions.sh: Add tests 18 and 19. All 19 tests pass, ShellCheck zero violations.

Root Cause

The 8 consecutive 'expected array, got ' errors (15:53-19:15) were caused by the AI model returning empty responses. The existing retry logic repeated the same 15KB+ prompt that caused the failure. The simplified retry prompt is more likely to recover from model confusion.

Verification

  • All 19 unit tests pass
  • All 36 e2e tests pass (3 skipped — require --live flag)
  • ShellCheck zero violations on all modified files

Ref #1821

…rrors (t1201)

- ai-actions.sh: make new_priority required in adjust_priority validation (t1126, t1201)
  Previously the field was optional with executor inference from reasoning text.
  Tests added in t1126 expected it to be required — this fixes the regression
  introduced when t1187 made it optional again. Now: missing new_priority is
  rejected with a clear error; invalid values (e.g. 'urgent') are also rejected.

- ai-reason.sh: replace full-prompt retry with simplified JSON-only prompt (t1201)
  When the first AI call returns empty or unparseable output, retry with a
  stripped-down prompt that explicitly reinforces 'respond with ONLY a JSON array,
  no markdown fencing'. This is more likely to recover from model confusion caused
  by large context (15KB+) than repeating the same prompt.

- ai-reason.sh: fix single-line array extraction in Try 4 (t1201)
  The bracket-based fallback parser (Try 4) failed to extract single-line JSON
  arrays like [{...}] embedded in preamble text. Added Try 4a using grep to
  find lines starting with [ and parse them directly before the multi-line awk
  fallback (Try 4b).

- tests/test-ai-actions.sh: add tests 18 and 19 (t1201)
  Test 18: extract_action_plan edge cases (empty, whitespace, fenced, embedded)
  Test 19: adjust_priority new_priority required and validated
  All 19 tests pass, ShellCheck zero violations.
@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 7 minutes and 58 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/t1201

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.

@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, 28 code smells

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

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 28
  • VULNERABILITIES: 0

Generated on: Wed Feb 18 22:57:21 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@marcusquinn marcusquinn merged commit 9fa84ab into main Feb 18, 2026
8 of 10 checks passed
@marcusquinn marcusquinn deleted the feature/t1201 branch February 18, 2026 22:57
@sonarqubecloud
Copy link

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