refactor: split opencode runtime and tests
This commit is contained in:
+8
-4
@@ -11,9 +11,10 @@ as a PR comment and does not block CI.
|
||||
2. `webhook_server.py` validates the request, checks the base branch's
|
||||
`.pr-review.json` for `"enabled": true`, and claims `(repo, PR, SHA)`.
|
||||
3. `ai_review.review_pr()` fetches the diff, trusted config, and prior reviews.
|
||||
4. `opencode_review.py` checks out the PR head in a sanitized temporary
|
||||
directory and runs the review agent. The legacy Ollama-compatible path is
|
||||
still available through `PRAGENT_ENGINE`.
|
||||
4. `review/opencode.py` coordinates the isolated review. Workspace preparation,
|
||||
lens configuration, and finding synthesis live in focused sibling modules.
|
||||
The legacy Ollama-compatible path is still available through
|
||||
`PRAGENT_ENGINE`.
|
||||
5. The review output is parsed and normalized, valid post-change line anchors
|
||||
are separated from summary-only findings, and Gitea receives the result.
|
||||
6. `langfuse_trace.py` records usage, cost basis, findings, and evaluation
|
||||
@@ -34,7 +35,10 @@ as a PR comment and does not block CI.
|
||||
| `review/adapters.py` | Gitea/model transport and review publishing |
|
||||
| `ai_review.py` | Compatibility shim for existing imports and CI execution |
|
||||
| `review/model.py` | Anthropic-compatible model adapter and response text extraction |
|
||||
| `review/opencode.py` | Hostile-checkout containment and agent execution |
|
||||
| `review/opencode.py` | Compatibility seam and review orchestration |
|
||||
| `review/opencode_workspace.py` | Archive extraction, sanitization, brief, and factory setup |
|
||||
| `review/opencode_lens_config.py` | Reviewer lens configuration and selection |
|
||||
| `review/opencode_synthesis.py` | Lens finding normalization, deduplication, and summary synthesis |
|
||||
| `review/diff.py` | Diff compression and prior-review extraction |
|
||||
| `feedback/*.py` | Feedback persistence, harvesting, analysis, and Langfuse scores |
|
||||
| `observability/langfuse.py` | Fail-open Langfuse ingestion and cost metadata |
|
||||
|
||||
Reference in New Issue
Block a user