Improve classify workflow #31
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request simplifies and streamlines the workflow for classifying pull request failures and analyzing logs in the
fix-remote-pr.ymlGitHub Actions workflow. Key changes include removing custom shell logic for fetching and parsing failure logs, delegating more responsibility to theaieng-bot classifyCLI, and improving JSON parsing robustness in the Python classifier. The workflow is now less error-prone and easier to maintain.Workflow simplification and delegation:
.github/workflows/fix-remote-pr.yml; the workflow now relies on theaieng-bot classifyCLI to fetch PR information and logs directly, reducing complexity and maintenance overhead. [1] [2] [3] [4]aieng-bot classifywith just the repo and PR number, and to parse output JSON for results, removing manual environment variable passing and output parsing..failure-logs.txtfrom 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:
src/aieng_bot/classifier/classifier.pyto attempt to fix and parse incomplete JSON responses by adding missing closing braces, making the classifier more robust to partial model outputs.max_tokens, and refactored loop variable naming for clarity. [1] [2]Dependency updates:
python-dotenvas a required dependency inpyproject.tomlfor improved environment variable management.