Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works
Code Observatory / Recorded run
Who calls this, and what does it call?
An assistant asks where one function lives and what touches it. A real MCP call finds the definition, then reads the resolved call graph around it.
RECORDED Captured from a real run on November 2, 2026. Nothing is running now.
PHAROS at 975a38dMIT license
What happened, in order
01The token is checkedMCP server
The same check as every other tool. MCP is on the read token's list.
Input: Tool
"find_symbol"Observed running
principal_for_token× 1, 0.006 msallowed_for× 1, 0.003 ms
Source that ran
02The MCP tool takes the nameMCP server
The tool receives a symbol name and a repository. The name may be bare or qualified.
Input: Arguments
{ "name": "_resolve_one", "repository": "ram-tewari/pharos", "limit": 5 }Observed running
find_symbol_tool× 1, 3.77 ms
Source that ran
03The repository is resolvedContext assembly
This call names one repository. Without one, the lookup would span the whole index, as search does.
Input: Reference
{ "ref": "ram-tewari/pharos" }Output: Matched
{ "items": 1 }Observed running
resolve_repositories× 1, 0.59 msrepositories_matching× 1, 0.59 ms
Source that ran
04The definition is foundCall graph
PHAROS matches the exact qualified name, or any name ending in it, then sorts exact matches and shorter names first. No search or embedding is involved.
- Matches
- 1
- Definition
- backend.app.codeintel.source._resolve_one
Input: Arguments
{ "name": "_resolve_one", "limit": 5 }Output: Rows
{ "items": 1 }Observed running
find_symbol× 1, 2.07 ms
Source that ran
05The call graph is readCall graph
Stored edges around the definition are loaded and grouped by relation. Each neighbour keeps how it was resolved, so an ambiguous call is absent rather than guessed.
- First callee
- backend.app.codeintel.source._load
- Its resolution
- same_file
- Caller
- backend.app.codeintel.source.resolve_sources
Output: Edges by relation
{ "calls": 4, "called_by": 1, "contains": 0, "contained_by": 1, "imports": 0, "imported_by": 0 }Observed running
symbol_graph× 1, 0.95 mschunk_ref× 7, 0.013 ms
Source that ran
Times are measured with instrumentation on, which slows every call. They show where time went in one local run, not how fast PHAROS is.
What came back
One definition at lines 141–162. Asking for a name that does not exist returned 0 matches, not a guess.
| Relation | Symbol | Resolved by |
|---|---|---|
| Calls | codeintel.source._load | same_file |
| Calls | codeintel.source.SourceResult | same_file |
| Calls | codeintel.source.git_blob_sha | same_file |
| Calls | codeintel.source._slice | same_file |
| Called by | codeintel.source.resolve_sources | same_file |
| Inside | codeintel.source | same_file |
How this was recorded
- Transport
- MCP tools/call find_symbol over streamable HTTP
- Index
- Indexed from GitHub at this commit through the production path: PostgreSQL, pgvector HNSW and ONNX embeddings.
- Database
- PostgreSQL 17.11 with pgvector 0.8.7
- Embedding model
- granite-embedding-english-r2-int8
- Where
- Local Mac, loopback only; not the deployed service
- Timing
- Measured with sys.monitoring at the first recorded call, so the figures include instrumentation.
Every function that ran26 PHAROS functions, in first-seen orderOpen list
_install_auth_middleware.<locals>.authentication_middleware__init__.py:159 × 1is_publicshared/auth.py:122 × 1, 0.003 msparse_bearershared/auth.py:113 × 1, 0.002 msprincipal_for_tokenshared/auth.py:102 × 1, 0.006 ms_configuredshared/auth.py:97 × 2, 0.003 msallowed_forshared/auth.py:126 × 1, 0.003 msPrincipal.is_adminshared/auth.py:74 × 1, 0.001 msPrincipal.as_stateshared/auth.py:83 × 1, 0.018 msPrincipal.user_uuidshared/auth.py:78 × 1, 0.014 ms_install_pool_monitor.<locals>.monitor_connection_pool__init__.py:199 × 1build_mcp_server.<locals>.find_symbol_toolmodules/mcp/native_server.py:170 × 1, 3.77 mssession_scopecodeintel/runtime.py:21 × 1ensure_databasecodeintel/runtime.py:15 × 1, 0.001 msresolve_repositoriescodeintel/context.py:82 × 1, 0.59 msrepositories_matchingcodeintel/retrieval.py:614 × 1, 0.59 ms_setup_event_listeners.<locals>.receive_before_cursor_executeshared/database.py:398 × 8, 0.007 ms_setup_event_listeners.<locals>.receive_after_cursor_executeshared/database.py:406 × 8, 0.010 msGUID.process_result_valueshared/base_model.py:46 × 41, 0.016 msfind_symbolcodeintel/symbols.py:13 × 1, 2.07 msGUID.load_dialect_implshared/base_model.py:29 × 2, 0.011 msGUID.process_bind_paramshared/base_model.py:35 × 9, 0.009 msEmbeddingVector.process_result_valueshared/vector_type.py:101 × 7, 0.29 msparse_vector_literalshared/vector_type.py:49 × 7, 0.28 msfind_symbol.<locals>.<lambda>codeintel/symbols.py:35 × 1, 0.003 mschunk_refcodeintel/symbols.py:65 × 7, 0.013 mssymbol_graphcodeintel/symbols.py:39 × 1, 0.95 ms
Claims this supports
In a recorded run at commit 975a38d, find_symbol resolved _resolve_one to one definition with four callees and one caller.
One symbol chosen by the author. The graph holds resolved edges only.
Call/import graph resolution is conservative; ambiguous calls remain unresolved.
Native MCP exposes search, context, symbol, repository and repository-memory tools.
