Repository navigation
ADFA-3305: Point javadoc's Index links at the split index; drop index-all.html - #51
Conversation
…-all.html javadoc's one-page index (j/html/api/index-all.html, 23 MB decoded) repeats its split index (index-files/index-1.html to index-27.html), and every javadoc page's Index link opened it: 5.0 s to load on a Pixel 6 Pro, against 0.5-0.8 s for a split page. A fifth drop_unread_rows.py group, javadoc-index-all, points every quoted href or src that resolves to a one-page index at its split index's first page, keeping the link's prefix (a fragment goes to the split page holding its anchor), and deletes the one-page index. The reference check reads the rewritten rows, so a link the rewrite does not reach (unquoted, built by a script, in a templated row's JSON) refuses the run, as do an unknown anchor, a missing or unreadable split index, and a page named index-all.html that is not a javadoc index. On the 2026-10-19 ship-time build: 5,224 links in 5,222 pages pointed at the split index; packed, 1,241,088 file and 1,252,817 .br bytes smaller than the same database repacked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018CMZQuXT3GT7nEct2w4tg3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018CMZQuXT3GT7nEct2w4tg3
The index rewrite reaches Content rows only, so a template linking to index-all.html must refuse the run. From documentation version 3 a template is stored compressed and its link is seen only once it is decoded. The test covers a compressed template at 3.0.0 and a plain one at 2.1.0; it fails on b6bcd09, the branch before the rebase onto the decoding fix (exit 0). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018CMZQuXT3GT7nEct2w4tg3
b6bcd09 to
5cf9c35
Compare
|
Rebased onto #46's e31aa00 (R50-05, which decodes version 3's templates before checking their links), so this branch was force-pushed: b6bcd09 -> 5cf9c35. The rebase conflicted in the docstring's check list and in CLAUDE.md; both sides' text is kept. New commit 5cf9c35: the rewrite changes only Content rows, so a template's link to 🤖 Generated with Claude Code |
Independent Claude review (head 5cf9c35)The group does what the body says. On a copy of the 3.0.0 ship-time build it pointed 5,224 links in 5,222 javadoc pages at
The file and
R51-01. I ran 24 mutants of the new code against the 47 tests. 16 were killed. Four of the 8 survivors change behaviour that no test pins:
The other 4 survivors don't change behaviour on the fixtures: dropping the The precheck is case-sensitive, but The real data uses none of these forms: all 5,224 links are lowercase, quoted
R51-02. The rewritten rows are about 10 bytes larger stored (+52,829 over 5,222 rows), and the VACUUM at the end keeps rowid order. On a copy of the ship-time build, which
The documented order (row drops before R51-03. Two figures:
Fix: say "one run each", and give the Checked and sound
🤖 Generated with Claude Code |
Four tests pin index-link paths that no test covered (review R51-01): upper-case HREF and SRC attributes and an upper-case file name are rewritten; xlink:href, data-href and data-src are left to the reference check, so the run refuses; a percent-encoded fragment goes to the split page holding the decoded id; and an id on several split pages goes to index-1.html. They pin behaviour the step already had, so each was checked against a mutant instead of a fix: they kill the review's survivors "no re.I", "no lookbehind", "no unquote", "last page wins" and "first not first". The review's 24 mutants now leave 3 survivors, the equivalent ones it named. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018CMZQuXT3GT7nEct2w4tg3
…e row holds The rewrite's pattern ignores letter case, but the cheap row filter in front of it did not: a row whose only link was "INDEX-ALL.HTML" was left as it was, while the same link beside a lower-case one was rewritten (review R51-01). The filter now uses the pattern's case rule, so every link the pattern matches is rewritten. Rewriting all of them, rather than none, keeps one rule for the pattern and the filter, and the only links it changes are ones that never resolved on the case-sensitive server and now do. Leaving them alone would have needed a case-sensitive pattern too, which would also stop an upper-case HREF or SRC attribute from being rewritten. The new test fails without the change: the row keeps "INDEX-ALL.HTML". Making the filter case-sensitive again, or dropping its re.I, fails it. Dropping the filter entirely changes nothing now, since it skips only rows the pattern cannot match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018CMZQuXT3GT7nEct2w4tg3
The javadoc-index-all rewrite stores each changed row a few bytes larger (+52,829 over 5,222 rows), and the closing VACUUM keeps row order, so in a file that was already packed the rows move to new pages and leave their old ones mostly empty. On a copy of the 2026-10-19 ship-time build the step took the file from 90,783,744 to 99,475,456 bytes; rebuild_database.py --pack Content,TooltipTexts --page-size 4096 then brought it to 89,542,656. The documented order already puts the pack after this step, but nothing said it has to (review R51-02). The docstring's Pipeline position and the CLAUDE.md entry now do. Documentation only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018CMZQuXT3GT7nEct2w4tg3
…that reproduces The docstring's "5.0 s to load and a split page 0.5-0.8 s" read as a repeated measurement. It was one timepage.mjs run per page on a Pixel 6 Pro with the cache disabled: index-all.html 5,033 ms to the load event, index-1.html 537 ms, index-19.html 832 ms. It now says so (review R51-03). The .br saving is now the one that reproduces at this head: 1,250,482 bytes (72,685,042 -> 71,434,560), with both copies of the ship-time build packed with --pack Content,TooltipTexts --page-size 4096 and compressed with brotli -q 11 -w 24. The review measured the same figure. The file saving, 1,241,088, is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018CMZQuXT3GT7nEct2w4tg3
Response to the reviewAll three findings are addressed (5cf9c35..8e807f4).
🤖 Generated with Claude Code |
…c-index Its base took origin/main (#52); CLAUDE.md conflicted where this branch rewrites a live-scripts entry and the base adds svg_images_to_webp.py to the same sentence. Both are kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018CMZQuXT3GT7nEct2w4tg3
…-index # Conflicts: # CLAUDE.md
ADFA-3305
Keeps javadoc's split index and drops its one-page copy.
j/html/api/index-all.html(23 MB decoded) repeats thesplit index
index-files/index-1.htmltoindex-27.html, and every javadoc page's Index link opened it. On a Pixel 6Pro, in one
timepage.mjsrun per page with the cache disabled, it took 5,033 ms to its load event, against 537 msfor
index-1.htmland 832 ms forindex-19.html. Stacked on #46, whose step it extends.The change
drop_unread_rows.pygroup,javadoc-index-all(on by default): every quotedhreforsrcthat resolvesto a one-page index, its file name matched in any letter case, is pointed at
index-files/index-1.html, keeping itsown relative or rooted prefix; a fragment goes to the split page holding its anchor (
index-1.htmlfirst whenseveral do). Then the one-page index (and its chunk row) is deleted.
in an attribute whose name only ends in
hreforsrc(xlink:href,data-href), in a templated row's JSON, orin a template (decoded first from version 3), none of which is rewritten - refuses the run. So do a fragment no
split page holds, a missing or unreadable split index, and a page named
index-all.htmlthat is not a javadocindex.
--dry-run, exit 1 means nothing written, asecond run does nothing.
rebuild_database.py --packhas to follow it. Each rewritten row stores a few bytes more (+52,829 over 5,222 rows)and VACUUM keeps row order, so in a file that was already packed they move to new pages: on the ship-time build the
step took the file from 90,783,744 to 99,475,456 bytes, and the pack brought it to 89,542,656.
Real data (the 2026-10-19 ship-time build, every ADFA-3305 step, 90,783,744 bytes)
are lower-case, quoted
hrefs with no fragment.rebuild_database.py --pack Content,TooltipTexts --page-size 4096and compared with the same databaserepacked: file 1,241,088 bytes smaller (90,783,744 -> 89,542,656),
.br(brotli -q 11 -w 24) 1,250,482 smaller(72,685,042 -> 71,434,560). Repacking alone moves the
.brby about 0.14 MB.index-all.html. A copy whosepage.peblinks to it refuses (template page.peb links to j/html/api/index-all.html); before the rebase ontoADFA-3305: Drop documentation rows nothing reads, and tooltip details that repeat the summary #46's template decoding, it exited 0.
index-all.htmland its chunk row are gone, everychanged page equals its original but for the link, every new link resolves to a stored row, and no kept row,
template or tooltip mentions
index-allin any letter case. A second run reports nothing to do.Tests
52 tests (15 new), passing under pytest (Python 3.11 and 3.14) and as a plain script. All 15 fail on #46's head.
INDEX-ALL.HTMLis rewritten; itfails on 5cf9c35, where the row was left as it was. Four pin paths no test covered, so they pass on 5cf9c35 and
were checked by mutants instead: upper-case
HREF/SRCand file names,xlink:href/data-hrefleft to thereference check, a percent-encoded fragment, and an id on several split pages.
equivalent: dropping the cheap row filter (it skips only rows the rewrite cannot change), dropping the
text/htmlfilter on split pages (the ship-time build's
index-files/holds only its 27 HTML pages), and dropping the\bin the anchor pattern (it would also match an attribute such as
valid="..."; on those 27 pages it finds the sameids either way).
Pipeline position
Unchanged from #46: after every step that writes page content or links, then
rebuild_database.py --pack, whichmust follow it.
🤖 Generated with Claude Code
https://claude.ai/code/session_018CMZQuXT3GT7nEct2w4tg3