Conversation
There was a problem hiding this comment.
Pull request overview
Adds two David Hume works to the TextRefs registry with matching citation systems and resolver templates targeting Hume Texts Online, expanding the registry’s coverage of modern philosophy works with stable, paragraph-addressable reference spaces.
Changes:
- Added
hume.treatiseandhume.enquiry-human-understandingworks with mappings (Wikidata + Wikipedia), resolvers, and harvestedreferences_rangeparagraph counts. - Introduced two new citation systems (
hume-section-paragraph,hume-book-part-section-paragraph) with locator regexes and metadata. - Documented harvesting/verification notes inline (counts methodology, boundary checks, and resolver control 404s).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| works/hume.treatise.yaml | New work entry for A Treatise of Human Nature with resolver + harvested reference ranges. |
| works/hume.enquiry-human-understanding.yaml | New work entry for the first Enquiry with resolver + per-section paragraph counts. |
| systems/hume-section-paragraph.yaml | New section+paragraph citation system for the first Enquiry. |
| systems/hume-book-part-section-paragraph.yaml | New book+part+section+paragraph citation system for the Treatise. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
7 tasks
maehr
added a commit
that referenced
this pull request
Aug 26, 2026
Copilot review on #38: the locator regex admitted 2.4.x.y and 3.4.x.y, which are not parts of the Treatise. They would have failed only by going unregistered, not by failing the shape check. A leading lookahead pins the pairs that exist — 1.1-1.4, 2.1-2.3, 3.1-3.3 — while keeping the named capture groups single and unduplicated, so URL templating is unaffected. Note this is deliberately stricter than the registry's usual convention, where the regex is a shape check and bounds live in the registered references (see `integer-section`, and `bekker` admitting pages up to 9999). Here the invalid combinations are a small closed set, so pinning them costs nothing and is better than deferring the error. Refs #34 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CD9MxbT2jSZmJyR9ywJGEs
…tion Verified row from registry #25, tracked in #34. Hume Texts Online (Peter Millican, Hertford College, Oxford) addresses the Enquiry by section page with a per-paragraph anchor, and prints each paragraph's own canonical citation next to it ("E 10.1, SBN 109"), so the anchor and the locator agree by construction. Checked 2026-08-26 with invalid controls: /texts/e/99, /texts/t/9/9/9 and /texts/zzz/1 all return a real HTTP 404. That is the cleanest control behaviour of any provider verified for #25. The 12 paragraph counts were harvested from the site, not typed from memory, and verified at the boundary: on /texts/e/10 the anchor id 41 is present and 42 is absent; the same check passed for sections 1, 3 and 12. Sum = 255. Wikidata Q1306656 verified as the Work — "Philosophical Essays Concerning Human Understanding", the 1748 title, with "An Enquiry Concerning Human Understanding" among its aliases and P50 = Q37160 (David Hume). Most search hits for this title are editions or book chapters, which the authoring rule in AGENTS.md warns against. Refs #34 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CD9MxbT2jSZmJyR9ywJGEs
…ation Verified row from registry #25, tracked in #34. Structure and paragraph counts were harvested from Hume Texts Online on 2026-08-26 by walking /texts/t/{book}/{part}/{section} until the site returned 404, then reading the highest paragraph anchor on each page. The result is the canonical shape of the Treatise: 3 books, 10 parts (I.i-iv, II.i-iii, III.i-iii), 90 sections, 1,213 paragraphs. Two sections looked implausibly short, so they were checked by hand rather than trusted: T 1.1.2 has exactly one paragraph (anchor id 2 absent) and T 3.2.4 has exactly two (id 3 absent). Both are genuine. The compiler has no four-part range kind, so this uses one book_chapter_verse block per book-and-part with the `book` field carrying the `{book}.{part}` prefix. The expansion emits book.part.section.paragraph directly, and no compiler change is needed. Wikidata Q2451675 verified as the Work — "A Treatise of Human Nature", a written work with P50 = Q37160 (David Hume), not one of the several edition items that share the title. Refs #34 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CD9MxbT2jSZmJyR9ywJGEs
Copilot review on #38: the locator regex admitted 2.4.x.y and 3.4.x.y, which are not parts of the Treatise. They would have failed only by going unregistered, not by failing the shape check. A leading lookahead pins the pairs that exist — 1.1-1.4, 2.1-2.3, 3.1-3.3 — while keeping the named capture groups single and unduplicated, so URL templating is unaffected. Note this is deliberately stricter than the registry's usual convention, where the regex is a shape check and bounds live in the registered references (see `integer-section`, and `bekker` admitting pages up to 9999). Here the invalid combinations are a small closed set, so pinning them costs nothing and is better than deferring the error. Refs #34 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CD9MxbT2jSZmJyR9ywJGEs
maehr
added a commit
to textrefs/textrefs.org
that referenced
this pull request
Aug 26, 2026
* chore(data): bump the registry pointer to 7d109195 Picks up the second-wave works verified against registry #25: - textrefs/registry#39 — Dante, Divina Commedia (14,233 references), with the verse-level Princeton resolver and a canto-level Dante Lab companion - textrefs/registry#38 — Hume, Treatise and first Enquiry (1,468 references) - textrefs/registry#40 — eight Nietzsche works (2,737 references) Closes registry #34, #36 and #37. The registry goes from 12 works to 23, and from 67,959 references to 86,397. npm run verify passes on the new pin: 86,477 records valid, 259,811 pages built, all internal links valid. * chore(deps): safe update of all dependencies within their semver ranges `npm update` only. package.json is untouched; the lockfile moves seven packages to the newest version their declared range already allows: - @astrojs/starlight 0.41.7 -> 0.41.9 - @commitlint/cli 21.2.1 -> 21.2.2 - @commitlint/config-conventional 21.2.0 -> 21.2.2 - astro 7.2.1 -> 7.2.7 - mermaid 11.16.1 -> 11.17.2 - starlight-openapi 0.26.0 -> 0.26.1 - uuid 14.0.1 -> 14.0.2 Deliberately not taken, because neither is a safe update: - starlight-blog 0.28.0 -> 0.29.0 is outside the declared range. - typescript 6.0.3 -> 7.0.2 is a major. Three high-severity advisories remain and are NOT fixed here. All three are the same chain — form-data (CRLF injection) via httpsnippet via starlight-openapi — and npm's only offered remedy is a DOWNGRADE of starlight-openapi to 0.24.0, which it flags isSemVerMajor. `npm audit fix --force` would move the tree backwards, so it was not run. starlight-openapi is a devDependency used to render the API docs at build time; nothing in that chain reaches a published page. npm run verify passes: 86,477 records valid, 259,811 pages built, all internal links valid. --------- Co-authored-by: Moritz Mähr <14755525+maehr@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #34. Verified row from #25, part of #28.
Two works, two citation systems, one resolver provider.
hume.enquiry-human-understandinghume-section-paragraphhume.treatisehume-book-part-section-paragraphWhy this provider
Hume Texts Online (Peter Millican, Hertford College, Oxford) is the reference text the Hume Society supports, and it has the best control behaviour of any provider verified for #25:
/texts/e/99,/texts/t/9/9/9and/texts/zzz/1all return a real HTTP 404. No degraded page, no wrong passage at 200.It also prints each paragraph's own canonical citation next to the paragraph — "E 10.1, SBN 109", "T 1.3.6.4, SBN 88-9". So the anchor and the locator agree by construction, and a reviewer can check any reference by eye. As a side benefit the same pages carry the Selby-Bigge/Nidditch concordance, if SBN is ever wanted as an additional system.
Where the counts came from
Harvested from the site, not typed from memory.
/texts/e/10the id41is present and42is absent; the same check passed for sections 1, 3 and 12. Sum 255./texts/t/{book}/{part}/{section}until the site returned 404, then read the highest paragraph anchor per page. Result is the canonical shape — 3 books, 10 parts (I.i–iv, II.i–iii, III.i–iii), 90 sections, 1,213 paragraphs.Two Treatise sections came back implausibly short, so they were checked by hand rather than trusted: T 1.1.2 has exactly one paragraph (anchor
2absent) and T 3.2.4 has exactly two (anchor3absent). Both are genuine — 1.1.2 is the famously brief "Division of the subject".A modelling note
The compiler has no four-part range kind. The Treatise uses one
book_chapter_verseblock per book-and-part, with thebookfield carrying the{book}.{part}prefix (book: '1.3'). The expansion emits1.3.6.4directly, so no compiler change is needed — unlike the Qurʾān in #32, which is blocked on textrefs/textrefs.org#94 for exactly this kind of reason.Identity
EvsEHU: the site's own siglum for the first Enquiry isE; the secondary literature mostly writesEHU. Both are seeded as alternative labels, along withFirst Enquiryand the 1748 title.Wikidata was a trap worth recording. Searching the familiar title returns a book chapter, an edited volume and an all-caps duplicate in the top three — all editions, which
AGENTS.mdwarns against mapping. The Work is Q1306656, filed under the 1748 title Philosophical Essays Concerning Human Understanding, with the familiar title as an alias andP50 = Q37160. The Treatise is Q2451675, a written work with the same author, not one of the several edition items sharing that title.Provider courtesy — worth carrying into the link checker
My first harvesting pass fired about twenty rapid requests and
davidhume.orgstarted dropping connections (SSL handshake timeouts). A single request succeeded immediately afterwards, so it was my rate, not the site. Everything here was re-harvested at one request per 2 seconds with retries.This is a small academic server. Whatever eventually link-checks the registry should be paced accordingly.
Checks
npm run compile:data— 14 works, 12 systems, 69,427 references; no dropped resolver targetsnpm run validate:data— 69,481/69,481 records valid1.18,3.4,10.42,12.35,13.1(Enquiry);1.1.2.2,3.2.4.3,1.3.17.1,1.5.1.1,4.1.1.1,1.1.1.13(Treatise)