| Metadata | Value |
|---|---|
| Track ID | TRACK-079 |
| Title | E2E Pipeline Validation & Lyric Section Consistency Fix |
| Status | Completed |
| Created | 2026-03-08 |
| Author | Sangeetha Grantha Team |
| Depends On | TRACK-071 (TOC-Based Dikshitar Import), TRACK-064 (UEE) |
Prove the CSV bulk import + PDF extraction pipeline end-to-end with real data, and fix the critical lyric section inconsistency affecting 92% of krithis.
The pipeline needed validation with real Dikshitar compositions. During validation, a critical bug was found: KrithiMatcherService.processExtractionResult() auto-created unverified krithis when no fuzzy match was found, bypassing curator review.
435 out of 473 krithis (92%) had inconsistent krithi_lyric_sections counts across their 6 language variants. 40 krithis had at least one variant with zero sections. Root cause: the Python structure_parser.py parsed section labels differently per script and mishandled dual-format (continuous + word-division) text.
imported_krithis as PENDINGstructure_parser.py: MKS demotion from top-level to sub-section, dual-format merge, bracket header detection, Indic anusvara/explicit-m formsLyricVariantPersistenceService.kt: type+queue matching instead of index-based, MKS filtered from canonical sectionsKrithiLyricRepository.kt: ORDER BY order_index via JOIN for correct section ordering