Skip to content

bug: run-qa-agent.sh and run-report-agent.sh don't build binary if missing #26

@jpleva91

Description

@jpleva91

Bug: Convenience scripts fail silently when binary is not built

Files: scripts/run-qa-agent.sh, scripts/run-report-agent.sh

set -euo pipefail
cd "$(dirname "$0")/.."
exec ./shellforge qa "${1:-.}"

Problem

Both scripts call ./shellforge directly without checking whether the binary exists. If the binary hasn't been built yet (fresh clone, post-clean), the script exits with a cryptic error:

bash: ./shellforge: No such file or directory

Compare with scripts/run-agent.sh, which already handles this correctly:

if [[ ! -f ./shellforge ]]; then
  echo "[run-agent] Building shellforge..."
  go build -o shellforge ./cmd/shellforge
fi

Fix

Apply the same build-if-missing guard to both scripts:

set -euo pipefail
cd "$(dirname "$0")/.."
if [[ ! -f ./shellforge ]]; then
  echo "[run-qa-agent] Building shellforge..."
  go build -o shellforge ./cmd/shellforge
fi
exec ./shellforge qa "${1:-.}"

Impact

Breaks the zero-setup cron/CI experience. Users following the README hit a confusing error before any agent work is done.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium priorityagent:claimedAgent dispatched — do not re-dispatchbugSomething isn't workingsprintCurrent sprint priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions