DataRunbooks · pinned from sggs-data
Runbook: Rebuild the database from the PDF
Page actions
- View as Markdown (opens in a new tab)
- Ask ChatGPT (opens in a new tab)
- Ask Claude (opens in a new tab)
ChatGPT and Claude are third-party services. The link gives them this page's public address and a short instruction. This site records nothing.
Preview: the published page may be older or missing.
https://docs.gurbanisoul.com/data/process/runbooks/rebuild-db/ · a pinned copy of Algorythmos-AI/sggs-data at c36e317
Toolchain trap: the pipeline needs PyMuPDF + numpy + scipy. On this box that is
/usr/bin/python3 (3.9), not Homebrew python3 (3.14). make doctor checks it.
make doctor # confirm interpreter + PDF + LFS DBcp db/sggs.sqlite /tmp/pre.sqlite # backup for the proofbash scripts/data/fetch_translations.sh # private translation inputs (checksum-verified)make rebuild # PATH=/usr/bin:$PATH bash pipeline/rebuild_all.sh # gates: reconcile char-exact, golden all-passpython3 pipeline/verify_regroup.py /tmp/pre.sqlite db/sggs.sqlite # only comp_id/line_no changedpython3 pipeline/timing/step0_baseline.py --db <pretiming-copy> --force --skip-backup # re-baseline (see below)make guard # pre-existing tables byte-identicalmake reconcile # refresh validation/reconcile-attestation.jsonmake contract # regenerate + assert no unexpected driftmake ios-db # rebuild both iOS profiles + license gate(cd frontend && npm run build:deploy) # rebuild the served static bundleRe-baselining after a rebuild. step0_baseline.py refuses to run on a DB that
already has the timing-layer tables. Snapshot a copy with those 7 tables dropped
(timing_sources, raag_timing_claims, shabd_raag_map, shabd_musical_markers,
shabd_structural_form, shabd_poetic_genre, timing_migrations), baseline that
copy with --force --skip-backup, then make guard against the installed DB.
Note: line_neighbors uses a nondeterministic random projection, so db_sha256
is not bit-reproducible across rebuilds. The scripture guarantees (reconcile, verify,
guard) are exact; the analytics layer is regenerated and re-baselined each time.
Sri Guru Granth Sahib Ji — Knowledge Base wiki. Generated from commit c3d9360. Updated 27 October 2026. This copy may be out of date; the page is at https://docs.gurbanisoul.com/data/process/runbooks/rebuild-db/