Repository navigation
[sentry:7854603802] models.files reaches modelFiles in src/terminal-setup/catalog.ts, which calls the core's fetchHfGgufFiles. The newest event (atc@0.2.21, darwin/arm64, core 0.24.8 - #114
Open
Ooooze wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
models.filesreachesmodelFilesin src/terminal-setup/catalog.ts, which calls the core'sfetchHfGgufFiles. The newest event (atc@0.2.21, darwin/arm64, core 0.24.8) carriesdiagnostic_cause_code=ECONNREFUSEDanderror_code=ECONNREFUSED; the innermost in-app frame isnode_modules/@atomic-chat/core/dist/models/hf.js:28(in_app=false), i.e. the runtime's fetch rejection.modelFilesonly mappedAtomicCoreErrormatchingHTTP (401|403), so the untyped transport rejection escaped throughmodels.filestoWorkspaceService.executeand was reported as an unexpected failure. Fix: inmodelFiles, after the existing 401/403 mapping, a rejection whose own or cause-chaincode(up to five levels) is one of ECONNREFUSED, ConnectionRefused (Bun), ECONNRESET, ENOTFOUND, EAI_AGAIN, ENETUNREACH, EHOSTUNREACH, ETIMEDOUT, UND_ERR_SOCKET, UND_ERR_CONNECT_TIMEOUT becomesAtcError('ATC_USAGE', 'Could not reach Hugging Face for this repository.', { details: 'Network error: <code>', hint: 'Check this machine’s network or proxy, then retry.' }). Every other rejection, the shard/projector filters and the sort are unchanged. The carried regression test failed on the base with the raw TypeError and passes with the patch; no core or telemetry change is required.Evidence:
Event da77eabd (atc@0.2.21, dist 55067cf, darwin/arm64, core 0.24.8, operation models.files): facts carry diagnostic_cause_code=ECONNREFUSED and error_code=ECONNREFUSED; exception is TypeError 'workspace models.files: unknown'; innermost frame node_modules/@atomic-chat/core/dist/models/hf.js:28, in_app=false.
Event 89303256 (atc@0.2.19, win32, core 0.23.4) shows the identical TypeError and stack without a cause tag (the observer did not exist in that release); same symptom on both hosts, so no regression.
src/terminal-setup/catalog.ts modelFiles() mapped only
AtomicCoreErrormatching /HTTP (401|403)/ to ATC_USAGE and rethrew every other rejection unchanged.Probe on base 55067cf: modelFiles('owner/repo', fetch rejecting with TypeError('fetch failed') cause {code:'ECONNREFUSED'}) rejected with the TypeError; 'expected TypeError: fetch failed to be an instance of AtcError' failed.
After the patch, the same test passes: the rejection is an AtcError with code ATC_USAGE and message 'Could not reach Hugging Face for this repository.'
src/terminal-setup/catalog.ts searchHub() already answers a catalog outage as 'Model catalog unavailable (HTTP ). Retry when connected.' — in-file precedent for a connectivity answer.
src/telemetry/reports.ts classifies ECONNREFUSED/ECONNRESET/ENOTFOUND/UND_ERR_* as an environment condition for downloads, consistent with treating this as a network condition, not a defect.
0.2.21 release sha equals base sha (empty release diff), so the inspected base is the code that produced the newest event.
Regression tests: src/terminal-setup/catalog.test.ts
Full CI and human review are required.
Report: http://127.0.0.1:8080/tenants/707d0855-80ab-4e1f-a156-f1c4546cbf52/runs/8b4c3675-9cad-4db9-9144-51c8586896b7
Sentry: https://atomic-chat.sentry.io/issues/7854603802/