Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works
Code Observatory / Source
Load at the pinned commit
Cached bytes come back through the same comparison, because the check happens after this returns.
PINNED SOURCE Copied from the repository at this commit. Source, not an execution.
PHAROS at 975a38dMIT license
_loadbackend/app/codeintel/source.py, lines 121–138Open source
def _load(req: SourceRequest, token: str | None) -> tuple[bytes, str]: cache_key = f"{req.repository_url}@{req.commit}:{req.path}" cached = _cache.get(cache_key) if cached is not None: return cached, "cache" if req.source_type == "local": if not req.local_path: raise FileNotFoundError("local repository path not recorded") data = read_file_at_commit(local_git_dir(req.local_path), req.commit, req.path) origin = "git" else: url = raw_file_url(req.repository_url, req.commit, req.path) if url is None: raise LookupError("no raw-content endpoint for this host") data = _fetch_https(url, token) origin = "https" _cache.put(cache_key, data) return data, originWhere this comes from
- Commit
975a38d5d17839c26ee219295a5be6ac66b6d910- File
backend/app/codeintel/source.py- Lines
- 121–138
- Git blob
c9f05cf7bf871b09919d64e9fdaf8380ecc3df2c- License
- MIT, © 2024–2026 Pharos Contributors. Notice
Read it on GitHub at this commit
Check it yourself
From a clone of the repository, the first command prints the blob above and the second prints these lines.
git rev-parse 975a38d:backend/app/codeintel/source.py
git show 975a38d:backend/app/codeintel/source.py | sed -n '121,138p'