Back to the room

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

  1. MCP server
  2. Context assembly
  3. Call graph
  1. 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

  2. 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

    Source that ran

  3. 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
    }
  4. 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

    Source that ran

  5. 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

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.

RelationSymbolResolved by
Callscodeintel.source._loadsame_file
Callscodeintel.source.SourceResultsame_file
Callscodeintel.source.git_blob_shasame_file
Callscodeintel.source._slicesame_file
Called bycodeintel.source.resolve_sourcessame_file
Insidecodeintel.sourcesame_file

Open this symbol in the graph

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
  1. _install_auth_middleware.<locals>.authentication_middleware __init__.py:159 × 1
  2. is_public shared/auth.py:122 × 1, 0.003 ms
  3. parse_bearer shared/auth.py:113 × 1, 0.002 ms
  4. principal_for_token shared/auth.py:102 × 1, 0.006 ms
  5. _configured shared/auth.py:97 × 2, 0.003 ms
  6. allowed_for shared/auth.py:126 × 1, 0.003 ms
  7. Principal.is_admin shared/auth.py:74 × 1, 0.001 ms
  8. Principal.as_state shared/auth.py:83 × 1, 0.018 ms
  9. Principal.user_uuid shared/auth.py:78 × 1, 0.014 ms
  10. _install_pool_monitor.<locals>.monitor_connection_pool __init__.py:199 × 1
  11. build_mcp_server.<locals>.find_symbol_tool modules/mcp/native_server.py:170 × 1, 3.77 ms
  12. session_scope codeintel/runtime.py:21 × 1
  13. ensure_database codeintel/runtime.py:15 × 1, 0.001 ms
  14. resolve_repositories codeintel/context.py:82 × 1, 0.59 ms
  15. repositories_matching codeintel/retrieval.py:614 × 1, 0.59 ms
  16. _setup_event_listeners.<locals>.receive_before_cursor_execute shared/database.py:398 × 8, 0.007 ms
  17. _setup_event_listeners.<locals>.receive_after_cursor_execute shared/database.py:406 × 8, 0.010 ms
  18. GUID.process_result_value shared/base_model.py:46 × 41, 0.016 ms
  19. find_symbol codeintel/symbols.py:13 × 1, 2.07 ms
  20. GUID.load_dialect_impl shared/base_model.py:29 × 2, 0.011 ms
  21. GUID.process_bind_param shared/base_model.py:35 × 9, 0.009 ms
  22. EmbeddingVector.process_result_value shared/vector_type.py:101 × 7, 0.29 ms
  23. parse_vector_literal shared/vector_type.py:49 × 7, 0.28 ms
  24. find_symbol.<locals>.<lambda> codeintel/symbols.py:35 × 1, 0.003 ms
  25. chunk_ref codeintel/symbols.py:65 × 7, 0.013 ms
  26. symbol_graph codeintel/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.

    Recorded runLedger

    One symbol chosen by the author. The graph holds resolved edges only.

  • Call/import graph resolution is conservative; ambiguous calls remain unresolved.

    Source verifiedLedger

  • Native MCP exposes search, context, symbol, repository and repository-memory tools.

    Source verifiedLedger