Skip to content

Fix issue #26: P0 bug: bug: run-qa-agent.sh and run-report-…#121

Closed
jpleva91 wants to merge 1 commit intomainfrom
cata/brain-26-1775283561
Closed

Fix issue #26: P0 bug: bug: run-qa-agent.sh and run-report-…#121
jpleva91 wants to merge 1 commit intomainfrom
cata/brain-26-1775283561

Conversation

@jpleva91
Copy link
Copy Markdown
Contributor

@jpleva91 jpleva91 commented Apr 4, 2026

Auto-generated by Cata via /evolve dispatch

Task: brain-26-1775283561

Copilot AI review requested due to automatic review settings April 4, 2026 06:22
Copy link
Copy Markdown

Copilot AI left a comment

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 updates the agent runner shell scripts to be more self-contained by ensuring the shellforge binary exists before attempting to run the qa or report subcommands.

Changes:

  • Add a “build ./shellforge if missing” step to scripts/run-qa-agent.sh
  • Add a “build ./shellforge if missing” step to scripts/run-report-agent.sh

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
scripts/run-report-agent.sh Builds ./shellforge on demand before running ./shellforge report
scripts/run-qa-agent.sh Builds ./shellforge on demand before running ./shellforge qa

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

set -euo pipefail
cd "$(dirname "$0")/.."

if [[ ! -f ./shellforge ]]; then
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

The build guard checks -f ./shellforge, but exec ./shellforge ... requires the binary to be executable. If shellforge exists without execute permissions (e.g., from an archive/checkout), this will skip the build and then fail at exec. Consider switching the check to [[ ! -x ./shellforge ]] (or verifying executability before exec).

Suggested change
if [[ ! -f ./shellforge ]]; then
if [[ ! -x ./shellforge ]]; then

Copilot uses AI. Check for mistakes.
Comment on lines +5 to +8
if [[ ! -f ./shellforge ]]; then
echo "[run-qa-agent] Building shellforge..."
go build -o shellforge ./cmd/shellforge
fi
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

This script duplicates the same “build shellforge if missing” logic that already exists in scripts/run-agent.sh. To reduce duplication and keep behavior consistent, consider delegating to run-agent.sh (or extracting a shared helper) rather than re-implementing the build step here.

Copilot uses AI. Check for mistakes.
set -euo pipefail
cd "$(dirname "$0")/.."

if [[ ! -f ./shellforge ]]; then
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

The build guard checks -f ./shellforge, but exec ./shellforge ... requires the binary to be executable. If shellforge exists without execute permissions, this will skip the build and then fail at exec. Consider switching the check to [[ ! -x ./shellforge ]] (or verifying executability before exec).

Suggested change
if [[ ! -f ./shellforge ]]; then
if [[ ! -x ./shellforge ]]; then

Copilot uses AI. Check for mistakes.
Comment on lines +5 to 10
if [[ ! -f ./shellforge ]]; then
echo "[run-report-agent] Building shellforge..."
go build -o shellforge ./cmd/shellforge
fi

exec ./shellforge report "${1:-.}"
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

This script duplicates the same “build shellforge if missing” logic that already exists in scripts/run-agent.sh. To reduce duplication and keep behavior consistent, consider delegating to run-agent.sh (or extracting a shared helper) rather than re-implementing the build step here.

Suggested change
if [[ ! -f ./shellforge ]]; then
echo "[run-report-agent] Building shellforge..."
go build -o shellforge ./cmd/shellforge
fi
exec ./shellforge report "${1:-.}"
exec ./scripts/run-agent.sh report "${1:-.}"

Copilot uses AI. Check for mistakes.
@jpleva91 jpleva91 closed this Apr 4, 2026
@jpleva91 jpleva91 deleted the cata/brain-26-1775283561 branch April 4, 2026 11:40
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