refactor: make review facade thin

This commit is contained in:
Claude
2026-09-01 01:05:54 +00:00
parent 7a510a926d
commit c948f2818b
4 changed files with 2391 additions and 2374 deletions
+4 -2
View File
@@ -24,8 +24,10 @@ review_pr facade/orchestrator
## Seams and responsibilities
The external seam is `ai_review.review_pr(...)`: one call represents one review
attempt and returns success/skip status. The top-level module is a compatibility
shim; the implementation lives in `review/ai_review.py`.
attempt and returns success/skip status. The top-level module and
`review/ai_review.py` are compatibility facades; the current implementation is
temporarily isolated in `review/_legacy.py` while its responsibilities are
extracted into smaller modules.
The internal seams are deliberately narrower:
+2 -1
View File
@@ -26,7 +26,8 @@ as a PR comment and does not block CI.
| `entrypoints/webhook.py` | HTTP ingress, signature verification, opt-in gate, concurrency |
| `review/config.py` | Trusted base-branch opt-in policy; transport injected for tests |
| `entrypoints/gitea.py` | HTTP transport adapter and repository-scoped client |
| `review/ai_review.py` | Review orchestration implementation |
| `review/ai_review.py` | Small public review facade |
| `review/_legacy.py` | Current review implementation, retained privately during extraction |
| `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 |
File diff suppressed because it is too large Load Diff
+9 -2371
View File
File diff suppressed because it is too large Load Diff