Skip to content

op index_status

Mikhail Deynekin edited this page Nov 22, 2026 · 7 revisions

index_status

Revision state, coverage, degradation, journal size.

Group Corpus administration
Edition community — works without a licence
Capability audit — the feature that carries this operation; the licence matrix is on 15 · Editions and licensing
MCP tool ragraf_index_status · read-only · idempotent
CLI ragraf -p <config> query index_status …

Why it exists

An index can be honest and still be described dishonestly: "vectors available" once meant that the embedding library was importable, even when the revision held zero vectors and search fell back to lexis alone. Since 0.13.0 the answer keeps three facts apart — the library, the number of vectors in the revision, and whether vector search is usable at all — and names the reason in vector_note instead of leaving the reader to guess.

What it solves

  • See the active revision: files, nodes, edges, capability and the CPG mode.
  • Read the three vector facts separately: vector_library, vectors_indexed, vector_available, plus vector_note with the reason when the answer is no.
  • Judge coverage: stated and derived edges, symbols, chunks, the heuristic share against its budget.

How to use it

The call that produced the answer below, as a command line:

$ ragraf -p demo-corpus.yaml query index_status

The same call through MCP: ragraf_index_status().

The answer below was captured on the demo corpus, not written for the page:

{
 "op": "index_status",
 "index_rev": "rev-0002",
 "capability": "degraded",
 "provenance": "index",
 "found": true,
 "result": {
  "rev": {
   "rev_id": "rev-0002",
   "parent_rev": "rev-0001",
   "created_at": "2026-11-10T20:08:38+03:00",
   "state": "ready",
   "capability": "degraded",
   "joern_used": 0,
   "file_count": 11,
   "node_count": 69,
   "edge_count": 91,
   "corpus_hash": "ab36fd1c181eacb4eadcbe406fd34eaa7a4de470c0cc9b421ba22f015e307892",
   "config_hash": "f07d136f61e4f808",
   "extractor_versions": "{\"ragraf\": \"0.1.0\", \"python\": \"3.14.7\", \"tree_sitter\": \"0.26.0\", \"tree_sitter_language_pack\": \"1.21.0\", \"sqlite\": \"3.50.4\", \"sqlite_vec\": \"0.1.9\", \"fastembed\": \"0.8.1\", \"tiktoken\": \"0.14.0\", \"tree_sitter_php_grammar\": \"available\", \"joern\": \"MISSING\", \"java\": \"MISSING\"}"
  },
  "coverage": {
   "chunks": 38.0,
   "corpus_bytes": 6306.0,
   "corpus_lines": 227.0,
   "cpg_calls_added": 0.0,
   "cpg_downgrade": 0.0,
   "cpg_downgrade_note": 0.0,
   "cpg_used": 0.0,
   "dup_bytes": 0.0,
   "dup_dropped": 0.0,
   "dup_groups": 0.0,
   "dup_lines": 0.0,
   "edges": 91.0,
   "edges_derived": 45.0,
   "edges_name_ambiguous": 2.0,
   "edges_resolved_by_name": 3.0,
   "edges_stated": 46.0,
   "files_failed": 0.0,
   "files_found": 11.0,
   "files_ok": 8.0,
   "files_partial": 0.0,
   "files_skipped": 0.0,
   "files_total": 11.0,
   "lines_markdown": 22.0,
   "lines_php": 55.0,
   "lines_python": 127.0,
   "lines_sql": 15.0,
   "lines_toml": 8.0,
   "refs_dangling_edges": 0.0,
   "refs_stub_nodes": 9.0,
   "secrets_skipped": 0.0,
   "symbols": 62.0,
   "texts": 5.0,
   "vector_layer": 1.0
  },
  "stages": [
   {
    "stage": "scan",
    "seconds": 0.019,
    "items": 11
   },
   {
    "stage": "ast",
    "seconds": 0.021,
    "items": 11
   },
   "... 9 more"
  ],
  "lexvec": {
   "ft_chunk": 38,
   "chunk_map": 38,
   "vec_meta": 38,
   "chunk_text": 38,
   "vec_chunk": 0,
   "vec_chunk_total": 0
  },
  "vector_available": true,
  "embedding_model": "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2",
  "drift": {
   "files": 0,
   "symbols": 0,
   "entries": 0
  },
  "project": "demo-corpus",
  "root": "C:/AutoClaw/RAGRAF.git/.work/demo-corpus",
  "graph_compute": {
   "nodes": 69,
   "edges": 91,
   "files_ranked": 0,
   "ranked_in_process": false,
   "backend": "torch-cpu",
   "device": "cpu",
   "nodes_threshold": 5000,
   "notes_count": 1
  },
  "quality": {
   "vectors": {
    "available": true,
    "sampled": 0,
    "normalized": false,
    "embedded": 0,
    "note": ""
   },
   "chunks": {
    "total": 38,
    "max_tokens": 112,
    "avg_tokens": 41,
    "over_budget": 0,
    "files_without_symbols": 2,
    "budget_tokens": 8000
   },
   "signatures": {
    "functions": 18,
    "truncated": 0,
    "with_untyped_params": 0,
    "docblocks": 0,
    "note": ""
   },
   "journal": {
    "runs": 0,
    "soft_limit": 500,
    "keep_default": 20,
    "over_limit": false,
    "excess": 0,
    "error": "OperationalError"
   },
   "problems": [],
   "healthy": true,
   "notes_count": 2
  },
  "edge_kinds": {
   "kinds": [
    "... 10 more"
   ],
   "total": 91,
   "heuristic_kinds": [
    "calls_heuristic",
    "imports_heuristic"
   ],
   "heuristic_count": 40,
   "heuristic_share": 0.4396,
   "stated": 48,
   "derived": 43,
   "budget_percent": 80,
   "budget_exceeded": false,
   "note": "",
   "evidence": {
    "kinds": [
     "... 2 more"
    ],
    "call_kinds": [
     "... 1 more"
    ],
    "total": 91,
    "call_edges": 45,
    "cpg_confirmed": 0,
    "derived_call_edges": 5,
    "external_call_edges": 40,
    "derived_share": 0.1111
   }
  },
  "storage": {
   "total_gb": 0.0,
   "budget_gb": 6,
   "over_budget": false,
   "stores": {
    "graph": {},
    "lexvec": {},
    "control": {}
   },
   "revisions_in_history": 2,
   "revisions_with_data": 2,
   "revisions_retained": 2,
   "document_rows": {
    "document_chunk": 30,
    "document_node": 30
   },
   "orphan_revisions": 0,
   "orphan_document_rows": 0,
   "cpg": {
    "bytes": 0,
    "mb": 0.0,
    "bins": 0,
    "workspaces": 0,
    "exports": 0,
    "empty_workspaces": 0,
    "temp_mb": 0.0,
    "revisions_with_artifacts": 0,
    "retained_revisions": [],
    "orphan_artifacts": 0
   },
   "tmp": {
    "cpg_tmp_mb": 0.0,
    "cpg_tmp_files": 0,
    "ragraf_tmp_mb": 0.0,
    "limit_mb": 512
   },
   "ragraf_total_mb": 1.0,
   "note": ""
  }
 },
 "limits_count": 1
}

The call succeeded. The answer is trimmed to two items per list and to the fields that carry no Russian prose: limits and the explanatory strings are counted in the footer below instead of being quoted.

Parameters

This operation takes no parameters.

What it returns

Result keys visible in the code: coverage, drift, edge_kinds, embedding_model, graph_compute, lexvec, project, quality, rev, root, stages, storage, vector_available, vector_library, vector_note, vectors_indexed.

The body also writes these fields into the answer envelope itself (extra): counts.

The envelope around the result is the same for every operation; how to read it: 04 · Operations reference.

How it works

Step What happens
Reads none of the three stores directly — the answer comes through the engine the body calls, or from what the call is given
Calls util.to_posix
Guarded by the index revision is read (current_rev), so every fact belongs to a named revision
Writes counts into the answer envelope
Empty answer yes
flowchart TD
  Start[query index_status]
  Rev{index revision}
  NoIndex[refused: no index]
  Call0[util.to_posix]
  Found{found}
  Empty[empty result]
  Out[envelope with result]
  Start --> Rev
  Rev -- none --> NoIndex
  Rev -- rev-N --> Call0
  Call0 --> Found
  Found -- no --> Empty
  Found -- yes --> Out
Loading

Where it stops

Every answer carries a limits field, and it is never empty when a boundary exists: that is where the limits of this particular call are named — which part of the corpus was not covered, which fact could not be confirmed, what the operation refused to guess.

The boundary of the whole Corpus administration group is stated once, on the reference page. It is a sentence about the group, so it is not repeated here as if it were a sentence about index_status.

Around this group

← this is the first operation of the group

→ next in the group: compact

The full table with all 87 operations · A–Z index · Corpus administration


Where these fields come from: the parameters, their types and defaults are read from the signature op_index_status in src/ragraf/facade.py:3013 (line numbers as of 0.12.0); the MCP annotations from the tool registration; the edition from src/ragraf/edition_baseline.json; the guards, calls, stores, envelope fields and the diagram from the body of that same method. The example is a run of tools/build-op-examples.py on the demo corpus at revision rev-0002; fields whose value is Russian prose in this build (limits, explanatory strings) are counted, not quoted. Nothing else on this page is written by hand.

The reason and the tasks above are a translation of the docstring of op_index_status, src/ragraf/facade.py:3013, kept in tools/op-text.json next to the line it came from. That file is the only hand-written text in the pipeline; the gate tools/check-op-text.py checks that the line exists and that its text is English.

Clone this wiki locally