Skip to content

CodeNib 0.2.2

CodeNib 0.2.2 makes one authenticated repository source surface authoritative from indexing through agent and Web serving. It fixes the Expo/CocoaPods layout reported in Issue #641 and adds an explicit alternative for generated or vendored subtrees:

python -m pip install --upgrade "codenib[graph,mcp]==0.2.2"
codenib codegraph init /absolute/path/to/repository \
  --exclude-dir ios/Pods

The authenticated fingerprint and source-binding paths now accept an absolute symlink only when its lexical target is inside the same pinned checkout. The target is re-walked from the repository authority instead of being opened by ambient absolute path. Raw link text remains part of the source identity, and initial/final identity checks still reject retargeting, prefix lookalikes, outside targets, device paths, alternate data streams, and unsupported Windows namespaces.

This supports layouts such as an ios/Pods link into an in-repository pnpm store without making ios, android, or Pods globally ignored names. Those directories can contain user-maintained source and remain indexed by default.

Persistent source selection

Use repeatable --exclude-dir arguments for exact root-relative subtrees:

codenib codegraph init . \
  --exclude-dir ios/Pods \
  --exclude-dir generated/api

Paths use POSIX / spelling on every platform, are lexical and component-aware, and are not globs. An explicit set replaces the complete custom selection. Later codegraph init, index, Wiki, publish, doctor, and toolchain flows reuse the manifest policy when no replacement is supplied; --clear-exclude-dirs returns to the default source surface. CodeNib does not silently adopt .gitignore or ambient global Git excludes.

Manifest 1.2 records the canonical selection and digest as part of repository and view identity. A policy change rebuilds affected views even when the selected bytes otherwise happen to match. Manifest 1.1 remains readable under its exact legacy policy and migrates on the next successful compilation.

The same selected inventory gates language detection, BM25/vector documents, symbol graph and SCIP output, MCP source tools, Wiki and Web reads, historical projections, and Ask citations. A backend or artifact that cannot confirm the recorded selection fails closed rather than being labeled current.

Symbol-graph builder schema 6 now records lsp_index.pkl as an optional, fingerprinted occurrence artifact. When present, it is copied and verified from the same owned graph generation before either pickle is loaded; when absent, ambient sidecars are ignored instead of being discovered by path.

Backend boundaries

Zoekt accepts the default repository policy through a fixed commit-tree proof, private generation publication, and an authenticated shard-tree receipt, but only when that commit tree exactly matches the authenticated checkout and has no tracked path rejected by the default policy. It does not yet support non-empty custom exclusions. Requesting the zoekt view, including through --preset full, therefore fails before producing a new shard when any of those conditions is unmet; the default CodeGraph path (bm25 plus symbol_graph) remains supported. The authenticated MCP Zoekt runtime is Linux-only in 0.2.2: it passes a retained /proc descriptor path to zoekt-webserver. Other platforms fail closed rather than reopen a mutable published shard path.

Manifest-bound native clangd indexes are also disabled until their generated .idx files have an authenticated allowed-file proof. C and C++ queries fall back to the verified persisted graph instead of consuming mutable files from a default-ignored build directory.

Upgrade notes

  • Re-run codenib codegraph init or codenib index after upgrading. Existing manifest 1.1 data remains readable; selected views rebuild into manifest 1.2.
  • Existing default source behavior is preserved. No directory name is newly ignored globally.
  • Use codenib codegraph status --json to inspect the recorded source selection and digest before changing it.
  • The target checkout remains unchanged; CodeNib-owned indexes and receipts stay below CODENIB_HOME.