diff --git a/docker/reproduce/entrypoint-reproduce.sh b/docker/reproduce/entrypoint-reproduce.sh index 0f26097..da25aa6 100644 --- a/docker/reproduce/entrypoint-reproduce.sh +++ b/docker/reproduce/entrypoint-reproduce.sh @@ -355,20 +355,23 @@ _post_comment() { # Exit gate logic: # 1. Can I reproduce it? → NO → rejected/blocked → EXIT # → YES → continue -# 2. Is the cause obvious? → YES → in-progress + backlog issue → EXIT +# 2. Is the cause obvious? → YES → backlog issue for dev → EXIT # → NO → in-triage → EXIT # -# Label combinations: -# - Reproduced + obvious cause: bug-report + in-progress → Dev-agent -# - Reproduced + cause unclear: bug-report + in-triage → Triage-agent -# - Cannot reproduce: bug-report + rejected → Human review -# - Inconclusive (timeout/error): bug-report + blocked → Gardener/human +# Label combinations (on the ORIGINAL issue): +# - Reproduced + obvious cause: reproduced (custom status) → backlog issue created +# - Reproduced + cause unclear: in-triage → Triage-agent +# - Cannot reproduce: rejected → Human review +# - Inconclusive (timeout/error): blocked → Gardener/human +# +# The newly created fix issue (when cause is obvious) gets backlog label +# so dev-poll will pick it up for implementation. # Remove bug-report label (we are resolving it) BUG_REPORT_ID=$(_label_id "bug-report" "#e4e669") _remove_label "$ISSUE_NUMBER" "$BUG_REPORT_ID" -# Determine outcome category and apply appropriate labels +# Determine outcome and apply appropriate labels LABEL_NAME="" LABEL_COLOR="" COMMENT_HEADER="" @@ -380,13 +383,13 @@ case "$OUTCOME" in ROOT_CAUSE=$(grep -m1 "^ROOT_CAUSE=" "/tmp/reproduce-findings-${ISSUE_NUMBER}.md" 2>/dev/null \ | sed 's/^ROOT_CAUSE=//' || echo "") if [ -n "$ROOT_CAUSE" ] && [ "$ROOT_CAUSE" != "See findings on issue #${ISSUE_NUMBER}" ]; then - # Obvious cause → bug-report + in-progress → Dev-agent - LABEL_NAME="in-progress" - LABEL_COLOR="#1d76db" + # Obvious cause → add reproduced status label, create backlog issue for dev-agent + LABEL_NAME="reproduced" + LABEL_COLOR="#0075ca" COMMENT_HEADER="## Reproduce-agent: **Reproduced with obvious cause** :white_check_mark: :zap:" CREATE_BACKLOG_ISSUE=true else - # Cause unclear → bug-report + in-triage → Triage-agent + # Cause unclear → in-triage → Triage-agent LABEL_NAME="in-triage" LABEL_COLOR="#d93f0b" COMMENT_HEADER="## Reproduce-agent: **Reproduced, cause unclear** :white_check_mark: :mag:" @@ -394,14 +397,14 @@ case "$OUTCOME" in ;; cannot-reproduce) - # Cannot reproduce → bug-report + rejected → Human review + # Cannot reproduce → rejected → Human review LABEL_NAME="rejected" LABEL_COLOR="#e4e669" COMMENT_HEADER="## Reproduce-agent: **Cannot reproduce** :x:" ;; needs-triage) - # Inconclusive (timeout, env issues) → bug-report + blocked → Gardener/human + # Inconclusive (timeout, env issues) → blocked → Gardener/human LABEL_NAME="blocked" LABEL_COLOR="#e11d48" COMMENT_HEADER="## Reproduce-agent: **Inconclusive, blocked** :construction:" @@ -438,7 +441,7 @@ Root cause (quick log analysis): ${ROOT_CAUSE} -d "$(jq -nc \ --arg t "fix: $(echo "$ISSUE_TITLE" | sed 's/^bug:/fix:/' | sed 's/^feat:/fix:/')" \ --arg b "$BACKLOG_BODY" \ - '{title:$t, body:$b}')" >/dev/null 2>&1 || \ + '{title:$t, body:$b, labels:[{"name":"backlog"}]}' 2>/dev/null)" >/dev/null 2>&1 || \ log "WARNING: failed to create backlog issue" fi