Compare commits

..

1 commit

Author SHA1 Message Date
Agent
9a22e407a4 fix: fix: triage agent creates root cause issues without backlog label (#386)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-07 21:52:44 +00:00

View file

@ -496,9 +496,11 @@ fi
if [ "$AGENT_TYPE" = "triage" ]; then
log "Triage post-processing: checking for created issues to label..."
# Extract issue numbers from Claude output that were created during triage
# Look for patterns like "Created issue #123" or "harb#123" or "#123" after "create"
CREATED_ISSUES=$(grep -oE '(Created|created) issue #[0-9]+|harb#[0-9]+|#[0-9]+' \
# Extract issue numbers from Claude output that were created during triage.
# Match unambiguous creation patterns: "Created issue #123", "Created #123",
# or "harb#123". Do NOT match bare #123 which would capture references in
# the triage summary (e.g., "Decomposed from #5", "cause 1 of 2", etc.).
CREATED_ISSUES=$(grep -oE '(Created|created) issue #[0-9]+|(Created|created) #[0-9]+|harb#[0-9]+' \
"/tmp/reproduce-claude-output-${ISSUE_NUMBER}.txt" 2>/dev/null | \
grep -oE '[0-9]+' | sort -u | head -10)
@ -506,14 +508,16 @@ if [ "$AGENT_TYPE" = "triage" ]; then
# Get backlog label ID
BACKLOG_ID=$(_label_id "backlog" "#fef2c0")
if [ -z "$BACKLOG_ID" ]; then
log "WARNING: could not get backlog label ID — skipping label enforcement"
else
for issue_num in $CREATED_ISSUES; do
if [ -n "$BACKLOG_ID" ]; then
_add_label "$issue_num" "$BACKLOG_ID"
log "Added backlog label to created issue #${issue_num}"
fi
done
fi
fi
fi
# ---------------------------------------------------------------------------
# Read outcome