## 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>
## Summary
- **Local stack:** `scripts/local-stack.sh up --frontend` runs the
**real** backend on the Firestore + GCS emulators with `FAKE_WORKERS=1`.
In-process fake workers move jobs through their real states in seconds,
using tiny real media, so web Playwright and mobile Maestro full-journey
tests can run offline against the same endpoints.
- **Email-code sign-in** (nomad-mobile spec §4.1): `POST
/api/users/auth/send-code` + `verify-code`. The code logic is shared
with kjbox via `LoginCodeStore`, and sends are throttled per email and
per IP.
- **Bug fix found by the new suite:** `confirm-duration` moved jobs to
`separating_stage1`, from which they can never reach review. It now
resumes at `downloading`. No prod job had taken this path yet.
## Changes
- `backend/services/fake_workers/`: dispatch seam in
`WorkerService.trigger_*`, plus fake search, download, checkout and
outbox, scenarios, and per-user config. The real stem upload, transcode,
backing-vocals analysis and preview render are reused. Every check is
strict (`is True`), so a MagicMock settings object never enables the
fakes, and startup **refuses FAKE_WORKERS in production**.
- `/api/test/*` router (mounted only in that mode): `status`,
`scenario`, `fake-config`, `emails`, `reset`, plus the fake Stripe
checkout page. Paying it runs the real webhook handler.
- `frontend/e2e/local-stack/` (9 specs, ~50s):
- sign-up → make → review → instrumental → download
- buy and cancel credits
- duration confirm, failed, complete and review states
- code sign-in and lockout
- New required CI job `local-stack-e2e`.
- Docs: TESTING.md § Local stack, DEVELOPMENT.md, API.md, README,
LESSONS-LEARNED.
- `MAX_SIGNUPS_PER_IP` can now be set by env. Only the local stack
raises it; production keeps the default of 2.
## Testing
- [x] Backend unit: 6175 passed
- [x] Emulator: 152 passed
- [x] Frontend Jest: 1706 passed
- [x] Local-stack Playwright: 9/9 passed (CI mode)
## Review
- [x] CodeRabbit CLI review completed locally. 1 minor finding declined:
it suggested swallowing infrastructure errors in send-code as fake
"sent" responses, which would hide real outages from users.
@coderabbitai ignore
---
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01AGuxtgoscF6RJGtpjHPg3W
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
## Summary
Enhances the Custom Lyrics LLM mode with syllable-count validation and
per-line repair, plus user-facing settings (`allow_reword`,
`allow_omit`, `fixed_line_count`, `strictness`) and a per-line preview
UI showing target/actual syllables and severity badges.
- **Backend**: New `GenerationSettings` model, validator computing
per-line `min_delta` against the existing `SyllablesMatchHandler`
engine, repair loop (max 3 iterations, plateau-aware on the full
`(violations, total_delta)` score tuple), proportional timing
redistribution for variable-line-count outputs, structured per-iteration
logging with worst-3-line breadcrumbs.
- **Frontend**: Collapsible `CustomLyricsSettings` panel (3 toggles +
5-button strictness segmented control with ARIA group semantics +
contradiction warning), `CustomLyricsPreview` with severity badges +
iterations badge + stop-reason banner, wired into existing
`CustomLyricsMode` modal. Snake-case API response shape
(`line_metadata`, `iterations_used`, `stop_reason`, `settings_applied`,
`new_segment_timing`).
- **i18n**: 33 new keys across 33 locales (auto-translated via Gemini
pipeline).
- **Eval harness**: `backend/eval/custom_lyrics/` with disk-backed
Gemini cache (record-and-replay), per-line + per-fixture + corpus
scorers, CLI runner (`make eval-custom-lyrics`), and 4 fixtures (Year 5
Stars from production + 3 handcrafted public-domain).
- **Production E2E**: Updated existing test for the new preview UI + 3
new tests for settings panel toggles.
## Risk / Deferred Validation
The eval harness is built and ready, but **Phase 8 baseline capture
(v1-ships criteria validation) was deferred** — we ship and test in
prod. If the Year-5-Stars fixture doesn't hit `pct_pass_at_2 >= 75%`
post-merge, the spec lists fallback paths (chunked generation, per-line
repair); the eval can be run anytime via `make eval-custom-lyrics`.
Repair-loop logging is structured and rich so any prod failure is
diagnosable from Cloud Logging without re-running locally — log
breadcrumbs include per-iteration violation count, score deltas, and the
worst 3 failing lines with their target/candidate text + syllable
arrays.
## Test plan
- [x] Backend unit tests: 77 passing
- [x] Frontend unit tests: 32 passing across CustomLyricsSettings,
CustomLyricsPreview, CustomLyricsMode, customLyrics API client,
segmentsFromLines
- [x] TypeScript compiles cleanly for the touched files
- [x] CodeRabbit local review run; real bugs in timing.py (median +
zero-syllable) and validator.py (segment-duration hardening) fixed
inline
- [ ] **Post-merge**: real Gemini run against Year-5-Stars production
job, check Cloud Logging for `custom_lyrics_repair_iter_complete`
events, verify `pct_pass_at_2` matches expectations
- [ ] **Post-merge**: run prod E2E suite once admin token is plumbed in
CI (or manually)
@coderabbitai ignore
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
## Summary
- Adds a third mode ("Replace Segment Lyrics") to the Edit All Lyrics
modal, enabling users to swap custom lyrics line-by-line while
preserving existing segment timing
- Extracts `createWordsWithDistributedTiming` shared utility from
EditModal for reuse
- Fixes Makefile `build-frontend` to clean stale output before copying
(was causing old JS chunks to persist)
- Restores accidentally deleted `nextjs_frontend/__init__.py`
## Test plan
- [x] Unit tests for `createWordsWithDistributedTiming` (8 cases)
- [x] Component tests for Replace Segments mode (17 cases)
- [x] E2E Playwright tests (8 cases)
- [x] All 306 Jest tests pass
- [x] Manual local testing with real audio file via `karaoke-gen` CLI
@coderabbitai ignore
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
## Summary
Merges the two-step human review process (lyrics review → instrumental
selection) into a single unified flow. Users now review lyrics AND
select instrumental track in one session.
**Benefits:**
- Better UX (one interaction vs two)
- Reduced drop-off between steps
- Single email notification instead of two
- Simpler workflow
## Changes
### Backend
- `complete_review` endpoint now accepts optional
`instrumental_selection` in request body
- Backing vocals analysis moved from `render_video_worker` to
`screens_worker` (runs before review)
- Removed standalone instrumental selection endpoints (now part of
combined review)
- Added `CompleteReviewRequest` model with validation
### Frontend
- New `InstrumentalSelectorEmbedded` component for combined review UI
- `LyricsAnalyzer` updated to proceed to instrumental review
- `ReviewChangesModal` shows "Proceed to Instrumental Review" button
- Mock data updated in E2E tests
### Local CLI
- `gen_cli.py` refactored to use `run_combined_review()` instead of
separate `run_instrumental_review()`
- `ReviewServer` extended with instrumental options and analysis
- Deleted standalone `InstrumentalReviewServer`
### Documentation
- Updated `docs/README.md` with recent changes entry
- Updated `docs/ARCHITECTURE.md` with new pipeline diagram
- Updated `docs/API.md` with endpoint changes
- Added lesson to `docs/LESSONS-LEARNED.md`
## Test plan
- [x] Backend unit tests: 1742 passed
- [x] Frontend unit tests: 234 passed
- [x] New integration tests: 5 tests for combined flow
- [x] New backend tests: 7 tests for CompleteReviewRequest and
state_data
- [x] New frontend E2E tests: 6 tests for combined flow UI
🤖 Generated with [Claude Code](https://claude.com/claude-code)
@coderabbitai ignore
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
## Summary
- **`make test` now runs ALL tests** (backend + frontend) and
auto-installs dependencies if missing
- Added clear "All tests must pass" guidance - agents should never
dismiss failures as "pre-existing"
- Fixed misplaced test that was always failing (tested wrong frontend)
- Fixed logo locator bug in landing-page test
## Changes
| File | Change |
|------|--------|
| `Makefile` | Auto-install deps, unified `make test`, added
`test-backend`/`test-frontend` |
| `CLAUDE.md` | Simplified to just `make test` |
| `docs/DEVELOPMENT.md` | Consolidated testing section |
| `docs/TESTING.md` | Updated guidance and quick reference |
| `frontend/e2e/regression/landing-page.spec.ts` | Fixed `getByText` →
`getByAltText` for logo |
| `frontend/e2e/manual/` | Moved `lyrics-review-mobile.spec.ts` here
with README |
## Test plan
- [x] `make test` passes all 153 tests (76 backend + 77 frontend)
- [x] Auto-install works in fresh worktree
- [x] Documentation is clear and consistent
@coderabbitai ignore
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
- Fix broken countdown processor tests (removed API methods that don't exist)
- Fix asyncio tests in test_instrumental_api.py (use pytest.mark.asyncio)
- Fix flaky test_search_returns_results (clear _remote_client to force mock)
- Fix youtube_description_template not passed through job_manager.create_job
- Fix Config fixture in E2E tests (add poll_interval and output_dir)
- Add Makefile with `make test` for running all tests
- Update CI to run all backend tests (not just specific files)
- Update cursor rule to specify full test suite requirements
- Version bump to 0.75.53