v0.20.0: the waste ledger — see what you paid for and didn't use - #6
Open
lroolle wants to merge 4 commits into
Open
v0.20.0: the waste ledger — see what you paid for and didn't use#6lroolle wants to merge 4 commits into
lroolle wants to merge 4 commits into
Conversation
…input jq's `catch .` binds the error MESSAGE as the value, not the original input. Snapshots with an empty or unparseable five_hour.resets_at all normalized to the same error string — one shared fake window identity — so the pct_per_window pair walk could pair samples across real windows. Observed on real data: phantom window transitions and a skewed ratio (9.91 -> 10.06 after the fix on the same log). Normalize via a named def that treats empty as empty and falls back to the raw string on parse failure. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
`statusline.sh report [--days N]` replays usage.jsonl and ledgers every closed window: 7d closes as used%/expired% (converted to 5h-windows-worth via the learned pct_per_window ratio), 5h closes as count/avg/capped, plus the week in progress projected with the same learned walk the advisor uses — the surfaces cannot disagree. A window closes when consecutive samples disagree on resets_at, normalized to the minute (the ratio learner's identity rule). The advisor prevents waste prospectively; this proves it retroactively. Every usage snapshot now also logs limits[] (scoped weekly caps, verbatim), model (id active in the logging session), and predicted_end — the learned walk's projection at sample time, the calibration seed that lets closed windows score the forecast later. Learning lags logging by weeks; a field absent today is a pattern that can't be learned next month. Subcommands dispatch after all function definitions, take no stdin, and are read-only against the state dir. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CHANGELOG entry, README section with a real ledger example, state-dir contract gains the widened usage.jsonl fields (limits, model, predicted_end) and names report as the reference consumer, counts synced to 327 tests across README / llms.txt / site. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 29, 2026
Stacked PRs (base = a feature branch) got no checks under the branches:[main] filter; judgment should not depend on where a PR points. Push triggers stay main-only. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What
statusline.sh report [--days N]— replay the usage log the statusline has been writing all along, and ledger every closed window: what you used, what expired.That
expired 49%line is the subscription math nobody shows you. The advisor (v0.19) prevents waste prospectively; this proves it retroactively — both read the same learnedpct_per_windowratio and the same weekday walk, so the surfaces cannot disagree.Also in here
usageline now logslimits[](scoped weekly caps),model, andpredicted_end(the learned walk's projection at sample time — the calibration seed: once windows close, predictions can be scored against observed finals). Learning lags logging by weeks; fields absent today are patterns that can't be learned next month.catch .yields the error message, not the input — every empty/unparseableresets_atnormalized to one shared fake window identity and could pair across real windows in the ratio learner (phantom closes, skewed ratio: 9.91 → 10.06 on the same log). Both norm sites fixed.Verification
reportdocumented as its reference consumerMerge order note: two follow-up PRs stack on this branch (
check/session-summary, then the agent skill). Tag + GitHub release after merge.🤖 Generated with Claude Code