fix: read /status token usage from SQLite session stats#13404
Closed
wbsch52 wants to merge 1 commit into
Closed
Conversation
|
🤖 Automated PR Review\n\n### Security Scan\n- ✓ No hardcoded secrets found\n- ✓ No SQL injection vectors\n- ✓ No path traversal risks\n- ✓ No unsafe deserialization\n- ✓ No command injection\n\n### Code Quality\n- ✓ Clean implementation\n- ✓ Tests included/updated\n- ✓ No code duplication detected\n\n### Summary\n✓ Automated review complete. No concerns detected. |
19 tasks
Collaborator
|
Likely duplicate of #13820 — same root cause: /status reading stale SessionStore instead of SQLite SessionDB for token totals. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/statusread token totals from the SQLite session record firstRoot cause
Gateway token accounting is now persisted directly into
state.db, but/statusstill displayedsession_storeJSON metadata. That JSON path no longer updates token totals, so/statuscould show0even when the session had real usage recorded in SQLite.Testing
source venv/bin/activate && pytest tests/gateway/test_status_command.py -qsource venv/bin/activate && pytest tests/gateway/test_status_command.py tests/gateway/test_unknown_command.py -q