mirror of
https://github.com/nomadkaraoke/karaoke-gen.git
synced 2026-11-20 13:07:57 +09:00
## Summary
Every `Deploy - Publish to PyPI` since v0.279.4 (about 10-22) has failed
with `400 File too large. Limit for project 'karaoke-gen' is 100 MB`.
The wheel had grown to 110 MB (105.1 MiB), so PyPI is still on 0.279.4.
Backend deploys were not affected. I found this while watching deploys
during an alerts-triage session.
In the wheel, 66 MB of the bundled Next.js export is RSC `.txt` payloads
(about 3 MB per locale × 33). The only thing that uses the export is the
CLI local-review server
(`karaoke_gen/lyrics_transcriber/review/server.py`). It mounts only
`/_next` and `/static`, and every other route returns an HTML entry
point. Next's RSC fetch paths (`/{locale}/app/.../index.txt`) already
get HTML from those routes, so the `.txt` files are never served.
- `make build-frontend` deletes `*.txt` from the copied export. On the
real CI wheel from run 40826404322 this takes it from 105.1 MiB to 41.1
MiB.
- `scripts/verify_wheel_frontend.py`, which already runs in both
package-build jobs, now fails above 95 MiB. Growth will show up on the
PR instead of as a failed publish after merge.
## Testing
- New `tests/unit/test_verify_wheel_frontend.py`: 5 tests covering the
pass case, missing entrypoint, too few files, the size guard, and
headroom below 100 MiB.
- Re-zipped the real 0.286.0 CI wheel without the `.txt` files: 41.1
MiB, and the verifier passes. The verifier rejects the original wheel
(105.1 MiB) with the new error.
- CodeRabbit: 1 finding ("deleting RSC payloads can break client
navigation"). Skipped, because the local server never serves those files
(see above), so it can't change runtime behaviour.
@coderabbitai ignore
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_012RYLVTiUPKxn3sQPyp3Teh
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Unit Tests for KaraokePrep
This directory contains unit tests for the KaraokePrep class.
Test Files
The tests are organized into the following files:
test_initialization.py: Tests for initialization and basic functionalitytest_file_operations.py: Tests for file operations (copy, download, convert)test_metadata.py: Tests for metadata extraction and parsingtest_lyrics.py: Tests for lyrics processingtest_audio.py: Tests for audio processing and separationtest_video.py: Tests for video creation and processingtest_async.py: Tests for async methods
Running the Tests
To run the tests, you need to have the test dependencies installed:
pip install -r requirements-test.txt
Then you can run the tests with:
python run_tests.py
This will run all the tests and generate a coverage report.
Checking Test Files
If you want to check if the test files are valid Python code without running the tests, you can use:
python check_tests.py
This will check if all the test files can be imported without errors.
Test Coverage
The tests aim to cover all the functionality of the KaraokePrep class. The coverage report will show you which parts of the code are covered by the tests.