Bump the vendored engine, whose aborted mirrors now exit 3 instead of 0 - #169
Merged
Conversation
Since httrack #1419 hts_main2() returns HTS_EXIT_MIRROR_ABORTED (3) for a mirror it gave up on, where it used to return the same 0 as a finished one. The finished pane classifies only when the code is 0, so on the new engine every fatal abort would have dropped out of that branch and shown a bare "Error (code 3)" with no mirror folder link, instead of naming the disk or the link cap. The exit code is a channel of its own rather than a second spelling of abortCode(): httpmirror() gives up on a handful of startup failures without ever setting exit_xh, so abortCode() and the stats both read like a clean run and only the code disagrees. MirrorOutcome.of() now weighs both, and an abort the engine could not name is an abort rather than a success. The other 25 engine commits need nothing here: the option surface, the compiled source list and the guide anchors the Help deep links use are all unchanged, and the UTF-8 catalog move was already in the previous pin. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
Review follow-up on the previous commit. The constant belongs beside the main() that returns it, not in the outcome enum: javac inlines a static final int at its use sites, so reading it there never loads HTTrackLib, and the stub android.jar does not force it out. The enum keeps the ranking, which is the part plain JUnit can exercise. of() now takes whether the engine aborted rather than the raw code. The two int channels overlapped at 3, and transposing them turned a disk-full abort into "size or time limit reached"; a boolean beside an int cannot transpose. mirrorRan() and mirrorAborted() give the three sites that read the raw code one place to read it. A test now compares the constant against HTS_EXIT_MIRROR_ABORTED in the pinned header, so a later pin that renumbers it fails here instead of quietly calling finished mirrors aborted. Three assertions that passed against the old engine's behaviour are replaced: the fatal-cause rows had exit_xh == -1 arriving on a code of 0, which the engine no longer produces, and the two-channel case was already covered by the switch's default arm. abortCode()'s contract and the wasStopped() comment both said main() returns 0 for nearly every abort, which is now only true of the stops it was asked for. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
… false A branch inserted ahead of the verdict gate could set the message for an aborted mirror without tripping anything: the gate was pinned by a substring search, which an earlier branch does not disturb. Every assignment to the finish message already sits after the gate, so a test now says so, and the reinstated bug fails it. The drift guard read the engine header raw, so a commented-out define satisfied it; it strips comments first now. mirrorRan() and mirrorAborted() claimed only two codes mean a mirror ran but never tried a third, so widening either to a range survived. The constant's comment said it must stay a compile-time constant or reading it would load HTTrackLib under plain JUnit. Loading and initialising HTTrackLib there works: its static initialiser only sets a tag, and android.* appears solely in method signatures, which resolve lazily. The comment guarded nothing and is gone. The wasStopped() comment likewise repeated the values abortCode() already documents. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
…'s line
The test added last commit anchored on `^\s*message`, which a same-line
assignment inside an inserted branch slips past: putting `{ message =
"<b>Error</b> ..."; } else if` ahead of the gate reinstated the original bug
with the suite green. It now scans the whole slice before the gate, allowing
only the declaration.
mirrorAborted() gained the 255 row its sibling already had, so widening it to
a range no longer survives.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
Three source-text guards in a row failed to hold the invariant that an aborted mirror names its cause and keeps its folder link. Each was defeated by editing the text it searched: an inserted branch, an assignment on a brace's line, then a comment that moved the anchor. Two of the four ways the invariant can break were never visible to a regex at all, the whole folder-link half among them. MirrorOutcome.decide() now returns what the pane says and whether a mirror exists to link to, and runInternal() passes the engine's answers in and reads the two fields out. The wording table moved with it, so the pane's fifty lines are nine. Mutating any verdict or dropping the link now fails a table test that asserts the text and the flag together, including the edit that beat the last guard. What is left in the activity is which folder the link points at, which is one line and pinned as such. The wording assertions that read the switch out of the activity are gone: the table asserts the same strings exactly, rather than a substring of each. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
Two ways to reinstate the bug survived the new tests. The caller could overwrite the verdict decide() had just returned, since nothing said the pane must show that one; and decide() could carve out most of the aborted cases, since only two of them were in the table. The table now walks every Stop against every abort code at the aborted exit code and asserts the folder link and a named cause for each, so a carve-out fails wherever it lands. The caller test pins the verdict as final and the message as its single assignment. The count that catches the overwrite was itself broken: String.split takes a regex, so the literal it looked for matched nothing and the assertion passed on zero. It is quoted now, and a control confirms it still discriminates. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
xroche
enabled auto-merge (squash)
August 25, 2026 18:31
xroche
added a commit
that referenced
this pull request
Aug 26, 2026
The engine moves to 26f24acb, the tagged 3.49.24. Nothing it changes reaches the Android binary: the delta is the WebHTTrack server and the guide, and htsserver.c is not in Android.mk. The docs bundle does ship, built from the pinned engine. It now covers the reshot Android screenshots and the all-files-access and notification steps the guide never described. The droid/* anchors Help deep-links to are unchanged. Release notes are rewritten for the round: the outcome fixes (#158, #159, #162, #163, #169), the native-fault ones (#160, #165, #168), the storage warning (#155) and the import prompt a fresh install could not answer (#164). The resume-offer note claims only what #158 delivers, since markers already on disk are left alone. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
xroche
added a commit
that referenced
this pull request
Aug 27, 2026
…ne dropped (#172) about_credits is our own hand-maintained copy of the engine's LANG_K1, run once through build_strings.sh and checked in. Nothing regenerates it, so it sat at the pre-2003 roster and shipped a contributor's personal email address, which httrack #1453 removed, alongside a 1998-<year> range build_strings.sh was rewriting on every run. Mirrors LANG_K1 at engine 4055ba5a, including that script's (C) -> © rewrite, so a later regeneration produces the same text. The string is now ahead of the pinned engine until the next submodule bump. greetings.txt, AUTHORS and html/contact.html need no change here: the docs bundle is generated from the pinned engine, so those roster surfaces follow the bump on their own. LANGUAGE_AUTHOR is deliberately not rendered, since each catalog keeps its own credit and Android ships no per-language strings. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.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.
Bumps the vendored engine 26 commits to 24deba93. httrack #1419 changed an exported contract:
hts_main2()now returns 3 for a mirror it gave up on, where before it returned the same 0 as a finished one. Our finished pane only classified a run when the code was 0, so on the new engine a disk-full or link-cap abort would have shown a bare "Error (code 3)" with no link to the mirror folder, instead of naming what ran out. The exit code is its own channel, not a second spelling ofabortCode().httpmirror()gives up on a few guards without ever settingexit_xh, and thereabortCode()and the stats both read like a clean run while only the exit code disagrees.Deciding what the pane says moved out of
runInternal()intoMirrorOutcome.decide(), which returns the text and whether a mirror exists to link to. Three source-text guards over the old inline version were each defeated by editing the text they searched, and the folder-link half of the invariant was never visible to a regex at all. The table test that replaced them fails on every edit that beat them. The activity's fifty lines are nine now, and every user-visible string is byte-identical to master.Nothing else in the engine range needs anything here. The option surface, the compiled source list and the guide anchors behind the Help deep links are all unchanged, and the UTF-8 catalog move was already in the previous pin.