From 695ca929535c8fa353a062c5922f0cfce7db9875 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 30 Jun 2026 17:51:31 +0000 Subject: [PATCH 1/2] docs: note Java-8 checker-qual override (3.55.1) for plugin execution The plugin builds against checker-qual 4.2.0, whose classes are Java 11 bytecode (major 55) and fail to load on a Java 8 JVM. Document that running the plugin under Java 8 requires overriding checker-qual to 3.55.1 (last release with Java 8 bytecode; 4.0.0 switched to Java 11) via the plugin's own block. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01KGLKH56bKYVWcv4XAfKe8Y --- README.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/README.md b/README.md index e475123..f10858e 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,45 @@ The plugin runs in three phases, building a navigable index from fine to coarse. - Maven 3.6.3+ - Local GGUF model (llama.cpp compatible) +### Running under Java 8: override `checker-qual` + +The plugin itself is compiled to Java 8 bytecode, but it pulls in +[`org.checkerframework:checker-qual`](https://central.sonatype.com/artifact/org.checkerframework/checker-qual) +transitively, and the version it builds against (`4.2.0`) ships its classes as **Java 11 +bytecode** (class-file major version 55). On a **Java 8** JVM, loading those annotation +classes fails with `UnsupportedClassVersionError`. + +If you run the plugin under a Java 8 Maven/JVM, **override `checker-qual` to `3.55.1`** — the +**last release whose runtime classes are Java 8 bytecode** (major 52). The `checker-qual` line +switched to Java 11 bytecode in `4.0.0`; every `3.x` release (`3.42.0` … `3.55.1`) is Java 8 +loadable, and `3.55.1` is the newest of them. (`checker-qual` `3.43.0`–`3.55.1` additionally +carry a root `module-info.class`, which a Java 8 classpath simply ignores; if you want a jar +with no `module-info.class` at all, `3.42.0` is the last such release.) + +Because this is a *plugin* dependency, the override goes inside the plugin's own +`` block (a project-level `` does **not** affect a plugin's +classpath): + +```xml + + net.ladenthin + llamacpp-ai-index-maven-plugin + + + + + org.checkerframework + checker-qual + 3.55.1 + + + +``` + +Running the plugin under Java 11 or newer needs no override. + ## Dependency The plugin depends on [`net.ladenthin:llama`](https://central.sonatype.com/artifact/net.ladenthin/llama), the Java/JNI binding for llama.cpp. From a10b13ccee91b2c36ea40fa35fec895d17f0bbb6 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 30 Jun 2026 17:54:43 +0000 Subject: [PATCH 2/2] feat(selftest): add big-window-sql rule, rename big-window -> big-window-java The big-window oversized-file fallback only existed for .java sources. Split it into a per-kind pair mirroring the plain java/sql rules: big-window-java (file-body-java) and the missing big-window-sql (file-body-sql), both routing oversized sources to the large-context granite-4.0-h-tiny-bigwindow model at priority 100. An oversized .sql file now keeps the SQL prompt instead of falling through. Updated the model-comment, README, and CHANGELOG references accordingly. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01KGLKH56bKYVWcv4XAfKe8Y --- CHANGELOG.md | 3 +++ README.md | 2 +- pom.xml | 44 ++++++++++++++++++++++++++++++++------------ 3 files changed, 36 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 49789b7..ff5e7cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ The release procedure (prompt template and step-by-step instructions) lives in [ ## [Unreleased] +### Changed +- Split the big-window size-routing rule per source kind in the `ai-index-selftest` example POM: the former single `big-window` rule is now `big-window-java` (prompt `file-body-java`), and a matching `big-window-sql` rule (prompt `file-body-sql`) routes oversized `.sql` sources to the same large-context model — so an oversized `.sql` file keeps the SQL prompt instead of being misrouted/uncovered. + ## [1.0.1] - 2026-06-29 ### Added diff --git a/README.md b/README.md index f10858e..d81a99c 100644 --- a/README.md +++ b/README.md @@ -207,7 +207,7 @@ The plugin is configured from three building blocks, declared on the plugin insi file too large for the window would lose content if trimmed, so the build **always fails** (a hard abort). The fix is **configuration only** — the plugin never picks a model for you: add a `` rule with a size `` that routes oversized files to a model with a large - enough window (see the `granite-4.0-h-tiny-bigwindow` definition + the `big-window` rule in the POM — + enough window (see the `granite-4.0-h-tiny-bigwindow` definition + the `big-window-java` / `big-window-sql` rules in the POM — IBM Granite 4.0-H-Tiny, Apache-2.0, a hybrid Mamba model whose KV cache grows only linearly, configured at a 384K window to cover files up to ~1 MB; verified summarizing a ~995 KB / ~268K-token file on an 8 GB GPU with no OOM. Quality is best within Granite's validated 128K (~500 KB) and degrades gradually diff --git a/pom.xml b/pom.xml index becdc9e..079ea44 100644 --- a/pom.xml +++ b/pom.xml @@ -1559,8 +1559,8 @@ SPDX-License-Identifier: Apache-2.0 the window check over-counts tokens and never lets a file overflow the window at run time); the cpt-3 check admits up to ~1.16 MB. reasoningEffort is empty: Granite has no gpt-oss harmony channels, so no reasoning kwarg is - sent. The size-routing rule that targets this key lives in the ai-generate - below (id big-window). For >~1 MB files, split them or + sent. The size-routing rules that target this key live in the ai-generate + below (ids big-window-java and big-window-sql). For >~1 MB files, split them or add a still-larger preset (Granite allocates up to its 512K training limit here, with further quality loss). --> @@ -2024,20 +2024,22 @@ message: the path on the first line, then a blank line, then the summaries to sy .sql - + cpt-3 window check admits up to ~1.16 MB). There is one big-window + rule per source kind so each keeps its own prompt: big-window-java + (file-body-java) and big-window-sql (file-body-sql). Each has higher + priority than its plain java/sql counterpart so it wins for oversized + files; normal-sized files never match (size min) and fall through to + the plain rule. Without rules like these, a file larger than the + default model's window hard-fails the build (the plugin never + auto-selects a model) - this is how YOU satisfy that check. Threshold + is conservative; tune to your model's window. (A file beyond Granite's + window fails too: split it or add a still-larger fallback.) --> - big-window + big-window-java file-body-java granite-4.0-h-tiny-bigwindow 100 @@ -2054,6 +2056,24 @@ message: the path on the first line, then a blank line, then the summaries to sy + + big-window-sql + file-body-sql + granite-4.0-h-tiny-bigwindow + 100 + + + + + .sql + + + 275000 + + + + + java file-body-java