Sangeetha-Grantha

Metadata Value
Status In Progress
Version 1.0.0
Last Updated 2026-11-11
Author Sangeetha Grantha Team

Track: Tyagaraja Edition Consultation & Collision Canon Split

ID: TRACK-149 Status: In Progress — Intent Accepted, Spec Accepted, Plan Accepted (implementation in progress) Owner: Seshadri Created: 2026-10-15 Updated: 2026-11-11

Goal

Consult the institutional print editions and Music Academy Journal volumes registered as unavailable in TRACK-147, adjudicate the edition-dependent Kshetra Pancharatnam, Utsava Sampradaya, Divyanama, and dramatic-work leads, split the 8 raga/tala collision identities into 17 distinct catalogue compositions through the audited canon/import pipeline, and apply the non-cycle approvals deferred by TRACK-147.

Context

Intent

Status: Accepted Accepted by: Seshadri (chat, 2026-11-03) Accepted at: 2026-11-03

Evidence-access amendment (2026-11-03, Seshadri): no print edition is available. Only publicly accessible sources may be consulted. Edition-dependent items stay unresolved or deferred unless a public source is found and registered.

Problem

TRACK-147 reconciled all 675 Tyagaraja catalogue identities, 684 classification subjects, and 687 CSV source rows, approved and seeded the 5 Ghana-raga Pancharatnam memberships (R__seed_11), and classified the corpus across devotional themes, addressees, ritual functions, dramatic works, and kshetra leads. Approved claims cite fetched thyagaraja-vaibhavam.blogspot.com witnesses (343 cached HTML files and 341 extraction checksums from imported_krithis.parsed_payload). The database snapshot (db-snapshot) is a hashed census, not scholarly authority. However, three categories of work remain intentionally deferred:

  1. Eight raga/tala collision identities (17 source witnesses): Eight catalogue krithis rows (jaya mangaLaM, pAhi rAma candra, paripUrNa kAma, Rama Rama Rama Sita, rAma sItA rAma, Sri Narada Muni, SrI nArasiMha, Sri Rama Jaya Rama) absorb 17 distinct source imports whose raga or tala disagree. They remain marked collision_not_classified in the master while their 17 tyagaraja:import:* witnesses carry individual classifications.
  2. Unconsulted print and archive editions: Print editions (govinda-rao-tyagaraja, ramanujachari-spiritual-heritage, sambamoorthy-tyagaraja) and unretrieved PDF volumes remain registered as unavailable witnesses, keeping Kshetra Pancharatnam sequences (Kovur, Tiruvottiyur, Lalgudi, Srirangam, including the missing Vinarādhā nā manavi lead), Utsava Sampradaya / Divyanama bhajana paddhati orderings, and full Nauka Charitram / Prahlada Bhakti Vijayam verse/prose context as unreviewed or unresolved claims.
  3. Deferred non-cycle approvals & structural defects: Approved claims outside the Ghana-raga Pancharatnam cycle are marked application: deferred in the master and manifest pending a non-cycle application path, and the 27 missing-pallavi and 4 missing-charanam catalogue records await audited lyric-section remediation.

Proposed outcome

  1. Edition access. Obtain lawful access to T.K. Govinda Rao’s Compositions of Tyagaraja, C. Ramanujachari & V. Raghavan’s The Spiritual Heritage of Tyagaraja, P. Sambamoorthy’s dramatic-work editions, and the Music Academy Journal volumes (1947, 1968, 2017). Register each consulted edition as a hashed witness.
  2. Collision split via audited canon workflow. Split or adjudicate the 8 collapsed krithis identities across their 17 imported_krithis witnesses through the audited canon/import service path (preserving krithi_source_evidence, krithi_ragas, and AUDIT_LOG), then rebind the tyagaraja:import:* witness subjects to their new tyagaraja:krithi:* identities.
  3. Kshetra Pancharatnam & ritual collection adjudication. Adjudicate Kovur, Tiruvottiyur (sundari nI divya), Lalgudi (ISa pAhi), and Srirangam (karuNa jUDavayya in Sāranga) Pancharatnam memberships and shrine associations (temples / deities), plus Utsava Sampradaya and Divyanama memberships, and seed approved cycles via R__seed_11.
  4. Dramatic works (Nauka Charitram & Prahlada Bhakti Vijayam). Verify constituent daru/kirtana memberships, item order, speakers, addressees, and divisions against consulted editions, and decide whether padya/vacana context needs a dedicated work anchor.
  5. Deferred application & structural remediation. Lift application: deferred on approved non-cycle claims once an application path is accepted, and remediate the 27 missing_pallavi and 4 missing_charanam records from verified witnesses without inventing text.

Affected users and systems

Constraints

Open questions

  1. Which print editions of Govinda Rao, Ramanujachari/Raghavan, and Sambamoorthy will be used as the primary locators?
  2. For each of the 8 collision identities, which witness retains the existing krithi_id and which witnesses receive newly minted krithis rows?
  3. Should approved non-cycle themes, ritual functions, and desadi tala notes be surfaced as separate search-header micro-clauses in context_formatter.py alongside TRACK-148?

Spec

Status: Accepted Accepted by: Seshadri (chat, 2026-11-03) Accepted at: 2026-11-03

Acceptance note: accepted with the Spec’s recommended defaults for its open decisions: openly_hosted witnesses may approve with a locator and short quote; Seshadri adjudicates with the musicologist subagent checking; non-cycle path is option D1.

Evidence policy (applies to every requirement)

No print edition is available to the owner, so the edition-dependent work runs on publicly accessible sources only, using the same rights tiers as TRACK-148 (public_domain, openly_hosted, inaccessible). The collision split (requirement 3) does not need an edition: it is a catalogue-integrity task over data already in the repository. It can proceed first.

Requirements

  1. Witness rights. Adopt the shared optional rights / rights_note witness fields from TRACK-148. Default existing fetched witnesses to openly_hosted and unavailable ones to inaccessible. The three print editions (govinda-rao-tyagaraja, ramanujachari-spiritual-heritage, sambamoorthy-tyagaraja) are recorded as inaccessible.
  2. Public-source sweep. Try the unretrieved witnesses that are reachable: ma:jma-vol18-1947, ma:jma-vol39-1968, ma:jma-2017 (Music Academy catalogue PDFs) and sanskrit-docs-tyagaraja (sanskritdocuments.org). Search public-domain digitisations (archive.org, Wikisource, Digital Library of India) for Tyagaraja kriti collections and for Nauka Charitram and Prahlada Bhakti Vijayam. Register each with SHA-256, URL, access date and rights, including “searched, nothing relevant”. No full copyrighted text enters the repository.
  3. Collision split (8 identities, 17 witnesses). For each of the eight collided krithis rows (jaya mangaLaM, pAhi rAma candra, paripUrNa kAma, Rama Rama Rama Sita, rAma sItA rAma, Sri Narada Muni, SrI nArasiMha, Sri Rama Jaya Rama):
    1. Produce a decision sheet listing every tyagaraja:import:* witness with its raga, tala, source URL and lyric hash, and what differs (raga, tala or both).
    2. Decide per identity: split (distinct compositions that share a title) or keep merged (the same composition with a source-labelling difference). Raga or tala disagreement alone does not prove distinct compositions. Record the evidence for each decision, and keep a merge where a public source shows a single composition.
    3. For each split, name the witness that retains the existing krithi_id and the witnesses that receive new krithis rows. Prefer retaining the witness that existing links (krithi_ragas, tags, evidence, search documents) already describe.
    4. Execute through the audited canon/import service path, preserving krithi_source_evidence, populating the junction tables (krithi_ragas, tala links, lyric sections) for every new row, and writing AUDIT_LOG. No direct SQL.
    5. Rebind the tyagaraja:import:* witness subjects to their new tyagaraja:krithi:* identities. New master subject IDs follow the contract (minted once, never recomputed).
    6. Move the identities out of collision_not_classified. Each resolved witness is classified, or explicitly left unclassified with a reason.
    7. Expected end state if all eight split fully: 8 rows become 17 (9 new rows); the catalogue count rises from 675 to 684. Fewer splits are a valid outcome and change the count accordingly. The accounting section of the master must reconcile at every outcome.
  4. Kshetra Pancharatnam, Utsava Sampradaya, Divyanama. Adjudicate Kovur, Tiruvottiyur (sundari nI divya), Lalgudi (ISa pAhi) and Srirangam (karuNa jUDavayya, Sarangam) and the Vinarādhā nā manavi lead, plus the Utsava Sampradaya and Divyanama sequences, only where a registered public witness supports them. Otherwise they stay unresolved/edition_inaccessible. Shrine associations (temples, deities) follow the same rule. Approved cycles are seeded through R__seed_11 or a successor R__ with the existing provenance guards, conflict abort and system audit attribution.
  5. Dramatic works. Verify the constituent kirtana/daru memberships, order, speakers, addressees and divisions of Nauka Charitram and Prahlada Bhakti Vijayam against public witnesses. Decide whether padya/vacana context needs a work anchor. Absent a public witness, record the current state as unverified and add nothing.
  6. Deferred application path. Adopt whatever non-cycle path TRACK-148 accepts (its Design option D, recommended D1 manifest-driven search metadata), so both composers share one mechanism. application: deferred on approved non-cycle Tyagaraja claims is lifted only after that path exists. Do not fork.
  7. Structural remediation. The 27 missing_pallavi and 4 missing_charanam records are repaired only from verified witnesses, through the audited lyric-section path, never inferred or invented. Records with no verifiable witness are listed as “unrepairable without source” and left unchanged. Section structure follows Domain Model §6 (KRITHI requires pallavi and charanam; check the composition’s form first).
  8. Search headers. Reuse TRACK-148’s formatter decision for non-cycle micro-clauses (theme, ritual function, desadi tala note) so there is one shared design. The 60-word budget holds. A re-index needs separate paid authorisation and is not part of this track’s implementation.
  9. Human gate. Only named human approval promotes a claim. Agent review supports checking only. Collision split decisions are approved by the owner before any write.
  10. Reporting. The regenerated concordance reports: collisions resolved/kept merged, claims by disposition, witnesses by rights, repaired and unrepairable structural records, and the edition_inaccessible ledger.

Design

Flagged concerns

  1. A raga or tala mismatch is not proof of two compositions. Tyagaraja kritis circulate in variant raga and tala attributions. A title shared by two witnesses may be one composition recorded differently. The Intent frames this as a “split into 17”; the Spec makes it a per-identity decision, and 17 is an upper bound, not a target. The musicologist subagent should review the decision sheet.
  2. Catalogue write path. If no audited split operation exists, the track needs backend work that the Intent did not scope. The Plan must size it.
  3. Public-domain scope. As for TRACK-148: freely hosted is not the same as public domain. The edition-dependent items (requirement 4, 5) will largely end as edition_inaccessible.
  4. Structural repair risk. Filling a missing pallavi or charanam from a different witness can merge two versions of a text. Repair only from a witness already attached to the same composition, and record which.
  5. Cross-track coupling. Requirements 6 and 8 depend on TRACK-148’s decisions (option D, formatter). Sequence TRACK-148’s Spec acceptance first, or accept that these two requirements wait.
  6. Paid and external actions. Re-indexing, commits, production changes: separate authorisation each time.
  7. Companion artifacts. Samini Rammanave-style title issues in the other track show that titles drift between sources. Compare by identity and lyric hash, not title alone.

Musicologist review (2026-11-03, subagent; advisory, not an approval)

Adopted into this Spec as additional requirements:

  1. Collision decision rules. The sheet applies, in order: (a) normalise raga and tala aliases first (for example Saranga/Sarangam, Adi/Desadi; verify each) so a label difference is not counted as a real one; (b) compare per-section lyric hashes after transliteration normalisation, not a whole-text hash; (c) same pallavi with different anupallavi or charanams means distinct kritis or a recension, which is a human call; (d) generic incipits (Rama Rama Rama Sita, rAma sItA rAma, Sri Rama Jaya Rama) are likely distinct pieces, including Divyanama, Utsava and dramatic-work items sharing an incipit with a standalone kriti; (e) check for ragamalika or a raga change before treating a mismatch as a conflict; (f) record doubtful attribution to Tyagaraja separately. A shared title does not prove one composition either.
  2. Form matrix before repair. Classify each of the 27 missing_pallavi and 4 missing_charanam records by form first (Domain Model §6.1). Padya, sloka, dvipada and vacana items in the dramatic works legitimately have no pallavi or charanam, and short Divyanama or Utsava items may have one charanam. Those are reclassified, not repaired.
  3. Relabel versus insert. A missing pallavi is often a mislabelled first section or an omitted refrain. Relabelling existing text with evidence is allowed. Inserting text is forbidden. Sections are never silently merged.
  4. Order provenance. Utsava and Divyanama sequence is editorial or traditional. Record the source of every order.
  5. Names. Vinarādhā nā manavi uses a different transliteration scheme from the other titles. The Intent’s “Sāranga” and the Spec’s “Sarangam” may be different ragas. A human checks both before they are conflated.
  6. Witness kind. Adopt TRACK-148’s witness_kind. The thyagaraja-vaibhavam blog is secondary_text, not a scholarly authority, so it can support a tala name or a lead but not a rhythm or ordering claim.

Corrections to the Evidence policy: as in TRACK-148 (public-domain test is jurisdiction-dependent; Sambamoorthy is not public domain).

Open questions carried forward

  1. Which public witnesses exist for the kshetra, Utsava, Divyanama and dramatic-work items? Answered by the requirement 2 sweep.
  2. For each of the 8 identities, which witness keeps the existing krithi_id? Needs the decision sheet and the owner’s call.
  3. Does the backend already have an audited split or re-point operation for collided canon rows?
  4. Non-cycle header clauses: same decision as TRACK-148 (recommended D1).
  5. May openly_hosted witnesses approve claims? Same decision as TRACK-148.

Plan

Status: Accepted Accepted by: Seshadri (chat, 2026-11-03) Accepted at: 2026-11-03

Decision (2026-11-03, Seshadri): “public domain” means publicly accessible. Copyright is not a gate for now. Consequences: openly_hosted and public_domain witnesses are treated alike for approval (locator required, hash required); rights stays as an informational field only and no longer limits quoting. Fetched artifacts are still cached outside git for size, not for rights. This supersedes the copyright cautions in the Spec’s Evidence policy and flagged concern 1.

Decision (2026-11-03, Seshadri): split execution uses Option A, a new audited unmapImport backend operation, followed by the existing reviewImport(APPROVED, null) to create each new krithi. Options B and C are not used. Backend files in the table above are now definite. The unmap is still designed only after step 1 shows what attaches to each witness, so step 3 below becomes “finalise the unmapImport design”, and the Plan is amended in the same change if that design diverges.

Grounded in a read-only pass over tyagaraja_classification.py, the TRACK-147 master, ImportService.reviewImport, RemediationService, CuratorRoutes, migration V47 and R__seed_11.

Plan amendment (2026-11-03, found while implementing)

ImportService.reviewImport runs a TRACK-062 title dedup before it creates a krithi. An unmapped import approved with no mappedKrithiId would therefore be re-linked to the same krithi, which is how the collisions arose. The split needs both halves:

  1. POST /v1/admin/imports/{id}/unmap (new unmapImport): detach, remove only the evidence for that import’s source URL, reset to PENDING, audit twice (import and krithi). Fails closed if the import is unmapped, is the krithi’s last witness, or supplied the krithi’s lyric variants.
  2. ImportReviewRequest.forceNew (default false, so existing callers are unchanged): skips the dedup so approval mints a krithi of its own.

Files added to the table below: ImportRequests.kt (forceNew, UnmapImportRequest), ImportRoutes.kt, ImportService.kt, DAL ImportRepository.countMappedTo, SourceEvidenceRepository.deleteByKrithiAndSourceUrl, KrithiLyricRepository.countVariantsBySourceReference, and a new UnmapImportTest. No schema change, no migration.

What the code review found (changes the plan)

  1. There is no audited operation that splits a collided krithi. RemediationService only merges duplicate lyric variants. The Curator attach / confirm-new routes act on the raga resolution queue, not on krithis.
  2. Promotion already works. ImportService.reviewImport(APPROVED, mappedKrithiId = null) creates a new krithi in one transaction (TRACK-112), with audit and revision attribution. But an import that is already APPROVED and mapped is adopted back into its existing krithi (the “alreadyPromoted” branch). So a split first needs an unmap, which does not exist.
  3. Precedent: migration V47 demerged a Dikshitar ragamalika with a Flyway V__ that hard-codes UUIDs, deletes the wrong variants, nulls mapped_krithi_id, resets the extraction queue and inserts audit_log rows. It is Flyway-compliant but environment-specific, because catalogue UUIDs are generated at import and differ in a rebuilt catalogue.
  4. Tyagaraja tooling is separate from Syama’s. tyagaraja_classification.py has its own Witness, Approval and ClaimAxis, and the contract says it stays independent until an explicit adapter migration. TRACK-148’s new fields must therefore be added to both modules, with a parity test, not shared by import.
  5. Cannot plan the exact unmap until the impact is known: which variants, sections, source evidence, junction rows and search documents attach to each of the 17 witnesses. That is step 1.

Files that change

Area File Change
Worker validator tools/krithi-extract-enrich-worker/src/tyagaraja_classification.py Add rights, rights_note, witness_kind to Witness; unresolved_reason on ClassificationClaim; collision disposition values (split, kept_merged, unresolved). Update EXPECTED_* accounting constants to follow the decisions.
Generators scripts/generate_tyagaraja_master.py, scripts/populate_tyagaraja_master.py Rebuild master and snapshot after the split; report rights, dispositions, repaired/unrepairable records.
Data database/data/track147-tyagaraja-master.json, track147-tyagaraja-application-manifest.json, track147-catalogue-snapshot.json Collision decisions, rebound witness subjects, new witnesses, dispositions. Regenerated, not hand-edited.
Generated doc application_documentation/01-requirements/features/tyagaraja-classification-master.md Regenerated.
Backend (conditional, see Option A) modules/backend/api/.../services/ImportService.kt (+ ImportReviewer interface), routes/ImportRoutes.kt, modules/backend/dal/.../repositories (imports, lyric variants, source evidence), modules/shared/domain DTOs New audited unmapImport operation and route.
Backend tests modules/backend/api/src/test/.../services/ and routes/ Unit and integration tests for unmap + re-promotion.
Seed database/migrations/R__seed_11_tyagaraja_reviewed_memberships.sql Only if a kshetra / Utsava / Divyanama cycle is approved. Else untouched.
Contract and tests contract doc (shared edits owned by TRACK-148); tests/test_tyagaraja_classification.py, tests/test_tyagaraja_source_inventory.py Parity and accounting tests.

How to execute the split (decided: Option A)

Decided: A. If the decision sheet shows no identity is really distinct, no unmap is built and the outcome is recorded as kept_merged; that is the only case where the backend work is skipped.

Order of work

  1. Impact and decision sheet (read-only, repository data only). For each of the 8 identities and 17 witnesses: raga, tala (after alias normalisation), per-section lyric hashes, source URL, what hangs off the existing krithi (variants, sections, evidence, krithi_ragas, tags, search documents). Apply the rules in Spec requirement 11 in order. No writes.
  2. Subagent musicologist reviews the sheet; Seshadri decides per identity: split / keep merged / unresolved, and which witness retains the krithi_id. Recorded in the master. This is the gate for any write.
  3. Finalise the unmapImport design from the impact inventory (what to detach, what to remove, audit metadata). Builds only for identities decided split.
  4. Execute splits (if any). Per identity: unmap, remove only what is attributable to the unmapped witness, re-promote through reviewImport, populate junction rows (krithi_ragas, tala, sections), audit. One identity at a time, each verified before the next.
  5. Verify with the verify-import skill against DB, API and UI. Check the other 667 single-source krithi are untouched.
  6. Rebind witness subjects to new tyagaraja:krithi:* ids, rebuild snapshot and master, reconcile accounting (675 + number of splits = catalogue identities).
  7. Public-source sweep for the kshetra, Utsava, Divyanama and dramatic-work items (ma:jma-vol18-1947, ma:jma-vol39-1968, ma:jma-2017, sanskritdocuments.org, archive.org / DLI). Record rights and outcome for each.
  8. Adjudicate only what a registered public witness supports; the rest ends unresolved/edition_inaccessible. Seed approved cycles through R__seed_11 with its existing provenance guards.
  9. Structural triage of the 27 + 4 records: classify by form first (Spec requirement 12). Reclassify padya/vacana/short items; relabel with evidence where a section is mislabelled; insert nothing. List the unrepairable.
  10. Formatter and deferred application: adopt TRACK-148’s D1 outcome; depends on TRACK-148 step 7. If TRACK-148 builds nothing, this track records the dependency and stops.
  11. Docs and regeneration; no re-index.

Steps 1 to 2 can start immediately and need nothing from TRACK-148. Step 10 waits for it.

Risks and mitigations

Options rejected

Proof and acceptance criteria

From tools/krithi-extract-enrich-worker:

uv run pytest tests/test_tyagaraja_classification.py tests/test_tyagaraja_source_inventory.py tests/test_musicological_classification.py

and the Tyagaraja generator’s own --check mode (the exact flags are read from scripts/generate_tyagaraja_master.py at implementation time and pasted into the Progress Log). From the repository root: make check-docs, make check-doc-impact.

If any catalogue write happens: make test and make test-integration (new unmap/re-promotion tests included), make db-reset to prove migrations and seeds still apply cleanly, and the verify-import skill for the split krithis (junction tables krithi_ragas, lyric sections, source evidence, audit rows). If the Kotlin backend or shared DTOs change, rebuild per the sangita-restart-on-kotlin-change skill and exercise the changed flow through the API, since no UI is changed.

Done when: each of the 8 identities has a recorded decision with evidence; the catalogue count matches the master accounting; every new krithi has its junction rows, lyric sections, source evidence and audit entry; the 667 single-source krithi are unchanged; every edition-dependent item has a final disposition or an edition_inaccessible reason; and all commands above pass with their output pasted into the Progress Log.

Implementation Checklist

Progress Log