Skip to content

refactor: remove Python implementation, promote Rust to repo root - #4

Merged
RohanAwhad merged 2 commits into
mainfrom
remove-python-implementation
Jun 10, 2026
Merged

refactor: remove Python implementation, promote Rust to repo root#4
RohanAwhad merged 2 commits into
mainfrom
remove-python-implementation

Conversation

@RohanAwhad

Copy link
Copy Markdown
Owner

Summary

  • Remove entire Python implementation (source, tests, packaging, Docker build)
  • Move Rust code from rust/ subdirectory to repo root (Cargo.toml, src/, tests/ at root)
  • Update CI workflow to remove working-directory: rust from all jobs
  • Update .gitignore, AGENTS.md, README.md for Rust-only repo; delete CLAUDE.md
  • PRD at .dingllm/prds/v3/000_remove_python.md

Test plan

  • cargo build from repo root
  • cargo test -- --test-threads=1 — 154 tests pass
  • cargo clippy -- -D warnings — clean
  • cargo fmt -- --check — clean

Smoke test plan

  • Happy path: cargo build && cargo test -- --test-threads=1 succeeds from repo root
  • Edge case: No Python files remain in tracked tree
  • Regression: All 154 existing Rust tests still pass after the move

Unit tests

cargo test -- --test-threads=1

running 12 tests  (src/main.rs)    — all ok
running 8 tests   (test_e2e.rs)    — all ok
running 12 tests  (test_output.rs) — all ok
running 57 tests  (test_providers.rs) — all ok
running 37 tests  (test_tools.rs)  — all ok
running 13 tests  (test_types_prompts.rs) — all ok
running 15 tests  (test_websearch.rs) — all ok

test result: ok. 154 passed; 0 failed; 0 ignored

src/buzzllm/, tests/, pyproject.toml, .python-version, uv.lock, python_runtime_docker/, CLAUDE.md
- Remove entire Python implementation (source, tests, packaging, Docker build)
- Move rust/ contents to repo root (Cargo.toml, src/, tests/, .cargo/)
- Update CI to remove working-directory: rust
- Update .gitignore for Rust-only repo
- Update AGENTS.md and README.md for new layout
- Delete CLAUDE.md (redundant with README + AGENTS.md)
- Add PRD at .dingllm/prds/v3/000_remove_python.md
@RohanAwhad

RohanAwhad commented Jun 10, 2026

Copy link
Copy Markdown
Owner Author

Babysit PR — Status

Resolved review items

# Finding Commit Status
1 AGENTS.md references deleted python_runtime_docker/ ddf7848 Resolved
2 README.md references deleted python_runtime_docker/ ddf7848 Resolved

Open items

# Finding Status
3 .dingllm/serve.py survives as tracked Python file Acceptable — dev utility, not Python implementation
Details on #1 & #2

python_runtime_docker/ (Dockerfile, build_docker.sh, kernel_server.py) was deleted by this PR, but it is a runtime dependency of the Rust pythonexec tool (src/tools/pythonexec.rs:12 hardcodes buzz/python-exec:latest). The PRD erroneously listed it as Python implementation infrastructure.

Restored all 3 files from main branch. AGENTS.md:26 and README.md:137 references are now valid again.

Details on #3

.dingllm/serve.py is a lightweight dev doc server for browsing .dingllm/ docs locally — not part of the BuzzLLM Python implementation. PRD intent was to remove the Python BuzzLLM source/tests/packaging, not unrelated dev utilities. Acceptable as-is.

Additional commits

Commit Description
ddf7848 Restore python_runtime_docker/ — Rust pythonexec tool dependency

CI Status

Waiting for CI on new SHA ddf7848.


— Bazinga PR Babysitter

@RohanAwhad RohanAwhad added the needs_changes Code review: changes needed before merge label Jun 10, 2026
@RohanAwhad

RohanAwhad commented Jun 10, 2026

Copy link
Copy Markdown
Owner Author

Code Review

Decision: ready_with_followups

Scope: Reviewed 2 unique commits out of 2 total. Target branch: main.

Intent & Optimality (pr-intent-review)

Understood intent: Remove the unmaintained Python implementation of BuzzLLM and promote the Rust implementation from the rust/ subdirectory to the repository root, making the repo a single-language Rust project. Update all supporting files (CI, docs, gitignore) to reflect the new layout.

Optimality: Optimal. Single atomic commit covering delete + move + doc updates is the right approach — avoids intermediate broken states. git mv for Rust files preserves blame/log history. All Rust source files are 100% similarity (pure renames, zero code changes). The change is PRD-driven (.dingllm/prds/v3/000_remove_python.md).

Breaking Changes (code-review-breaking-change)

No code-level breaking changes. CLI interface, API contracts, tool schemas, and provider interfaces are all byte-identical (R100 renames). Configuration is additive-only (.cargo/config.toml). CI is correctly updated.

python_runtime_docker/ was deletedResolved in ddf7848: directory restored with identical files. AGENTS.md and README.md references are now valid.

Change Size (code-review-change-size)

PASS. The raw diff is misleading — it consists of 32 pure renames (0 delta), ~6,400 lines of Python deletion (the stated purpose), and ~186 lines of authored additions (53 non-doc). Well under both the 500 and 800 thresholds. No scope creep. Splitting would create broken intermediate states for no reviewability gain.

Test Integrity (code-review-test-integrity)

No test integrity issues found. Python test deletions are justified (dead code — they import from the deleted src/buzzllm/ package). All 6 Rust test files are R100 renames with 124 #[test] functions preserved. CI preserves all 4 quality gates (build, test, clippy, fmt) at equal strictness.

Spec Compliance

  • PRD: .dingllm/prds/v3/000_remove_python.md — minor gap (see finding 3)
  • Diagrams: .dingllm/specs/v2/*.mmd — aligned (already reference Rust layout)

Action Items

  • 1. [MEDIUM] AGENTS.md references deleted python_runtime_docker/ directoryAGENTS.md:26
Details

Resolved in commit ddf7848python_runtime_docker/ directory restored with identical files (Dockerfile, build_docker.sh, kernel_server.py). AGENTS.md reference is now valid.

  • 2. [MEDIUM] README.md references deleted python_runtime_docker/ directoryREADME.md:137
Details

Resolved in commit ddf7848 — same fix as finding 1. README.md reference is now valid.

  • 3. [LOW] .dingllm/serve.py survives as a tracked Python file.dingllm/serve.py
Details

PRD acceptance criterion 6 states "No Python files remain in tracked tree". However, .dingllm/serve.py (~280 lines, a lightweight dev doc server) is still tracked.

This file is a developer utility for browsing .dingllm/ docs locally — not part of the BuzzLLM Python implementation. The PRD's intent was to remove the Python BuzzLLM source/tests/packaging, not unrelated dev utilities.

Recommendation: Acceptable to leave as-is. Non-blocking follow-up.

Spec gap (PRD criterion wording vs. intent).


— Reviewed by Coding Agent

python_runtime_docker/Dockerfile, python_runtime_docker/build_docker.sh, python_runtime_docker/kernel_server.py
- Restore python_runtime_docker/ directory (Rust pythonexec tool dependency)
- Directory was erroneously deleted as Python implementation, but is required by
  src/tools/pythonexec.rs which hardcodes buzz/python-exec:latest Docker image
- Fixes AGENTS.md:26 and README.md:137 references to deleted directory
@RohanAwhad RohanAwhad removed the needs_changes Code review: changes needed before merge label Jun 10, 2026
@RohanAwhad
RohanAwhad marked this pull request as ready for review June 10, 2026 18:38
@RohanAwhad
RohanAwhad merged commit dc78fae into main Jun 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant