Skip to content

Fix the fat-jar no-natives check and three stale statements - #234

Merged
bernardladenthin merged 5 commits into
mainfrom
ccr-90fc5f6a-vs4s0f
Oct 22, 2026
Merged

bernardladenthin merged 5 commits into
mainfrom
ccr-90fc5f6a-vs4s0f

Conversation

@bernardladenthin

Copy link
Copy Markdown
Owner

Summary

  • CI: a fat jar without any native library is named in the release check again. .github/verify-classifier-fatjars.sh runs under set -euo pipefail, and its natives_of helper piped unzip -Z1 through grep: for a jar with no native entry grep exits 1, the assignment failed and the script ended red without an ::error:: line or a jar name, so the two "carries no native library at all" checks could never run. The helper now tolerates only grep's "no match"; an unzip failure or a grep error still fails it.
  • The script gets its first test: the srcmorph-local .github/buildcheck/tests/test_verify_classifier_fatjars.py builds fixture jars and asserts exit code and ::error:: message for every check (a matching classifier jar passes; CPU-only under a GPU name, a lost default native, an unmapped classifier shape, a jar without natives, a single-OS default jar and a corrupt jar fail). The two no-natives cases were red before the fix.
  • Stale statements corrected by a review of the branch: TODO.md's "main does not build" item names both reasons the reactor cannot go back to llama 5.1.0 (the removed enableFlashAttn() / renamed setLazyMode, and the 6.0.0 natives-jar split), its @VisibleForTesting audit item names where the members live since the PIT split, a comment in verify-classifier-fatjars.sh dates the natives jars to 6.0.0, and AiGenerationConfig's Javadoc names llama 6.0.0 (not 5.2.0) as the release that added setFlashAttn.

Test plan

  • Affected unit / integration tests pass locally: python3 -m unittest discover -s .github/buildcheck/tests -t .github (the new test red before the fix, green after), check-shared-files.py, check-release-gate.py, check-run-scripts.py.
  • CI is green on this branch
  • Docs / CHANGELOG updated: CHANGELOG.md, TODO.md.

Related issues / PRs

  • Sibling PRs of the same branch: java-llama.cpp, BitcoinAddressFinder, streambuffer and workspace.

Checklist

  • I have read CONTRIBUTING.md and CODE_OF_CONDUCT.md
  • My commits follow Conventional Commits -- they are imperative one-line subjects in the repository's existing style, not type(scope): prefixed.
  • No security-sensitive changes

Generated by Claude Code

The item still named 5.2.0; the pin has been 6.0.0 since b710796 and that
release is not on Central either (llama-6.0.0.pom 404, newest 5.1.0). The
substance stands: the item closes with the jllama release, nothing to change
in this repository.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VBFFnrhtvXiUeyxjmUc4R2
- TODO "main does not build": the reason it gave for not reverting to 5.1.0
  was attributed to the pom comment, which names a different one. Both are
  stated now: the binding removed enableFlashAttn()/FLASH_ATTN and renamed
  setTensorReadLazy to setLazyMode (the pom comment), and the reactor also
  depends on 6.0.0's natives-jar split.
- TODO "@VisibleForTesting audit": the four members and lazyMode/cacheType
  live in LlamaCppJniProviderSupport since the PIT split, and
  tensorReadLazyMode is lazyMode.
- verify-classifier-fatjars.sh: natives jars "(6.0.0 on)", a comment only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VBFFnrhtvXiUeyxjmUc4R2
verify-classifier-fatjars.sh runs under set -euo pipefail, and natives_of
piped unzip -Z1 through grep. For a jar with no native entry grep exits 1,
the assignment of the helper's output fails and set -e ends the script
there: the job went red with no ::error:: line and no jar name, and the two
"carries no native library at all" checks (default jar, classifier jar)
were unreachable. The helper now tolerates only grep's "no match"
(`|| [ "$?" -eq 1 ]`); an unzip failure or a grep error (exit 2) still
fails the pipeline, so a corrupt jar is not accepted.

The script had no test. The srcmorph-local
.github/buildcheck/tests/test_verify_classifier_fatjars.py (stdlib only,
not a shared file) builds fixture jars and asserts exit code and ::error::
message for every check: a matching classifier jar passes; a CPU-only jar
under a GPU name, a lost default native, an unmapped classifier shape, a
classifier or default jar without natives, a single-OS default jar and a
corrupt jar fail.

Red/green: before the fix both no-natives cases failed with
"AssertionError: '::error::' not found in ''" (exit 1, empty stderr);
with it all 8 cases pass, and the buildcheck suite is 67/67.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VBFFnrhtvXiUeyxjmUc4R2
The Javadoc of AiGenerationConfig.DEFAULT_FLASH_ATTN still credited
ModelParameters.setFlashAttn(FlashAttn) to net.ladenthin:llama 5.2.0.
jllama never published that number and renumbered the release to 6.0.0,
which is what the pom pins and what CHANGELOG.md already says. It was the
last forward-looking 5.2.0 reference in the sources; the remaining ones
are deliberate history notes and a test fixture. Documentation only, so
no test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VBFFnrhtvXiUeyxjmUc4R2
…ements of the branch

The fat-jar check's corrupt-jar case asserted only a non-zero exit, which a
helper whose failure is masked (`|| true` on its call, a lost pipefail)
would pass as well: the script would then report the file as a jar without
natives, with exit code 1 and an ::error:: line. The case now pins unzip's
exit code 9 and the absence of the script's diagnosis (red with the helper's
call masked, green as the script is). A `|| true` on the grep branch alone is
not observable through a corrupt jar, pipefail carries unzip's status either
way; the docstring and the CHANGELOG say what the test proves and what it
cannot. The TODO's @VisibleForTesting inventory now separates the
package-private production API of the provider support (called by the
provider) from the documented test seams (the codec's line and string
overloads, trimSourceAtLineBreak, the mojos' build*Configuration()).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VBFFnrhtvXiUeyxjmUc4R2
@bernardladenthin
bernardladenthin merged commit 86b6a6d into main Oct 22, 2026
19 of 28 checks passed
@bernardladenthin
bernardladenthin deleted the ccr-90fc5f6a-vs4s0f branch October 22, 2026 14:33

This branch had an error being deployed

1 failed and 1 active deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants