Repository navigation
Patch Generation Robustness Overhaul
This release focuses on hardening the LLM-driven patch generation pipeline — fixing path resolution, diff application, JSON parsing, and observability.
Bug Fixes
- Use
git apply --3wayfor LLM-generated patches (better conflict resolution) - Fuzzy-match diff file paths when LLM fabricates wrong directories
- Include full file contents in patch generator prompt for better context
- Bug-specific source search instead of reusing diagnose-stage locations
- Replace hardcoded
--includeextensions with--exclude-dirapproach - Keyword search prioritizes specific identifiers over generic terms
- Handle LLM illegal JSON escapes (`' and bare newlines)
- Patch generation uses repo-relative paths instead of absolute paths
- Fix severity type comparison in
_deploy_patch - Fix for-loop variable
_shadowingi18n.timport (TypeError) - Restore ANSI colors by using
sys.__stdout__ _display_widthstrips ANSI escape codes before calculating width- Treat East Asian Ambiguous width chars as 2 columns in banner
- Exclude
.bakand.origfiles from grep search - Fix
_sanitize_difforphaned call (reverted but still referenced)
Features
- Log prompt length and LLM empty response details (
finish_reason) - Log LLM raw response in PatchGenerator before parse
- Log diagnose LLM raw response for JSON parse failure debugging
- INFO-level logging for patch generation and application
- Add patch info to trace output
Docs
- Add Docker container patrol requirements to
observe.md