v1.108.290 — Charging ourselves for the calls before the one that worked
analyze_regret gains an inflation block beside its six cluster signals, and
suggest_corrections and digest surface it. The clusters have always named
WHICH queries went wrong; this says what the wrongness cost.
Inflation is calls made over information needs served, where a need is
(session_uid, query_hash). A clean ledger reads 1.0; excess_calls counts
the calls that bought nothing. The shape follows
arXiv:2608.13571, which defines token
inflation as the ratio of true workflow cost to single-call cost. We had never
charged ourselves for that gap: _meta.tokens_saved reports the saving on the
call that worked and says nothing about the two before it.
Read-only, no new tables, no schema change, nothing billed. Requires
perf_telemetry_enabled like the rest of the ledger.
Three decisions worth stating
The basis is CALLS, not tokens, and the basis field says so on every shape.
ranking_events carries no token column. A ratio named after tokens while
counting calls would be measuring one thing and named for another; renaming it
needs a column, not a better adjective.
A NULL session_uid is UNKNOWN and excluded, never folded into a synthetic
session. That column was added by ALTER, so every earlier row carries NULL —
and treating NULL as one shared session fuses the entire historical ledger into a
single need with a spectacular fake ratio. The excluded count is reported.
repeats_after_index_change is disclosed and NOT subtracted. A re-ask after
the index moved under the query is arguably a different question, so it is
arguably not waste — but subtracting it lowers our own inflation number, and a
self-flattering adjustment applied silently is the one direction this metric must
not drift. Both numbers are reported; the reader can adjust.
Unmeasurable is a first-class answer and is passed through rather than omitted: a
caller who cannot see WHY the ratio is absent reads its absence as no inflation.
Also: the project brief rotates
CLAUDE.md reached 200,543 characters and stopped loading — while the
maintenance practice governing its size was being followed. That practice named
one section, and the section it named was 14% of the file. Closed history moved
verbatim to ISSUE-HISTORY.md: 200,543 → 113,054, nothing deleted, now gated by
a test. A rule that names one section licenses every other section to grow.
Verification
Suite 8105 passed, 17 skipped, 0 failed + ruff check src/ clean, and the
3.13 CI-env reproduce returns the same 8122 total AND the same skip split. All 9
CI jobs green on the released SHA.
Licence identifier is unchanged at LicenseRef-jCodeMunch-Dual-Use-1, so an
allowlist pinned to >=1.108.289 continues to match.