audit: a capped report says so, and the long reports page like git - #49
Merged
Conversation
Two halves of one complaint: jit audit --since 3d printed '50 events · 15:06–17:34' and the reader concluded three days of history had been deleted by an upgrade. Nothing was deleted — the default --limit 50 had cut the view, and the header then described its own page while appearing to describe the query. The header now measures the FULL match set before the cap: a '50 of 214 events' count, the query's true span, and failed/denied/decoy tallies that include rows the cap cut. The trailer's first hint becomes the way out (--limit 0, with the full count). An uncapped report renders byte-identical to before. And because 'all 2006 events' is only useful if you can read them, jit audit and jit scan now page through the user's pager on a terminal, git-style: $JIT_PAGER then $PAGER then less, LESS=FRX so one-screen output prints inline, --no-pager and PAGER=cat to opt out. The pager writer fronts only the command's output stream — os.Stdout itself is untouched, so color still sees a terminal and width still reads the real window. Spawned lazily on the first report byte, so scan's stderr progress trail stays visible; a typo'd $PAGER warns and prints straight through rather than feeding the report to a broken pipe. Piped or redirected output is byte-identical to before: the pager engages only on a real tty. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TXiT8qiEHcUyKDbSkofwT5
This was referenced Aug 13, 2026
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
Two halves of one reported complaint:
jit audit --since 3dprinted50 events · 15:06–17:34, and the reader reasonably concluded three days of history had been deleted by an upgrade. Nothing was deleted — the default--limit 50had cut the view, and the header then described its own page while appearing to describe the query.The header speaks for the query
50 of 214 events, the query's true span, and failed/denied/decoy tallies that include rows the cap cut.jit audit --limit 0 all 214 events.The long reports page, git-style
jit auditandjit scannow page through the user's pager on a terminal:$JIT_PAGER→$PAGER→less, withLESS=FRXset only when unset (color through, one-screen output prints inline and stays in scrollback).--no-pagerorPAGER=catopt out.Design points:
os.Stdoutis untouched, so fatih/color still sees a terminal andtermtext.Width()still reads the real window. Color and full-width layout survive intoless -Rfor free.$PAGERwarns on stderr and prints straight through — the report must never vanish into a broken pipe.--followstays direct (a pager buffering an endless tail shows nothing).Testing
go test -race ./..., gofmt, vet, staticcheck, gosec,go mod verify/tidyclean; docs regenerated.--no-pageroverrides, pipes never spawn it, missing pager falls back with a warning.🤖 Generated with Claude Code
https://claude.ai/code/session_01TXiT8qiEHcUyKDbSkofwT5