You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
detector.py: an installed tiktoken whose encoding can't be downloaded makes the whole engine fail to import (instead of Zero-Dependency Mode) #3791
bugUnintended behavior or logic failure in the enginecore-engineModifications to the central physics and parsing enginescope:infraCI, tooling, churn/factory, docs infrastructure
gitgalaxy/core/detector.py loads tiktoken's encoding at import time, and only guards ImportError:
HAS_TIKTOKEN = False
try:
import tiktoken
HAS_TIKTOKEN = True
ENCODER = tiktoken.get_encoding("cl100k_base") # downloads on first use
except ImportError:
pass
When tiktoken is installed but cl100k_base isn't cached and can't be downloaded, get_encoding raises, and import gitgalaxy.core.detector fails. Examples: a network-restricted sandbox, an air-gapped machine, a corporate proxy. That takes galaxyscope and every test that imports the engine down with it. The failure is a requests.exceptions.ProxyError (or a DNS or timeout error), not an ImportError.
This contradicts Zero-Dependency Mode (docs/zero_dependency_mode.md): "tiktoken unavailable" is supposed to mean token mass comes back NULL and the scan proceeds. It is also the air-gapped scenario the project explicitly supports.
Reproduce
In an environment where openaipublic.blob.core.windows.net is blocked, with no TIKTOKEN_CACHE_DIR / data-gym-cache entry:
don't degrade automatically, these are typically an AI getting the wrong env, perhaps we should make the dependencies more clear on if they need to run or not, what is acceptable, but we can't change modes randomly for temporal comparability.
bugUnintended behavior or logic failure in the enginecore-engineModifications to the central physics and parsing enginescope:infraCI, tooling, churn/factory, docs infrastructure
Activity
Call-graph comparison tooling: reference contract + cache, triage, on…
squid-protocol commentedon Sep 26, 2026
don't degrade automatically, these are typically an AI getting the wrong env, perhaps we should make the dependencies more clear on if they need to run or not, what is acceptable, but we can't change modes randomly for temporal comparability.
#3791: an installed tiktoken that cannot load its encoding no longer …