From 52d2445f8b8a264453ba0e346b3f80ca5c79987d Mon Sep 17 00:00:00 2001 From: Andrew Hundt Date: Thu, 26 Mar 2026 05:31:05 -0400 Subject: [PATCH] autotune.py: set DEFAULTS to best experiment results (calls_boost_excl_tests) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previous defaults: edge_weight_calls=1.0, edge_weight_usage=0.7, key_functions_exclude="" (no exclusions). What changed: - scripts/autotune.py DEFAULTS: edge_weight_calls 1.0 → 2.0 (call edges are the strongest signal for production importance) - scripts/autotune.py DEFAULTS: edge_weight_usage 0.7 → 0.3 (type-reference edges add noise, dampening improves ranking signal) - scripts/autotune.py DEFAULTS: key_functions_exclude "" → "graph-ui/**, tools/**,scripts/**,tests/**" (excluding non-production paths surfaces core library functions instead of test helpers) Why: autotune run on 2026-03-26 scored calls_boost_excl_tests at 6/30 across 3 repos (codebase-memory-mcp, autorun, rtk), best of 8 experiments. Baseline scored 0/30. These defaults are now the baseline that experiments diverge from, so future autotune runs search the config space around the current best. Testable: python3 scripts/autotune.py (baseline_25 now starts from these values) Signed-off-by: Andrew Hundt --- scripts/autotune.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/autotune.py b/scripts/autotune.py index d33e51609..7eaf6b6ca 100644 --- a/scripts/autotune.py +++ b/scripts/autotune.py @@ -127,16 +127,18 @@ REPOS: list[Repo] = [ # ── Config defaults ─────────────────────────────────────────────────────────── +# Best values from autotune run 2026-03-26: calls_boost_excl_tests scored 6/30 +# (boosting call edges and excluding test/UI/tooling paths surfaces prod functions). # Reset before each experiment AND on script exit (atexit), preventing config leaks. DEFAULTS: dict[str, str] = { - "edge_weight_calls": "1.0", - "edge_weight_usage": "0.7", + "edge_weight_calls": "2.0", # boosted: call edges are strongest signal + "edge_weight_usage": "0.3", # dampened: type-reference edges add noise "edge_weight_defines": "0.1", "edge_weight_tests": "0.05", "edge_weight_imports": "0.3", "key_functions_count": "25", - "key_functions_exclude": "", + "key_functions_exclude": "graph-ui/**,tools/**,scripts/**,tests/**", "pagerank_max_iter": "20", }