Skip to content

Commit 385ecb6

Browse files
kckernclaude
andcommitted
test(parity): junk pieces after a cross-book range in raw and latex
raw /acts.28.31-rom.1.1;16.1 now matches live (null). Its latex is empty on live (inc_latex.php read the same null raw data): a latex allow with the html one's path rule (two different books, bare numeric pieces) and a live: guard for an empty body. Also raw /jst.john.3.16 (live null, matches). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 73e8c69 commit 385ecb6

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

‎apps/web/test/parity/allow.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"html re:^/(?:[A-Za-z0-9*]+/)?([1-4]?[A-Za-z]+)\\.[\\d.]+-(?!\\1\\.)[1-4]?[A-Za-z]+\\.[\\d.]+(;[\\d.]+)+$ && live:<h3>\\s*(?:\\d+:\\s)?\\s*\\d+(?::\\d+)?\\s*</h3>": "A bare piece after a leading cross-book range (/acts.28.31-rom.1.1;16.1, /gen.50.26-ex.1.2;3.4) has no book to read it by. PHP's getBook read junk from it: a \"not found\" section headed \" 16:1\" or \"3: 3:4\" and, when its verse_ids came back false, the raw path as the title. Node's meta and api reproduce those blocks; the html page shows the range and an empty section without the junk heading (PHP junk, reviewer decision 2026-10-22). Only paths that are one range between two different book tokens followed by bare numeric pieces, and only where live shows such a junk heading (an h3 of bare numbers)",
3+
"latex re:^/(?:[A-Za-z0-9*]+/)?([1-4]?[A-Za-z]+)\\.[\\d.]+-(?!\\1\\.)[1-4]?[A-Za-z]+\\.[\\d.]+(;[\\d.]+)+$ && live:^\\s*$": "The same junk piece after a leading cross-book range in latex: inc_latex.php read renderRaw's data, which was null (the junk block's verse_ids false made array_merge give null), so live's latex is empty; Node prints the range's verses. Only those paths, and only where live's body is empty",
34
"passage check:singleHeadingDrop": "PHP single_heading bug: passage_script.php drops the first verse (or verse part) of every section after the first, with that section's summary, background or headnote (Matthew 5:2b, 13, 17, 21 in NIV Matthew 5; Genesis 2:1 in /passage options[start]=1..34; Matthew 1:1 after Malachi 4:6). Node keeps all verses and shows only the first heading. Allowed only where live is Node with exactly one paragraph-opening verse span (and its extras and paragraph tags) removed per run, between verses live shows, every other line equal, and each removed verse starts a section (§) in live's raw text",
45
"html /%2eenv": "Locally the search runs on the MySQL fallback, which stops at its time budget (SEARCH_FALLBACK_MAX_MS) before finishing a scan for a short word and says \"Showing partial results\". Same 0 results; production searches through Sphinx, which has no budget.",
56
"html re:^/(search/)?[^/?]*(%22|\")[^/?]*$": "Live returns no results for quoted phrases (PHP breaks the quotes before querying Sphinx); Node searches the phrase, as Sphinx does — owner decision 2026-10-20",

‎apps/web/test/parity/allow.test.js‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,14 @@ describe('allow.json: junk pieces after a leading cross-book range', () => {
9797
});
9898
});
9999

100+
describe('allow.json: latex of junk pieces after a leading cross-book range', () => {
101+
const allow = JSON.parse(readFileSync(new URL('./allow.json', import.meta.url), 'utf8'));
102+
test('allowed where live\'s latex is empty', () => {
103+
expect(allowReason(allow, 'latex', '/acts.28.31-rom.1.1;16.1', '')).toMatch(/latex/);
104+
});
105+
test('not where live printed text, nor for a same-book range', () => {
106+
expect(allowReason(allow, 'latex', '/acts.28.31-rom.1.1;16.1', '\\begin{scripturechapter}')).toBeUndefined();
107+
expect(allowReason(allow, 'latex', '/gen.1.1-gen.2.3;4', '')).toBeUndefined();
108+
});
109+
});
110+

‎apps/web/test/parity/corpus.mjs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ const EXTRA = [
6767
['meta', '/gen.50.26-ex.1.2;3.4'],
6868
['html', '/acts.28.31-rom.1.1;16.1'],
6969
['html', '/gen.50.26-ex.1.2;3.4'],
70+
['raw', '/acts.28.31-rom.1.1;16.1'],
71+
['latex', '/acts.28.31-rom.1.1;16.1'],
7072
// A JST piece after another piece (the package dropped it)
7173
['html', '/john.3.16;jst.john.3.16'],
7274
['api', '/john.3.16;jst.john.3.16'],
@@ -83,6 +85,7 @@ const EXTRA = [
8385
['raw', '/john.3.16;jst.john.3.16;18'],
8486
['meta', '/jst.john.3.16;18'],
8587
['meta', '/john.3.16;jst.john.3.16;john.1.1'],
88+
['raw', '/jst.john.3.16'],
8689
['passage', '/passage?ref=Malachi+4%3A6&version=KJV&hversion=KJV&options%5Bstart%5D=23144&options%5Bend%5D=23147&searchterm='],
8790
];
8891

0 commit comments

Comments
 (0)