Summary
The codebase has significant DRY (Don't Repeat Yourself) violations where configuration values are duplicated across Rust, Python, and Shell code. This creates maintenance burden and risk of inconsistency.
Critical Violations
| # |
Knowledge |
Locations |
| 1 |
Port 8765 (daemon) |
parakeet-ptt/src/config.rs:12, parakeet-stt-daemon/config.py:16, scripts/stt-helper.sh:71 |
| 2 |
Port 8080 (LLM) |
parakeet-ptt/src/main.rs:66, scripts/stt-helper.sh:87 |
| 3 |
Path /tmp/parakeet-* |
scripts/stt-helper.sh:15-22, parakeet-ptt/main.rs:3141, overlay_process.rs:1050 |
| 4 |
Header x-parakeet-secret |
parakeet-ptt/config.rs:373, parakeet-stt-daemon/server.py:131 |
| 5 |
Binary name parakeet-overlay |
main.rs:1313, overlay_renderer.rs:34,119 |
Recommended Fix
Make scripts/stt-helper.sh the single source of truth for operator-facing config. Have Rust/Python derive values from environment variables at runtime rather than hardcoding.
Note
This needs critical review before implementation - some duplications may be intentional (e.g., defense in depth). Please review each violation before refactoring.
Summary
The codebase has significant DRY (Don't Repeat Yourself) violations where configuration values are duplicated across Rust, Python, and Shell code. This creates maintenance burden and risk of inconsistency.
Critical Violations
parakeet-ptt/src/config.rs:12,parakeet-stt-daemon/config.py:16,scripts/stt-helper.sh:71parakeet-ptt/src/main.rs:66,scripts/stt-helper.sh:87/tmp/parakeet-*scripts/stt-helper.sh:15-22,parakeet-ptt/main.rs:3141,overlay_process.rs:1050x-parakeet-secretparakeet-ptt/config.rs:373,parakeet-stt-daemon/server.py:131parakeet-overlaymain.rs:1313,overlay_renderer.rs:34,119Recommended Fix
Make
scripts/stt-helper.shthe single source of truth for operator-facing config. Have Rust/Python derive values from environment variables at runtime rather than hardcoding.Note
This needs critical review before implementation - some duplications may be intentional (e.g., defense in depth). Please review each violation before refactoring.