<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged codearchitecture</title>
<link>https://coderlegion.com/tag/codearchitecture</link>
<description>Powered by Question2Answer</description>
<item>
<title>From a Test-Suite Trace to a Search Signal: the Bootstrap Pipeline Story</title>
<link>https://coderlegion.com/28140/from-a-test-suite-trace-to-a-search-signal-the-bootstrap-pipeline-story</link>
<description>&lt;hr&gt;
&lt;h3 id=&quot;where-it-started&quot;&gt;Where It Started&lt;/h3&gt;
&lt;p&gt;The problem to which everything traces back: &lt;strong&gt;RAG search across an unfamiliar codebase sees the code, but misses the intent.&lt;/strong&gt; Embeddings find a chunk by keywords, PropertyGraph finds a symbol by name, but to the question &quot;where is the real business logic here, and what can I safely throw away?&quot; no model answers — because the answer simply doesn't exist in static code representation.&lt;/p&gt;
&lt;p&gt;Hence the &lt;strong&gt;bootstrap pipeline&lt;/strong&gt; was born for indexing a new project across 4 steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Entities&lt;/strong&gt; — types and data-classes as the core domain backbone;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Entry points&lt;/strong&gt; — decorators (&lt;code&gt;@mcp_app.tool&lt;/code&gt;) as the outer system boundary;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tests as ground truth&lt;/strong&gt; — tests as the only deterministic way to say &lt;em&gt;&quot;this function is part of live execution logic&quot;&lt;/em&gt;;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Git → ADR&lt;/strong&gt; — history of decisions extracted from commit logs.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Step 3 was the main battleground. The argument wasn't &lt;em&gt;&quot;are tests needed&quot;&lt;/em&gt;, but &lt;strong&gt;how to link a test to the exact function it actually executes&lt;/strong&gt;. Steps 1 and 2 relied on clean static analysis, whereas step 3 lacked an obvious static answer.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;first-clash-static-vs-dynamic-exp-7-&quot;&gt;First Clash: Static vs Dynamic (Exp 7)&lt;/h3&gt;
&lt;p&gt;Initial intuition: &quot;A test has a name, a function has a name, let's link by name.&quot;&lt;br&gt;
Measurement killed it instantly: &lt;strong&gt;0 out of 109&lt;/strong&gt; tests in the evaluation sample named the function they actually executed. Import-only (file-level match) gave 77.9% — but file level is coarse noise (a single file contains dozens of functions).&lt;/p&gt;
&lt;p&gt;We executed the entire suite (1,727 tests) using a custom &lt;code&gt;sys.settrace&lt;/code&gt; plugin:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;[dynamic_trace] total tests traced: 1727
[dynamic_trace] tests executing &amp;gt;=1 src function: 1551 (89.8%)
[dynamic_trace] unique src functions executed: 1212
[dynamic_trace] avg src functions per linked test: 10.1 (median 6, range 1-118)
tests with exact-name target hit in dynamic set: 47 (2.7%)
A/B same session: 174.8s vs 198.6s -&amp;gt; overhead +13.6%
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Takeaway: Dynamic tracing is the only deterministic linker, at the cost of a +13.6% one-time execution overhead.&lt;/strong&gt; And an uncomfortable truth surfaced immediately: a single test executes &lt;strong&gt;10.1 functions&lt;/strong&gt; on average. &quot;1 test = 1 function&quot; was a naive myth. Thus, edges required a &lt;strong&gt;ranker&lt;/strong&gt;: which of the 10 is the primary target?&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;ranking-failed-exp-7b-tarantula-&quot;&gt;Ranking Failed (Exp 7b, Tarantula)&lt;/h3&gt;
&lt;p&gt;We tested the Tarantula heuristic (&quot;a function called infrequently by many tests is the primary target&quot;).&lt;br&gt;
&lt;em&gt;Hypothesis:&lt;/em&gt; ≥60-70% of tests have an unambiguous candidate at rank≤3.&lt;br&gt;
&lt;em&gt;Reality:&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;rank≤3 applied to only &lt;strong&gt;22.6%&lt;/strong&gt; of tests (7.5% rank=1) — &lt;strong&gt;HYPOTHESIS REFUTED&lt;/strong&gt;;&lt;/li&gt;
&lt;li&gt;However, &lt;strong&gt;precision was high&lt;/strong&gt;: manually inspected candidates at rank=1..3 were all accurate targets;&lt;/li&gt;
&lt;li&gt;The main offender: &lt;strong&gt;shared utilities&lt;/strong&gt; like &lt;code&gt;safe_mkdir&lt;/code&gt; / &lt;code&gt;get_data_root&lt;/code&gt; (autouse fixtures, 234 callers each) and &lt;code&gt;project_hash&lt;/code&gt; (223 callers).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Verdict:&lt;/strong&gt; Tarantula is unsuitable for &lt;em&gt;selecting&lt;/em&gt; the main target, but works well as a &lt;em&gt;confidence annotation&lt;/em&gt; for ~16% of tests. &lt;code&gt;TESTS&lt;/code&gt; edges are thus built from the complete trace without truncation — they are correct by construction and do not require lossy ranking.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;driver-switch-failed-exp-8-sysmon-&quot;&gt;Driver Switch Failed (Exp 8, sysmon)&lt;/h3&gt;
&lt;p&gt;Could &lt;code&gt;coverage run&lt;/code&gt; (Python 3.14, &lt;code&gt;sys.monitoring&lt;/code&gt;) run faster than our custom &lt;code&gt;sys.settrace&lt;/code&gt; plugin?&lt;br&gt;
&lt;em&gt;Hypothesis:&lt;/em&gt; Overhead &amp;lt;5%.&lt;br&gt;
&lt;em&gt;Measurement:&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;baseline: 184.88s | coverage: 221.78s -&amp;gt; overhead +19.96% (target &amp;lt;5% REFUTED)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;coverage.py&lt;/code&gt; was &lt;strong&gt;~1.5x slower&lt;/strong&gt; than our lightweight plugin. &lt;code&gt;sys.monitoring&lt;/code&gt; remains a validation oracle for spot-checks, while &lt;code&gt;sys.settrace&lt;/code&gt; stays as the main execution driver.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;static-companion-not-a-replacement-exp-9-&quot;&gt;Static Companion — Not a Replacement (Exp 9)&lt;/h3&gt;
&lt;p&gt;We evaluated a full static score (AST L1 calls / L2 name tokens / L3 imports) against dynamic trace as ground truth.&lt;/p&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; margin: 1em 0;&quot;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style=&quot;border: 1px solid #ddd; padding: 8px; background-color: #4a90e2; color: white; text-align: left;&quot;&gt;Signal&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #ddd; padding: 8px; background-color: #4a90e2; color: white; text-align: left;&quot;&gt;Hit&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #ddd; padding: 8px; background-color: #4a90e2; color: white; text-align: left;&quot;&gt;Recall&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #ddd; padding: 8px; background-color: #4a90e2; color: white; text-align: left;&quot;&gt;Precision&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #ddd; padding: 8px; background-color: #4a90e2; color: white; text-align: left;&quot;&gt;Mean Candidates&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;&lt;strong&gt;L1 (direct calls from test body)&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;88.4%&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;30.3%&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;68.0%&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;2.9&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;&lt;strong&gt;L2 (name tokens)&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;17.7%&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;3.8%&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;12.1%&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;&lt;strong&gt;L3 (file imports)&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;91.6%&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;72.0%&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;21.8%&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;41.4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;&lt;strong&gt;Union (L1 + L2 + L3)&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;90.4%&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;70.0%&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;20.6%&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The initial assumption (&lt;em&gt;recall ≤ 30%&lt;/em&gt;) was wrong: &lt;strong&gt;union recall reached 70%&lt;/strong&gt;. Static signals were stronger than anticipated, but as a precise anchor L1 is narrow (precision 68%, 2.9 candidates), and as a wide net L3 is noisy (41.4 candidates).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Verdict:&lt;/strong&gt; Dynamic trace remains the edge driver; static analysis acts as a companion layer and candidate supplier for mock tests (which execute 0 real target functions dynamically).&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;portability-across-external-codebases-exp-16-&quot;&gt;Portability Across External Codebases (Exp 16)&lt;/h3&gt;
&lt;p&gt;Does this generalize beyond our own repo? We ran the tracer against external projects:&lt;/p&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; margin: 1em 0;&quot;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style=&quot;border: 1px solid #ddd; padding: 8px; background-color: #4a90e2; color: white; text-align: left;&quot;&gt;Project&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #ddd; padding: 8px; background-color: #4a90e2; color: white; text-align: left;&quot;&gt;Language&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #ddd; padding: 8px; background-color: #4a90e2; color: white; text-align: left;&quot;&gt;Tests&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #ddd; padding: 8px; background-color: #4a90e2; color: white; text-align: left;&quot;&gt;Linked %&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #ddd; padding: 8px; background-color: #4a90e2; color: white; text-align: left;&quot;&gt;Overhead&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;&lt;strong&gt;gemma_agent&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;Python&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;2882 (2874 pass)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;&lt;strong&gt;97.3%&lt;/strong&gt; (2805)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;&lt;strong&gt;+17.4%&lt;/strong&gt; (71.4s vs 60.8s)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;&lt;strong&gt;commit-&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;Python&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;27&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;&lt;strong&gt;100%&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;N/A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;&lt;strong&gt;codebase-memory-mcp&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;Go&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;27 test funcs&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;—&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #ddd; padding: 8px;&quot;&gt;&lt;code&gt;go test&lt;/code&gt;: 51.0% pkg / &lt;strong&gt;22.2% per-test&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Linked % on clean (non-mocked) third-party projects proved &lt;strong&gt;higher&lt;/strong&gt; than on our own codebase (which relies heavily on mocks). The limitation is honest: dynamic execution is currently &lt;strong&gt;Python-only&lt;/strong&gt;; Go and TS require per-test tooling (e.g., &lt;code&gt;go test -coverprofile&lt;/code&gt; across N executions). PropertyGraph itself is polyglot, but the edge builder remains Python-first.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;and-now-edges-met-the-consumer-e17-&quot;&gt;And Now: Edges Met the Consumer (E17)&lt;/h3&gt;
&lt;p&gt;Everything prior built &lt;code&gt;test ──TESTS──&amp;gt; function&lt;/code&gt; edges inside PropertyGraph without leveraging them during search. E17 closed the loop:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Data:&lt;/strong&gt; 1,727 tests → &lt;strong&gt;16,172 TESTS edges&lt;/strong&gt;, 1,595 Test nodes, 1,132 covered functions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Implementation:&lt;/strong&gt; &lt;code&gt;SymbolIndexAdapter.get_tests_for_symbol()&lt;/code&gt; (incoming &lt;code&gt;TESTS&lt;/code&gt; edges) + &lt;code&gt;Searcher._append_tests_signal()&lt;/code&gt;: appends up to 3 tests per function (capped at &lt;code&gt;min(len, 6)&lt;/code&gt; per query), &lt;code&gt;graph_score = 0.4&lt;/code&gt; vs 1.0 for definitions, sentinel &lt;code&gt;chunk_index = -(20_000_000 + line)&lt;/code&gt; avoiding collisions with code chunks in RRF ranking.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Toggle:&lt;/strong&gt; &lt;code&gt;MSCODEBASE_TESTS_SIGNAL&lt;/code&gt;, &lt;strong&gt;off by default&lt;/strong&gt; — production behavior remains bit-for-bit untouched.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A/B evaluation on a live PropertyGraph (7 target functions, true answers from trace):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;hit@1: off=7/7, on=7/7 | hit@3: 7/7 | MRR(function): off=1.000, on=1.000
TESTS-signal: 6/7 queries received relevant covering tests in the response
graph_stage avg dt: off=3.43ms, on=3.27ms (within noise floor)
RETRACTION: 0 broken links (all files verified on disk)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The core invariant holds — &lt;strong&gt;function definitions are never displaced by test results&lt;/strong&gt; (&lt;code&gt;MRR = 1.0&lt;/code&gt; in both arms): tests follow strictly as secondary context.&lt;/p&gt;
&lt;h4 id=&quot;wide-panel-35-queries-functions-with-most-tests-edges-&quot;&gt;Wide Panel (35 queries, functions with most TESTS edges)&lt;/h4&gt;
&lt;p&gt;To validate beyond the narrow 7-query panel, we ran a wide panel of 35 identifier queries (functions with the most TESTS edges):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;hit@1: off=33/35 (94.3%), on=33/35 (94.3%)
hit@3: off=34/35 (97.1%), on=34/35 (97.1%)
MRR(function): off=0.957, on=0.957
TESTS-signal: 34/35 queries received new covering tests (97.1%)
graph_stage avg dt: off=6.52ms, on=7.53ms (overhead +15.3%)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Critical finding:&lt;/strong&gt; TESTS-signal &lt;strong&gt;does not improve hit@1&lt;/strong&gt; (off=on). It only &lt;strong&gt;adds context&lt;/strong&gt; (tests) to already-found results: 97.1% of queries received new covering tests. This means TESTS-signal is &lt;strong&gt;context for LLM&lt;/strong&gt;, not a search improvement. If LLM doesn't use tests, the signal is useless.&lt;/p&gt;
&lt;h4 id=&quot;language-coverage-critical-limitation-&quot;&gt;Language Coverage (Critical Limitation)&lt;/h4&gt;
&lt;p&gt;TESTS-signal works &lt;strong&gt;only for Python&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Python:&lt;/strong&gt; 34.0% of functions covered by TESTS edges (1,108/3,256)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Other (Go, Rust, etc.):&lt;/strong&gt; 0% (716 functions without TESTS edges)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;TypeScript:&lt;/strong&gt; 0% (11 functions without TESTS edges)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For non-Python projects, TESTS-signal &lt;strong&gt;does not work at all&lt;/strong&gt;. Dynamic trace (pytest + sys.settrace) collects edges only for Python. For Go/TS, a separate connector is needed (go test -coverprofile, Jest coverage), but this &lt;strong&gt;is not done&lt;/strong&gt;.&lt;/p&gt;
&lt;h4 id=&quot;red-team-5-5-attacks-repelled&quot;&gt;Red Team: 5/5 Attacks Repelled&lt;/h4&gt;
&lt;p&gt;We tested TESTS-signal against 5 attack vectors:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;Concurrency:&lt;/strong&gt; 10 threads × 100 calls = 1,000 calls in 17.2s, 0 errors&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Boundaries:&lt;/strong&gt; function with 234 tests = 16.11ms (acceptable)&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Abuse:&lt;/strong&gt; query for nonexistent function = 0 results (graceful degradation)&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;TOCTOU:&lt;/strong&gt; graph closed between calls = graceful degradation&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Dependency failure:&lt;/strong&gt; PropertyGraph with nonexistent path = 0 results (graceful degradation)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt; TESTS-signal is resilient to concurrency, boundaries, abuse, TOCTOU, and dependency failures.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-could-go-wrong&quot;&gt;What Could Go Wrong&lt;/h3&gt;
&lt;p&gt;A transparent list of risks and open validation items. (Full numbers for the A/B and red-team results are in the E17 section above — this list stays to the takeaways and the fixes.)&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Evaluation scope.&lt;/strong&gt; While expanded to a 35-query panel, evaluation is still performed on a single primary codebase without deep reranker interaction.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;A/B did not improve hit@1.&lt;/strong&gt; See &quot;Wide Panel&quot; above — TESTS-signal &lt;strong&gt;does not help find the function&lt;/strong&gt;. It only &lt;strong&gt;adds context&lt;/strong&gt; to already-found results.&lt;br&gt;
→ &lt;strong&gt;Conclusion:&lt;/strong&gt; TESTS-signal is &lt;strong&gt;context for LLM&lt;/strong&gt;, not a search improvement.&lt;br&gt;
→ &lt;strong&gt;Risk:&lt;/strong&gt; if LLM doesn't use tests, the signal is useless.&lt;br&gt;
→ &lt;strong&gt;Fix:&lt;/strong&gt; verify on real LLM pipeline (not in this experiment).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Overhead +15.3% for wide panel&lt;/strong&gt; (6.52ms → 7.53ms avg graph_stage time). For bootstrap (one-time run) this is acceptable. For prod search — may be critical with many queries.&lt;br&gt;
→ &lt;strong&gt;Risk:&lt;/strong&gt; at 1000 queries/sec, overhead may be noticeable.&lt;br&gt;
→ &lt;strong&gt;Fix:&lt;/strong&gt; cache TESTS-signal (not done).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Language limitation.&lt;/strong&gt; Dynamic trace is currently Python-only (~34% function coverage in Python, 0% in JS/TS/Go).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;graph_score = 0.4&lt;/code&gt; is an empirical constant.&lt;/strong&gt; Chosen to stay strictly below function definitions, but unverified against BM25/reranker weight interactions.&lt;br&gt;
→ Verify on full pipeline; constant may become a parameter.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Pointer &lt;code&gt;:0&lt;/code&gt;.&lt;/strong&gt; Test nodes from dynamic trace lack line numbers (&lt;code&gt;line=0&lt;/code&gt;). Indexers must resolve test decorator line positions before enabling in prod.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Hub-function noise.&lt;/strong&gt; &lt;code&gt;safe_mkdir&lt;/code&gt; linked to 234 tests yields low-signal noise. The cap of 3 tests prevents payload flooding but doesn't solve irrelevance.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Dependence on a green test suite.&lt;/strong&gt; On broken test suites, trace degrades (failing tests = missing edges). Bootstrap applies to stable branches only.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Mock tests are blind.&lt;/strong&gt; 10.2% of tests execute 0 src functions; static companions cover 88 of 176, but not all.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Graph reindex drift.&lt;/strong&gt; Rebuilding the PropertyGraph may alter node ordering slightly.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;CI scale limit.&lt;/strong&gt; Running trace on 100k+ test suites may breach CI execution windows.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Clean-state status.&lt;/strong&gt; Verification was executed locally; clean CI state verification requires a PR merge.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;h3 id=&quot;acknowledgments&quot;&gt;Acknowledgments&lt;/h3&gt;
&lt;p&gt;A huge thank you to everyone who engages with these posts in the comments. Your feedback, real-world observations, counter-examples, and benchmark numbers directly shape these experiments. This kind of open technical critique is what keeps engineering honest.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;a-note-on-how-this-was-written&quot;&gt;A note on how this was written&lt;/h3&gt;
&lt;p&gt;Every experiment, bug, failure, and idea here is mine — I earned them the hard way, in production, in public. AI worked as my editor: it helped me structure thoughts and polish my English. It did not invent the facts, because it has none of its own.&lt;/p&gt;
&lt;p&gt;No AI detectors were consulted in the making of this disclosure. They have enough trouble agreeing on what I am.&lt;/p&gt;
&lt;hr&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Disclaimer &amp;amp; Status:&lt;/strong&gt; draft (source-material for the article). This is not a &quot;feature advertisement&quot;, but an honest engineering story: figures are reproducible, weak points are named, and unaddressed risks are listed in the &quot;What Could Go Wrong&quot; section.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/28140/from-a-test-suite-trace-to-a-search-signal-the-bootstrap-pipeline-story</guid>
<pubDate>Tue, 22 Sep 2026 10:27:33 +0000</pubDate>
</item>
</channel>
</rss>