fix[notask]: expose binding.js via package exports on audiogen-ggml + tts-ggml for mobile bundler - #4087
Merged
Merged
Conversation
… mobile bundler
The mobile bundler (qvac-test-addon-mobile at HEAD, called by
integration-mobile-test-audiogen-ggml.yml) recently tightened its enforcement
of the package.json "exports" field. Files not declared in "exports" are now
stripped from the on-device app.bundle. Since audiogen-ggml's exports listed
".", "./models", "./test/benchmark-runner" but NOT "./binding.js", the
bundler excluded binding.js from the shipped module, and require('./binding')
in index.js (line ~784, _createAddon) failed on device with
MODULE_NOT_FOUND: Cannot find module './binding'
imported from 'file:///app.bundle/node_modules/@qvac/audiogen-ggml/index.js'
Both testLoadModels and testGenerateMusicOnGpu failed within ~1 s during
addon construction (before any user code ran).
Pattern matches how @qvac/asr-ggml and @qvac/llm-llamacpp already declare
"./binding.js": "./binding.js" for the same reason. @qvac/audiogen-ggml and
@qvac/tts-ggml never added it and worked by accident under the older,
lenient bundler; the tighter enforcement (landing alongside the Node 22 +
Appium 3 bump on 2026-08-22) exposed the gap.
Verification
- Reproduced on main (Android Device Farm run 32972232229) and on an
unrelated feature branch (run 32967429767) — identical error signature.
- Cross-check: @qvac/asr-ggml Android mobile CI on 2026-08-25 (run
32841431292) loaded the addon successfully (6 GPU-smoke test cases ran
end-to-end with real 4-60 s timings), confirming the failure is
package-specific, not a global mobile-bundler outage.
- Fix scope: single-line addition to the exports field. No source or
behavioral change to the addon itself; binding.js content is unchanged.
Unblocks any downstream mobile validation of @qvac/audiogen-ggml
(functional smoke + RTF benchmark), which has been red on main since the
bundler tightening landed.
Contributor
Review StatusCurrent Status: ✅ APPROVED |
Contributor
License compliance — cleanNo new dependency license findings in this PR. 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):
|
…le bundler
Same class of bug as the audiogen-ggml fix in this PR: mobile bundler
enforces "exports"; binding.js was not declared and gets stripped from the
on-device app.bundle, breaking require('./binding') in index.js at runtime.
@qvac/tts-ggml hasn't been mobile-tested since 2026-08-18 (before the
bundler tightening on 2026-08-22), so the failure hasn't been observed
empirically yet — but the diagnosis and fix are identical, and the pattern
matches how @qvac/asr-ggml and @qvac/llm-llamacpp already declare the same
"./binding.js": "./binding.js" export.
Pre-empting: without this line, the next mobile tts-ggml CI run will fail
the same way audiogen-ggml did.
Zbig9000
approved these changes
Aug 26, 2026
GustavoA1604
approved these changes
Aug 26, 2026
Alok-Ranjan23
had a problem deploying
to
release
August 26, 2026 14:46 — with
GitHub Actions
Failure
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
Two-line fix across
packages/audiogen-ggml/package.jsonandpackages/tts-ggml/package.json— adds"./binding.js": "./binding.js"to each addon'sexportsfield so the mobile app bundler stops strippingbinding.jsfrom the shipped module. Aligns with the workaround pattern already used by@qvac/asr-ggmland@qvac/llm-llamacpp.The bug (currently on
mainfor audiogen; pre-empted for tts)Mobile Android CI for
@qvac/audiogen-ggmlfails during addon construction on device:Both
testLoadModelsandtestGenerateMusicOnGpufail within ~1 s. This happens in_createAddon()inindex.js(~line 784) when it callsrequire('./binding').@qvac/tts-ggmlwill hit the exact same failure the next time anyone runs its mobile CI — same code shape (require('./binding')inindex.js), same missing./binding.jsinexports. It hasn't been mobile-tested since 2026-08-18 (before the bundler tightening on 2026-08-22), so the failure hasn't been observed empirically yet, but the diagnosis is identical.Root cause
The mobile bundler (from
tetherto/qvac-test-addon-mobile, called byintegration-mobile-test-*-ggml.yml) recently tightenedexports-field enforcement. Files not declared inexportsare stripped from the on-deviceapp.bundle. Neitheraudiogen-ggmlnortts-ggmlhad"./binding.js"in theirexports— sobinding.jsgets excluded from the bundle, andrequire('./binding')inindex.jshas no file to resolve.Evidence
"./binding.js"inexports?@qvac/asr-ggml32841431292: 6 GPU-smoke test cases ran end-to-end with 4–60 s timings)@qvac/llm-llamacpp@qvac/tts-ggml@qvac/audiogen-ggmlmain— reproduced via workflow_dispatch runs32967429767and32972232229, identical MODULE_NOT_FOUND signatureasr-ggmlandllm-llamacppalready declare the same"./binding.js": "./binding.js"line — this PR alignsaudiogen-ggmlandtts-ggmlwith that pattern.When it started failing
Last known-green audiogen mobile run: 2026-08-20 (SHA
c7af7f156). Last known-green tts mobile run: 2026-08-18. Regression window includes the Node 22 + Appium 3 bump (dabf43fb2, 2026-08-22) which required matching updates in the externalqvac-test-addon-mobilerepo — the bundler tightening most likely rode along there. The addon source code did not need to change; the older lenient bundler was tolerating a missing exports declaration and the new one isn't.Verification
node -e "JSON.parse(...)"on both modifiedpackage.jsonfiles — valid JSON.prettier --checkon both — no formatting drift.git diff— two literal one-line additions.binding.jscontent is unchanged in both addons; the addons behave identically at runtime.The audiogen fix will be empirically re-validated by re-dispatching
integration-mobile-test-audiogen-ggml.ymlagainstmainonce merged. The tts fix will be validated when someone next runsintegration-mobile-test-tts-ggml.yml.What this unblocks
@qvac/audiogen-ggml(functional smoke, RTF benchmark), which has been red onmainsince ~2026-08-22.@qvac/tts-ggml, which would otherwise hit the same failure.What this does NOT change