Repository navigation
[sentry:7857488946] POST /atomic/v1/engines/:engine/update with a variant-only target resolved the variant against catalog.available by strict string equality in LlamacppEngine.target. T - #127
Open
Ooooze wants to merge 1 commit into
Conversation
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.
POST /atomic/v1/engines/:engine/update with a variant-only target resolved the variant against
catalog.availableby strict string equality inLlamacppEngine.target. The client's variant can be a minor-less CUDA family id (win-cuda-13-x64, whatstaticLatestVariants/latestBackendOptionsput behind the "Latest CUDA 13" dropdown and whatversion_backendmay hold), while the catalog lists concrete assets (win-cuda-13.5-x64, the event's active backend). The strict lookup found nothing and raisedAtomicCoreError('BACKEND_TAG_UNRESOLVED', 'The llamacpp-upstream catalog has no <variant> build for this computer.')— an HTTP 500 for a build the catalog does have. Fix:target()now resolves a variant-only target throughresolveLatestVersionBackend(variant, catalog.available)(exact id first, then the newest concrete member of the family — the resolutionUPSTREAM_POLICY.resolveSentineland the app'sresolveLatestBackendStringalready use) and parses the resulting<version>/<backend>with the existingparseKey. A variant the catalog truly lacks still raisesBACKEND_TAG_UNRESOLVEDwith the same code, message shape and details. Explicit<version>/<variant>targets are unchanged. The carried regression test passes with the fix; the pre-existing test that a variant absent from the catalog is refused still holds becausewin-cuda12-x64is not a family id underWIN_CUDA_FAMILY_RE. Sentry'shttp request: unknownwording comes fromBACKEND_TAG_UNRESOLVEDbeing classified neither EXPECTED nor OPERATIONAL in src/telemetry/diagnostics.ts — a protected telemetry change outside this repair and not the defect. Windows behaviour was not exercised in this Linux sandbox; the probe drives the engine with a fake catalog that mirrors the event's ids.Evidence:
Event stack: src/engines/llamacpp.ts target (lineno 213), updateHeld (lineno 124), src/backend/install/service.ts operate (lineno 432).
Base target() used
catalog.available.find((entry) => entry.backend === variant)then threw BACKEND_TAG_UNRESOLVED; probe on base failed with 'The llamacpp-upstream catalog has no win-cuda-13-x64 build for this computer.'src/backend/catalog/cuda-family.ts resolveLatestVersionBackend: exact backend match first, else resolveGpuFamilyConcrete picks the numerically newest concrete member of the family; used by UPSTREAM_POLICY.resolveSentinel and optimal-cache.
src/backend/select/recovery.ts staticLatestVariants('windows') returns minor-less ids ['win-cpu-x64','win-cuda-12-x64','win-cuda-13-x64','win-rocm-x64','win-vulkan-x64'] behind the Latest dropdown entries.
Event facts: active_backend=win-cuda-13.5-x64, source=control_route, component=http, operation=request, http_status=500, error_code=BACKEND_TAG_UNRESOLVED, release atomic-chat-core@0.24.7 (dist 2072fa6). Release diff to 0.24.8 touches only src/runtime/strata/** and src/core/{create,strata}.ts.
Pre-existing test 'refuses a variant the catalog does not have' uses variant win-cuda12-x64, which WIN_CUDA_FAMILY_RE does not match, so resolveLatestVersionBackend returns null and the refusal is preserved.
Check run after the fix: src/engines/llamacpp-family-target.test.ts — 1 passed, exit code 0.
Regression tests: src/engines/llamacpp-family-target.test.ts
Full CI and human review are required.
Report: http://127.0.0.1:8080/tenants/707d0855-80ab-4e1f-a156-f1c4546cbf52/runs/0282f0db-3256-4149-b0e4-c11aa8322814
Sentry: https://atomic-chat.sentry.io/issues/7857488946/