Skip to content

Conversation

@amrit110
Copy link
Member

This pull request simplifies and streamlines the workflow for classifying pull request failures and analyzing logs in the fix-remote-pr.yml GitHub Actions workflow. Key changes include removing custom shell logic for fetching and parsing failure logs, delegating more responsibility to the aieng-bot classify CLI, and improving JSON parsing robustness in the Python classifier. The workflow is now less error-prone and easier to maintain.

Workflow simplification and delegation:

  • Removed all custom shell logic for fetching, extracting, and copying failure logs in .github/workflows/fix-remote-pr.yml; the workflow now relies on the aieng-bot classify CLI to fetch PR information and logs directly, reducing complexity and maintenance overhead. [1] [2] [3] [4]
  • Updated the classification step to call aieng-bot classify with just the repo and PR number, and to parse output JSON for results, removing manual environment variable passing and output parsing.
  • Removed all references to .failure-logs.txt from file copying, git exclude lists, and cleanup steps, since logs are no longer handled by shell code. [1] [2] [3] [4] [5]

Python classifier improvements:

  • Added a new strategy in src/aieng_bot/classifier/classifier.py to attempt to fix and parse incomplete JSON responses by adding missing closing braces, making the classifier more robust to partial model outputs.
  • Improved logging and warning when Claude's response is truncated due to max_tokens, and refactored loop variable naming for clarity. [1] [2]

Dependency updates:

  • Added python-dotenv as a required dependency in pyproject.toml for improved environment variable management.

@amrit110 amrit110 self-assigned this Dec 23, 2025
@amrit110 amrit110 added enhancement New feature or request github_actions Pull requests that update GitHub Actions code refactor Refactor code structure labels Dec 23, 2025
@amrit110 amrit110 merged commit 1456969 into main Dec 23, 2025
9 checks passed
@amrit110 amrit110 deleted the improve_classify_cmd branch December 23, 2025 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request github_actions Pull requests that update GitHub Actions code refactor Refactor code structure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants