Commit 32ede68
release: v1.108.188 — telemetry rows land in the store the caller named
Every reader of the perf database took a base path — ranking_db_query,
WeightTuner, analyze_perf — but the writers passed none. Writes resolved
through _State._base_path, which is whatever the first caller of
_ensure_loaded happened to pass, and most savings writes pass nothing. So it
was usually None and every row landed in ~/.code-index no matter which
storage_path the tool was handed.
Measured with a fresh tracker state and a boxed home: five producers wrote
five rows to the default store while ranking_db_query against the named store
returned zero. WeightTuner on a non-default store was therefore learning from
a ledger the searches had never written to. On a default install writer and
reader coincide, which is why this stayed invisible.
Both tables in that file had it. ranking_events gets base_path at all six
producer call sites via the new tools._utils.ledger_base_path, and tool_calls
gets it from the dispatcher, which already extracts repo from the same
arguments. analyze_perf reads both through one base path.
_perf_db_failed now covers the default database only: one unwritable
caller-supplied store must not disable telemetry for every other store. An
explicit base path is not cached, because it belongs to one call.
Deliberately unchanged: where the savings total lives. That counter is a
process-global lifetime total loaded once, and re-anchoring it mid-process
would move a user's cumulative savings between files. Pinned by a test.
Nine tests from 1.108.186 and 1.108.187 were corrected: their fixtures put the
ledger in a different directory from the storage path and captured rows only
because writes ignored storage_path. Both releases' pins were re-verified as
non-vacuous afterwards.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 38b28f9 commit 32ede68
12 files changed
Lines changed: 428 additions & 21 deletions
File tree
- src/jcodemunch_mcp
- storage
- tools
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
5 | 67 | | |
6 | 68 | | |
7 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | | - | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments