feat(notifications): schedule the maintainer recap job on a configurable cadence - #4418
Conversation
…ble cadence Adds the cron trigger for the cross-repo maintainer recap digest (JSONbored#1963): a new generate-maintainer-recap job enqueues on a configurable daily/weekly cadence (GITTENSORY_RECAP_CADENCE, default weekly) behind the GITTENSORY_MAINTAINER_RECAP flag, gathering each scanned repo's gate-precision and outcome-calibration data into one RecapReport and delivering it to Discord.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4418 +/- ##
=======================================
Coverage 93.96% 93.97%
=======================================
Files 401 402 +1
Lines 36913 36954 +41
Branches 13497 13507 +10
=======================================
+ Hits 34687 34729 +42
Misses 1570 1570
+ Partials 656 655 -1
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-09 17:23:50 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 6 non-blocking
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Summary
generate-maintainer-recapjob type, gated behindGITTENSORY_MAINTAINER_RECAP(default off), enqueues on a configurableGITTENSORY_RECAP_CADENCE=daily|weeklycadence (default weekly,GITTENSORY_RECAP_HOUR/GITTENSORY_RECAP_DAYpick when) — following the exactisHourly/hour/getUTCDayenqueue idiom already used forgenerate-weekly-value-reportandprune-retention.runMaintainerRecapJob,src/review/maintainer-recap-wire.ts) scans registered (preferring agent-configured) repos, folds each repo's already-computed gate-precision + outcome-calibration reports into oneRecapReportvia the existingbuildMaintainerRecap(feat(notifications): pure maintainer-recap builder — aggregate review activity into a RecapReport #2239), and delivers it through the existingdeliverRecapToDiscord(feat(notifications): Discord delivery for the maintainer recap digest (reuse discord-notify) #2245). A per-repo aggregator failure is logged and skipped so one repo's D1 hiccup never blanks the whole digest, mirroringops-wire.ts'srunOpsAlerts.Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #2248.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally — 100% branch coverage on every changed line (verified via lcov.info against the diff).npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderate— 0 vulnerabilitiesnpm run test:cigreen (both before and after rebasing onto the latestmain).Test coverage added:
test/unit/maintainer-recap-wire.test.ts:isRecapEnabledon/off convention;shouldFireMaintainerRecapcadence gate — default weekly (Monday 14:00 UTC) fires only there, explicitweekly,dailycadence (fires every day, ignores day-of-week), an invalid cadence value falling back toweekly(notdaily), custom hour/day-of-week, out-of-range (but finite) hour/day clamping, non-finite hour/day falling back to the default;runMaintainerRecapJob— cross-repo aggregation across multiple repos, default vs. customwindowDaysthreaded through, preferring agent-configured repos over the full registered set, falling back to every registered repo when settings resolution errors for every repo (a settings blip must not abort the scan), a per-repo aggregator failure being logged/skipped without aborting the job, and still delivering a zeroed report when there are no registered repos.test/unit/index.test.ts: the cron enqueues the job only when the flag is on and the cadence tick matches (flag-off is byte-identical), does not enqueue outside the configured cadence, and honors a customdailycadence.test/unit/queue.test.ts: the processor runs the job end-to-end (through to a real Discord audit row) when the flag is on, and no-ops (no fetch, no audit row) when the flag is off — mirroring the existinggenerate-review-recapprocessor tests.Safety
UI Evidencesection. (N/A — no visible UI changes; backend-only.)UI Evidence
N/A — backend-only change (cron scheduling + queue processor), no UI surface touched.
Notes
GITTENSORY_MAINTAINER_RECAP=false): the cron enqueues zero new work and the worker is byte-identical to today until an operator opts in.