Safe Autonomous Code Fixing
Let AI fix bugs without breaking trust: reproduce with failing tests, localise with traces and git bisect, keep patches minimal, verify in isolation, detect test tampering and secrets, review and revert safely, with every step run in Python and real git.
What you'll learn
- Design an automated bug-fixing pipeline that reproduces, localises, patches, verifies and hands off to review.
- Reproduce bugs with failing tests and localise them with stack traces and git bisect.
- Constrain patches to minimal diffs and verify them in isolated environments with flaky-test and mutation checks.
- Block unsafe patches: test tampering, protected paths, leaked secrets and over-broad permissions.
- Ship automated fixes through human review with clear evidence, and revert safely when needed.
- Measure an auto-fix system with merge, revert and review-time metrics.
Syllabus
Why Autonomous Fixing Needs Safety
Reproduce and Localise
- Reproducing With a Failing Test
- Reading Stack Traces and Logs
- Finding the Breaking Commit With git bisect
Generating Minimal Patches
Verifying Patches
- Isolated Verification of Each Candidate
- Detecting Flaky Tests
- Are the Tests Strong Enough? Mutation Checks
- Static Checks, Types and Builds
Guardrails on Patches
Sandboxes and Permissions
- Sandboxed Execution
- Least-Privilege Tokens and Branch Protection
- Untrusted Instructions in Issues and Logs