Sangeetha-Grantha

Metadata Value
Status Completed
Version 1.1.0
Last Updated 2026-07-19
Author Sangeetha Grantha Team

TRACK-127: Relocate One-Off Operational Scripts Out of the Worker Package

Goal: src/ is the installable, Docker-shipped worker package, but it contains ~1,400 lines of one-shot operational tooling: repair_comprehensive.py, repair_sections.py, repair_section_text.py, import_dikshitar_krithis.py, browser_batch_extract.py. Move completed repairs to archive/, still-useful tools to scripts/, and fix the hazards they carry.

Origin: Python best-practices evaluation, 2026-07-19 (item 2).

Definition of Done

Inputs

Out of Scope

Steps

  1. Confirm with git history / TRACK-093 status which scripts are dead (Phase-4A repairs are complete per TRACK-079) vs. still operational.
  2. git mv dead scripts to archive/tools/krithi-worker-repairs/ with a short README.
  3. git mv live scripts to scripts/; create scripts/_common.py; fix imports and the credential default.
  4. Update any docs/workflows referencing the old python -m src.repair_* invocations.
  5. Rebuild the Docker image; confirm the relocated files are absent and HEALTHCHECK/entrypoint still work.

Deliverables

Verification

Outcome (2026-07-19)

Relocation only — no script logic was rewritten.

Script Disposition Why
repair_comprehensive.py archive/tools/krithi-worker-repairs/ Phase-4A repair, completed under TRACK-079 (Completed)
repair_sections.py archive/tools/krithi-worker-repairs/ as above
repair_section_text.py archive/tools/krithi-worker-repairs/ as above
import_dikshitar_krithis.py scripts/ TRACK-093 is Paused, not abandoned — still live tooling
browser_batch_extract.py scripts/ live batch tool

src/ now holds only the live pipeline: worker, strategies, parsers, enricher, db, cli, schema, heuristics.

Hazards removed:

Verification run:

Notes: