Parallelize tests for faster PR turnaround time#372
Merged
Conversation
added 2 commits
December 13, 2025 19:28
… test names to include shard information and streamline test execution by replacing inline pytest commands with a dedicated script for sharded tests. Remove coverage upload steps for batch evaluation and MCP end-to-end tests.
| score = parsed.get("score", 0.0) | ||
| except (json.JSONDecodeError, TypeError): | ||
| logger.warning("Failed to parse response as JSON: %s", response_text) | ||
| score = 0.0 |
There was a problem hiding this comment.
Bug: Exception handler misses AttributeError from dict method
The try/except block catches json.JSONDecodeError and TypeError, but if the API returns valid JSON that isn't a dictionary (like an integer "123" or a list "[]"), calling .get() on the parsed value raises AttributeError, which escapes the handler. Adding AttributeError to the except clause would make the error handling complete.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Enhance CI workflow to support sharded testing for core tests. Update test names to include shard information and streamline test execution by replacing inline pytest commands with a dedicated script for sharded tests. Remove coverage upload steps for batch evaluation and MCP end-to-end tests.
name: Pull Request
about: Propose changes to the codebase
title: "Brief description of changes"
labels: ''
assignees: ''
Description
Please include a summary of the change and which issue is fixed or feature is implemented. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Implements # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
Test Configuration:
Checklist:
black .,isort .,flake8 .)Screenshots (if applicable)
If applicable, add screenshots to help showcase your changes.
Additional context
Add any other context about the PR here.
Note
Shard core tests via a new test runner script, remove coverage uploads, and harden tests (JSON parsing, CLI test isolation).
shard1–4) and run viascripts/run_sharded_tests.sh; job names include shard info.scripts/run_sharded_tests.shto split test files, support--dry-run, and runpytest -n autowhile excluding slow/remote tests.tests/pytest/test_pytest_klavis_mcp.pynow safely parses JSON and defaultsscore=0.0on errors with logging.test_cli_full_command_style_evaluator_and_dataset_flagsnow usestmp_pathand changes CWD to avoid running real project tests./.github/PULL_REQUEST_TEMPLATE.md.Written by Cursor Bugbot for commit 61a4db6. This will update automatically on new commits. Configure here.