## Summary - Disabled all auto-correction during lyrics transcription (both agentic AI via Gemini and heuristic rule-based handlers) - Raw transcription now goes directly to human review without automatic fixes - This change was made because auto-correction was creating more work for reviewers by introducing errors that needed manual correction ## Changes - Added `SKIP_CORRECTION` env var (default: `true`) in `backend/config.py` - Updated `LyricsProcessor` to check skip_correction and set `run_correction=False` - Added `_create_uncorrected_result()` method to controller for review UI compatibility - Updated docs to reflect disabled status ## How to Re-enable Set `SKIP_CORRECTION=false` environment variable to re-enable auto-correction if quality improves in the future. ## Test plan - [x] All 1605 tests pass - [x] Test review: Changes are configuration-driven, existing code paths remain tested - [x] CodeRabbit review: Passed clean @coderabbitai ignore 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
4.7 KiB
Plan: Disable Auto-Correction (Agentic and Heuristic)
Created: 2026-01-20 Branch: feat/sess-20260120-1914-disable-auto-correction Status: Draft
Overview
Disable all auto-correction during the lyrics transcription & correction phase. Currently, auto-correction (both agentic AI-based and heuristic rule-based) creates more work for human reviewers by introducing errors that need to be manually fixed. The solution is to skip all correction processing and pass the raw transcription directly to human review.
Requirements
- Disable agentic AI correction (LLM-based via Gemini)
- Disable heuristic correction (rule-based handlers like ExtendAnchorHandler, WordCountMatchHandler, etc.)
- Preserve the transcription → human review → video generation flow
- Minimal code changes (configuration-based if possible)
- Easy to re-enable in the future if correction quality improves
Technical Approach
The simplest approach is to change the backend configuration default for use_agentic_ai from true to false, AND ensure that when agentic AI is disabled, the heuristic handlers also don't run.
Current behavior:
backend/config.pyline 46:use_agentic_aidefaults totruelyrics_worker.pysetsUSE_AGENTIC_AIenv var based on configcorrector.pyline 84/132: ChecksUSE_AGENTIC_AIenv var- When agentic is disabled, rule-based handlers still run (lines 669-733)
Proposed changes:
Option A: Add a new skip_correction config (Recommended)
Add a single boolean skip_correction setting that:
- When
true: Skips the entire correction process, returning raw transcription - When
false(future): Falls back to existing agentic/heuristic behavior
This is cleaner than disabling both systems separately because:
- Single config controls both
- Clear intent ("skip correction" vs "disable two different systems")
- Easy to understand for future maintainers
Option B: Just disable both individually
- Set
use_agentic_aidefault tofalse - Disable default heuristic handlers by setting
enabled_handlers=[]
Option A is cleaner, but Option B requires fewer code changes.
Decision: Option A - Add skip_correction config for clarity and easier future re-enablement.
Implementation Steps
-
Add
skip_correctionconfig to backend/config.py- Add
skip_correction: boolsetting, defaulttrue - Comment explaining this disables both agentic and heuristic correction
- Add
-
Update lyrics_worker.py to pass skip_correction
- Pass the config value through to LyricsProcessor/LyricsTranscriber
-
Update corrector.py to support skip_correction
- When
skip_correction=True, return immediately with uncorrected segments - No handler processing, no agentic AI
- Still need to do anchor/gap finding? No - skip entirely
- When
-
Update LyricsProcessor to support skip_correction
- Pass through to LyricsTranscriber
-
Update LyricsTranscriber controller to support skip_correction
- Pass through to corrector or skip corrector.run() entirely
-
Update docs/README.md
- Note that auto-correction is disabled
- Update "Agentic AI correction" status to "Disabled"
-
Run tests to verify no regressions
Files to Create/Modify
| File | Action | Description |
|---|---|---|
backend/config.py |
Modify | Add skip_correction config (default: true) |
backend/workers/lyrics_worker.py |
Modify | Pass skip_correction to transcription |
karaoke_gen/lyrics_transcriber/correction/corrector.py |
Modify | Return early when skip_correction=True |
karaoke_gen/lyrics_transcriber/controller.py |
Modify | Pass skip_correction to corrector |
karaoke_gen/lyrics_processor.py |
Modify | Pass skip_correction through |
docs/README.md |
Modify | Update status to reflect disabled correction |
Testing Strategy
- Unit tests: No new tests needed - this is a config change
- Existing tests: Run
make testto ensure no regressions - Manual verification: The correction metadata in the corrections.json should show no corrections made
Open Questions
None - the approach is straightforward.
Rollback Plan
To re-enable auto-correction:
- Set
SKIP_CORRECTION=falseenvironment variable, OR - Change the default back to
falseinbackend/config.py
The code paths for agentic and heuristic correction remain intact and can be re-enabled at any time.
Alternative Considered
Instead of adding a new config, we could:
- Set
USE_AGENTIC_AI=false(disables agentic) - Set
enabled_handlers=[]somewhere (disables heuristic)
But this is more fragmented and harder to understand. A single skip_correction config is clearer.