Repository navigation
Fix the SpotBugs newline rule on the calibration block; make the selftest model directory a property - #237
Merged
Conversation
The LF fix of the previous commit left spotbugs:check red:
VA_FORMAT_STRING_USES_NEWLINE fires on every String.format pattern that
contains \n and asks for %n -- the platform separator the paste block
must not carry, since the block is meant for a pom.xml and .gitattributes
sets eol=lf. The rule and the requirement are in direct conflict, so the
newline has to leave the pattern rather than change back.
appendPasteBlock now appends it as a literal through a new appendXmlNumber
helper -- the same shape appendJsonNumber and appendYamlNumber already use,
and for the same reason their javadoc gives -- and formats the two numbers
at the call site through FORMAT_TOKENS_PER_SECOND and FORMAT_CHARS_PER_TOKEN.
Those constants were declared for this block and only the JSON and YAML
renderers used them; the block repeated %.1f and %.2f inline, so their
javadoc claim ("identical to the one renderXml() pastes") held by
coincidence of the literal. It is now one source for all three renderers.
No suppression was added, the rendered text is unchanged, and
CalibrationReportTest -- including the child-JVM case with
-Dline.separator=\r\n -- pins that.
Why no CI run could have caught it: the reactor still dies earlier on the
unresolvable net.ladenthin:llama:6.0.0 (TODO.md, first open item), so no
run reaches SpotBugs. main was red on a check nothing executed. Found by
running the full reactor against a locally resolvable llama 6.0.0-SNAPSHOT.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E2h8gXyyE5UeimkL9vQv9G
All 38 <modelPath> entries of the srcmorph-selftest profile carried the
absolute X:/Modelle/<file>.gguf. That drive does not exist on the owner's
machine any more (the models live on M:), so the profile could not run
anywhere as committed -- and this POM is published, so a machine-specific
absolute path shipped with it 38 times.
They read ${ai.modelDir}/<file>.gguf now. The property defaults to the
owner's model drive, so the profile behaves as before here, and any other
machine runs it with -Dai.modelDir=/path/to/models. A moved model drive is
one line instead of 38.
docs/ai-index-benchmark/tools/calibrate-bench-pom.xml already had its own
overridable bench.model property and only needed the drive letter, so it
keeps its shape.
Verified with help:effective-pom under -P srcmorph-selftest: the default
resolves every path to M:/Modelle/<file>.gguf, and -Dai.modelDir=<dir>
redirects all of them.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E2h8gXyyE5UeimkL9vQv9G
PARAM_DRY_PENALTY_LAST_N, PARAM_REPEAT_LAST_N, KWARG_ENABLE_THINKING and KWARG_REASONING_EFFORT were unread in LlamaCppJniAiGenerationProviderTest, which Error Prone reports as four UnusedVariable warnings. The assertions they belonged to moved to LlamaCppJniProviderSupportTest with the core-module extraction, where buildInferenceParameters is reachable without a GGUF: the same four constants are declared there and used, so the wire keys stay covered and no coverage is lost by deleting these copies. The test's inlined Java source also becomes a text block, which removes the file's fifth and sixth warnings (StringConcatToTextBlock). Spotless applied. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E2h8gXyyE5UeimkL9vQv9G
… CUDA launch Two documentation statements that stopped matching jllama 6.0.0. LlamaCppJniAiGenerationProvider explained gpuLayers = -1 as "CPU build stays CPU; GPU build uses its own default". That was the pre-6.0.0 artifact layout, where the classifier chose the backend. Since 6.0.0 the library jar is CPU-only and a GPU backend joins it as an additive module jar, so the premise is gone -- while the conclusion stayed right: -1 leaves llama.cpp's own default, which offloads everything once a GPU device is registered and stays on the CPU when none is. A GPU therefore needs no gpuLayers, only the matching natives jar on the classpath. Measured on an RTX 3070 Laptop with Qwen3-4B-Instruct-2507-Q4_K_M, identical configuration, only the classpath differing: without the module jar 63 t/s prefill and 7.1 t/s decode, ggml registering [RPC, CPU]; with it 3474 / 86.8, ggml registering [CUDA, RPC, CPU]. gpuLayers -1 and 99 were within noise of each other in both cases, which is what "llama.cpp's own default" means here. TODO.md's "GPU classifier fat jars are verified structurally, never launched" now records that cuda13-windows-x86-64 has had the launch pass: the -P gpu-cuda fat jar (258 MB, carrying Windows/x86_64/cuda13/ next to the six CPU library directories) ran a real GenerateFileIndex over the production prompt set through the CLI and through srcmorph:generate, at the throughput above, with the loader naming the module. rocm, sycl, openvino and vulkan stay unlaunched; vulkan is reachable on any NVIDIA box and is the cheapest to add next. The CHANGELOG records this branch's four changes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E2h8gXyyE5UeimkL9vQv9G
bernardladenthin
had a problem deploying
to
maven-central
October 23, 2026 15:01 — with
GitHub Actions
Failure
bernardladenthin
had a problem deploying
to
startgate
October 23, 2026 15:01 — with
GitHub Actions
Error
bernardladenthin
had a problem deploying
to
maven-central
October 23, 2026 15:01 — with
GitHub Actions
Failure
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 7
✨ Finishing Touches
Comment |
This branch had an error being deployed
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.
Summary
spotbugs:checkwas red onmainafter Write the calibration paste block with LF line endings on every platform #236.VA_FORMAT_STRING_USES_NEWLINEfires on everyString.formatpattern containing\nand asks for%n— the platform separator the calibration paste block must not carry, so the rule and the requirement conflict. The newline leaves the pattern instead: a newappendXmlNumberhelper appends it as a literal (the shapeappendJsonNumber/appendYamlNumberalready use, for the same documented reason) and the numbers are formatted at the call site through theFORMAT_*constants, which until now only the JSON/YAML renderers used although their javadoc claimed otherwise. No suppression, rendered text unchanged.srcmorph-selftestprofile names its model directory once. All 38<modelPath>entries carried the absoluteX:/Modelle/…, a drive that no longer exists on the owner's machine — so the profile ran nowhere as committed, and a machine-specific path shipped in a published POM 38 times. They read${ai.modelDir}/<file>.ggufnow; another machine uses-Dai.modelDir=/path/to/models.gpuLayers = -1comment ("CPU build stays CPU; GPU build uses its own default" — there is no such split since the natives-jar restructure), andTODO.md's "GPU classifier fat jars … never launched", which now records thatcuda13-windows-x86-64has had a real launch pass.LlamaCppJniAiGenerationProviderTest(six Error Prone warnings). Their assertions moved to the model-freeLlamaCppJniProviderSupportTestwith the core-module extraction, so no coverage is lost.Test plan
clean verifyBUILD SUCCESS on all three modules, 659 + 39 + 32 tests, 0 failures,spotbugs:checkandspotless:checkclean. Run against a resolvablellama 6.0.0-SNAPSHOTfrom the Central snapshot repository in an isolated local repository, which is the only way to get past the pin described below.-P srcmorph-selftestinterpolation verified withhelp:effective-pom: the default resolves every path toM:/Modelle/<file>.gguf,-Dai.modelDir=<dir>redirects all 38.gpuLayersclaim is measured, not assumed — RTX 3070 Laptop,Qwen3-4B-Instruct-2507-Q4_K_M, identical config, only the classpath differing: 63 t/s prefill / 7.1 t/s decode with ggml registering[RPC, CPU], and 3474 / 86.8 with[CUDA, RPC, CPU]once thecuda13module jar is present.gpuLayers−1 and 99 within noise in both cases.cuda13fat jar (-P gpu-cuda, 258 MB) ran a realGenerateFileIndexover the production prompt set through the CLI and throughsrcmorph:generate.net.ladenthin:llama:6.0.0(TODO.md, first open item) — which is also why no CI run could ever have shown the SpotBugs failure this PR fixes: nothing reached SpotBugs. Expect green only once jllama 6.0.0 is on Central.Related issues / PRs
Refs #236 — the first commit here fixes a SpotBugs violation that PR introduced and CI could not see.
Checklist
CONTRIBUTING.mdandCODE_OF_CONDUCT.mdmainuse plain imperative subjects with a detailed body (e.g. "Write the calibration paste block with LF line endings on every platform"), and these match that.CONTRIBUTING.mddocuments Conventional Commits, so the written convention and the repository's practice disagree; worth settling one way or the other, and happy to rewrite these subjects if the document is the one that should win.🤖 Generated with Claude Code
https://claude.ai/code/session_01E2h8gXyyE5UeimkL9vQv9G