-
Notifications
You must be signed in to change notification settings - Fork 0
test: full autofix pipeline validation #87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
0e2f7f7
2e405e4
afcaad0
ff74818
06efdcd
a37429c
27bee77
5c40edd
cec0e1a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,67 @@ | ||||||
| """Test file with intentional errors to validate the full autofix pipeline. | ||||||
|
|
||||||
| This file contains: | ||||||
| 1. Formatting issues (ruff/black can fix) - cosmetic | ||||||
| 2. Type errors (mypy will catch) - non-cosmetic, needs Codex | ||||||
| 3. Test failures (pytest will catch) - non-cosmetic, needs Codex | ||||||
|
|
||||||
| The autofix system should: | ||||||
| 1. First run basic autofix (ruff/black) to fix formatting | ||||||
| 2. Gate should still fail due to mypy/pytest errors | ||||||
| 3. Auto-escalate to Codex to fix the remaining issues | ||||||
| """ | ||||||
| import os | ||||||
| from typing import Dict,List,Optional | ||||||
| import sys | ||||||
|
|
||||||
| # Formatting issue 1: missing spaces around operators | ||||||
| x=1+2+3 | ||||||
|
|
||||||
| # Formatting issue 2: multiple imports on one line (already above) | ||||||
|
|
||||||
| # Formatting issue 3: trailing whitespace (invisible but present) | ||||||
| y = 42 | ||||||
|
|
||||||
| # Formatting issue 4: inconsistent quotes | ||||||
| message = "hello" | ||||||
| other_message = 'world' | ||||||
|
|
||||||
| # Type error 1: wrong type assignment | ||||||
| def get_count() -> int: | ||||||
| return "not an int" # mypy error: returning str instead of int | ||||||
|
|
||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Useful? React with 👍 / 👎. |
||||||
| # Type error 2: incompatible types | ||||||
| def process_items(items: List[str]) -> Dict[str, int]: | ||||||
| result: Dict[str, int] = {} | ||||||
| for item in items: | ||||||
| result[item] = "count" # mypy error: assigning str to int | ||||||
| return result | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Useful? React with 👍 / 👎. |
||||||
|
|
||||||
| # Type error 3: missing return | ||||||
| def calculate_total(values: List[int]) -> int: | ||||||
| total = sum(values) | ||||||
| # Missing return statement - mypy should catch this | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Useful? React with 👍 / 👎.
|
||||||
| # Missing return statement - mypy should catch this | |
| return total |
Copilot
AI
Dec 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'json' is not used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix hardcoded failing assertion in test_intentional_failure
test_intentional_failure sets expected = 42 but actual = 41, making the assertion fail unconditionally whenever the test suite runs, independent of any underlying functionality; align the expected and actual values so the test can pass when behavior is correct.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
Optionaltype is imported but never used in the file. This appears to be an unintentional unused import that was not mentioned in the PR description's list of intentional errors.