feat(notifications): config-as-code overrides for the maintainer recap cadence#4421
Merged
JSONbored merged 2 commits intoJul 9, 2026
Conversation
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
…p cadence Lets an operator set the cross-repo maintainer recap digest's enabled/cadence/channel knobs via the gittensory self-repo's .gittensory.yml maintainerRecap: block instead of only the GITTENSORY_MAINTAINER_RECAP/GITTENSORY_RECAP_CADENCE env vars. A present manifest block wins over the env vars, which stay the fallback when it is absent or invalid.
The engine copy's trustMaintainerAuthoredIssueForReward comment had drifted from its src/review/ twin after a recent merge, tripping the check-engine-parity tripwire for any branch based on current main. Comment-only resync, no logic change.
oktofeesh1
force-pushed
the
feat-maintainer-recap-config-override-2250
branch
from
July 9, 2026 17:43
dbfc954 to
e53472e
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4421 +/- ##
=======================================
Coverage ? 93.97%
=======================================
Files ? 411
Lines ? 37202
Branches ? 13587
=======================================
Hits ? 34962
Misses ? 1585
Partials ? 655
🚀 New features to boost your workflow:
|
JSONbored
approved these changes
Jul 9, 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.
Summary
enabled/cadence/channelknobs via.gittensory.ymlconfig-as-code instead of only theGITTENSORY_MAINTAINER_RECAP/GITTENSORY_RECAP_CADENCEenv vars (feat(notifications): config-as-code recap channel/cadence overrides in .gittensory.yml focus manifest #2250).maintainerRecap:block to the focus-manifest schema (packages/gittensory-engine/src/focus-manifest.ts), mirroring the existingreviewRecap:block's shape (no DB-backed counterpart; the parsed value IS the effective value). Invalidcadence/channelvalues fall back to their defaults (weekly/discord) via the sharednormalizeEnumhelper, with a warning.resolveMaintainerRecapManifestOverride(src/review/maintainer-recap-wire.ts) reads this block off the gittensory self-repo's manifest (resolveGittensorySelfRepoFullName) — a present block wins outright over the env vars for bothisRecapEnabledandshouldFireMaintainerRecap; absent/errored, the env vars decide exactly as before. Wired into both the cron enqueue path (src/index.ts) and the queue processor's defense-in-depth check (src/queue/processors.ts).src/selfhost/config-lint.ts'sTOP_LEVEL_FIELDSallowlist didn't recognizemaintainerRecap:, which would have produced a false "unknown top-level field" warning for a self-host operator using it (mirrors the existingrepoDocGeneration/reviewRecapregression tests for the same class of bug).A deliberate design deviation from the issue's literal citation
#2250 pointed at
resolveEffectiveSettings/src/settings/repository-settings.ts:34(i.e., wiring this throughRepositorySettings). I did not do that, on purpose:RepositorySettings/resolveEffectiveSettingsresolve settings per contributor repo, but the maintainer recap digest is an operator-level, cross-repo concern (one digest spanning every scanned repo) — there is no single contributor repo whose settings should govern it. Threading it throughRepositorySettingswould have also required updating theRepositorySettingsSchema/OpenAPI surface (ui:openapi:settings-parity) and the settings API routes for a field that isn't actually a per-repo setting.Instead, the override is resolved from the gittensory self-repo's own manifest (the repo this instance identifies as, via the existing
resolveGittensorySelfRepoFullNamehelper already used for other self-referential/operator-level lookups) — the same "config-as-code for an operator-level setting" shape, without inventing a fake per-repo scope for a setting that isn't per-repo. This keepsRepositorySettingsSchema/OpenAPI and the settings API completely untouched (verified:npm run ui:openapi:settings-paritypasses unchanged).Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #2250.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally — 100% branch coverage on every changed line, verified directly againstlcov.info(not just the aggregate report) for every touched file.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:openapi:settings-parity— unchanged (confirmsRepositorySettingswas deliberately left untouched, see above)npm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderate— 0 vulnerabilitiesnpm run test:cigreen (630 test files / 12,539 tests), verified both before and after rebasing onto upstreammain.Test coverage added:
test/unit/focus-manifest.test.ts: a fullmaintainerRecap:describe block mirroringreviewRecap:— omitted/null key, non-mapping value,enabledparse + non-boolean warning,cadenceparse + invalid-value fallback (bothdaily/weeklyand an invalid string),channelparse + invalid-value fallback (e.g.slack, since only Discord delivery exists for this digest today), round-trip throughmaintainerRecapConfigToJson, and the doc-token coverage test (.gittensory.yml.exampledocuments every field).test/unit/maintainer-recap-wire.test.ts:isRecapEnabled/shouldFireMaintainerRecap— a present manifest override winning over the env value in both directions, and falling back to env when not present;resolveMaintainerRecapManifestOverride— returns the configured block, returnspresent: falsewhen unconfigured, and degrades topresent: false(never throws) when the manifest load itself fails.test/unit/queue.test.ts/test/unit/index.test.ts: existing feat(notifications): schedule the recap job on the cron with a configurable cadence knob #2248 tests re-verified to still pass with the new override resolution wired into both the cron path and the processor's defense-in-depth check (a manifest-load fetch during these tests is now distinguished from the actual Discord webhook fetch).test/unit/focus-manifest-validation.test.ts: the normalized-JSON output includesmaintainerRecapwhen configured and omits it when absent.test/unit/selfhost-config-lint.test.ts: a regression test for theTOP_LEVEL_FIELDSallowlist gap described above.test/unit/config-templates.test.ts: kept green by mirroring the new.gittensory.yml.exampledocumentation block intoconfig/examples/gittensory.full.yml(a byte-identical-from-marker golden-file check).Safety
ui:openapi:settings-parityconfirms no drift.)UI Evidencesection. (N/A — no visible UI changes; backend + config-schema only.).gittensory.yml.exampleandconfig/examples/gittensory.full.ymlupdated in lockstep; no changelog edit.)UI Evidence
N/A — backend + config-schema change only, no UI surface touched.
Notes
src/review/maintainer-recap-wire.ts, introduced in feat(notifications): schedule the maintainer recap job on a configurable cadence #4418 (the cron-scheduling PR for feat(notifications): schedule the recap job on the cron with a configurable cadence knob #2248). If feat(notifications): schedule the maintainer recap job on a configurable cadence #4418 hasn't merged yet when this is reviewed, this branch stacks on top of it — the diff will show only this PR's own changes once feat(notifications): schedule the maintainer recap job on a configurable cadence #4418 merges intomain.