Send both morning reports at one configurable time, as Block Kit - #16
Merged
Conversation
The daily digest and the quarterly reminder each had their own cron expression (DIGEST_CRON, QUARTERLY_CRON), which let the two drift apart. Both now fire at a single `report-time` setting — HH:MM in the workspace timezone, resolved database -> REPORT_TIME env seed -> 08:00 — editable from the web configuration page and `/hawkmod config` through the shared validator. Saving a new time reschedules the cron jobs immediately, the same argument as the role-group re-sync: leaving it until tomorrow would mean the setting looked applied and was not. The quarterly reminder keeps its own calendar and borrows only the clock time. Both reports also move from walls of mrkdwn to Block Kit: the digest groups findings by severity under a header, with per-finding lines shortened (the finding's own alert carries the kind, buttons, and detail) and long lists chunked under Slack's section limit; the quarterly reminder gets a field grid for the roster and sign-off numbers. Same rule as before: findings are named, content never appears, and a clean day still posts nothing. 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
The two morning reports — the daily open-findings digest (was 8:00 via
DIGEST_CRON) and the quarterly audit reminder (was 9:00 viaQUARTERLY_CRON) — now both fire at a singlereport-timesetting, and both are rendered as Block Kit instead of walls of text.One time, one setting
report-timesetting (HH:MM, 24-hour, workspaceTZ), following the existing resolution rule: database →REPORT_TIMEenv seed →08:00default.DIGEST_CRONandQUARTERLY_CRONare gone fromconfig.ts,.env.example, anddocker-compose.yml./configpage and/hawkmod config set report-time 07:30— both doors go through the one validator insettingsAdmin.ts(newtimekind; normalizes7:30→07:30, refuses non-times).rescheduleReports()), same argument as the role-group re-sync: leaving it until tomorrow would mean the setting looked applied and was not. The confirmation names the next run.REPORT_TIMEenv var falls back to the default with a warning rather than silencing the reports.Prettier reports
snake_casekind is dropped — the finding's own alert carries kind, buttons, and detail), 20-item cap with "…and N more", lines chunked into sections to stay under Slack's 3000-char limit, context footer pointing at/hawkmod status.Notes for review
parseReportTimeis pure and lives insettings.tsnext toparseHandles; the scheduler and validator share it. Tests intest/settings.test.ts.npm run typecheck && npm test && npm run format:check && npm run buildall pass (117 tests).🤖 Generated with Claude Code