Skip to content

fix(docker): complete partially traced packages in standalone co-location - #9615

Merged
diegosouzapw merged 14 commits into
release/v3.8.50from
fix/docker-colocate-partial-trace
Aug 8, 2026
Merged

diegosouzapw merged 14 commits into
release/v3.8.50from
fix/docker-colocate-partial-trace

Conversation

@diegosouzapw

@diegosouzapw diegosouzapw commented Aug 6, 2026 •

Copy link
Copy Markdown
Owner

Contexto

Publish to Docker Hub falha em 100% dos pushes da release/v3.8.50 desde que o #9151 ativou o publish em release branches ativas (último verde: v3.8.49, 30/07). O guard pós-build morre com:

Error: Cannot find module '/app/.build/next/standalone/node_modules/@atjsh/llmlingua-2/dist/index.js'
  path: '...@atjsh/llmlingua-2/package.json'

…logo depois de o co-locate reportar ✅ Co-located 100 LLMLingua SLM optional package(s).

Causa-raiz

O file tracing do Next materializa @atjsh/llmlingua-2 parcialmente no standalone: o package.json entra, o payload dist/ que o main aponta não. O no-clobber do colocateOptionals.mjs checava existsSync no diretório do pacote — a casca parcial contava como presente e o único pacote que importava era pulado para sempre (o #9185 adicionou o closure walk mas manteve o check por diretório). O early-exit "already co-located" tinha o mesmo defeito.

Fix

Presença agora é julgada por integridade do entrypoint — o pacote resolve de dentro da árvore-alvo (mesmo contrato do guard do Dockerfile). Diretórios parciais são completados com merge no-clobber por arquivo (cpSync force:false): o que o trace materializou nunca é sobrescrito, e instâncias pinadas (transformers 3.5.2 no dist) mantêm a proteção — o teste de contrato existente segue verde.

Validação (TDD)

2 testes novos em tests/unit/docker-llmlingua-optionals-9166.test.ts reproduzem a falha do CI (pacote parcial pulado; early-exit global disparando com membro parcial): red no código velho → 5/5 green com o fix.

Refs #9151, #9185, #9166. Run com a falha: https://github.com/diegosouzapw/OmniRoute/actions/runs/31091515674


⚠️ base-red inherited

This run inherits ~10 base-red failures caused by:

  • Migration version collision at (ccr_blocks vs proxy_logs_egress_ip) — being fixed in fix(db): resolve CCR migration version collision #9618
  • Docs drift: / claimed in docs but not in code
  • ESLint warnings from base commits
  • Changelog fragment format violation ()
  • Various unit test counts out of sync (flags, providers, APIKEY providers)

The only PR-introduced failure was the test, fixed in 706cebe.


⚠️ base-red inherited

This run inherits ~10 base-red failures caused by:

  • Migration version collision at 134 (ccr_blocks vs proxy_logs_egress_ip) — being fixed in fix(db): resolve CCR migration version collision #9618
  • Docs drift: OMNIROUTE_MAX_POOL_SIZE / OMNIROUTE_DB_POOL_SIZE claimed in docs but not in code
  • ESLint warnings from base commits
  • Changelog fragment format violation (9415-newapi-sub2api-aggregator-balance.md)
  • Various unit test counts out of sync (flags, providers, APIKEY providers)

The only PR-introduced failure was the colocateLlmlinguaOptionals is idempotent test, fixed in 706cebe.

…tion

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.
…ypoint 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
@diegosouzapw diegosouzapw changed the title fix(docker): complete partially traced packages in standalone co-location [defer] fix(docker): complete partially traced packages in standalone co-location Aug 7, 2026
@diegosouzapw diegosouzapw changed the title [defer] fix(docker): complete partially traced packages in standalone co-location fix(docker): complete partially traced packages in standalone co-location Aug 7, 2026
@diegosouzapw
diegosouzapw merged commit 63cf354 into release/v3.8.50 Aug 8, 2026
22 checks passed
@diegosouzapw
diegosouzapw deleted the fix/docker-colocate-partial-trace branch August 8, 2026 12:42
ddarkr added a commit to ddarkr/OmniRoute that referenced this pull request Aug 26, 2026
Conflict resolutions:
- open-sse/config/providers/shared.ts: take upstream's 872K Codex OAuth
  context window (verified against live /codex/models endpoint)
- scripts/build/colocateOptionals.mjs: take upstream's isPackageIntact
  (PR diegosouzapw#9615) which supersedes downstream's hasCompleteTree with an
  entrypoint-resolution integrity check
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>
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.

1 participant