affaan-m/ECC · warning
[WARN] $*
Error message
[WARN] $*
What it means
warn() at scripts/gan-harness.sh:57 prints '[WARN] <text>' in yellow as the generate-vs-evaluator harness's non-fatal degradation channel. Two live call sites use it: 'Evaluator did not produce feedback file. Assuming score 0.0' (the evaluator stage emitted no feedback file, so extract_score falls through its grep chain to 0.0) and 'Score plateau detected (no improvement for 2 iterations). Stopping early.' (the loop's early-stop heuristic on the TOTAL weighted score).
Source
Thrown at scripts/gan-harness.sh:57
HARNESS_DIR="${PROJECT_DIR}/gan-harness"
FEEDBACK_DIR="${HARNESS_DIR}/feedback"
SCREENSHOTS_DIR="${HARNESS_DIR}/screenshots"
START_TIME=$(date +%s)
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
PURPLE='\033[0;35m'
CYAN='\033[0;36m'
NC='\033[0m'
# ─── Helpers ─────────────────────────────────────────────────────────────────
log() { echo -e "${BLUE}[GAN-HARNESS]${NC} $*"; }
ok() { echo -e "${GREEN}[✓]${NC} $*"; }
warn() { echo -e "${YELLOW}[WARN]${NC} $*"; }
fail() { echo -e "${RED}[✗]${NC} $*"; }
phase() { echo -e "\n${PURPLE}═══════════════════════════════════════════════${NC}"; echo -e "${PURPLE} $*${NC}"; echo -e "${PURPLE}═══════════════════════════════════════════════${NC}\n"; }
extract_score() {
# Extract the TOTAL weighted score from a feedback file
local file="$1"
# Look for **TOTAL** or **X.X/10** pattern
grep -oP '(?<=\*\*TOTAL\*\*.*\*\*)[0-9]+\.[0-9]+' "$file" 2>/dev/null \
|| grep -oP '(?<=TOTAL.*\|.*\| \*\*)[0-9]+\.[0-9]+' "$file" 2>/dev/null \
|| grep -oP 'Verdict:.*([0-9]+\.[0-9]+)' "$file" 2>/dev/null | grep -oP '[0-9]+\.[0-9]+' \
|| echo "0.0"
}
score_passes() {
local score="$1"
local threshold="$2"
awk -v s="$score" -v t="$threshold" 'BEGIN { exit !(s >= t) }'
}View on GitHub (pinned to d8409a4b08)
Solutions
- Confirm the evaluator writes its feedback file to the exact path the harness greps and that the run order (planner -> generator -> evaluator) completed.
- Check the evaluator's own stderr/logs — a missing feedback file usually means it crashed.
- If scores are wrongly 0.0, align the feedback file's format with extract_score's patterns (emit '**TOTAL** N.N' or 'Verdict: ... N.N').
- For genuine plateaus, inspect the last two feedback files to confirm scores truly flatlined before accepting the early stop.
Example fix
# before: feedback file only says "looks good" -> extract_score returns 0.0 -> '[WARN] ... Assuming score 0.0' # after: emit a parseable score the harness recognizes printf '**TOTAL** 7.5/10\n' >> "$FEEDBACK_FILE"
Defensive patterns
Strategy: fallback
Validate before calling
# After the evaluator stage, confirm a parseable feedback file exists before scoring if [ ! -s "$FEEDBACK_FILE" ]; then echo "evaluator produced no feedback file; check evaluator logs" >&2 exit 1 fi if ! grep -qE '\*\*TOTAL\*\*[0-9 ]+\.[0-9]|Verdict:.*[0-9]+\.[0-9]+' "$FEEDBACK_FILE"; then echo "feedback file lacks a parseable score line" >&2 fi
Prevention
- Make the evaluator's output path and score format (e.g. '**TOTAL** N.N') an explicit contract with the harness.
- Fail the harness on a missing feedback file when you care about real scores instead of accepting the 0.0 fallback.
- Log evaluator stderr alongside the loop so '[WARN] ... Assuming score 0.0' has an explanation next to it.
- Tune or disable the plateau early-stop when iterating on prompts, or you will mistake it for convergence.
When it happens
Trigger: The evaluator command/agent fails or writes its feedback file somewhere the harness does not look, so no file is found; the feedback file exists but none of extract_score's patterns match (**TOTAL** N, 'TOTAL | ... | **N**', 'Verdict: ... N.N'), also yielding 0.0; the generator's TOTAL weighted score stays flat for 2 consecutive iterations, triggering early stop.
Common situations: Misconfigured evaluator output path; evaluator crashing on malformed spec.md; genuine convergence/plateau; feedback format drift breaking the grep patterns so real scores read as 0.0 and the loop 'plateaus' immediately.
Related errors
AI-assisted analysis of affaan-m/ECC@d8409a4b08 (2026-08-26).
Data as JSON: /api/errors/8588878c2f0f238b.
Report an issue: GitHub.