Sprint C: author-filtered stats scan, release cadence + repo size, weekly digest
- src/stats/: OwnEmailMatcher (config emails + GH no-reply per account) + git-side --author filtering (cheap even on the pterodactyl fork's 4700+ commits); streak (current/longest, midnight-grace rule), 52-week heatmap, day/hour histograms — one scan feeds all of them, data layer only for now (visual Stats-tab redesign stays in Sprint D's mockup-first cycle) - src/stats/cadence.rs: release cadence (median tag gap, local tags, Tier A) - src/stats/size.rs + cache.rs: git-object vs working-tree size, persisted in new ~/.vulp/stats_cache.toml (max 1 sample/day), recorded only during [R]/vulp refresh — confirms vulp's own filter-repo cleanup (539MB->834KB) - src/digest.rs: WeeklyDigest struct + 3 renderers (Discord embed/markdown archive/plaintext); vulp digest [send discord|webhook <url>] CLI, webhook stored via existing auth token store (~/.vulp/.tokens, 0600), never logged; send respects --dry-run - TUI: [d] on Stats previews the digest in a Modal::Info before anything is ever sent - fix: list_contributors used --all (double-counts after fetching remotes), now --branches - config: stats_author_emails field (TUI-editable) - verified: streak/delta/top-repo/release math against a hand-built commit history, webhook validation+permissions, dry-run, real refresh (51 repos, vulp's own entry confirms the filter-repo win), TUI preview via pyte
This commit is contained in:
1 parent
d99660420f
commit
14ef7fb06c
20 files changed
+890
-3
No files matched your search
+22
@@ -36,6 +36,10 @@ vulp <command> [--json] # non-interactive (scripts/AI)
|
||||
- **Secret scan**: `sync --action commit-push` refuses to commit staged
|
||||
changes that look like credentials (see Git operations); override with
|
||||
`--allow-secrets`.
|
||||
- **Discord webhook secret**: `vulp digest webhook <url>` stores the URL in
|
||||
`~/.vulp/.tokens` (mode 0600) the same way provider tokens are stored —
|
||||
never in `config.toml`, never printed back, never logged. Whoever has the
|
||||
URL can post to (and edit/delete messages in) that channel.
|
||||
- **`VULP_AGENT`** (env var, any non-empty value): every activity-log entry
|
||||
written while it's set gets a `· via agent` marker in its detail, so human
|
||||
and agent actions are distinguishable in `vulp activity` and the TUI feed.
|
||||
@@ -139,6 +143,24 @@ review and commit the file yourself. Defaults come from config:
|
||||
`default_license` (mit) and `license_holder` (falls back to
|
||||
`git config user.name`, then the account username).
|
||||
|
||||
## Weekly digest
|
||||
|
||||
```
|
||||
vulp digest [--json] # build + print this week's digest, archive to ~/.vulp/digests/
|
||||
vulp digest send discord # also POST it to the saved Discord webhook
|
||||
vulp digest webhook <url> # store/replace the webhook URL (secret — see Guardrails)
|
||||
```
|
||||
|
||||
The digest counts only **your own** commits — filtered by `stats_author_emails`
|
||||
(config; falls back to `git config user.email`) plus each configured
|
||||
account's GitHub no-reply address — not every commit in the workspace
|
||||
(most repos here are 90%+ upstream/fork history). It reports: own commits
|
||||
this week vs last week, active days, current streak, top 3 repos by own
|
||||
commits, local tags created this week, PR/issue open+merged/closed counts
|
||||
(provider search API, needs an account), and todos added/done. Every build
|
||||
is archived to `~/.vulp/digests/<ISO-week>.md` regardless of `send`.
|
||||
`digest send discord` respects global `--dry-run`.
|
||||
|
||||
## Recipes for AI agents
|
||||
|
||||
```bash
|
||||
|
||||
Reference in new issue
Block a user