Add --from/--to closed-window filter to report and stats#8
Merged
Conversation
The report command only supported --since (relative window "last N
days/months"). stats was the same. Users wanting a past quarter or a
release-to-release window had to either re-run extract (heavy, costs
minutes on large repos) or fall back to diff — which outputs a
comparison table instead of a full report/stats view.
Add --from and --to on both report and stats (already existed on
diff). Dates are YYYY-MM-DD, both boundaries inclusive, UTC day
granularity (matches LoadOptions.From/To semantics already used by
diff). --since and --from/--to are mutually exclusive at the CLI
layer — both specify a window and combining them is ambiguous
("does --since shift --from forward, or override it?"). --from >
--to is rejected up front.
Parity check: "Q1 2025 on pi-hole" returns 156 commits / 17 devs
under both `stats --stat summary` and `report`, with boundaries
2025-01-01 through 2025-03-31 inclusive. Edge cases verified:
open-forward (only --from), open-backward (only --to), single-day
window, and pre-repo-birth empty window (0 commits, graceful).
Filter lives at load time, not extract time — consistent with the
design principle that extract produces canonical raw data and
consumers apply analytical lenses. Rename chains stay intact in the
JSONL; only what gets displayed changes.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Owner
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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.
The report command only supported --since (relative window "last N days/months"). stats was the same. Users wanting a past quarter or a release-to-release window had to either re-run extract (heavy, costs minutes on large repos) or fall back to diff — which outputs a comparison table instead of a full report/stats view.
Add --from and --to on both report and stats (already existed on diff). Dates are YYYY-MM-DD, both boundaries inclusive, UTC day granularity (matches LoadOptions.From/To semantics already used by diff). --since and --from/--to are mutually exclusive at the CLI layer — both specify a window and combining them is ambiguous ("does --since shift --from forward, or override it?"). --from > --to is rejected up front.
Parity check: "Q1 2025 on pi-hole" returns 156 commits / 17 devs under both
stats --stat summaryandreport, with boundaries 2025-01-01 through 2025-03-31 inclusive. Edge cases verified: open-forward (only --from), open-backward (only --to), single-day window, and pre-repo-birth empty window (0 commits, graceful).Filter lives at load time, not extract time — consistent with the design principle that extract produces canonical raw data and consumers apply analytical lenses. Rename chains stay intact in the JSONL; only what gets displayed changes.