You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(plugin): insights shows the keep-alive saving with the wrong sign #582
/context-guru:insights shows the keep-alive saving with the wrong sign. When pings save more than they cost, the "Keep-alive pings" row shows a large negative number. The rows also do not add up to the "Saved" headline.
What we found
Example /api/stats waterfall for a 7-day window (rounded numbers):
Waterfall key
delta_usd
compaction
-80
keepalive_saved
-120
keepalive_ping
60
cg_llm
6
total_saved
134
Insights shows "Keep-alive pings" as -120 - 60 = -$180.
The correct row is 120 - 60 = +$60. The flat field keepalive_net_usd agrees.
With the fix, the rows add up to the headline: 80 + 60 - 6 = 134. Today they do not.
Why it happens
In the waterfall, a saving is a negative delta_usd. levers() in context-guru-plugin/scripts/cg.py negates compaction, but it uses keepalive_saved as it is:
Activity
fix(plugin): insights shows savings with the right sign (#583)
docs(readme): re-render the insights screenshot after the #582 fix
docs(readme): replace the plugin section with "What's cool" (#579)