Patch Verification Engine
AI writes the fix.
PatchLens verifies it.
Independently reproduce the original failure, apply the candidate patch, and confirm the result using deterministic execution evidence.
Demo Project
Student attendance application — KeyError on unknown student lookup.
Candidate Patch
benchmark/good_fix.diff
Reproduction Command
Uses the bundled demo project
Pipeline
- Reproduce original failure
Run the reproduction command against the unpatched codebase.
- Apply candidate patch
Apply the diff to a clean working copy.
- Re-run original failure
Execute the same command against the patched codebase.
- Run test suite
Execute the full test suite to check for regressions.
- Inspect patch integrity
Static checks for suspicious patch patterns.
- Produce verdict
Emit VERIFIED, NOT FIXED, or INCONCLUSIVE.
Verification Input
plj-20240612-001
Repository
Original Failure
KeyError when looking up attendance for an unknown student. The application crashes instead of handling a missing student record gracefully.
Candidate Patch
| --- a/app/student_service.py |
| +++ b/app/student_service.py |
| @@ -7,7 +7,12 @@ |
| def get_student(student_id): |
| - return STUDENTS[student_id] |
| + return STUDENTS.get(student_id) |
| def get_attendance(student_id): |
| student = get_student(student_id) |
| + |
| + if student is None: |
| + return None |
| + |
| return student["attendance"] |
Reproduction Command
Runs end-to-end deterministic verification