Skip to content

FLT-281 Stage 2d: dialect Bibles and AI-drafted Old Testament chapters

Andrew decided on 2026-11-22: "Don't worry about the licenses for now." The release import now offers the eBible dialect Bibles, and the reader shows them with the copyright notice the manifest gives.

What is offered

data/bibles/manifest.json marks each offered translation with "offer": true. The release import takes the public-domain entries (WEB, BSB) plus the offered ones. Every other licensed entry is still skipped (ImportCommand.IsReleaseIncluded; import-all --public-domain-only --offered).

Code Language Stored text
GULNT Gullah New Testament + AI-drafted Old Testament books
SRNNT Sranan New Testament + AI-drafted Old Testament books
BZJNT Belize Kriol New Testament + AI-drafted Old Testament books
DJKNT Eastern Maroon New Testament + AI-drafted Old Testament books
SRMNT Saramaccan New Testament + AI-drafted Old Testament books
PCM Nigerian Pidgin Full Bible from eBible (published Old Testament, no drafts)
HWC Hawai'i Pidgin Full Bible from eBible (published Old Testament, no drafts)

Each translation keeps license and attribution exactly as the manifest writes them. The reader prints the attribution under every chapter. Any chapter with ai-draft verses also shows the AI draft notice (web/src/app/draft-disclaimer.ts) and an "AI draft" tag on each verse.

For a translation with a published New Testament and AI-drafted Old Testament verses, the API's aiDraftOldTestament is true. The translation menu then reads "New Testament + AI-drafted Old Testament (draft)". GET /api/scripture/{code}/books lists the books and chapters that are really stored. The book and chapter pickers offer only those, so a reader is never sent to an empty chapter.

AI-drafted Old Testament chapters

Another worker drafts chapters into data/translations/drafts/<CODE>/<BOOK>/<n>.json on another PC. The snapshot build runs Verse4Verse.Translate import-drafts --code <CODE> for every offered translation that has a drafts folder, so every chapter in the checkout is imported with ReviewStatus ai-draft. To pick up new chapters, pull the drafts into this checkout and rebuild Stage 2d. Import refuses to overwrite a published verse.

Rebuild (offline, no deployment)

Prerequisites on the build PC:

  1. A verified Stage 2c snapshot at C:\v4v-night\snapshot-2c (v4v_snapshot.duckdb + manifest.json), and the 2b tools folder C:\v4v-night\snapshot-2b.work (it holds the official DuckDB v2.0.0 shared-libs/duckdb.dll).
  2. The USFX inputs (gitignored). Download each released entry's sourceUrl zip and unzip it to data/bibles/raw/<eBibleId>/, giving <eBibleId>_usfx.xml: engwebp, engbsb, gulNT, srnNT, pcm, bzj, djkNT, hwc and srmNT.
  3. The current drafts under data/translations/drafts/.
$env:MSBUILDDISABLENODEREUSE = '1'
pwsh -NoProfile -File scripts/build-snapshot-2d.ps1 `
  -SourceDirectory C:\v4v-night\snapshot-2c `
  -OutputDirectory C:\v4v-night\snapshot-2d `
  -ToolsDirectory  C:\v4v-night\snapshot-2b.work `
  -LiveDecisionsExport C:\v4v-night\live-decisions.json

Exactly one live-decision source is required, as for 2c (see snapshot-manual-decisions.md): -LiveDatabase <checkpointed live copy>, -LiveDecisionsExport <json>, or -NoLiveDecisions -NoLiveDecisionsReason "<why>". The DuckDB CLI is read from <ToolsDirectory>/cli/duckdb.exe.

The script:

  1. Checks the 2c SHA-256 against its manifest, then copies the snapshot.
  2. Publishes the Worker, API and translation tool headless with -m:1.
  3. Runs migrate (which adds the catalog genre columns, catalog 0004), then catalog-genres-import --file data/catalog/genres/itunes-genres.json (genre names only; a re-run updates 0 rows), then import-all --public-domain-only --offered --skip-existing. WEB and BSB are already present and are skipped.
  4. Runs import-drafts for each drafted translation, from a staging root that holds only the manifest, the USFX inputs and data/translations. There is no .env, so no other database can be reached. Then it carries live manual review decisions (Invoke-SnapshotDecisionCarry from scripts/snapshot-decisions.ps1: export if given -LiveDatabase, replay, the decision gate), then runs the exact publication tuple gate.
  5. Runs Worker scripture-report, which reports counts only. Then it checks these gates:
  6. WEB has 38,029 verses and BSB has 31,086.
  7. Each released Bible has all 27 New Testament books.
  8. Each notice equals the manifest text.
  9. The drafted books equal the drafts folders.
  10. No AI-draft verses appear anywhere else.
  11. Runs an API smoke test: translations, the draft label, JHN 3 in every released Bible, and the books endpoint. Each drafted book's first chapter must be entirely ai-draft. /api/catalog/facets must list at least one genre, and /api/catalog/songs?genre=<largest> must return only songs of that genre.
  12. Writes v4v_snapshot.duckdb and manifest.json (2c manifest + scriptureStage: "2d" + per-translation counts, refreshed migrations/latestMigrationId, manualDecisions, publicationTuples and catalogGenres).

Lyrics and live-state rows are not touched; catalog rows only gain genre values. The swap protocol is unchanged (Stage 2a runbook): scripts/swap-snapshot.ps1 with -WritersFenced and the 2d folder, only under a separate cloud authorization. Its WEB/BSB gates still apply.

A full rebuild from nothing is the chain build-snapshot.ps1 (2b), then build-snapshot-2c.ps1, then build-snapshot-2d.ps1.

The v4v-import job and the image

import-release runs the same Bible selection, with --offered. The API image (src/Verse4Verse.Api/Dockerfile) copies exactly the released USFX files. ReleaseImportTests checks that the Dockerfile and the manifest agree. The deploy PC needs the same data/bibles/raw downloads before scripts/deploy-app.ps1 builds the image.