Skip to content

[bug-hunter] extract-log-errors.py flags warning-only logs as failures #393

Description

@github-actions

Impact

/scripts/extract-log-errors.py reports warning-only logs as failures, which creates false-positive failure reports for agent workflows that consume its JSON output.

Reproduction Steps

  1. Create a minimal warning-only log:
    cat > /tmp/gh-aw/agent/repro-warning-only.log <<'EOF'
    2026-02-24T00:00:00Z ##[warning] just a warning
    EOF
  2. Run this new minimal test:
    python3 /tmp/gh-aw/agent/test_extract_warning.py

Expected vs Actual

Expected: warning-only logs should produce total_matches == 0 because the script is documented to extract errors/failures.

Actual: the test fails with:

AssertionError: {'total_files_scanned': 1, 'total_matches': 1, 'matches': [{'file': '/tmp/gh-aw/agent/repro-warning-only.log', 'start_line': 1, 'end_line': 1, 'snippet': '2026-02-24T00:00:00Z ##[warning] just a warning'}]}

Failing Test

import json
import subprocess
from pathlib import Path

log = Path('/tmp/gh-aw/agent/repro-warning-only.log')
log.write_text('2026-02-24T00:00:00Z ##[warning] just a warning\n', encoding='utf-8')

result = subprocess.run(
    ['python3', 'scripts/extract-log-errors.py', str(log)],
    cwd='/home/runner/work/ai-github-actions/ai-github-actions',
    check=True,
    text=True,
    capture_output=True,
)

summary = json.loads(result.stdout)
assert summary['total_matches'] == 0, summary

Evidence

  • The script is described as extracting errors/failures in scripts/extract-log-errors.py:3-6 and scripts/extract-log-errors.py:17-21.
  • DEFAULT_PATTERNS currently includes warnings (r"##\[warning\]") at scripts/extract-log-errors.py:33, which causes warning-only logs to be classified as matches.
  • git blame shows this behavior was introduced in commit 29f5c201890049e7acc8ece895a336733d90df5d.

What is this? | From workflow: Bug Hunter

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

  • expires on Mar 3, 2026, 11:27 AM UTC

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions