Skip to content

Fix v0.4.0 Web media helper compatibility - #91

Merged
leehack merged 2 commits into
mainfrom
fix/mtmd-v040-compat
Sep 5, 2026
Merged

Fix v0.4.0 Web media helper compatibility#91
leehack merged 2 commits into
mainfrom
fix/mtmd-v040-compat

Conversation

@leehack

@leehack leehack commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Summary

Adapt all three Web media helper call sites to llama.cpp v0.4.0's new options parameter without dropping older upstream compatibility. CMake detects the declaration at configure time; one private buffer/file shim passes upstream defaults and preserves non-placeholder behavior. No JS/public ABI, source pin, consumer pin, capability, or automatic publication policy changes.

Closes #90.
Closes #92 (pre-existing contradictory speech qualification guidance; docs only).

Regression prevention

  • Compile and execute both old/new helper API shapes, checking exact context/data/path/size/placeholder/default-option forwarding; guard all three production call sites.
  • Extend the existing real multimodal smoke with native file and encoded PNG decode, empty input, truncated PNG, and missing-file assertions. Normal resized RGB inference alone does not exercise these paths.
  • Add a CI compatibility lane for exact llama.cpp v0.4.0 5266f24da75dc449bd56cbed7addb9c8e4a6a73e alongside the unchanged llama_cpp.version pin. Both build wasm32/memory64 and run state/multimodal direct+worker smokes. Preserve the original pinned check/artifact names and isolate matrix uploads.
  • Document the matrix and test command. Existing candidate, hosted speech qualification, immutable publication, and downstream reviewed-pin boundaries remain unchanged.

Validation

  • Local Emscripten 6.0.8 builds against current development pin v0.2.0, published upstream line v0.3.0, and candidate v0.4.0: wasm32 and memory64 PASS (6 builds). Actual feature probes select the old and new signatures respectively.
  • Real tiny-GGUF state persistence: direct+worker PASS on all three revisions.
  • Real checksum-pinned Qwen3.5 0.8B + F16 projector: direct+worker image inference PASS on all three revisions, including final direct file/encoded positive and malformed/missing-media negative assertions.
  • Real Qwen3-TTS 1.7B Base Q4_K_M + Q8_0 projector with nonempty speaker-reference WAV: v0.2.0, v0.3.0, and v0.4.0 memory64 direct+worker PASS; synthesis, finite/nonzero PCM, pre-abort/cancellation, reuse, and unload covered. v0.4.0 returned 36,480 samples in each runtime. This tests the changed speaker decode branch, not voice fidelity.
  • Real checksum-pinned Qwen3-ASR: v0.4.0 wasm32/memory64 × direct/worker PASS (4 modes), including exact cold/warm transcript, cancellation, and silence rejection.
  • npm run check:js, generated-output no-diff, full Python contract suite 353/353, compiled helper tests 2/2, wasm64 patch contracts 3/3, state/TTS/CI reliability contracts, actionlint, Python compile, and diff check PASS.
  • Independent Sol review: PASS on exact head 20e4663d97302e7906c7557c31ab4c98dbaabcef against base 646037ac816c066d3f7d9e357139ca20800dc7ee. Zero known PR-caused regressions, zero unresolved threads, and no remaining cleanup/code blocker. Sol independently reran focused contracts, actionlint, and diff checks. An incorrect private-runtime reference in the new smoke harness was caught and corrected before the initial commit, and the final negative browser assertions passed on all three upstream versions.

All validation is complete on exact head 20e4663d97302e7906c7557c31ab4c98dbaabcef. Hosted CI run 33966949306: 2/2 matrix jobs PASS, including both memory-mode builds, state persistence, and real multimodal direct/worker tests for current pin and v0.4.0. Final GitHub state: MERGEABLE/CLEAN, draft, 0 total/0 unresolved review threads. No GitHub review is populated; independent Sol approval is recorded above. No known regression remains. Mark-ready/merge is a separate maintainer decision; no merge, dispatch, publication, release, or pin update was performed.

Pinned model provenance: Qwen3.5 bd258782e35f7f458f8aced1adc053e6e92e89bc735ba3be89d38a06121dc517 / projector 56e4c6cfe73b0c82e3e82bc518d7591997e61d81f723fc41a586f4fa69ea2453; ASR bca259818b50ca7c4c05e9bdb35a5dc04fa039653a6d6f3f0f331f96f6aa1971 / projector 41a342b5e4c514e968cb756de6cd1b7be39eff43c44c57a2ef5fc6522e36603d; TTS 8d18c94acb2addd042f97da63c98be144eafa76d0d9495177eab65130cf85129 / projector 6fd65188839bcd6ecc91b277ad471e22a0edfada4699a0fe82f1165c18cfcce2; speaker WAV de964f9d761766be44fdf648c961f9232cd53cb14373c20b6046106f06661203. TTS prompt Hi, initial synthesis seed 1 (cancellation/reuse seeds 2/3), Apple M4 Max CPU/WASM fallback.

Limits / release boundary

Local browser validation uses CPU/WASM fallback; no hardware WebGPU claim. TTS uses memory64, not an unvalidated wasm32 configuration. No full video capability is introduced. This is upgrade preparation, not a claim that published Web v0.1.41 is defective. No release, workflow dispatch, asset publication, or downstream pin change is part of this PR.

@leehack
leehack marked this pull request as ready for review September 5, 2026 13:22
@leehack
leehack merged commit 89178be into main Sep 5, 2026
2 checks passed
@leehack
leehack deleted the fix/mtmd-v040-compat branch September 5, 2026 13:22
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.

Align stale speech qualification guidance with hosted automation Adapt media helpers to llama.cpp v0.4.0 options API

1 participant