Skip to content

Data flows

These diagrams show how data moves through a CodeNavi install: from your files to the index, from a question to an answer, and out of your network. Each section has one diagram. For the list of outbound connections with every field they send, see What CodeNavi sends.

Overview

Every client uses one port. The request handlers drive two engines, search and the indexer. Both use the same GPU models and the same local stores.

YOUR MACHINECoding agentsClaude Code, Codex, CursorBrowserweb UI at /uiScripts · CLIPOST /chat, /api/v1Front door :8765429 throttlecodebase scopebearer tokenlicence gateHandlers35 MCP toolsweb UI APIchatYour reposread-only mountSearchexpand · rankGPU modelsBuric-E0.6B · rerankerIndexerchunk · scan · embedUpdate checkonce a dayencodeencodereindexStoresLanceDB vectorscall graph (SQLite)feedback · noteslogs · metrics :9091readwriteCloud LLMonly if configuredUpdate servercodenavi.comchat · wiki compile: query + redacted chunkstoken + versionleaves the machine by defaultleaves the machine only if you configure it
The front door checks requests in this order: per-client throttle, then the codebase scope from /mcp/{codebase}, then the bearer token, then the licence. Chat is served by POST /chat, the web UI and the CLI. It is not an MCP tool.

Indexing

The scanner runs before the embedder. A detected secret is replaced before it can reach the vector store or a client.

Repo filesread-only mountWalk + filterextensions · ignoresPre-checkencoding · sizeAST chunkertree-sitter, 16 langsScanner53 rulesEmbedderBuric-E0.6B, GPULanceDBcode · doc chunkssecrets → [REDACTED]injection → [FLAGGED]only redacted, flagged text is embedded and storedCall graphrelations_{cb}.dbsame ASTsQuarantinereport in reports/file fails scan
An incremental reindex processes only the files that changed. The call-graph pass is best effort: if it fails, the reindex still succeeds.
  • The walk follows INCLUDE_EXTENSIONS, EXCLUDE_DIRS, .gitignore and MAX_FILE_SIZE. It does not read .dockerignore. See Configuration.
  • Languages without a grammar (SQL, templates, YAML, Markdown and others) are split by lines or landmarks. See Supported languages.
  • The rules are in data/secret_rules.json. At start-up, new rules from the image are added to that file and your edits stay.

semantic_search uses two models and no LLM. Your agent gets ranked chunks with citations and writes the answer itself.

Coding agentsemantic_searchcodebase=…Front doorscope · token · licenceExpand queryaliases · index termsEmbed queryBuric-E0.6B, GPUVector searchLanceDB, oversampledRerankcross-encoder, GPUThresholddrop low scoresSafety gatedrop blocked chunksdemote down-votedResultsranked chunks+ advisory noteschunks with file:line · no LLM has runAgent's modelsees what it readsthe agent's own route off the machine, under your agreement with that provider
Scores rank the results of one query. Do not compare scores between queries. Query expansion adds your aliases and matching symbol and file names from the index, at most twelve extra terms, with no LLM call.
  • find_callers, impact_analysis and diff_impact do not use the GPU. They read the call graph that indexing built.
  • grep_search searches the redacted text by default (since 1.3.76).

What leaves your network

By default one connection leaves your network: the daily update check. Every other outbound path starts only when you configure it.

YOUR MACHINE · NETWORKAgent's modelAnthropic, OpenAI…Coding agentMCP clientwhat it readsCodeNaviport 8765Local LLMOllama · LM Studio · vLLMstays localUpdate servercodenavi.com · dailytoken + versionHugging Facefirst run, if not in imagemodel nameCloud LLMClaude · OpenAI · Gemini…query + redacted chunksOpenAI-compatible URL *OPENAI_BASE_URLAPI key + redacted chunksRemote code embedderCODE_EMBEDDING_PROVIDERredacted chunks + queriesWebhook *HOOK_URLevent metadataScanner LLM judge *SCANNER_OLLAMA_URLflagged code, unredactedCrawled websitescrawler, opt-inHTTP fetches* host must also be in CODENAVI_OUTBOUND_HOSTS (1.3.76+)
Redaction is pattern matching and can miss a value. Your coding agent sends what it reads to its own model provider. That connection belongs to the agent, not to CodeNavi.

What CodeNavi sends lists what each connection sends and how to turn it off. Network & authentication lists the ports CodeNavi listens on.

Updates

The connected update and the air-gapped update use the same signature check. Both stop if the signature cannot be verified.

update.shyou run itUpdate endpointtoken · version · digestDelta blobssha256-namedVerify manifestpinned cosign keyapply-updatecheck image IDRecreatecompose --force-recreatemissing key, binary or signature = refuseServer update checkdaily: badge,renewed licenceCarried storeUSB or mirrorfetch-blobs --storeair-gappedUntoucheddata/ · index/.env · licencekeeps
A routine update is a few tens of MB, because only the changed image layers are sent. To install an unsigned store you must pass --allow-unsigned, and the updater prints a warning. The daily check downloads a renewed licence key once and checks its signature before it installs it.

See Updating CodeNavi and Air-gapped install.

Logs and metrics

Logs stay on disk in the install directory. A value that was redacted at index time stays redacted in the logs.

CodeNavi serverwrites locallylogs/codenavi.logstartup, reindex, security events, licence statelogs/queries.logqueries, result counts, safety-gate filteringreports/ + data/quarantine/quarantined files and the rule that firedfeedback.dbratings and demotionsdata/security_settings_audit.jsonlwho changed the redaction policy, when:9091 metricsPrometheus text, loopback by default/healthno token: minimal body; token: fullYour PrometheusGrafana, alertsscrape
Metrics are also served at GET /metrics on port 8765, behind the token. /health always answers, so a client without the token can see that the server is up. The version and licence details need the token.

See Observability.