๐ ๏ธ Autonomous Code Repair (FixService)¶
Poing AI includes an Autonomous Code Repair Engine that reads review findings, compiler errors, or test failures, uses AI agents to formulate drop-in code replacements, applies patches to disk, and executes project test suites (unittest, gdlint, npm test, dotnet test) in a closed-loop validation cycle.
๐๏ธ How Autonomous Repair Works¶
flowchart TD
A["๐ฅ Discover Issues<br/><i>(Review Findings, PR comments, or uncommitted diff)</i>"] --> B["๐ง Context & Guidelines Retrieval<br/><i>(Vector RAG + Engine Guidelines)</i>"]
B --> C["๐ค AI Agent (Antigravity / Gemini / Ollama)<br/><i>(Formulates drop-in snippet replacements)</i>"]
C --> D["โ๏ธ Apply Patches to Disk<br/><i>(Exact substring replacement)</i>"]
D --> E{"๐งช Run Test Suite / Linters<br/><i>(unittest, gdlint, npm test, etc.)</i>"}
E -- "โ Tests Fail" --> F["๐ Self-Healing Retry Loop<br/><i>(Feed error trace back to agent)</i>"]
F --> C
E -- "โ
Tests Pass" --> G["๐ Output / Commit"]
G --> H["Local: Formatted diff & summary<br/>PR: Commit, push to branch, & auto-resolve threads"]
๐ Running Locally with the CLI¶
1. Auto-Fix with Google Antigravity Managed Agent (Recommended)¶
Powered by Google's Interactions API (antigravity-preview-05-2026) with remote Linux sandboxing:
# Fix uncommitted bugs in your workspace using Antigravity
poing --local --fix --provider antigravity
2. Fast Auto-Fix with Gemini Flash¶
3. 100% Offline Auto-Fix with Ollama¶
๐ฌ Triggering Auto-Fix in GitHub Pull Requests¶
When Poing AI flags issues or you want automated fixes on a PR:
- Comment
/fixor@poing-ai fixon the pull request. - Poing AI:
- Fetches unresolved review threads.
- Generates and tests the required code repairs.
- Commits the fixes under
poing-ai[bot]. - Pushes directly to the PR branch.
- Auto-resolves the review threads.
๐ฏ Autonomous Issue Worker (Opt-in)¶
Poing AI can listen to issues, solve them, and open ready-to-merge Pull Requests. This feature is disabled by default to give repository maintainers full control.
How to Trigger Issue Auto-Fix¶
- On-demand via Comment (Default): Comment
/fixor/workon any open issue. - Label Opt-in: Add the
auto-fixorpoing-worklabel to the issue. - Automatic for All Issues: Enable in
.github/poing.json:
Issue Worker Lifecycle¶
- Context & Target Discovery: Extracts referenced file paths from the issue and queries the Vector RAG retriever to identify relevant source files.
- Patching & Test Execution: Generates drop-in snippet fixes and executes the project's test suite to verify the repair.
- Branch & Pull Request Creation: Creates branch
fix/issue-<id>-<slug>, commits the tested changes, pushes to origin, and opens a Pull Request linking toCloses #<id>. - Issue Notification: Posts a confirmation comment on the issue with a link to the generated PR.
โ๏ธ Test Runner Auto-Detection¶
The fixer automatically detects and executes your repository's test runner to verify fixes before finalizing:
| Project Type | Detected Test / Lint Command |
|---|---|
| Python | python3 -m unittest discover tests |
| Godot Engine | gdlint . |
| Node.js / Web | npm test |
| Custom | Configured via test_command in .github/poing.json |
If tests fail during a fix attempt, Poing AI feeds the failure stack trace back into the agent for up to 3 iterative repair attempts.