Back to the room

Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works

Code Observatory / method

_hydrate

codeintel.retrieval.Retriever._hydrate

PINNED SOURCE Source and edges from the index at this commit. An execution appears only where one was recorded.

PHAROS at 975a38dMIT license

Around this symbol

Search all symbols

Loading

Called by (1)
SymbolFileResolved by
searchretrieval.pysame file
Inside (1)
SymbolFileResolved by
Retrieverretrieval.pysame file
codeintel.retrieval.Retriever._hydratebackend/app/codeintel/retrieval.py, lines 535–563Open source
    def _hydrate(self, hits: list[Hit]) -> None:        if not hits:            return        ids = [uuid.UUID(h.chunk_id) for h in hits]        rows = self.db.execute(            select(DocumentChunk, Repository)            .join(Repository, Repository.id == DocumentChunk.repository_id)            .where(DocumentChunk.id.in_(ids))        ).all()        by_id = {str(c.id): (c, r) for c, r in rows}        for h in hits:            c, r = by_id[h.chunk_id]            meta = c.chunk_metadata or {}            h.repository_id = str(r.id)            h.repository_name = r.name            h.repository_url = r.url            h.source_type = r.source_type            h.path = meta.get("path", "")            h.language = c.language            h.kind = c.ast_node_type            h.symbol = c.symbol_name            h.name = meta.get("name")            h.start_line, h.end_line = c.start_line, c.end_line            h.commit_sha = c.branch_reference            h.parser = c.parser            h.summary = c.semantic_summary            h.raw_url = c.github_uri            h.resource_id = str(c.resource_id)            h.fallback_reason = meta.get("fallback_reason")

What the index recorded

Signature
def _hydrate(self, hits: list[Hit]) -> None:
File
backend/app/codeintel/retrieval.py
Lines
535–563
Parser
python-ast
Git blob
884729a39ae0b3d340ad83f75946677dcddf3791
Call sites
9 named, 2 resolved, 7 left unlinked
Outside this subset
2 more edges reach code outside the graph shown here

Read it on GitHub at this commit