Skip to content

fix(health-check): remove undefined RUN_LIMIT variable - #31

Merged
don-petry merged 1 commit into
mainfrom
claude/dazzling-noyce-940f8f
May 6, 2026
Merged

don-petry merged 1 commit into
mainfrom
claude/dazzling-noyce-940f8f

Conversation

@don-petry

Copy link
Copy Markdown
Collaborator

Summary

  • scripts/pr_review_health.sh referenced ${RUN_LIMIT} inside a heredoc, but the variable was never defined anywhere in the script
  • With set -euo pipefail active, bash exits with "unbound variable" on line 140 every time the script reaches the Claude invocation
  • Fixed by replacing ${RUN_LIMIT} with the literal 100, which matches the per_page=100 used in the GitHub API call on line 58

Test plan

  • Confirm the next scheduled health-check run completes successfully (no more "unbound variable" error at line 140)
  • Verify the Claude prompt still renders correctly with 100 hardcoded

🤖 Generated with Claude Code

The heredoc prompt referenced \${RUN_LIMIT} which was never defined,
causing the script to fail with "unbound variable" under set -u.
Replace with the literal 100 (matching the per_page=100 API call).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 6, 2026 11:33
@don-petry
don-petry merged commit 1b64471 into main May 6, 2026
5 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a runtime failure in the daily health-check script by removing a reference to an undefined shell variable in the Claude prompt heredoc, which previously caused set -euo pipefail to terminate the script with an “unbound variable” error.

Changes:

  • Replace ${RUN_LIMIT} (undefined) with the literal 100 in the health-check analysis prompt to prevent unbound variable exits and match the per_page=100 API fetch cap.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

don-petry added a commit that referenced this pull request May 17, 2026
The heredoc prompt referenced \${RUN_LIMIT} which was never defined,
causing the script to fail with "unbound variable" under set -u.
Replace with the literal 100 (matching the per_page=100 API call).

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
don-petry added a commit that referenced this pull request May 17, 2026
The heredoc prompt referenced \${RUN_LIMIT} which was never defined,
causing the script to fail with "unbound variable" under set -u.
Replace with the literal 100 (matching the per_page=100 API call).

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
don-petry added a commit that referenced this pull request Jun 7, 2026
The heredoc prompt referenced \${RUN_LIMIT} which was never defined,
causing the script to fail with "unbound variable" under set -u.
Replace with the literal 100 (matching the per_page=100 API call).

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
don-petry added a commit that referenced this pull request Jun 7, 2026
The heredoc prompt referenced \${RUN_LIMIT} which was never defined,
causing the script to fail with "unbound variable" under set -u.
Replace with the literal 100 (matching the per_page=100 API call).

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
don-petry added a commit that referenced this pull request Jun 8, 2026
The heredoc prompt referenced \${RUN_LIMIT} which was never defined,
causing the script to fail with "unbound variable" under set -u.
Replace with the literal 100 (matching the per_page=100 API call).

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
don-petry added a commit that referenced this pull request Jun 12, 2026
The heredoc prompt referenced \${RUN_LIMIT} which was never defined,
causing the script to fail with "unbound variable" under set -u.
Replace with the literal 100 (matching the per_page=100 API call).

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
don-petry added a commit that referenced this pull request Jun 14, 2026
The heredoc prompt referenced \${RUN_LIMIT} which was never defined,
causing the script to fail with "unbound variable" under set -u.
Replace with the literal 100 (matching the per_page=100 API call).

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
don-petry added a commit that referenced this pull request Jun 18, 2026
The heredoc prompt referenced \${RUN_LIMIT} which was never defined,
causing the script to fail with "unbound variable" under set -u.
Replace with the literal 100 (matching the per_page=100 API call).

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
don-petry added a commit that referenced this pull request Jun 25, 2026
The heredoc prompt referenced \${RUN_LIMIT} which was never defined,
causing the script to fail with "unbound variable" under set -u.
Replace with the literal 100 (matching the per_page=100 API call).

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
don-petry added a commit that referenced this pull request Jun 25, 2026
The heredoc prompt referenced \${RUN_LIMIT} which was never defined,
causing the script to fail with "unbound variable" under set -u.
Replace with the literal 100 (matching the per_page=100 API call).

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

2 participants