Repository navigation
fix(docker): bundle LLMLingua optional dependencies - #9185
Merged
diegosouzapw merged 1 commit intoAug 6, 2026
Merged
diegosouzapw merged 1 commit into
diegosouzapw merged 1 commit into
Conversation
Zartharas
marked this pull request as ready for review
August 2, 2026 02:35
diegosouzapw
added a commit
that referenced
this pull request
Aug 6, 2026
…ned suites
Continuing the base-red drain on release/v3.8.50.
- src/i18n/messages/{en,pt-BR,vi}.json: #8523's manual-API-key UI calls
noAuthProvider.providerAdded / .add / .manualApiKey, but the keys were never
added to en.json — 'direct translation calls have English messages' was red.
Added to en (source of truth) plus the two parity-tested locales.
settings-i18n-keys 10/10.
- src/i18n/messages/pt-BR.json: same 3 keys the vi locale was missing
(providers.onboardingProviderDescriptions.unorouter, agentBridge.noMappingsDesc,
agentBridge.addMapping), translated. i18n-pt-br 3/3, i18n-vi-completeness 5/5.
- tests/unit/tls-client-node-docker-binary-7802.test.ts: the assertion pinned the
literal flag list of the builder's npm ci. #9185 inserted --include=optional
(LLMLingua optional deps) and broke the pin without touching intent, which is
the --ignore-scripts PRECONDITION. Regex is now flag-order tolerant and still
requires --ignore-scripts on the same npm ci. 1/1.
- tests/unit/runtime-env.test.ts: #8999 made withRuntimePortEnv also pin the bind
address (HOSTNAME, defaulting to 0.0.0.0 when OMNIROUTE_HOSTNAME is unset).
Expectation updated to the real shape. 2/2.
Refs #9298
diegosouzapw
added a commit
that referenced
this pull request
Aug 8, 2026
…tion (#9615) * fix(docker): complete partially traced packages in standalone co-location Publish-to-Docker-Hub has failed on every release/v3.8.50 push since #9151 enabled publishing from active release branches: the post-build guard dies with "Cannot find module .../@atjsh/llmlingua-2/dist/index.js" while the co-location step right above it reports 100 packages copied. Root cause: Next's file tracing materializes @atjsh/llmlingua-2 PARTIALLY in the standalone (package.json lands, the dist/ payload its main points at does not). colocateOptionals' no-clobber checked existsSync on the package DIRECTORY, so the partial shell counted as present and the one package that mattered was skipped forever (#9185 added the closure walk but kept the directory-level check). Fix: presence is now judged by entrypoint integrity — the package resolves from inside the target tree (same contract as the Dockerfile guard). Partial directories are completed with a file-level no-clobber merge (cpSync force:false), so files the trace did materialize are never overwritten and pinned instances (dist transformers 3.5.2) keep their protection. Validation (TDD): 2 new tests in docker-llmlingua-optionals-9166.test.ts reproduce the CI failure (partial package skipped; closure-wide early-exit firing while a member is partial) — red on the old code, 5/5 green after. * fix: update colocate test mock packages to match isPackageIntact entrypoint resolution The PR's isPackageIntact check uses require.resolve to validate that co-located packages have a usable entrypoint inside the target tree. The pre-existing test's mock packages lacked main fields and index files, so require.resolve failed and the idempotency assertion broke. Update buildRoot() to give every closure package a resolvable entry (main + index.js), mirroring what real npm packages ship. Refs #9615 * docs(changelog): fragment for #9615 * fix(yuanbao-web): accept content field in SSE text events (upstream format change) (#8739) Closes #8739 * fix(errorClassifier): classify ChatGPT Web SENTINEL_BLOCKED 403 as FORBIDDEN, enabling combo fallback (#8813) Closes #8813 * fix(vertex): route Claude models to native rawPredict and respect targetFormat overrides (#8994) Closes #8994 * fix(cursor): preserve tool context across multi-turn conversations when client lacks conversation_id (#9029) Closes #9029 * fix(sse): move Antigravity client system content to first user message to avoid upstream 429 (#9030) Closes #9030 * fix(combo): distinguish pre-dispatch skips from genuine failures to prevent false 503 ALL_ACCOUNTS_INACTIVE (#9630) Closes #9630 * fix: repair stray brace in combo.ts and fix no-explicit-any types in repro-9630 test --------- Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com>
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
Validated in local merge-train T4 (HouMinXi+Zartharas+Andrian+artickc)
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…tion (diegosouzapw#9615) * fix(docker): complete partially traced packages in standalone co-location Publish-to-Docker-Hub has failed on every release/v3.8.50 push since diegosouzapw#9151 enabled publishing from active release branches: the post-build guard dies with "Cannot find module .../@atjsh/llmlingua-2/dist/index.js" while the co-location step right above it reports 100 packages copied. Root cause: Next's file tracing materializes @atjsh/llmlingua-2 PARTIALLY in the standalone (package.json lands, the dist/ payload its main points at does not). colocateOptionals' no-clobber checked existsSync on the package DIRECTORY, so the partial shell counted as present and the one package that mattered was skipped forever (diegosouzapw#9185 added the closure walk but kept the directory-level check). Fix: presence is now judged by entrypoint integrity — the package resolves from inside the target tree (same contract as the Dockerfile guard). Partial directories are completed with a file-level no-clobber merge (cpSync force:false), so files the trace did materialize are never overwritten and pinned instances (dist transformers 3.5.2) keep their protection. Validation (TDD): 2 new tests in docker-llmlingua-optionals-9166.test.ts reproduce the CI failure (partial package skipped; closure-wide early-exit firing while a member is partial) — red on the old code, 5/5 green after. * fix: update colocate test mock packages to match isPackageIntact entrypoint resolution The PR's isPackageIntact check uses require.resolve to validate that co-located packages have a usable entrypoint inside the target tree. The pre-existing test's mock packages lacked main fields and index files, so require.resolve failed and the idempotency assertion broke. Update buildRoot() to give every closure package a resolvable entry (main + index.js), mirroring what real npm packages ship. Refs diegosouzapw#9615 * docs(changelog): fragment for diegosouzapw#9615 * fix(yuanbao-web): accept content field in SSE text events (upstream format change) (diegosouzapw#8739) Closes diegosouzapw#8739 * fix(errorClassifier): classify ChatGPT Web SENTINEL_BLOCKED 403 as FORBIDDEN, enabling combo fallback (diegosouzapw#8813) Closes diegosouzapw#8813 * fix(vertex): route Claude models to native rawPredict and respect targetFormat overrides (diegosouzapw#8994) Closes diegosouzapw#8994 * fix(cursor): preserve tool context across multi-turn conversations when client lacks conversation_id (diegosouzapw#9029) Closes diegosouzapw#9029 * fix(sse): move Antigravity client system content to first user message to avoid upstream 429 (diegosouzapw#9030) Closes diegosouzapw#9030 * fix(combo): distinguish pre-dispatch skips from genuine failures to prevent false 503 ALL_ACCOUNTS_INACTIVE (diegosouzapw#9630) Closes diegosouzapw#9630 * fix: repair stray brace in combo.ts and fix no-explicit-any types in repro-9630 test --------- Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com>
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
@huggingface/transformersdependency closure so ONNX runtime packages survive final-image assemblyRelated Issues
Root Cause
The LLMLingua packages were already present in
optionalDependenciesandpackage-lock.json.The Docker builder installed them in the root
node_modules, but the final image copied only.build/next/standalone. Because the LLMLingua engine uses dynamic imports, Next.js tracing did not reliably include the complete optional dependency closure in that standalone bundle.The existing
colocateLlmlinguaOptionalshelper targeteddist/node_modulesfor npm package installations and was not applied to the Docker standalone output.Validation
Choose the change type and focused loop from the
Contribution Golden Path.
Change type: Docker / build packaging
Focused tests:
node --import tsx/esm --test tests/unit/colocate-optionals.test.ts tests/unit/docker-llmlingua-optionals-9166.test.tsnode --check scripts/build/colocateOptionals.mjsnode --check scripts/build/assembleStandalone.mjsgit diff --checkReconciled with
release/v3.8.50atfc35dc248f46354e80fdcdaa551e6598abcf5124Production-code changes include automated regression tests
Full Docker image build — delegated to PR CI because of its substantial local build cost
Full lint, unit suite, coverage, production build, and SonarQube analysis — pending PR CI
Tests Added Or Updated
existing
tests/unit/colocate-optionals.test.tsnew
tests/unit/docker-llmlingua-optionals-9166.test.ts@huggingface/transformersinstance is not overwrittenonnxruntime-node, are still copiedReviewer Notes
The generalized colocation helper retains its existing default destination of
dist/node_modules, so the npm postinstall behavior remains compatible.Standalone assembly supplies its own destination and adds
@huggingface/transformersas a closure seed. Copying remains no-clobber: packages already present in the standalone bundle keep their traced and pinned versions, while missing transitive dependencies are filled from the builder’s installed dependency tree.The Docker validation uses a
createRequirerooted at the standalone package and verifies every resolved path is under the standalonenode_modules. This prevents a false-positive result caused by falling back to the builder’s root/app/node_modules.