Repository navigation
Token volume per bucket, and the two security counts a window can report - #20
Merged
Merged
Conversation
…an report Three additions the overview needs. **Grouped cost buckets carry token volume too.** The overview's trend chart is about to become switchable between money and usage, and those two have different shapes: one opus burst dominates a cost chart and flattens the week around it, while in token terms the same burst sits in proportion. All four token classes are returned separately — their unit prices differ by more than tenfold, so a single sum neither adds back up to the money nor says whether the time was spent writing new context or reading cache. **Redactions are recorded.** They were deliberately dropped before, as "request detail, not another row" — except the detail was not stored either. The consequence only shows up after a user switches outbound redaction from observe to enforce: observe mode leaves evidence behind in /leaks, enforce mode replaced the secrets in place and left nothing, so the panel goes quiet exactly when protection is at its strongest. The column is nullable, like tool_calls: "redaction was off" and "redaction was on and replaced nothing" are different facts. Only the count is stored — what was replaced is precisely what must not be written down. **Summary reports flagged and redacted request counts** for the window, so a security panel can say what each defence actually saw rather than only which mode it is in. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Thanks for the PR. One thing before review: this targets
No need to close and reopen: click Edit next to the PR title and change the base branch to See CONTRIBUTING.md and CONTRIBUTING.md for the branch contract. |
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.
Three additions the desktop overview needs.
Grouped cost buckets carry token volume
The trend chart is becoming switchable between money and usage, and the two have different shapes — one opus burst dominates a cost chart and flattens the week around it, while in token terms the same burst sits in proportion.
All four token classes come back separately: their unit prices differ by more than tenfold, so a single sum neither adds back up to the money nor says whether the time went on writing new context or reading cache.
Redactions are recorded
Event::Redactedwas deliberately dropped by the recorder as "request detail, not another row" — except the detail was not stored either. The consequence only appears once a user switches outbound redaction from observe to enforce: observe mode leaves evidence in/leaks, enforce mode replaced the secrets in place and left nothing behind, so the panel goes quiet exactly when protection is strongest.The column is nullable, like
tool_calls: "redaction was off" and "redaction was on and replaced nothing" are different facts. Only the count is stored — what was replaced is precisely what must not be written down.Schema 8 → 9. The migration test that fails whenever a column is added without updating it did its job.
Summary reports the two security counts
flagged_requestsandredacted_requestsfor the window, so a security panel can report what each defence actually saw rather than only which mode it is in.Gates
cargo fmt --all -- --check,cargo clippy --workspace --all-targets -- -D warnings,cargo test --workspace(61 binaries green),./scripts/smoke.sh(46 passed, 0 failed).🤖 Generated with Claude Code