Skip to content

feat(works)!: resolver review — drop non-resolving targets, add NA28/BHS/SuttaCentral/NINJAL - #20

Merged
maehr merged 2 commits into
mainfrom
feat/resolver-review
Aug 12, 2026
Merged

feat(works)!: resolver review — drop non-resolving targets, add NA28/BHS/SuttaCentral/NINJAL#20
maehr merged 2 commits into
mainfrom
feat/resolver-review

Conversation

@maehr

@maehr maehr commented Aug 12, 2026

Copy link
Copy Markdown
Member

Closes #15, #16, #17, #18, #19

Implements a scholarly review of all 12 work records, comparing the configured resolver targets against the editions each field actually cites. Every claim below was re-checked against the live sites on 2026-08-12; three of the review's own claims turned out to be wrong and are corrected here rather than acted on.

Everything is draft under ADR-0004 and no resolver target has ever been promised, so entries that do not work are deleted rather than demoted. No resolver-quality vocabulary is introduced.

Deleted — six resolvers that do not address the cited passage (#15)

Four had no locator variable in the URL at all, so every reference in the work expanded to the same landing page:

File Resolver References sharing one URL
aristotle.nicomachean-ethics.yaml Project Gutenberg 8438 ~5,220
plato.republic.yaml Project Gutenberg 1497 1,475
murasaki-shikibu.genji.yaml Project Gutenberg 19264 54
dhammapada.yaml palikanon.com 423

That is worse than no resolver: the record asserts "here is Republic 514a" and hands the reader the front matter of an ebook. PG 19264 is additionally not the work — it is Wilson's anthology Japanese Literature, carrying only Suematsu's selections.

Plus:

  • new-testament.yaml's Wikisource KJV entry, which is broken rather than coarse: en.wikisource.org migrated most books to one continuous page each, so .../{Book}/Chapter_{n} 404s for 26 of the 27 NT books, and where the pages survive the #{verse} anchors are not unique (Genesis carries 15 separate id="1" anchors; Romans has none).
  • dhammapada.yaml's Project Gutenberg entry, which does anchor per chapter but is an access copy, not a critical edition — Gutenberg's own mission statement disclaims establishing textual standards.

Wikisource is kept everywhere it uses a real url_by map that reaches the cited chapter (Analects, Daodejing, Genji), as is ancient-buddhist-texts.net.

Added — the four missing editions

SuttaCentral, Dhammapada (#16). Pali root text and Sujato translation, CC0, at verse granularity: 26.41https://suttacentral.net/dhp423/en/sujato. The compiler already derives {verseGlobal} from the system's chapter_sizes, so this needed no new machinery. Turns 423 chapter-level targets into 423 verse-level ones.

NINJAL, Genji (#17). The Library of Congress manuscript transcription, CC BY 4.0, all 54 chapters via url_by. The file's own comment had flagged this as pending.

NA28, New Testament (#18) and BHS, Tanakh (#19). Both on die-bibel.de, both free to read without registration, both with per-verse anchors:

John.3.16 → https://www.die-bibel.de/bibel/NA28/JHN.3/#JHN.3.16
Ps.23.1   → https://www.die-bibel.de/bibel/BHS/PSA.23/#PSA.23.1

Both use the new vars: mapping (textrefs/textrefs.org#72) because die-bibel.de addresses books by USFM code and the locator carries OSIS codes. Neither is openly licensed, so access: open with license_url: only and no SPDX license:.

Completed — the two Bible works were 90% missing

Both records were named for a whole corpus while enumerating a single book:

Work Before After
New Testament John only, 879 refs 27 books, 7,953 refs
Tanakh Genesis only, 1,533 refs 39 books, 23,213 refs

Counts derived mechanically, not transcribed:

  • NT from morphgnt/sblgnt — the same edition the STEP Bible resolver serves.
  • Tanakh from openscriptures/morphhb wlc/*.xml, the Westminster Leningrad Codex, i.e. the Masoretic text BHS presents. Its 39 files are already named with OSIS codes, so the vocabularies line up with no translation step. 23,213 matches the standard WLC figure.

Each entry is the highest verse number in the chapter, not the number of verses printed. SBLGNT omits verses that traditional numbering reserves (Matt 17:21, John 5:4, the bracketed pericope adulterae) and those numbers are still cited; a citation registry should mint Matt.17.21 even where a critical text prints nothing there.

Thirty-nine books rather than the twenty-four of the Jewish reckoning, because the locator vocabulary is OSIS, which splits Samuel/Kings/Chronicles and enumerates the Twelve individually.

Three corrections to the review that prompted this

  • Sefaria is not broken. The review flagged the Tanakh template as substituting OSIS Gen where Sefaria's URLs read Genesis. Sefaria's ref parser normalises OSIS itself: sefaria.org/Gen.1.1 → 301 → Genesis.1.1 (200), same for Exod.20.1, 1Sam.1.1, Ps.23.1. Left unchanged.
  • STEP Bible is not broken. It resolves OSIS codes server-side (John.3.16, Matt.1.1, 1Cor.13.4, Rev.1.1 all return the right SBLGNT text). Left unchanged.
  • SHEBANQ was dropped, not added. BHS itself turned out to be freely readable on die-bibel.de, which is what the review actually wanted. SHEBANQ is CC BY-NC, renders verse text only via client-side JS (so per-verse resolution could not be confirmed), and would need a third book vocabulary (Latin/Vulgate: Samuel_I, Psalmi, Canticum) — a second mapping table for no added coverage.

Verification

  • npm run verify → clean (format, astro check, 18 tests, full build) in 8m 07s.
  • npm run build:data67,958 references, 24 mappings, 68,004 records, all valid, zero skipped resolver entries.
  • The zero matters: an unmapped book code skips its entry and warns, so a non-zero count would mean a hole in one of the two 27/39-entry USFM tables.
  • All 66 USFM codes checked individually against the rendered chapter title. die-bibel.de answers an unrecognised code with HTTP 200 and a default pageBHS/GENE.1/ renders "Genesis 1", and the OSIS spellings MATT.1/JOH.3/1COR.13 all silently render Matthäus 1 — so status codes prove nothing. All 66 titles came back distinct and correct.
  • Compiled output spot-checked for dhammapada|26.41, genji|54, John.3.16, 1Cor.13.4, Gen.1.1, Ps.23.1, and asserted to contain zero remaining gutenberg.org, palikanon.com or Wikisource-KJV URLs.

One caveat recorded honestly: SuttaCentral is a client-side SPA that returns 200 for any path, including out-of-range /dhp424. Its per-verse route is evidenced by SuttaCentral's own Feb-2022 release note introducing exactly this linking form, and by the API's range structure — not by DOM inspection. Details in #16.

Sequencing

@maehr

maehr commented Aug 12, 2026

Copy link
Copy Markdown
Member Author

CI status, so the red check is not misread:

validate — fail, inherited from #13, not from this change. The failure is byte-identical to the one on #13: mapping/d5d6ca80-…: relation: Invalid option: expected one of "exactMatch"|"closeMatch". Registry CI validates against textrefs.org@staging, which does not yet have ADR-0006, so it rejects alternateOf — and it fails there before ever reaching a resolver, let alone the new vars field.

Two things must land before this can go green, in order:

  1. docs(decisions): decide mapping relation vocabulary (ADR-0006) textrefs.org#67staging (unblocks the relation vocabulary)
  2. feat(compile): map locator variables into a provider's own vocabulary (#71) textrefs.org#72staging (adds the vars field this data uses)

Locally, against the correct parent, npm run build:data compiles clean: 67,958 references, 68,004 records, all valid, zero skipped resolver entries.

@maehr
maehr marked this pull request as ready for review August 12, 2026 16:42
Copilot AI lite review requested due to automatic review settings August 12, 2026 16:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates multiple work records in the TextRefs registry to reflect a resolver-quality review: removing resolver targets that don’t address the cited passage, adding missing scholarly/field-standard resolver targets, and expanding Bible corpora reference enumerations to full book coverage.

Changes:

  • Removed non-resolving/coarse resolver targets (notably Project Gutenberg and other landing-page-only resolvers) and added explanatory rationale where a second resolver is intentionally absent.
  • Added new resolvers: SuttaCentral (Dhammapada, verse-level), NINJAL (Genji, per-chapter url_by), and Deutsche Bibelgesellschaft NA28/BHS (via vars book-code mapping).
  • Expanded references_range enumerations for New Testament (27 books) and Tanakh (39 books) with chapter-level maxima.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
works/tanakh.yaml Adds BHS resolver (die-bibel.de) with OSIS→USFM mapping and expands Tanakh references to all 39 books.
works/new-testament.yaml Adds NA28 resolver (die-bibel.de) with OSIS→USFM mapping, removes broken Wikisource KJV resolver, and expands references to all 27 books.
works/dhammapada.yaml Adds SuttaCentral verse-level resolvers (Pali + English) and removes non-verse/non-resolving targets.
works/murasaki-shikibu.genji.yaml Adds NINJAL Library of Congress manuscript transcription resolver via per-chapter url_by mapping and removes Project Gutenberg.
works/plato.republic.yaml Removes Project Gutenberg landing-page resolver; keeps Perseus with rationale for no second resolver.
works/aristotle.nicomachean-ethics.yaml Removes Project Gutenberg landing-page resolver; keeps Perseus with rationale for no second resolver.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread works/new-testament.yaml Outdated
@maehr
maehr force-pushed the feat/mapping-relation-vocabulary branch from ea61fd3 to 24c854d Compare August 12, 2026 20:17
Base automatically changed from feat/mapping-relation-vocabulary to main August 12, 2026 20:18
…BHS/SuttaCentral/NINJAL

Compares every configured resolver against the editions each field actually
cites, and completes the two Bible works, which were named for a whole corpus
while enumerating a single book.

Deleted, because they do not address the cited passage:

- Project Gutenberg from Aristotle, Plato and Genji, and palikanon.com from
  the Dhammapada. Their URLs carry no locator variable, so all ~5,220 / 1,475
  / 54 / 423 references expanded to one landing page each. PG 19264 is also
  not the work — it is Wilson's anthology, carrying only Suematsu's Genji
  selections.
- The Wikisource King James resolver from the New Testament. en.wikisource.org
  migrated most books to one continuous page each, so `/Chapter_{n}` 404s for
  26 of 27 books, and the surviving `#{verse}` anchors are not unique.
- Project Gutenberg from the Dhammapada. It anchors per chapter, but Gutenberg
  disclaims establishing textual standards and SuttaCentral now covers it.

Added:

- SuttaCentral (Pali root text and Sujato translation, CC0) at verse
  granularity via the existing `verseGlobal` counter: 26.41 -> dhp423.
- NINJAL's Library of Congress Genji transcription (CC BY 4.0), all 54
  chapters via url_by.
- NA28 and BHS on die-bibel.de, both free to read, both with per-verse
  anchors, both via the new per-resolver `vars` book-code mapping.

Completed:

- New Testament: John only (879 refs) -> 27 books (7,953), counts derived
  from morphgnt/sblgnt, the edition the STEP resolver serves.
- Tanakh: Genesis only (1,533) -> 39 books (23,213), counts derived from
  openscriptures/morphhb, the Westminster Leningrad Codex behind BHS.

Counts take the highest verse number per chapter rather than the number of
verses printed: SBLGNT omits verses traditional numbering reserves (Matt
17:21, John 5:4, the pericope adulterae), and those numbers are still cited.

All 66 USFM book codes were checked against the rendered chapter title, not
the status code — die-bibel.de answers an unknown code with HTTP 200 and a
default page, so a typo would emit confidently wrong links rather than fail.

Sefaria and STEP Bible were re-checked and left unchanged: both accept OSIS
codes directly, contrary to the review that prompted this.

BREAKING CHANGE: deleted resolver targets disappear from every affected
reference's resolver_targets, and completing the two Bible works adds ~28,700
new canonical references.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@maehr
maehr force-pushed the feat/resolver-review branch from 8ace303 to 37d82a0 Compare August 12, 2026 20:33
The header states the rule these counts follow: each entry is the highest
verse number in the chapter, not the number of verses printed, because
SBLGNT omits verses that traditional numbering reserves and those numbers
are still cited. John 7:53 is exactly such a number — it opens the
bracketed pericope adulterae (John 7:53–8:11), and chapter 8 already
carries its remaining verses at the traditional maximum of 59.

Capping chapter 7 at 52 left John.7.53 unmintable and unresolvable. The
New Testament now yields 7,954 references.
@maehr
maehr merged commit 237e39f into main Aug 12, 2026
4 checks passed
@maehr
maehr deleted the feat/resolver-review branch August 12, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

data: delete resolvers that do not address the cited passage

2 participants