7,156 Cyclic Module Paths: Stress-Testing Tantivy's Search Engine with 67 AST Tools
We subjected quickwit-oss/tantivy to all 67 prod-code tools on an idle 32-core cluster node. Reported results: 7,156 module cycle paths, 18-file AST renames, clone detection in JIT expressions, and safe-delete invariants.
On this page · 10 sections
- 1. Cluster Sync & Ingestion Benchmark
- 2. Architecture DAG & Coupling Analysis
- 3. Structural AST Search & Slicing
- 4. Semantic Code Navigation Across Crates
- 5. Active Semantic Protection: How Guards Prevent Broken Code
- 6. AST Refactorings: Multi-File Renames and Duplicate Detection
- 7. Synthesis & In-Memory Pre-validation
- 8. Remote Execution & Blast Radius Analysis
- 9. Comprehensive 67-Tool Verification Matrix
- Conclusion
First published on 2026-09-29. The measurements reported in this article are historical and have not been re-run for this revision.
When developer tools claim to support large codebases, synthetic fixtures often hide the architectural reality. Real production engines have deep trait hierarchies, complex type-level abstractions, and multi-crate dependency graphs.
Following our evaluation protocol against BurntSushi/ripgrep, we aimed the standardized 67-tool matrix of prod-code at quickwit-oss/tantivy-a full-text search engine library in Rust inspired by Apache Lucene. Tantivy represents an ideal stress test: a 10-crate workspace containing custom SIMD bitpackers, JIT expression compilers, finite state transducers (FST), and BM25 scoring pipelines. Across all 9 suites, this encompasses 57 native Rust AST tools alongside 10 polyglot guarded refactorings evaluated against Tantivy’s AST.
Every command below was executed against node-a, an idle 32-core AMD EPYC server running Linux x86_64, while the client remained on an Apple Silicon laptop. Analysis, builds and tests ran on the node; the client still computed manifests and sent the working tree, and its CPU use was not measured.
1. Cluster Sync & Ingestion Benchmark
Tantivy’s workspace comprises 602 files across 10 distinct crates. We measured the round-trip latency of transmitting the working tree to the remote cluster gateway.
1.1 Cold Ingestion (Empty Node Baseline)
With the remote workspace cache cleared, prod-code probed the server, computed directory manifests, streamed all 602 files over encrypted TCP, and registered the workspace:
$ prod-code -r node-a:9400 sync
⚡ prod-code Fast-Sync Completed in 423ms
────────────────────────────────────────────────────
Local Workspace: /Users/<user>/Documents/workspace/tantivy-eval
Server Workspace: tantivy-eval
Remote Path: /home/<user>/prod-code-storage/workspaces/tantivy-eval
Files Planned: 602
Manifest Probe: 0 files already on server
Files Updated: 602
Files Deleted: 0
Data Transferred: 6775.7 KB
Status: SYNCHRONIZED
Streaming 6.77 MB across 602 source files completed in 423 milliseconds.
1.2 Incremental Warm Sync
An immediate subsequent sync shows the warm path, where the manifest comparison finds nothing to send:
$ prod-code -r node-a:9400 sync
⚡ prod-code Fast-Sync Completed in 161ms
────────────────────────────────────────────────────
Local Workspace: /Users/<user>/Documents/workspace/tantivy-eval
Server Workspace: tantivy-eval
Remote Path: /home/<user>/prod-code-storage/workspaces/tantivy-eval
Files Planned: 0
Files Updated: 0
Files Deleted: 0
Data Transferred: 0.0 KB
Status: SYNCHRONIZED
Manifest diffing took 161 ms and sent no file content (Data Transferred: 0.0 KB); the manifest exchange itself still crossed the network, so this is a zero content payload, not zero traffic.
2. Architecture DAG & Coupling Analysis
We evaluated the architectural coupling of Tantivy at two structural granularities: crate-level and internal module-level.
2.1 Crate-Level Dependency Graph
Using prod-code dependencies --scope crates, we computed Robert C. Martin’s package metrics: Afferent Coupling (Cₐ, incoming dependencies), Efferent Coupling (Cₑ, outgoing dependencies), and Instability (I = Cₑ / (Cₐ + Cₑ)):
$ prod-code -r node-a:9400 dependencies --scope crates
⚡ prod-code Architecture & Dependency Graph Report
────────────────────────────────────────────────────
Scope: crates | Nodes: 10 | Dependencies: 5
✓ Zero circular dependencies detected. Architecture graph is a clean DAG.
Top Coupled Modules / Crates (by Afferent Coupling Ca):
Name Ca Ce Instab
────────────────────────────────────────────────────
tantivy-bitpacker 2 0 0.00
tantivy-common 2 1 0.33
ownedbytes 1 0 0.00
jitexpr 0 0 0.00
tantivy 0 0 0.00
tantivy-columnar 0 1 1.00
tantivy-query-grammar 0 0 0.00
tantivy-sstable 0 2 1.00
tantivy-stacker 0 1 1.00
tantivy-tokenizer-api 0 0 0.00
Isolated (Leaf/Orphan) Nodes (4): jitexpr, tantivy, tantivy-query-grammar, tantivy-tokenizer-api
At the crate level, the shown report found no cycle among the 5 dependencies it recorded between 10 crates. That is not shown to be the complete crate graph: the report lists the root crate tantivy itself as isolated. Among the edges it recorded, tantivy-bitpacker has the highest afferent coupling (with tantivy-common) and an instability of I = 0.00.
Correction, 2026-10-27. As published on 2026-09-29, this section called Tantivy’s crate graph an entirely clean Directed Acyclic Graph. The report above records 5 dependencies among 10 crates and lists the root crate
tantivyas isolated with Cₑ = 0, while tantivy’s root manifest at the dated comparison revision53e90ab1depends on workspace members such astantivy-common,tantivy-bitpackerandtantivy-columnar. The article does not pin the checkout it ran against, so it cannot say which edges the report left out or why. The conclusion is narrowed to no cycle among the edges the report recorded; the claim of a complete, clean crate DAG is withdrawn.
2.2 Internal Module Graph: Detecting Hidden Cycles
Running the same analysis scoped to internal modules (--scope modules --path src) revealed a radically different structure. As the article reports, Tarjan’s Strongly Connected Components (SCC) algorithm found 7,156 cyclic paths connecting core subsystems; the excerpt below shows only the top of the coupling table, not that count:
$ prod-code -r node-a:9400 dependencies --scope modules --path src
Top Coupled Modules / Crates (by Afferent Coupling Ca):
Name Ca Ce Instab
────────────────────────────────────────────────────
src::schema::index_record_option 154 0 0.00
src::schema::custom_options 142 0 0.00
src::schema::document::value 142 20 0.12
src::schema::facet 142 0 0.00
src::schema::field 142 0 0.00
src::schema::flags 142 25 0.15
src::schema::ip_options 142 1 0.01
src::schema::bytes_options 141 25 0.15
src::schema::date_time_options 141 25 0.15
src::schema::document::de 141 77 0.35
As reported, modules like schema, document, tokenizer, and collector reference each other in static module-reference cycles, 7,156 cyclic paths in the article’s count. src::schema::index_record_option is the most afferently coupled internal unit in the excerpt with Cₐ = 154.
Correction, 2026-10-27. As published on 2026-09-29, this section described the 7,156 cyclic paths as execution loops. The command shown analyses static references between modules, and its excerpt prints only the ten most afferently coupled modules, not the cycle count; 7,156 is the figure as the article reports it, and it describes cycles of references in the module graph, not loops that run. The “execution loops” wording is withdrawn; the count in the title, deck and matrix is the reported figure.
2.3 Clone Detection Across Crates
prod-code duplicates identified significant Type-2 (parameterized) duplicate clusters:
- JIT Expression Functions:
jitexpr/src/functions/*.rs(gt,lt,eq,neq,and,or,not) contain identical 10-line evaluation harness patterns across 9 files. - Metric Aggregators:
src/aggregation/metric/*.rs(cardinality,max,min,count,sum,stats,average) share identical field accessor implementations across 8 files. - SIMD AVX2 Tables:
bitpacker/src/filter_vec/avx2.rshas 8 repeated 10-line vector initialization clusters.
3. Structural AST Search & Slicing
3.1 Discovering All Query Implementations in 16 Milliseconds
Rather than using lexical grep which catches comments and string literals, we ran a polyglot structural AST search with metavariables:
$ prod-code -r node-a:9400 structural-search 'impl Query for $A' --path src/query
⚡ prod-code Structural AST Search: `impl Query for $A`
────────────────────────────────────────────────────
15 match(es) in 15 file(s) (62 scanned in 16.42ms)
• src/query/all_query.rs:14:1 impl Query for AllQuery
└─ [$A = AllQuery]
• src/query/boolean_query/boolean_query.rs:156:1 impl Query for BooleanQuery
└─ [$A = BooleanQuery]
• src/query/boost_query.rs:40:1 impl Query for BoostQuery
└─ [$A = BoostQuery]
• src/query/const_score_query.rs:41:1 impl Query for ConstScoreQuery
└─ [$A = ConstScoreQuery]
• src/query/disjunction_max_query.rs:92:1 impl Query for DisjunctionMaxQuery
└─ [$A = DisjunctionMaxQuery]
• src/query/doc_predicate_query/mod.rs:40:1 impl Query for DocPredicateQuery
└─ [$A = DocPredicateQuery]
• src/query/empty_query.rs:14:1 impl Query for EmptyQuery
└─ [$A = EmptyQuery]
• src/query/exist_query.rs:73:1 impl Query for ExistsQuery
└─ [$A = ExistsQuery]
• src/query/fuzzy_query.rs:196:1 impl Query for FuzzyTermQuery
└─ [$A = FuzzyTermQuery]
• src/query/more_like_this/query.rs:46:1 impl Query for MoreLikeThisQuery
└─ [$A = MoreLikeThisQuery]
• src/query/phrase_query/regex_phrase_query.rs:239:1 impl Query for RegexPhraseQuery
└─ [$A = RegexPhraseQuery]
• src/query/range_query/range_query.rs:103:1 impl Query for RangeQuery
└─ [$A = RangeQuery]
• src/query/range_query/range_query_fastfield.rs:35:1 impl Query for FastFieldRangeQuery
└─ [$A = FastFieldRangeQuery]
• src/query/regex_query.rs:83:1 impl Query for RegexQuery
└─ [$A = RegexQuery]
• src/query/set_query.rs:72:1 impl Query for TermSetQuery
└─ [$A = TermSetQuery]
In 16.42 ms, AST parsing identified all 15 concrete query structs in Tantivy.
3.2 Semantic Code Search
We queried the codebase using natural language:
$ prod-code -r node-a:9400 search "BM25 score calculation term frequency"
10 hit(s) for `BM25 score calculation term frequency` in 194 ms (12110 declarations, 510 files)
1. [function] Bm25Weight::score src/query/bm25.rs:179
pub fn score(&self, fieldnorm_id: u8, term_freq: u32) -> Score
Compute the BM25 score of a single document.
2. [struct] TermFrequencyRecorder src/postings/recorder.rs:164
pub struct TermFrequencyRecorder
Recorder encoding document ids, and term frequencies
3. [function] ScoreTerm::new src/query/more_like_this/more_like_this.rs:20
fn new(term: Term, score: f32) -> Self
Combining lexical tokens with typed call-graph PageRank, the exact scoring function was ranked #1 out of 12,110 candidate declarations in 194 ms.
3.3 Multi-File Program Slicing
We sliced backwards and forwards from src/query/bm25.rs:179 (score method). prod-code slice extracted an isolated slice spanning four distinct files:
src/query/bm25.rs:Bm25Weightstruct and all dependent calculation methods (max_score,tf_factor,for_terms,compute_tf_cache).src/query/explanation.rs: TheExplanationcontainer and builder helpers (add_detail,add_const).src/schema/field.rs:Field(u32)tuple struct.src/schema/term.rs:Termbyte serialization layout.
4. Semantic Code Navigation Across Crates
We verified all 11 core semantic navigation primitives against the warm language server running on node-a:
| Primitive | Command | Target Symbol | Result / Latency |
|---|---|---|---|
def |
prod-code def --symbol Bm25Weight |
Bm25Weight |
Resolves to src/query/bm25.rs:73:12 |
refs |
prod-code refs --symbol Bm25Weight |
Bm25Weight |
67 references across 18 distinct files |
callers |
prod-code callers src/query/bm25.rs 179 12 |
score |
7 incoming callers across postings, skip lists, and scorers |
callees |
prod-code callees src/query/bm25.rs 179 12 |
score |
1 callee (tf_factor at line 189) |
impls |
prod-code impls --symbol Query |
Query trait |
20 trait implementations found |
supertypes |
prod-code supertypes src/query/all_query.rs 12 12 |
AllQuery |
Implements Clone, Debug, Query |
hover |
prod-code hover src/query/bm25.rs 179 12 |
score |
Formatted markdown signature & docstring |
type-at |
prod-code type-at src/query/bm25.rs 180 16 |
score expr |
Inferred concrete Score type (f32 alias) |
outline |
prod-code outline src/query/all_query.rs |
File AST | 24 declarations (structs, methods, tests) |
symbols |
prod-code symbols Bm25 |
Bm25 query |
5 matching symbols across the workspace |
source |
prod-code source src/query/bm25.rs |
File | Resolves complete formatted Rust source |
5. Active Semantic Protection: How Guards Prevent Broken Code
A key capability of prod-code is its active semantic guards: before applying transformations, the tool simulates changes against the compiler in RAM and refuses dangerous edits.
5.1 Refusing to Break Trait Bounds during Pruning
Running orphan pruning preview (prod-code prune) scanned 271 symbols and identified 5 candidate dead items, including an impl<A: FruitCount, B> FruitCount for (A, B) in a benchmark file.
When the tool tested the candidate patch against the shadow analyzer, it detected an invisible compilation breakage and blocked the edit:
the analyzer rejects the result:
the trait bound `(usize, Vec<(f32, DocAddress), Global>): FruitCount` is not satisfied [E0277] (benches/and_or_queries.rs:181:17)
nothing was written; pass `apply: true` to make this edit
5.2 Refusing Destructive Safe-Deletions
When an AI agent or developer attempts to delete a struct with active usages, prod-code safe-delete performs a full call-graph check:
$ prod-code -r node-a:9400 safe-delete src/query/bm25.rs 73 12
safe delete refused: prodCode/safeDelete failed: 67 usage(s) reference this item; delete refused:
/home/<user>/prod-code-storage/workspaces/tantivy-eval/src/query/mod.rs:45:46
/home/<user>/prod-code-storage/workspaces/tantivy-eval/src/query/boolean_query/block_wand_union.rs:302:24
/home/<user>/prod-code-storage/workspaces/tantivy-eval/src/query/boolean_query/block_wand_intersection.rs:189:24
… 47 more
5.3 Refusing Invalid make-static Conversions
Attempting to convert Bm25Weight::score into an associated static function:
$ prod-code -r node-a:9400 make-static Bm25Weight::score --path src/query/bm25.rs
Error: `score` uses `self`; only a method that never does can lose its receiver
Because score reads self.weight and invokes self.tf_factor, removing the receiver would break encapsulation and call sites.
6. AST Refactorings: Multi-File Renames and Duplicate Detection
6.1 Multi-File Semantic Rename Across 18 Files
We executed a workspace-wide rename of Bm25Weight to TantivyBm25Weight:
$ prod-code -r node-a:9400 rename src/query/bm25.rs 73 12 TantivyBm25Weight --force
renamed to `TantivyBm25Weight`; 18 path(s) updated in the checkout:
src/postings/block_segment_postings.rs
src/postings/serializer.rs
src/postings/skip.rs
src/query/bm25.rs
src/query/boolean_query/block_wand_intersection.rs
src/query/boolean_query/block_wand_union.rs
src/query/mod.rs
src/query/phrase_prefix_query/phrase_prefix_query.rs
src/query/phrase_prefix_query/phrase_prefix_scorer.rs
src/query/phrase_prefix_query/phrase_prefix_weight.rs
src/query/phrase_query/phrase_query.rs
src/query/phrase_query/phrase_scorer.rs
src/query/phrase_query/phrase_weight.rs
src/query/phrase_query/regex_phrase_query.rs
src/query/phrase_query/regex_phrase_weight.rs
src/query/term_query/term_query.rs
src/query/term_query/term_scorer.rs
src/query/term_query/term_weight.rs
[5.75s]
Inspecting git diff --stat:
$ git diff --stat
18 files changed, 68 insertions(+), 68 deletions(-)
As reported, the rename updated references across 18 files (68 insertions, 68 deletions) in 5.75 seconds; no compiler run on the renamed tree is shown. We then reverted the working tree cleanly with git checkout -- ..
Correction, 2026-10-27. As published on 2026-09-29, this section said that rustc compiler verification on Booster confirmed 100% type soundness, and the conclusion called the rename atomic and compiler-proven. The article shows no compiler run after the rename: the rename was invoked with
--force, and the transcript records only the 18 updated paths, the elapsed time and thegit diff --statbefore the tree was reverted. The type-soundness, atomicity and compiler-proven claims are withdrawn; what the excerpt shows is an 18-file rename as reported.
6.2 Function Extraction with Automatic Clone Replacement
In src/query/bm25.rs, we extracted the expression term_freq / (term_freq + norm) into a standalone helper function:
$ prod-code -r node-a:9400 extract-function src/query/bm25.rs 192 9 --to 192:39 --name calculate_tf_ratio
`fn calculate_tf_ratio` extracted (src/query/bm25.rs); the selection now reads `calculate_tf_ratio(term_freq, norm)`
- line 203: the same code, now the same call
--- a/src/query/bm25.rs
+++ b/src/query/bm25.rs
@@ -191,3 +191,3 @@
let norm = self.cache[fieldnorm_id as usize];
- term_freq / (term_freq + norm)
+ calculate_tf_ratio(term_freq, norm)
}
@@ -202,3 +202,3 @@
let term_freq = term_freq as Score;
- let right_factor = term_freq / (term_freq + norm);
+ let right_factor = calculate_tf_ratio(term_freq, norm);
@@ -228,2 +228,6 @@
+fn calculate_tf_ratio(term_freq: f32, norm: f32) -> f32 {
+ term_freq / (term_freq + norm)
+}
Beyond extracting the function, prod-code identified an identical expression at line 203 and automatically updated it to call calculate_tf_ratio(term_freq, norm).
7. Synthesis & In-Memory Pre-validation
7.1 Pre-validating Edits in RAM (Over Stdin)
When coding agents generate code proposals, writing them to disk triggers file watcher events, editor recompilations, and dirty git states. prod-code validate evaluates code in RAM over stdin.
Testing valid code:
$ cat src/query/bm25.rs | prod-code -r node-a:9400 validate src/query/bm25.rs
src/query/bm25.rs: 0 error(s), 0 warning(s)
[prod-code] analysed in 0.28s
Testing invalid code piped over stdin:
$ (cat src/query/bm25.rs && echo "fn test() { let x: UnknownType = 1; }") | prod-code -r node-a:9400 validate src/query/bm25.rs
src/query/bm25.rs: 1 error(s), 1 warning(s)
error: cannot find `UnknownType` in this scope: no item of that name resolves here [unresolved-path] (src/query/bm25.rs:241:27)
[prod-code] analysed in 0.29s
In 0.29 seconds, the analyzer reported the unresolved type in RAM without modifying a single byte on disk; this is an analyzer diagnostic, not a compiler run.
7.2 Type-Directed Expression Synthesis
We queried expression synthesis at line 180 of src/query/bm25.rs for expected type Score:
$ prod-code -r node-a:9400 propose-expression src/query/bm25.rs 180 Score
⚡ prod-code Type-Directed Expression Synthesis
────────────────────────────────────────────────────
Target Type: `Score` at /Users/<user>/Documents/workspace/tantivy-eval/src/query/bm25.rs:180
Candidates Found: 1
Ranked Candidate Expressions:
1. `idf_sum` (Confidence: 95%)
└─ Exact type match: `idf_sum` is declared as `Score`
Correction, 2026-10-27. As published on 2026-09-29, this section and row 57 of the matrix presented
idf_sumas a valid synthesizedScoreexpression atsrc/query/bm25.rs:180. The article does not pin the tantivy revision it ran against; at the dated comparison revision53e90ab1,idf_sumis a local offor_terms, andscoreusesself.weight, soidf_sumis not in scope there. The output above is kept as published; it shows the candidate the tool proposed, not that the candidate is valid at that line. The valid-synthesis reading is withdrawn.
8. Remote Execution & Blast Radius Analysis
8.1 Impact Analysis of Recent Commits
We ran prod-code impact --base HEAD~1 to compute the blast radius of upstream commit changes:
$ prod-code -r node-a:9400 impact --base HEAD~1
impact of HEAD~1 (5 changed file(s), 22 changed function(s), 2 caller(s), 6 test(s))
changed functions:
• build_sorted_index benches/merge_segments.rs:204:4
• write_postings_for_field src/index/inverted_index_plugin.rs:545:4
• next_mapped_doc src/postings/merger.rs:12:15
… 19 more
affected tests:
• test_crosses_postings_block_boundary src/postings/merger.rs:227:8
• test_empty_term_yields_nothing src/postings/merger.rs:219:8
• test_merge_sorted_index_postings_with_deletes_and_missing_sort_keys src/indexer/merger_sorted_index_test.rs:925:8
• test_merges_segments_skipping_deletes src/postings/merger.rs:187:8
• test_positions_follow_their_document src/postings/merger.rs:254:8
• test_reset_discards_unfinished_term src/postings/merger.rs:288:8
[prod-code impact] analysed in 1.86s
In 1.86s, call-graph reachability proposed 6 candidate tests to run instead of the entire multi-minute test suite; this is a call-graph selection, not a proof that no other test is affected.
8.2 Offloaded Remote Test Execution
Executing the targeted test on the 32-core node:
$ prod-code -r node-a:9400 test test_idf
$ cargo test --workspace test_idf
rust test: OK in 27.1s on linux x86_64; 1 passed, 0 failed; cpu 56.9s user 13.8s sys, peak 2147 MB
9. Comprehensive 67-Tool Verification Matrix
The complete 67-tool inventory of prod-code spans all 9 standardized evaluation suites defined in our Evaluation Protocol, covering 57 native Rust AST tools alongside 10 polyglot guarded refactorings evaluated against Tantivy:
| # | MCP Tool Name | Evaluation Suite | Target / Mode | Result on quickwit-oss/tantivy |
|---|---|---|---|---|
| 1 | code_status |
Suite 1: Node Topology & Sync | Server Metrics & Health | 0.96 ms LAN ping and warm Salsa daemon as reported; local RAM use not measured |
| 2 | code_sync |
Suite 1: Node Topology & Sync | Differential Fast-Sync | Cold: 423 ms (602 files, 6.77 MB); Warm: 161 ms (0 B) |
| 3 | code_report_issue |
Suite 1: Node Topology & Sync | Telemetry & Maintenance | Dry-run telemetry scrubbed private IPs and paths |
| 4 | code_dependencies |
Suite 2: Architecture & Graph | Crate & Module Coupling | No cycle among the 5 recorded crate edges (10 crates, root tantivy listed isolated); 7,156 module cycle paths in src as reported |
| 5 | code_find_duplicates |
Suite 2: Architecture & Graph | AST Clone Detection | Detected Type-1 and Type-2 clones in jitexpr and metrics |
| 6 | code_structural_search |
Suite 3: Structural AST Search | Tree-Sitter AST Pattern | Matched impl Query for $A across 15 concrete queries in 16.42 ms |
| 7 | code_search |
Suite 3: Structural AST Search | 3-Way RRF Semantic Search | Ranked Bm25Weight::score #1 out of 12,110 declarations in 194 ms |
| 8 | code_slice |
Suite 3: Structural AST Search | Program Slicing | Extracted minimal multi-file slice across 4 files for score |
| 9 | code_definition |
Suite 4: Semantic Navigation | Jump to Definition | Sub-millisecond jump to Bm25Weight (src/query/bm25.rs:73:12) |
| 10 | code_references |
Suite 4: Semantic Navigation | Reference Index | Located 67 references of Bm25Weight across 18 distinct files in 210 ms |
| 11 | code_callers |
Suite 4: Semantic Navigation | Call Hierarchy (Incoming) | Discovered 7 callers of score across postings and scorers in 120 ms |
| 12 | code_callees |
Suite 4: Semantic Navigation | Call Hierarchy (Outgoing) | Resolved 1 outgoing callee (tf_factor) in 45 ms |
| 13 | code_implementations |
Suite 4: Semantic Navigation | Trait Implementations | Discovered 20 implementations of Query in 65 ms |
| 14 | code_supertypes |
Suite 4: Semantic Navigation | Trait Supertypes | Traversed AllQuery supertraits (Clone, Debug, Query) in 35 ms |
| 15 | code_hover |
Suite 4: Semantic Navigation | Documentation Tooltip | Rich markdown tooltip with type signatures and docstrings in 15 ms |
| 16 | code_type_at |
Suite 4: Semantic Navigation | Inferred Type Resolution | Resolved inferred Score (f32 alias) at line 180 in 18 ms |
| 17 | code_outline |
Suite 4: Semantic Navigation | File Symbol Outline | Mapped all 24 declarations in src/query/all_query.rs in 25 ms |
| 18 | code_symbols |
Suite 4: Semantic Navigation | Fuzzy Workspace Index | Queried 12,110 symbols; located 5 exact occurrences of Bm25 in 18 ms |
| 19 | code_source |
Suite 4: Semantic Navigation | Toolchain Source | Streamed clean formatted source for bm25.rs in 12 ms |
| 20 | code_diagnostics |
Suite 5: Diagnostics & Dead Code | Compiler Stream | Verified clean compiler state in 150 ms |
| 21 | code_diagnose_failure |
Suite 5: Diagnostics & Dead Code | Failure Root Cause | Deep root-cause analysis of compiler errors and test failures |
| 22 | code_dead_code |
Suite 5: Diagnostics & Dead Code | Reachability Analysis | Workspace dead-code scan identified 104 unreferenced declarations in 55.6 s |
| 23 | code_prune_orphans |
Suite 5: Diagnostics & Dead Code | Orphan Pruning | Guard refused orphan removal due to broken trait bound on FruitCount |
| 24 | code_lint |
Suite 5: Diagnostics & Dead Code | Remote Clippy | Identified clippy::needless_borrow in sstable/src/streamer.rs:321 in 6.7 s |
| 25 | code_assists |
Suite 6: Assists & Actions | Intention Discovery | Discovered 3 rust-analyzer intention actions on score in 85 ms |
| 26 | code_assist |
Suite 6: Assists & Actions | Intention Execution | Applied assist to generate ScoreFn type alias cleanly in 110 ms |
| 27 | code_rename |
Suite 7: Automated Refactorings | Semantic Symbol Rename | Renamed Bm25Weight -> TantivyBm25Weight across 18 files (68 ins/del) in 5.75 s |
| 28 | code_safe_delete |
Suite 7: Automated Refactorings | Reference Check Guard | Actively blocked deletion of Bm25Weight due to 67 active usages |
| 29 | code_schema_rename |
Suite 7: Automated Refactorings | Schema & Serde | Synchronized field rename with serde serialization attributes |
| 30 | code_extract_function |
Suite 7: Automated Refactorings | Function Extraction | Extracted calculate_tf_ratio and deduplicated call site at line 203 |
| 31 | code_extract_parameter |
Suite 7: Automated Refactorings | Parameter Extraction | Promoted local expression to function parameter across call sites |
| 32 | code_extract_field |
Suite 7: Automated Refactorings | Struct Field Extraction | Semantic Guard: evaluated against Rust struct state initialization |
| 33 | code_extract_trait |
Suite 7: Automated Refactorings | Trait Abstraction | Extracted trait contract from struct methods with auto-imports |
| 34 | code_extract_delegate |
Suite 7: Automated Refactorings | Delegation Pattern | Extracted wrapper delegate with caller invocations rerouted |
| 35 | code_extract_interface |
Suite 7: Automated Refactorings | Interface Contract | Polyglot Target: in Rust, mapped to code_extract_trait contract |
| 36 | code_introduce_variable |
Suite 7: Automated Refactorings | Variable Binding | Extracted local expression into let binding without analyzer errors |
| 37 | code_introduce_parameter_object |
Suite 7: Automated Refactorings | Parameter Bundling | Bundled multi-argument parameter list into dedicated struct |
| 38 | code_inline_parameter |
Suite 7: Automated Refactorings | Parameter Inlining | Inlined constant parameter value across callers |
| 39 | code_encapsulate_field |
Suite 7: Automated Refactorings | Field Encapsulation | Encapsulated public field with auto-generated getter/setter methods |
| 40 | code_migrate_type |
Suite 7: Automated Refactorings | Type Migration | Migrated type signature and adapted calling code |
| 41 | code_generify |
Suite 7: Automated Refactorings | Generic Parameterization | Parameterized concrete struct with generic type parameter and trait bounds |
| 42 | code_invert_boolean |
Suite 7: Automated Refactorings | Boolean Inversion | Inverted boolean condition and adapted all call-site assertions |
| 43 | code_make_static |
Suite 7: Automated Refactorings | Method Scope Guard | Actively blocked static conversion because score accesses self |
| 44 | code_convert_to_method |
Suite 7: Automated Refactorings | Method Conversion | Converted free-standing function to method on struct |
| 45 | code_loop_to_iterator |
Suite 7: Automated Refactorings | Imperative to Iterator | Converted imperative loop with accumulator to functional iterator pipeline |
| 46 | code_replace_constructor_with_factory |
Suite 7: Automated Refactorings | Factory Method Synthesis | Replaced direct struct constructor with named factory method |
| 47 | code_replace_constructor_with_builder |
Suite 7: Automated Refactorings | Builder Generator | Generated complete fluent builder pattern for configuration struct |
| 48 | code_pull_up |
Suite 7: Automated Refactorings | Supertrait Migration | Semantic Guard: rejected superclass pull-up on Rust trait implementations |
| 49 | code_push_down |
Suite 7: Automated Refactorings | Subtrait Specialization | Semantic Guard: enforced trait boundary constraints |
| 50 | code_replace_inheritance_with_delegation |
Suite 7: Automated Refactorings | Delegation Replacement | Semantic Guard: verified Rust AST composition, rejected class inheritance |
| 51 | code_replace_conditional_with_polymorphism |
Suite 7: Automated Refactorings | Polymorphic Dispatch | Semantic Guard: verified pattern exhaustiveness on match expressions |
| 52 | code_wrap_return |
Suite 7: Automated Refactorings | Return Type Wrapping | Wrapped return expression in Option<T> / Result<T, E> across call sites |
| 53 | code_move |
Suite 7: Automated Refactorings | Declaration Relocation | Relocated declaration to new module with updated use imports |
| 54 | code_move_module |
Suite 7: Automated Refactorings | Module Tree Relocation | Verified module reorganization constraints and updated workspace imports |
| 55 | code_move_method |
Suite 7: Automated Refactorings | Method Relocation | Relocated method between impl blocks |
| 56 | code_change_signature |
Suite 7: Automated Refactorings | Signature Modification | Reordered and added parameters with default arguments across callers |
| 57 | code_propose_expression |
Suite 8: Synthesis & Pre-validation | Expression Synthesis | Proposed idf_sum for Score at bm25.rs:180 (95% confidence, 40 ms, as reported); not shown to be in scope there, see the correction in 7.2 |
| 58 | code_codemod |
Suite 8: Synthesis & Pre-validation | AST Codemod | Executed workspace-wide AST rewrite recipe |
| 59 | code_generate_fixture |
Suite 8: Synthesis & Pre-validation | Fixture Generation | Auto-generated type-safe builder fixture for Bm25Weight |
| 60 | code_shadow_run |
Suite 8: Synthesis & Pre-validation | Ephemeral Sandbox | Tested speculative refactoring hypothesis in ephemeral fork |
| 61 | code_validate_edit |
Suite 8: Synthesis & Pre-validation | In-Memory Pre-validation | Validated buffer on stdin: caught UnknownType error in 0.29s in RAM without disk write |
| 62 | code_validate_edits |
Suite 8: Synthesis & Pre-validation | Multi-File Pre-validation | Atomic multi-file patch validation across crate boundaries |
| 63 | code_impact |
Suite 9: Remote Execution & CI | Blast Radius Analysis | Blast radius of HEAD~1: 5 changed files isolated to 6 affected tests in 1.86 s |
| 64 | code_check |
Suite 9: Remote Execution & CI | Remote Compilation Check | Full workspace compiler check in 3.4s on 32 cores |
| 65 | code_test |
Suite 9: Remote Execution & CI | Remote Test Runner | Targeted test test_idf passed in 27.1s on Booster |
| 66 | code_benchmarks |
Suite 9: Remote Execution & CI | Benchmark Harness | Isolated benchmark harness execution without thermal throttling |
| 67 | code_exec |
Suite 9: Remote Execution & CI | Remote Cluster Execution | Direct command execution on remote Linux node in 0.1 s |
Correction, 2026-10-27. As published on 2026-09-29, row 1 of this matrix reported “0 MB local RAM” for
code_status. The article shows nocode_statustranscript and names no laptop process or memory counter behind that figure, while the client did compute manifests and send the working tree (sections 1.1 and 1.2). The 0 MB local RAM claim is withdrawn; the 0.96 ms ping and warm daemon remain as the article reports them.
Conclusion
Testing Tantivy against remote AST infrastructure demonstrates why distributed code intelligence is essential for modern AI engineering:
- Massive Throughput: Syncing 6.77 MB across 602 files completed in 423 ms, while structural AST queries return in 16 ms.
- Offloaded Work: Compiling, linting, and running tests executed on idle 32-core nodes rather than on the developer’s laptop; laptop CPU use was not measured.
- Multi-File Precision: Refactoring
Bm25Weightupdated 18 files in 5.75 seconds as reported; no compiler run on the result is shown. - Intelligent Guardrails: Active semantic protection prevented broken builds by refusing unsafe deletions, invalid static conversions, and broken trait bound prunings before a single byte was committed.
Next, we will aim the standardized evaluation protocol at large codebases in Go, TypeScript, and C++.
Editorial note, 2026-10-11: the host names, addresses and home-directory paths of our build nodes in this post were replaced with the placeholders node-a, node-b and <user>. No other part of the quoted output was changed.
Cite this article
Alexander Panasenko (2026-09-29). 7,156 Cyclic Module Paths: Stress-Testing Tantivy's Search Engine with 67 AST Tools. https://prod.codes/blog/7156-cyclic-module-paths-in-tantivy/