Skip to content

QVAC-22415 feat[api]: migrate @qvac/llm-llamacpp to the shared @qvac/fabric runtime - #4454

Merged
jpgaribotti merged 7 commits into
mainfrom
feat/QVAC-22415
Sep 18, 2026
Merged

jpgaribotti merged 7 commits into
mainfrom
feat/QVAC-22415

Conversation

@jpgaribotti

@jpgaribotti jpgaribotti commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

🎯 What problem does this PR solve?

  • @qvac/llm-llamacpp statically linked the qvac-fabric vcpkg port, so every fabric consumer in a process carried its own copy of llama.cpp + ggml + mtmd. This was the last Phase 1 addon still on the port — after this, no addon declares qvac-fabric and packages/fabric is its only remaining consumer.
  • Duplicated engines mean duplicated binary size and duplicated backend loading. The addon module drops from tens of MB to ~3.2 MB, and the llama/ggml runtime is now loaded once per process.

📝 How does it solve it?

  • vcpkg.json drops qvac-fabric and the vk-profiling feature, plus the find_package(llama) / find_package(OpenSSL) calls the port required. Vulkan profiling is now a property of the shared runtime, chosen when building @qvac/fabric. Remaining vcpkg deps: picojson, nlohmann-json, concurrentqueue, qvac-lib-inference-addon-cpp, qvac-lint-cpp.
  • CMakeLists.txt adopts the shared cmake/qvac-addon template, replacing the hand-rolled preamble (triplet overlay, libc++ flags, lint-cpp config sync, Windows lean-header defines, --exclude-libs,ALL, JS_LOGGER/BACKENDS_SUBDIR, and the manual GGML_AVAILABLE_BACKENDS staging loop). It also picks up the Android 16 KB page-size link flags and the Apple compiler-rt force_load the template applies everywhere.
  • binding.js preloads @qvac/fabric so the shared .bare module is registered before the addon resolves DT_NEEDED qvac__fabric@0.bare.
  • addon.ts resolves backendsDir from the @qvac/fabric install on desktop, falling back to the addon's own prebuilds/ on mobile where the package tree isn't resolvable from the packed worklet bundle. BACKENDS_SUBDIR moves from <host>/llm-llamacpp to <host>/qvac__fabric.
  • Finetuning keeps its API but now resolves llama_opt_* / ggml_opt_* / common_opt_sft_dataset_init from the shared runtime instead of objects linked into this addon.
  • C++ tests and the optional BUILD_CLI tool link the fabric headers and module instead of llama directly. Neither gets the wiring add_bare_module() gives the .bare module, so both stage qvac__fabric and its dlopen'd backends beside the binary and rpath them in. A new backend_env.cpp preloads those backends from GGML_BACKEND_DIR — without it no backend registers, not even CPU, and tests abort on a null deref under ASan.
  • run-cpp-tests.js owns the ASan relaxations required by linking a non-ASan, -static-libstdc++ fabric prebuild, so a local run matches CI rather than depending on the workflow to export them. Covered by new unit tests.
  • CI joins the fabric-stack flow: llm is added to npm_runtime in .github/fabric-consumers.json, and on-pr-llm-llamacpp.yml detects fabric-stack PRs and threads a fabric-overlay-artifact through the cpp-test, prebuild and integration lanes. This wiring was diffed against on-pr-embed-llamacpp.yml and is semantically identical.
  • docs/architecture/ADDON-CMAKE-TEMPLATE.md is updated to record Phase 1 as complete, since this PR closes it out.

🧪 How was it tested?

CI

Dispatched on-pr-llm run on the rebased head (fa39cb01). detect-fabric-stack treats a dispatch as a stack run, but needs_fabric_artifact is pull_request_target-only, so every native job here built against the released @qvac/fabric 0.16.0 from npm — the state this PR merges into.

  • Prebuilds: fresh builds, no reuse marker, on all nine targets (linux-x64, linux-arm64, darwin-x64, darwin-arm64, win32-x64, android-arm64, ios-arm64, ios-arm64-simulator, ios-x64-simulator).
  • The template's C++ runtime assert ran and passed on both ELF/glibc legs, e.g. on linux-x64: qvac-addon: verifying qvac__llm-llamacpp-0.53.2-eb99933f imports fabric's C++ runtime. The check is Linux-only by design and is skipped on Android, where fabric does not own the runtime.
  • Integration tests green on every leg, including the Linux legs that failed with Unknown error before the @qvac/fabric 0.16.0 runtime pin:
leg runner result
linux-x64 qvac-ubuntu2404-x64-gpu 251/251 pass
linux-x64 qvac-ubuntu2204-x64-gpu-runner2 251/251 pass
linux-arm64 ubuntu-24.04-arm 248/248 pass
linux-arm64 ubuntu-22.04-arm 248/248 pass
darwin-arm64 qvac-macos26-arm64-gpu2 251/251 pass
darwin-x64 macos-15 14/14 pass
win32-x64 qvac-win25-x64-gpu2 251/251 pass
  • Also green: cpp-lint, sanity-checks, verify-fabric-lockstep, detect-native-changes, prebuild merge and artifact save.

Two lanes the run does not cover:

  • cpp-tests never started, which is the only reason the run is red — no job was created for it, and every other job is green or skipped. This is pre-existing on main rather than something this PR introduces: cpp-tests-llm.yml is the only cpp-tests-* workflow carrying a concurrency block (added by QVAC-24194 infra: make the llm cpp-tests vcpkg cache work #4103), and its group expression is identical to its caller's. github.workflow inside a reusable workflow resolves to the calling workflow's name, so the nested call asks for the group its own caller already holds and GitHub schedules nothing. Corroborated three ways: across the last 25 on-pr-llm runs the nested cpp-tests has never once run (skipped where the label was absent, missing where it was enabled, and the run red every time it was missing); the same commit's on-pr-embed run, whose reusable workflow has no concurrency block, ran its five C++ legs green; and dispatching cpp-tests-llm.yml directly does create its jobs. The C++ suite for this branch was therefore validated locally (below), and the workflow fix belongs in its own PR since it affects every LLM PR.
  • The fabric-overlay lane stays dormant because it only arms on a pull_request_target run of a PR that actually changes packages/fabric with the prebuilds label. This PR does not touch packages/fabric, so the wiring was diffed against on-pr-embed-llamacpp.yml instead of executed. Mobile device-farm suites are likewise on-demand only; both were dispatched for this branch and are reported below.

Mobile (Device Farm)

Both suites ran against GPR dev builds of this branch, published by on-merge-llm-llamacpp.yml from tmp-QVAC-22415 (this head, minus one CI-only commit that touches on-pr-llm-llamacpp.yml).

suite run build under test fabric result
Android, full sharded (A–F + continuous batching), Pixel 9 + Galaxy S25 Ultra 35328217855 0.53.2-tmp.runid-35327163288 0.16.1 53/53 pass, 0 crashed legs
iOS, full suite, iPhone 17 + iPhone 16 Pro 35262874486 0.53.2-tmp.runid-35257060208 0.16.0 58/58 pass, 0 crashed legs
  • Android requires @qvac/fabric 0.16.1 (QVAC-25104 fix: name fabric's ELF version node only where it owns the runtime #4566), not the 0.16.0 the CI run above built against. The first Android dispatch (35257948413, on the 0.16.0 build) failed every test at addon load with ADDON_NOT_FOUND: Cannot find addon '.', before any model work. 0.16.0 named its ELF version node on every target, so this addon recorded a DT_VERNEED on QVAC_FABRIC_ABI_1 with 153 pinned imports, and its dlopen failed on device. Not specific to this PR: published @qvac/embed-llamacpp 0.41.1 (fabric 0.15.0) passes the Android suite while 0.41.2 (fabric 0.16.0, no change to its load path) fails identically. 0.16.1 ships that node anonymous again on the links that export no C++ ABI; rebuilt against it, this addon carries no fabric version needs at all and the suite is green.
  • iOS is unaffected by that fix, so its 0.16.0 run still stands. Every hunk of the 0.16.1 change sits inside if(UNIX AND NOT APPLE), and the Apple link takes -exported_symbols_list against exports.txt — Mach-O has no symbol versioning for a version node to exist in, and symbols.map never reaches it.
  • The dependency floor is therefore ^0.16.1, matching the six other fabric consumers on main. ^0.16.0 would still admit the broken release, which a source build on Android would reproduce.

Locally on linux-x64

  • DT_NEEDED confirmed on the built module:
    $ readelf -d qvac__llm-llamacpp@0.bare | grep NEEDED
     (NEEDED)  Shared library: [qvac__fabric@0.bare]
    
  • Symbol closure checked: of the module's 393 undefined symbols, zero in the llama_* / ggml_* / gguf_* / mtmd_* / common_* / string_* / json_schema_* families are missing from the fabric prebuild — including the finetuning training API, which was the main open question.
  • Runtime load: the addon loads under Bare (createInstance resolves), and backendsDir resolves to the fabric install with all 16 ggml backend modules present.
  • C++ suite: addon-test builds, stages qvac__fabric@0.bare + backends, ldd resolves via $ORIGIN, and 160 tests pass green under ASan (23 skipped — they need model fixtures not downloadable in this environment).
  • CLI: cli_tool builds, links fabric, and executes into the shared runtime's GGUF parser.
  • JS: npm run lint, typecheck, and test:unit all pass (108/108 bare tests, 90/90 node tests, mobile manifest validations).

💥 Breaking Changes

None for API consumers. Two build/packaging notes for anyone consuming this package directly:

  • @qvac/fabric carries the prebuilt runtime inside its own tarball, so npm install must run before bare-make generate/build, and the dependency must not be pruned at runtime.
  • The vk-profiling build feature and the VK_PROFILING CMake option / prebuild input are gone; select Vulkan profiling when building @qvac/fabric instead.

@jpgaribotti
jpgaribotti requested review from a team as code owners September 14, 2026 14:19
@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Review Status

Current Status: ❌ PENDING
Approvals so far: none

Pending reviews: Needs 1 Management or Team Lead, and 1 more from Management, Team Lead, or Member.

@github-actions

Copy link
Copy Markdown
Contributor

License compliance — findings detected (warn-only)

Critical: 0 · High: 2 · Medium: 0

Dependency License Scope Severity Outcome
tetherto/qvac/.github/actions/detect-fabric-stack@6620d695d3a07cafe3931182e7844dde376a23f8 (none detected) runtime High blocks
tetherto/qvac/.github/actions/wait-and-download-fabric-prebuilds@6620d695d3a07cafe3931182e7844dde376a23f8 (none detected) runtime High blocks

How to resolve a blocking finding:

  • Remove or replace the disallowed dependency, or
  • If the license is genuinely acceptable, run the compliance SKILL and record the decision in .github/license-allowlist.yml (CODEOWNERS-reviewed), or
  • For a one-off, a maintainer can apply the license-override label (High findings only; Critical cannot be overridden).

Warn-only (shadow) mode — this check does not block merges yet.

Updated automatically by the canonical license compliance workflow.

NOTICE presence (advisory)

Missing NOTICE (advisory, does not block):

  • ./docs/website
  • ./packages/fabric/test/integration
  • ./packages/llm-llamacpp/benchmarks/server
  • ./packages/llm-llamacpp/benchmarks/performance
  • ./packages/inference-addon-cpp/mobile
  • ./packages/asr-ggml/benchmarks/server
  • ./packages/embed-llamacpp/benchmarks/server
  • ./packages/embed-llamacpp/benchmarks/performance
  • ./packages/sdk/e2e
  • ./packages/vla-ggml/sim/server
  • ./.github/actions/release-merge-guard

@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Workflow security (shadow mode)

zizmor found 1103 finding(s) in .github/ (highest severity: high). This check is warn-only and does not block the merge.

Findings are annotated inline on the changed files and listed in the job summary.

Reproduce locally:

pipx run zizmor==1.27.0 --offline .github/

@github-actions

Copy link
Copy Markdown
Contributor

🧪 C++ Test Coverage Report

Coverage:

📊 Detailed Coverage
Filename                         Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
NmtLazyInitializeBackend.cpp          99                19    80.81%          11                 1    90.91%         157                34    78.34%          66                20    69.70%
NmtLazyInitializeBackend.hpp           2                 0   100.00%           1                 0   100.00%           1                 0   100.00%           0                 0         -
TranslationModel.cpp                 296               168    43.24%          28                 8    71.43%         506               213    57.91%         181               122    32.60%
TranslationModel.hpp                   1                 0   100.00%           1                 0   100.00%           1                 0   100.00%           0                 0         -
nmt.cpp                               72                22    69.44%           9                 1    88.89%         137                28    79.56%          44                16    63.64%
nmt.hpp                               51                 4    92.16%          11                 2    81.82%          53                 4    92.45%          28                 0   100.00%
nmt_beam_search.cpp                  116                25    78.45%          10                 3    70.00%         254                32    87.40%          76                19    75.00%
nmt_graph_decoder.cpp                164                78    52.44%          15                 7    53.33%         540               161    70.19%         112                69    38.39%
nmt_graph_encoder.cpp                 54                13    75.93%           3                 0   100.00%         268                33    87.69%          37                16    56.76%
nmt_loader.cpp                       270                67    75.19%          14                 0   100.00%         774                97    87.47%         161                67    58.39%
nmt_state_backend.cpp                188                46    75.53%          20                 0   100.00%         424                79    81.37%         121                51    57.85%
nmt_tokenization.cpp                  88                21    76.14%           8                 0   100.00%         135                36    73.33%          61                26    57.38%
nmt_utils.cpp                        211                34    83.89%          21                 0   100.00%         314                38    87.90%         143                45    68.53%
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                               1612               497    69.17%         152                22    85.53%        3564               755    78.82%        1030               451    56.21%

@github-actions

Copy link
Copy Markdown
Contributor

🧪 C++ Test Coverage Report

Coverage:

📊 Detailed Coverage
Filename                         Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
NmtLazyInitializeBackend.cpp          99                19    80.81%          11                 1    90.91%         157                34    78.34%          66                20    69.70%
NmtLazyInitializeBackend.hpp           2                 0   100.00%           1                 0   100.00%           1                 0   100.00%           0                 0         -
TranslationModel.cpp                 296               168    43.24%          28                 8    71.43%         506               213    57.91%         181               122    32.60%
TranslationModel.hpp                   1                 0   100.00%           1                 0   100.00%           1                 0   100.00%           0                 0         -
nmt.cpp                               72                22    69.44%           9                 1    88.89%         137                28    79.56%          44                16    63.64%
nmt.hpp                               51                 4    92.16%          11                 2    81.82%          53                 4    92.45%          28                 0   100.00%
nmt_beam_search.cpp                  116                25    78.45%          10                 3    70.00%         254                32    87.40%          76                19    75.00%
nmt_graph_decoder.cpp                164                78    52.44%          15                 7    53.33%         540               161    70.19%         112                69    38.39%
nmt_graph_encoder.cpp                 54                13    75.93%           3                 0   100.00%         268                33    87.69%          37                16    56.76%
nmt_loader.cpp                       270                67    75.19%          14                 0   100.00%         774                97    87.47%         161                67    58.39%
nmt_state_backend.cpp                188                46    75.53%          20                 0   100.00%         424                79    81.37%         121                51    57.85%
nmt_tokenization.cpp                  88                21    76.14%           8                 0   100.00%         135                36    73.33%          61                26    57.38%
nmt_utils.cpp                        211                34    83.89%          21                 0   100.00%         314                38    87.90%         143                45    68.53%
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                               1612               497    69.17%         152                22    85.53%        3564               755    78.82%        1030               451    56.21%

…fabric runtime

Moves the addon off its bundled, statically-linked qvac-fabric vcpkg build and
onto the shared @qvac/fabric npm runtime. llama.cpp, ggml, mtmd and libcommon are
now loaded once per process from the single @qvac/fabric install rather than
duplicated inside every fabric consumer, which drops the addon binary from tens
of MB to ~3.2 MB. This was the last Phase 1 addon on the vcpkg port, so no addon
declares qvac-fabric any more -- packages/fabric is its only remaining consumer.

- vcpkg.json drops qvac-fabric and the vk-profiling feature, along with the
  find_package(llama) and find_package(OpenSSL) calls the port required. Vulkan
  profiling is now a property of the shared runtime, chosen when building
  @qvac/fabric.
- CMakeLists.txt adopts the shared cmake/qvac-addon template, replacing the
  hand-rolled preamble (triplet overlay, libc++ flags, lint-cpp config sync,
  Windows lean-header defines, --exclude-libs,ALL, JS_LOGGER/BACKENDS_SUBDIR and
  the manual GGML_AVAILABLE_BACKENDS staging loop). This also picks up the
  Android 16 KB page-size link flags and the Apple compiler-rt force_load the
  template applies everywhere.
- binding.js preloads @qvac/fabric so the shared .bare module is registered
  before the addon resolves DT_NEEDED qvac__fabric@0.bare.
- addon.ts resolves backendsDir from the @qvac/fabric install on desktop and
  falls back to the addon's own prebuilds on mobile, where the package tree is
  not resolvable from the packed worklet bundle. BACKENDS_SUBDIR moves from
  <host>/llm-llamacpp to <host>/qvac__fabric to match.
- Finetuning keeps its API but now resolves llama_opt_* / ggml_opt_* and
  common_opt_sft_dataset_init from the shared runtime instead of from objects
  linked into this addon.
- C++ tests and the optional BUILD_CLI tool link the fabric headers and module
  instead of llama directly. Neither gets the wiring add_bare_module() gives the
  .bare module, so both stage qvac__fabric and its dlopen'd backends beside the
  binary and rpath them in. backend_env.cpp preloads those backends from
  GGML_BACKEND_DIR -- without it no backend registers, not even CPU, and tests
  abort on a null deref under ASan.
- run-cpp-tests.js owns the ASan relaxations required by linking a non-ASan,
  -static-libstdc++ fabric prebuild, so a local run matches CI instead of
  depending on the workflow to export them. Covered by unit tests.
- CI workflows join the fabric-stack flow: llm is added to the npm_runtime
  consumers and the on-pr workflow detects fabric-stack PRs and threads a
  fabric-overlay-artifact through the cpp-test, prebuild and integration lanes.

Verified locally: the built module carries DT_NEEDED qvac__fabric@0.bare, and of
its undefined symbols none in the llama_* / ggml_* / gguf_* / mtmd_* / common_* /
string_* / json_schema_* families are missing from the fabric prebuild. The addon
loads under Bare, the C++ suite runs 160 tests green under ASan, cli_tool
executes into the shared runtime, and the JS unit suites pass.
….53.2

The migration commit was written against fabric 0.13.0, before the C++
runtime work landed. The floor is now ^0.16.0: that is the release whose
version node the addon pins its runtime to, and building against anything
earlier either resolves the runtime from the host's libstdc++ or fails the
template's assertion outright.

Released as a patch. Migrating off the vcpkg qvac-fabric port changes how
the addon is packaged and loaded, not what it exposes, so consumers on the
0.53.x line -- sdk, inference and rag all carry ^0.53.0 -- pick it up
without a range change of their own and stay workspace-linked. A minor
would have unlinked all three and, until 0.53.2 published, failed the
ts-checks lane, which installs standalone from the public registry.

The changelog entry moves with it. Rebasing put the migration's section
mid-file as a second [0.53.0], since main had released that version
meanwhile; it is now [0.53.2] at the top, with the runtime pin and the
export narrowing described as part of the migration rather than as a
follow-up, because for this addon they arrive together.

The lockfile also relinks @qvac/asr-ggml, which main records against the
registry although the workspace version satisfies the range. Pre-existing
drift, corrected by regenerating rather than introduced here.
@github-actions

Copy link
Copy Markdown
Contributor

🧪 C++ Test Coverage Report

Coverage:

📊 Detailed Coverage
Filename                         Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
NmtLazyInitializeBackend.cpp          99                19    80.81%          11                 1    90.91%         157                34    78.34%          66                20    69.70%
NmtLazyInitializeBackend.hpp           2                 0   100.00%           1                 0   100.00%           1                 0   100.00%           0                 0         -
TranslationModel.cpp                 296               168    43.24%          28                 8    71.43%         506               213    57.91%         181               122    32.60%
TranslationModel.hpp                   1                 0   100.00%           1                 0   100.00%           1                 0   100.00%           0                 0         -
nmt.cpp                               72                22    69.44%           9                 1    88.89%         137                28    79.56%          44                16    63.64%
nmt.hpp                               51                 4    92.16%          11                 2    81.82%          53                 4    92.45%          28                 0   100.00%
nmt_beam_search.cpp                  116                25    78.45%          10                 3    70.00%         254                32    87.40%          76                19    75.00%
nmt_graph_decoder.cpp                164                78    52.44%          15                 7    53.33%         540               161    70.19%         112                69    38.39%
nmt_graph_encoder.cpp                 54                13    75.93%           3                 0   100.00%         268                33    87.69%          37                16    56.76%
nmt_loader.cpp                       270                67    75.19%          14                 0   100.00%         774                97    87.47%         161                67    58.39%
nmt_state_backend.cpp                188                46    75.53%          20                 0   100.00%         424                79    81.37%         121                51    57.85%
nmt_tokenization.cpp                  88                21    76.14%           8                 0   100.00%         135                36    73.33%          61                26    57.38%
nmt_utils.cpp                        211                34    83.89%          21                 0   100.00%         314                38    87.90%         143                45    68.53%
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                               1612               497    69.17%         152                22    85.53%        3564               755    78.82%        1030               451    56.21%

Comment thread .github/workflows/on-pr-llm-llamacpp.yml
Without the gate, a fabric-stack PR would lint this addon against
published fabric headers while every other native lane built against
the PR's runtime.
@github-actions

Copy link
Copy Markdown
Contributor

🧪 C++ Test Coverage Report

Coverage:

📊 Detailed Coverage
Filename                         Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
NmtLazyInitializeBackend.cpp          99                19    80.81%          11                 1    90.91%         157                34    78.34%          66                20    69.70%
NmtLazyInitializeBackend.hpp           2                 0   100.00%           1                 0   100.00%           1                 0   100.00%           0                 0         -
TranslationModel.cpp                 296               168    43.24%          28                 8    71.43%         506               213    57.91%         181               122    32.60%
TranslationModel.hpp                   1                 0   100.00%           1                 0   100.00%           1                 0   100.00%           0                 0         -
nmt.cpp                               72                22    69.44%           9                 1    88.89%         137                28    79.56%          44                16    63.64%
nmt.hpp                               51                 4    92.16%          11                 2    81.82%          53                 4    92.45%          28                 0   100.00%
nmt_beam_search.cpp                  116                25    78.45%          10                 3    70.00%         254                32    87.40%          76                19    75.00%
nmt_graph_decoder.cpp                164                78    52.44%          15                 7    53.33%         540               161    70.19%         112                69    38.39%
nmt_graph_encoder.cpp                 54                13    75.93%           3                 0   100.00%         268                33    87.69%          37                16    56.76%
nmt_loader.cpp                       270                67    75.19%          14                 0   100.00%         774                97    87.47%         161                67    58.39%
nmt_state_backend.cpp                188                46    75.53%          20                 0   100.00%         424                79    81.37%         121                51    57.85%
nmt_tokenization.cpp                  88                21    76.14%           8                 0   100.00%         135                36    73.33%          61                26    57.38%
nmt_utils.cpp                        211                34    83.89%          21                 0   100.00%         314                38    87.90%         143                45    68.53%
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                               1612               497    69.17%         152                22    85.53%        3564               755    78.82%        1030               451    56.21%

GustavoA1604
GustavoA1604 previously approved these changes Sep 17, 2026
0.16.0 stamped its named ELF version node on every target, including Android,
where fabric exports no C++ ABI to pin to. A module built against it recorded
the version need anyway and failed its dlopen on device, so every addon
reported ADDON_NOT_FOUND before any model work. 0.16.1 (#4566) ships that node
anonymous on the links that export no runtime.

^0.16.0 still admits the broken release, which matters for a source build on
Android; the six other fabric consumers already moved to ^0.16.1 on main with
their patch releases. Rebuilt against 0.16.1, this addon carries no fabric
version needs at all and the full Android suite passes 53/53 on Pixel 9 and
Galaxy S25 Ultra.

Lockfile regenerated with the pinned pnpm: the workspace fabric is 0.16.1, so
the only change is the specifier and the link to it is preserved.
@github-actions

Copy link
Copy Markdown
Contributor

🧪 C++ Test Coverage Report

Coverage:

📊 Detailed Coverage
Filename                         Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
NmtLazyInitializeBackend.cpp          99                19    80.81%          11                 1    90.91%         157                34    78.34%          66                20    69.70%
NmtLazyInitializeBackend.hpp           2                 0   100.00%           1                 0   100.00%           1                 0   100.00%           0                 0         -
TranslationModel.cpp                 296               168    43.24%          28                 8    71.43%         506               213    57.91%         181               122    32.60%
TranslationModel.hpp                   1                 0   100.00%           1                 0   100.00%           1                 0   100.00%           0                 0         -
nmt.cpp                               72                22    69.44%           9                 1    88.89%         137                28    79.56%          44                16    63.64%
nmt.hpp                               51                 4    92.16%          11                 2    81.82%          53                 4    92.45%          28                 0   100.00%
nmt_beam_search.cpp                  116                25    78.45%          10                 3    70.00%         254                32    87.40%          76                19    75.00%
nmt_graph_decoder.cpp                164                78    52.44%          15                 7    53.33%         540               161    70.19%         112                69    38.39%
nmt_graph_encoder.cpp                 54                13    75.93%           3                 0   100.00%         268                33    87.69%          37                16    56.76%
nmt_loader.cpp                       270                67    75.19%          14                 0   100.00%         774                97    87.47%         161                67    58.39%
nmt_state_backend.cpp                188                46    75.53%          20                 0   100.00%         424                79    81.37%         121                51    57.85%
nmt_tokenization.cpp                  88                21    76.14%           8                 0   100.00%         135                36    73.33%          61                26    57.38%
nmt_utils.cpp                        211                34    83.89%          21                 0   100.00%         314                38    87.90%         143                45    68.53%
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                               1612               497    69.17%         152                22    85.53%        3564               755    78.82%        1030               451    56.21%

Without the input, a fabric-stack PR would run llm cpp-tests and
integration through on-pr-nx against published fabric while the
bespoke on-pr path used the PR runtime. Also record the ^0.16.1
floor in the addon docs.
@github-actions

Copy link
Copy Markdown
Contributor

🧪 C++ Test Coverage Report

Coverage:

📊 Detailed Coverage
Filename                         Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
NmtLazyInitializeBackend.cpp          99                99     0.00%          11                11     0.00%         157               157     0.00%          66                66     0.00%
NmtLazyInitializeBackend.hpp           2                 2     0.00%           1                 1     0.00%           1                 1     0.00%           0                 0         -
TranslationModel.cpp                 296               296     0.00%          28                28     0.00%         506               506     0.00%         181               181     0.00%
TranslationModel.hpp                   1                 1     0.00%           1                 1     0.00%           1                 1     0.00%           0                 0         -
nmt.cpp                               72                72     0.00%           9                 9     0.00%         137               137     0.00%          44                44     0.00%
nmt.hpp                               51                51     0.00%          11                11     0.00%          53                53     0.00%          28                28     0.00%
nmt_beam_search.cpp                  116               116     0.00%          10                10     0.00%         254               254     0.00%          76                76     0.00%
nmt_graph_decoder.cpp                164               164     0.00%          15                15     0.00%         540               540     0.00%         112               112     0.00%
nmt_graph_encoder.cpp                 54                54     0.00%           3                 3     0.00%         268               268     0.00%          37                37     0.00%
nmt_loader.cpp                       270               270     0.00%          14                14     0.00%         774               774     0.00%         161               161     0.00%
nmt_state_backend.cpp                188               188     0.00%          20                20     0.00%         424               424     0.00%         121               121     0.00%
nmt_tokenization.cpp                  88                88     0.00%           8                 8     0.00%         135               135     0.00%          61                61     0.00%
nmt_utils.cpp                        211               211     0.00%          21                21     0.00%         314               314     0.00%         143               143     0.00%
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                               1612              1612     0.00%         152               152     0.00%        3564              3564     0.00%        1030              1030     0.00%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

prebuilds CI: run only prebuild/cache stage (requires verified) run-cpp-addon-tests CI: run C++ addon tests (requires verified) run-desktop-addon-tests CI: run desktop integration tests (requires verified)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants