Aller au contenu
login
arrow_backRetour aux issues
vshulcz/deja-vu #1403

brief counts the same events as recalls today and not this week

ecoDébutant good first issue

descriptionDescription

`deja brief` prints two lines that cannot both be true. The same events are recalls in the first and not recalls in the second, so the day can hold more of them than the week containing it. `usage.TodayWithInjections` counts `hook`, `deja-vu` and `tool` events as recalls. `usage.Week` counts the same three as injections and leaves them out of its recall figure. Five hook injections and nothing else, measured: ``` today: recalls=5 bytes=2000 injected=2000 week : recalls=0 bytes=0 injected=5 ``` Which is printed as: ``` today 1 session · 5 recalls served (2.0 kB) this week 1 session · 0 recalls ``` The statusline reads the same two figures the same way, and `deja stats` splits them deliberately — "N recalls by your agents ... (plus M auto-injections)" — so the split itself is intended somewhere. What is not intended is one screen using both definitions without saying so. It also breaks the suppression #842 added: `weekEchoesToday` compares `weekRecalls == recalls`, two counts that mean different things, so the week line survives the check precisely when it is about to print a smaller number than the line above it. Two ways out, and the choice is a product one rather than a fix: 1. **Auto-injections are recalls everywhere.** `Week` counts them the way `Today` does. The week number grows for everyone, and "recall" means "memory reached an agent", however it got there. `stats` keeps its separate line for the breakdown. 2. **Auto-injections are not recalls anywhere.** `Today` stops counting them, and the statusline's headline number drops for anyone relying on hooks rather than the MCP tool. Closer to "a recall is something an agent asked for". Either way both screens should say the same thing. I have not touched it — it changes a number people read every day. Found by the night hunt, iteration 88.
codeOuvre sur GitHub