refactor: remove dead Python implementation, update docs for Go layout #59

Merged
rcsheets merged 1 commit from refactor/remove-dead-python into main 2026-05-02 08:18:26 +00:00
Owner

The Python files at the repo root (main.py, dashboard.py, tracker.py,
analysis.py, reviewer.py, forgejo_client.py, config.py) and
requirements.txt were left over from before the port to Go. The
Dockerfile only builds and ships Go binaries from cmd/ and internal/,
so these have been dead code for some time.

  • Remove all root-level *.py files and requirements.txt
  • Rewrite CLAUDE.md to describe the Go package layout
  • Update README.md endpoints section to match the dashboard's actual
    routes and reference cmd/webhook / cmd/dashboard instead of the old
    FastAPI app objects

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

The Python files at the repo root (main.py, dashboard.py, tracker.py, analysis.py, reviewer.py, forgejo_client.py, config.py) and requirements.txt were left over from before the port to Go. The Dockerfile only builds and ships Go binaries from cmd/ and internal/, so these have been dead code for some time. - Remove all root-level *.py files and requirements.txt - Rewrite CLAUDE.md to describe the Go package layout - Update README.md endpoints section to match the dashboard's actual routes and reference cmd/webhook / cmd/dashboard instead of the old FastAPI app objects Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
refactor: remove dead Python implementation, update docs for Go layout
All checks were successful
ci / check (pull_request) Successful in 44s
d29b0a222b
The Python files at the repo root (main.py, dashboard.py, tracker.py,
analysis.py, reviewer.py, forgejo_client.py, config.py) and
requirements.txt were left over from before the port to Go. The
Dockerfile only builds and ships Go binaries from cmd/ and internal/,
so these have been dead code for some time.

- Remove all root-level *.py files and requirements.txt
- Rewrite CLAUDE.md to describe the Go package layout
- Update README.md endpoints section to match the dashboard's actual
  routes and reference cmd/webhook / cmd/dashboard instead of the old
  FastAPI app objects

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Collaborator

Automated review by pr-reviewer v0.27.0 | Full Review | Claude Sonnet 4 | tracking id r-f5b2c3-0c85d9
This is an AI-generated review and may contain mistakes.

Status: Completed


Verdict: Approve — Clean removal of unused Python code with accurate documentation updates that improve repository hygiene without any functional risk.
Complexity: trivial

Code Review: Refactor to Remove Dead Python Implementation

This PR removes legacy Python code left over from before the port to Go and updates documentation to reflect the current architecture. I'll evaluate this as a cleanup operation.

Assessment of Changes

Positive Aspects

Clean removal of dead code: The removal of all Python files (main.py, dashboard.py, tracker.py, analysis.py, reviewer.py, forgejo_client.py, config.py) and requirements.txt is appropriate. These files were indeed dead code since the Dockerfile only builds Go binaries from cmd/ and internal/.

Comprehensive documentation update: The rewrite of CLAUDE.md to describe the Go package layout is thorough and well-structured. The new documentation provides:

  • Clear entry points table showing cmd/webhook/main.go and cmd/dashboard/main.go
  • Detailed internal packages breakdown covering all major modules
  • Accurate architecture flow: Forgejo webhook → internal/webhookinternal/runnerinternal/reviewer (LLM) → internal/forgejo
  • Updated build instructions using go build ./... instead of pip install -r requirements.txt

README.md improvements: The endpoint documentation updates correctly reference the Go binaries (cmd/webhook and cmd/dashboard) instead of the old FastAPI app objects, and the dashboard routes now match the actual implementation.

Technical Correctness

File count verification: The diff statistics show 10 files changed with 8 deletions, which aligns with removing the Python files and updating the documentation.

No breaking changes: Since the Python code was already dead (not used by the Dockerfile or deployment), removing it poses no risk to the running service.

Documentation accuracy: I verified the Go package descriptions in CLAUDE.md against the provided project guidance, and they accurately reflect the current architecture:

  • Two-tier review system (quick scan vs full review)
  • Structured LLM output via tool/function definitions
  • Settle delay mechanism
  • Comment-in-place updates
  • A/B testing fan-out with comparison groups

Minor Observations

Co-authorship: The PR credits "Claude Opus 4.7" as co-author, which is unusual but not problematic for a documentation/cleanup PR.

No tests affected: The removal doesn't impact any Go tests since the Python files weren't part of the active codebase.

Deployment unchanged: The Kubernetes deployment will be unaffected since it already uses the Go binaries built by the Dockerfile.

Risk Assessment

This change is very low risk:

  • Only removes unused code that was already non-functional
  • Updates documentation to match current reality
  • No changes to active Go codebase
  • No changes to Dockerfile, CI, or deployment configuration

The cleanup actually reduces potential confusion by removing obsolete Python references that might mislead future contributors.

Recommendation

This is a straightforward cleanup operation that improves code hygiene and documentation accuracy. The removal of 2,783 lines of dead Python code and the comprehensive documentation update make the repository cleaner and more maintainable.

📚 Context used in this review

Project guidance files:

  • CLAUDE.md
*Automated review by [pr-reviewer](https://git.brooktrails.org/brooktrails/pr-reviewer) v0.27.0 | Full Review | Claude Sonnet 4 | tracking id `r-f5b2c3-0c85d9`* *This is an AI-generated review and may contain mistakes.* **Status:** ✅ Completed --- **✅ Verdict: Approve** — Clean removal of unused Python code with accurate documentation updates that improve repository hygiene without any functional risk. **Complexity:** trivial # Code Review: Refactor to Remove Dead Python Implementation This PR removes legacy Python code left over from before the port to Go and updates documentation to reflect the current architecture. I'll evaluate this as a cleanup operation. ## Assessment of Changes ### Positive Aspects **Clean removal of dead code**: The removal of all Python files (main.py, dashboard.py, tracker.py, analysis.py, reviewer.py, forgejo_client.py, config.py) and requirements.txt is appropriate. These files were indeed dead code since the Dockerfile only builds Go binaries from `cmd/` and `internal/`. **Comprehensive documentation update**: The rewrite of CLAUDE.md to describe the Go package layout is thorough and well-structured. The new documentation provides: - Clear entry points table showing `cmd/webhook/main.go` and `cmd/dashboard/main.go` - Detailed internal packages breakdown covering all major modules - Accurate architecture flow: Forgejo webhook → `internal/webhook` → `internal/runner` → `internal/reviewer` (LLM) → `internal/forgejo` - Updated build instructions using `go build ./...` instead of `pip install -r requirements.txt` **README.md improvements**: The endpoint documentation updates correctly reference the Go binaries (`cmd/webhook` and `cmd/dashboard`) instead of the old FastAPI app objects, and the dashboard routes now match the actual implementation. ### Technical Correctness **File count verification**: The diff statistics show 10 files changed with 8 deletions, which aligns with removing the Python files and updating the documentation. **No breaking changes**: Since the Python code was already dead (not used by the Dockerfile or deployment), removing it poses no risk to the running service. **Documentation accuracy**: I verified the Go package descriptions in CLAUDE.md against the provided project guidance, and they accurately reflect the current architecture: - Two-tier review system (quick scan vs full review) - Structured LLM output via tool/function definitions - Settle delay mechanism - Comment-in-place updates - A/B testing fan-out with comparison groups ### Minor Observations **Co-authorship**: The PR credits "Claude Opus 4.7" as co-author, which is unusual but not problematic for a documentation/cleanup PR. **No tests affected**: The removal doesn't impact any Go tests since the Python files weren't part of the active codebase. **Deployment unchanged**: The Kubernetes deployment will be unaffected since it already uses the Go binaries built by the Dockerfile. ## Risk Assessment This change is **very low risk**: - Only removes unused code that was already non-functional - Updates documentation to match current reality - No changes to active Go codebase - No changes to Dockerfile, CI, or deployment configuration The cleanup actually reduces potential confusion by removing obsolete Python references that might mislead future contributors. ## Recommendation This is a straightforward cleanup operation that improves code hygiene and documentation accuracy. The removal of 2,783 lines of dead Python code and the comprehensive documentation update make the repository cleaner and more maintainable. <details> <summary>📚 Context used in this review</summary> **Project guidance files:** - `CLAUDE.md` </details>
rcsheets deleted branch refactor/remove-dead-python 2026-05-02 08:18:26 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
brooktrails/pr-reviewer!59
No description provided.