Repository navigation
Conversation
Add a GitHub Actions workflow that runs on every pull request and on pushes to master. It checks that: - every tracked XML file is well-formed - wlc/ has 39 books and 23,213 verses, and every word has a lemma, a morph code and a unique five-character id - MAPM/MAPM.xml has balanced verse markers and the same verse inventory as wlc/, apart from Josh 21:36-37, which MAM's text does not have - no operating-system junk files are tracked On pull requests it also writes a summary of which words and verses changed to the job summary, to make review quicker. The summary never fails the build. The script uses only the Python standard library. The workflow uses the pull_request trigger with a read-only token, so it is safe for pull requests from forks. Remove the four Thumbs.db files and ignore such files from now on, as proposed in #111, so that the new check passes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Review of Recommendation: address the six P2 correctness findings below before merging. Each was reproduced by running the unchanged validator against an isolated, Git-tracked copy of the complete dataset. They cover malformed VerseMap XML escaping validation, baseline comparison errors failing valid current data, misplaced words bypassing checks, six-character IDs passing the ID check, deletion of MAPM passing validation, and conflicting start/end attributes being overlooked. What passed: the unchanged dataset validated with 23,213 WLC verses, 306,785 word IDs, and 23,211 MAPM verses. Separate mutations correctly failed for missing lemmas, duplicate word IDs, malformed morphology, unclosed MAPM verses, verse-inventory mismatches, tracked junk, and malformed XML outside the skipped WLC metadata. Reconstructing the Psalm 93:4 example produced the promised single Standards: no direct violations of documented repository standards were found. One maintainability concern overlaps the baseline-comparison defect: Additional improvement: swapping two intact words within a verse reports “No word-level changes.” The records are keyed by word ID and contain no position, so the summary cannot expose a changed reading caused solely by reordering. Comparing the ordered word IDs per verse would address this. This is separate from the six findings because the PR's explicit field list does not promise position tracking. Full OSIS schema validation and validation against the complete morphology-code tables are explicitly deferred in the PR and were not counted as defects. Findings1. [P2] Include VerseMap.xml in the tracked-XML checkThis excludes every file under 2. [P2] Keep errors in comparison data out of validation status
3. [P2] Reject words outside recognized verse elementsAll word validation and summary indexing happen inside this verse traversal. Adding 4. [P2] Match the entire ID value, including a possible final newlineThe ID pattern uses 5. [P2] Fail validation when the current MAPM file is missingReturning 6. [P2] Reject milestones carrying both start and end attributesThe |
Address the six findings from the review of 6623bd0, each reproduced first by mutating a copy of the dataset: 1. wlc/VerseMap.xml was never parsed, so a malformed copy passed. Every tracked XML file not already read by a specific check is now parsed for well-formedness. 2. A malformed file in the base revision failed the run. The base is now read quietly; the summary names what could not be compared, and any error while producing the summary is reported there instead of failing the run. 3. A <w> outside any verse skipped all checks. It is now an error. 4. The id, morph, n and verse-id patterns used "$", which accepts a trailing newline, so a six-character id passed. They now use fullmatch(). 5. Deleting MAPM/MAPM.xml passed. A missing file is now an error. 6. A verse milestone with both sID and eID, or with neither, was not reported. Each milestone must now carry exactly one. Also from the review: - The change summary now lists verses whose words are the same but in a different order, which the id-keyed comparison could not show. - parse() and _quiet_parse() are merged into one function with a quiet flag, so the two comparison paths share one error policy. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Prepared by Claude (an AI assistant) working at my direction. All six findings are addressed in 22484c0. Each was reproduced first against 6623bd0 by mutating a copy of the dataset, and each mutation now gives the expected result:
How each was fixed:
Also taken up from the review:
Still passing after the change: the unchanged dataset (23,213 verses, 306,785 words, 23,211 MAPM verses), the single-row Ps 93:4 summary against the pre-merge base, and the controls for an empty lemma, a missing id, a duplicate id, a malformed morph, a malformed Not changed: the mutation tests were run locally and are not added to the repository. |
Why
This project has no automated checks, so every pull request has had to be verified by hand. With few people able to review, that is slow, and it is how #108 came to wait eighteen months. This adds a small set of checks that run on every pull request and on pushes to
master.What it checks
Any of these failing fails the run:
wlc/has 39 books and 23,213 verses, and every word has a lemma, a morph code and a unique five-character id;MAPM/MAPM.xmlhas balanced verse markers and the same verse inventory aswlc/, apart from Josh 21:36–37, which MAM's text does not have;Thumbs.db,.DS_Store,desktop.ini) are tracked.What it reports
On a pull request it also writes a data change summary to the job summary: which words in
wlc/changed and in which field (text, lemma, morph,n), any word ids added or removed, and how manyMAPM/verses changed. The summary never fails the run; it is there so a reviewer can see at a glance what a change touches. For #108 it would have been one row:19AHFAlso in this pull request
The four
Thumbs.dbfiles are removed and such files are ignored from now on, as osjc proposed in #111. Without that the new junk-file check would fail onmaster.How it was tested
Run locally with the same script:
masterbefore Fix the structure of Ps.93.4, by treating the Azla Legarmeh in the first word as a SHALISH #108, Implicit Articles and Syntax Trees #110 and Update MAPM to the current Miqra according to the Masorah #114 were merged: fails, on the 2014MAPM.xml(unclosed verses, text outside verses, different verse numbering) and theThumbs.dbfiles;wlc/: 23213 verses, 306785 words,MAPM/: 23211 verses) in about four seconds.This pull request is the first real run of the workflow on GitHub.
Notes
.github/scripts/validate_data.py) uses only the Python standard library, so it can be run locally withpython3 .github/scripts/validate_data.py, or with--base <checkout of master>to see the change summary.pull_requesttrigger withcontents: readonly, so pull requests from forks get a read-only token and no secrets.wlc/against the OSIS schema, because the wordidattribute is not in that schema and the files do not pass it today. Morph codes are checked for shape, not against the full code tables; that would be a good later addition.🤖 Generated with Claude Code