| Metadata | Value |
|---|---|
| Status | Active |
| Version | 1.0.0 |
| Last Updated | 2026-09-10 |
| Author | Sangita Grantha Team |
| Document Type | Evidence record |
[!NOTE] Historical evidence: results, counts, commands, and observations below belong to the original work described here. The editorial update date is not a new test or corpus verification. For present behavior, use current feature map.
This document captures the implementation status, validation runs, detailed non-convergence analysis, and next actions for the extraction unification work (HTML + PDF + queue/worker/ingest).
Use this as the starting context for the next session.
202 Accepted + enqueue side effect).rAgaM ... tALaM ... lines is implemented.notConverged=3.database/migrations/31__extraction_queue_html_support.sql
extraction_queue.source_format check constraint to include HTML.database/migrations/32__normalize_entity_resolution_cache_confidence.sql
entity_resolution_cache.confidence to integer range 0..100.database/migrations/33__fix_krithi_lyric_variants_lyrics_index.sql
md5(lyrics) index to avoid large-row index failures.database/migrations/34__repair_krithi_lyric_variants_lyrics_index.sql
idx_krithi_lyric_variants_lyrics_md5).modules/backend/api/src/main/kotlin/com/sangita/grantha/backend/api/services/ImportService.kt
ENQUEUE_HTML_EXTRACTION_FROM_IMPORT.modules/backend/api/src/main/kotlin/com/sangita/grantha/backend/api/routes/ImportRoutes.kt
/v1/admin/imports/scrape now enqueues via import service instead of inline scrape path.modules/backend/api/src/test/kotlin/com/sangita/grantha/backend/api/routes/ImportRoutesTest.kt
202 Accepted, HTML task enqueue, idempotency, and no direct web-scraper call.modules/backend/api/src/main/kotlin/com/sangita/grantha/backend/api/services/ExtractionResultProcessor.kt
modules/backend/dal/src/main/kotlin/com/sangita/grantha/backend/dal/repositories/KrithiRepository.kt
tools/krithi-extract-enrich-worker/src/html_extractor.py
tools/krithi-extract-enrich-worker/src/worker.py
source_format=HTML._should_force_ocr_for_garbled_devanagari(...) heuristic and routes PDFs to OCR when text is corrupted.HTML_JSOUP, PDF_PYMUPDF, PDF_OCR).tools/krithi-extract-enrich-worker/src/metadata_parser.py
Guru Guha Vaibhavam: ...).rAgaM kumudakriyA - tALaM - rUpakaM.title_hint is present.tools/sangita-cli/src/commands/test.rs
blogspot-htmlakhila-three-sourcedikshitar-a-seriestools/sangita-cli/README.md
tools/krithi-extract-enrich-worker/tests/test_html_extractor.pytools/krithi-extract-enrich-worker/tests/test_metadata_parser.pytools/krithi-extract-enrich-worker/tests/test_worker.pyRecent worker/parser verification:
uv run pytest tests/test_metadata_parser.py tests/test_worker.py -> passed (9 passed).Ran multiple extraction-e2e --scenario blogspot-html tasks for specific URLs; each reached INGESTED and created evidence.
Examples:
abhyaambaam-bhaktim -> task 7dac8668-cf87-49f2-a932-04a1d1c94622abhayaambikaayaah-anyam -> task f640a360-e59e-4ee6-89e2-597868c62403abhayaambikaayai -> task a7b9d470-f3fa-4715-87e2-12a3402176beCommand:
cargo run --manifest-path /Users/seshadri/project/sangeetha-grantha/tools/sangita-cli/Cargo.toml -- \
test extraction-e2e \
--scenario dikshitar-a-series \
--csv-path /tmp/dikshitar-a-next-batch.csv \
--english-pdf-path /Users/seshadri/Downloads/mdeng-A-series.pdf \
--sanskrit-pdf-path /Users/seshadri/Downloads/mdskt-A-series.pdf \
--skip-migrations \
--skip-extraction-start \
--timeout-seconds 300
Run summary:
totalRows=3successfulRows=3failedRows=0converged=0partial=0notConverged=3englishPdfKrithis=24sanskritPdfKrithis=25PDF baseline task ids from this run:
45b8e077-aabf-4f4f-bfb7-73754654d4d2ab325d75-8568-431f-8030-ea2e017b731bHTML task ids from this run:
abhyaambaam-bhaktim -> 4afe50c0-7f21-4320-855f-02a6c294279aabhayaambikaayaah-anyam -> b4f7f1c7-178e-4b44-a878-f31e89c60c95abhayaambikaayai -> 95c45693-0cca-4344-8117-fa29a1546375http://guru-guha.blogspot.com/2007/08/dikshitar-kriti-abhyaambaam-bhaktim.html
http://guru-guha.blogspot.com/2007/08/dikshitar-kriti-abhayaambikaayaah-anyam.html
http://guru-guha.blogspot.com/2007/08/dikshitar-kriti-abhayaambikaayai.html
abhyaambaam-bhaktimd30e1f33-b8ac-45cc-88e2-519388986ea1 (Abhyaambaayaam Bhaktim)64508e83-5fc3-433f-8bd3-721ba0fff7f664508e83-5fc3-433f-8bd3-721ba0fff7f6abhayaambikaayaah-anyam553e819e-20e3-4fcc-aa02-f29c1f1f76292429a37c-fec9-4ec0-8f93-5c93aefd92062429a37c-fec9-4ec0-8f93-5c93aefd9206abhayaambikaayaib021a5e5-6371-4c35-88d0-597c41574318abhayambikayaiabhayambikayai (Devanagari)krithi_source_evidence in this run.For run tag 1770913249:
10, 1316This matches the repeated symptom: result_count = 26, but evidence rows are lower (24/25).
rAgaM kumudakriyA - tALaM - rUpakaMKumudakriya / Rupakam.method=PDF_OCR).... yai vs ... yA and short-truncated HTML titles (... aSva) can still steer matches toward existing non-canonical entries.extraction_queue.result_payload -> ExtractionResultProcessor loop -> krithi_source_evidence inserts.evidence_count == result_count for a controlled multi-page fixture.WITH eng AS (
SELECT page_range::int AS p
FROM krithi_source_evidence
WHERE source_url = '<eng-url-with-run>'
AND page_range ~ '^[0-9]+$'
),
skt AS (
SELECT page_range::int AS p
FROM krithi_source_evidence
WHERE source_url = '<skt-url-with-run>'
AND page_range ~ '^[0-9]+$'
)
SELECT 'eng' AS src, gs AS missing_page
FROM generate_series(1,26) gs
WHERE gs NOT IN (SELECT p FROM eng)
UNION ALL
SELECT 'skt' AS src, gs AS missing_page
FROM generate_series(1,26) gs
WHERE gs NOT IN (SELECT p FROM skt)
ORDER BY src, missing_page;
SELECT source_url, krithi_id, extracted_at, raw_extraction->>'title' AS extracted_title
FROM krithi_source_evidence
WHERE source_url LIKE 'http://guru-guha.blogspot.com/2007/08/dikshitar-kriti-abh%'
ORDER BY extracted_at DESC;
WITH task AS (
SELECT result_payload
FROM extraction_queue
WHERE id = '<pdf-task-id>'::uuid
)
SELECT ordinality AS idx, elem->>'title' AS title
FROM task, jsonb_array_elements(task.result_payload) WITH ORDINALITY AS t(elem, ordinality)
ORDER BY ordinality;
database/migrations/31__extraction_queue_html_support.sqldatabase/migrations/33__fix_krithi_lyric_variants_lyrics_index.sqldatabase/migrations/34__repair_krithi_lyric_variants_lyrics_index.sqlmodules/backend/api/src/main/kotlin/com/sangita/grantha/backend/api/services/ImportService.ktmodules/backend/api/src/main/kotlin/com/sangita/grantha/backend/api/routes/ImportRoutes.ktmodules/backend/api/src/test/kotlin/com/sangita/grantha/backend/api/routes/ImportRoutesTest.ktmodules/backend/api/src/main/kotlin/com/sangita/grantha/backend/api/services/ExtractionResultProcessor.ktmodules/backend/dal/src/main/kotlin/com/sangita/grantha/backend/dal/repositories/KrithiRepository.kttools/krithi-extract-enrich-worker/src/worker.pytools/krithi-extract-enrich-worker/src/metadata_parser.pytools/krithi-extract-enrich-worker/src/html_extractor.pytools/krithi-extract-enrich-worker/tests/test_metadata_parser.pytools/krithi-extract-enrich-worker/tests/test_worker.pytools/sangita-cli/src/commands/test.rstools/sangita-cli/README.md