Skip to content

Commit 5624e83

Browse files
committed
Close remaining doc staleness from PR #189 work
Three small gaps caught in a final audit of the §-doc and the issues doc: 1. feature-investigation §1 'What java-llama.cpp already covers': the Session row still read 'single-threaded'. PR #189 added per-Session locking; relabel to 'thread-safe per instance' so the §1 table matches the §2.6 status block. 2. feature-investigation §4 'Suggested rollout order': all ten entries listed there are SHIPPED now. The section is preserved as a historical artifact (useful for comparing original effort estimates against what actually shipped, especially §2.1 which came in much smaller than the L estimate and §2.10 which had to be reverted), but a header note now states up front that it is no longer a roadmap. 3. docs/history/49be664_open_issues.md #113 LoadProgressCallback: the entry said FIXED in PR #188 and stopped there, but the PR #188 implementation forgot the forward declaration in jllama.h, which made the JNI symbol C++-mangled and produced an UnsatisfiedLinkError on the first call to the feature. PR #189 commit 36d8862 added the missing declaration and the feature is now actually functional (LoadProgressCallbackTest passes on the current CI). Add a 'Subtle issue resolved by PR #189' paragraph so a future reader does not think 'PR #188 shipped this, why did it fail on the first run after merge'. No code changes; documentation only.
1 parent 0f597b3 commit 5624e83

2 files changed

Lines changed: 32 additions & 3 deletions

File tree

docs/feature-investigation-llama-stack-client-kotlin.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ T-shirt sizes:
3636
| Reactive Streams `Publisher<LlamaOutput>` token stream | ✅ (§2.3) |
3737
| `completeBatch` / `chatBatch` parallel dispatch | ✅ (§2.4) |
3838
| Typed `Usage` / `Timings` / `CompletionResult` | ✅ (§2.5) |
39-
| `Session` helper (single-threaded) | ✅ (§2.6) |
39+
| `Session` helper (thread-safe per instance) | ✅ (§2.6) |
4040
| `AutoCloseable` iterator + cancel polish | ✅ (§2.7) |
4141
| Per-request `setJsonSchema` + `completeAsJson<T>` | ✅ (§2.8) |
4242
| Typed `TokenLogprob` in `LlamaOutput` | ✅ (§2.9) |
@@ -411,6 +411,17 @@ web frameworks.
411411

412412
## 4. Suggested rollout order
413413

414+
> **Historical note (kept for context).** All ten items below are now
415+
> SHIPPED &#x2014; the original §2.1 / §2.2 / §2.5 / §2.7 / §2.3 / §2.4 /
416+
> §2.8 / §2.9 / §2.6 / §2.10 sequence was delivered across PR #188 and
417+
> PR #189. §2.10 ships **cooperative only**; the M-effort sub-token
418+
> follow-up was attempted twice and reverted (see the postmortem in the
419+
> §2.10 entry above for why). §2.1 ended up much smaller than the
420+
> original L estimate once the upstream OAI chat path was found to
421+
> already accept `image_url` blocks. This section is preserved so the
422+
> original effort estimates can be compared against what actually
423+
> shipped; it is no longer a roadmap.
424+
414425
1. **§2.1 Multimodal (L)** — biggest capability gap, isolated subsystem.
415426
2. **§2.2 Typed Chat model + tool calling (M)** — foundational; other
416427
features (usage, logprobs, async) all return / accept these types.

docs/history/49be664_open_issues.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,10 @@ vs. total, whether the file is the weights file, whether it is a download or
190190
disk load) via a `Consumer<LLamaLoadProgress>` callback passed to the
191191
`LlamaModel` constructor. Intended for showing a progress bar to end users.
192192

193-
**Status in fork:** FIXED in PR #188 (commit `70df324`). New
194-
`LoadProgressCallback` functional interface (single method
193+
**Status in fork:** FIXED in PR #188 (commit `70df324`), with a
194+
**follow-up symbol-export fix in PR #189 (commit `36d8862`) that the
195+
original feature needed to actually be callable** on Linux/macOS.
196+
New `LoadProgressCallback` functional interface (single method
195197
`boolean onProgress(float progress)`; return `false` to abort).
196198
New constructor overload
197199
`LlamaModel(ModelParameters, LoadProgressCallback)` plumbs the
@@ -207,6 +209,22 @@ bytes, weights vs download flag) is NOT exposed — only the float —
207209
because `llama_model_params.progress_callback` itself only emits the
208210
float; richer fields would require an upstream API change.
209211

212+
**Subtle issue resolved by PR #189 `36d8862`.** The PR #188 implementation
213+
forgot to add the `loadModelWithProgress` forward declaration to
214+
`src/main/cpp/jllama.h`. The `jllama.cpp` translation unit `#include`s only
215+
that header (not the freshly-generated `net_ladenthin_llama_LlamaModel.h`
216+
that `javac -h` writes during `mvn compile`), so the C++ compiler treated
217+
the function definition as a regular C++ function and emitted a name-mangled
218+
symbol (`_Z57Java_..._loadModelWithProgress...`). The JVM looked up the
219+
plain unmangled name and threw
220+
`UnsatisfiedLinkError: 'void net.ladenthin.llama.LlamaModel.loadModelWithProgress(...)'`
221+
the first time `LoadProgressCallbackTest#receivesProgressUpdates` exercised
222+
the code path. Adding the seven-line forward declaration in `jllama.h`
223+
restored `extern "C"` linkage and the test now passes
224+
(`LoadProgressCallbackTest: Tests run: 3, Failures: 0, Errors: 0` on the
225+
current CI run). The neighbouring plain `loadModel` symbol was unaffected
226+
because its declaration was already in `jllama.h`.
227+
210228
---
211229

212230
## #112 — Qwen 3 model does not load

0 commit comments

Comments
 (0)