fix(notifications): wire the calibration/gate-outcomes/per-repo builders into the recap digest#8465
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
…the digest The three section builders shipped fully implemented and unit-tested but were never composed into the delivered digest, and formatMaintainerRecap's per-repo body was a second, drifted inline copy of buildPerRepoRecapSection. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8465 +/- ##
==========================================
+ Coverage 79.69% 89.60% +9.90%
==========================================
Files 791 98 -693
Lines 79319 22772 -56547
Branches 23954 3890 -20064
==========================================
- Hits 63216 20405 -42811
+ Misses 13298 2187 -11111
+ Partials 2805 180 -2625
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-24 15:48:43 UTC
Review summary Nits — 4 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
|
LoopOver is closing this pull request on the maintainer's behalf (conflicts with the base branch — resolve and open a fresh PR). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
Fixes #8372
Root cause
buildCalibrationRecapSection,buildGateOutcomesRecapSection, andbuildPerRepoRecapSectionall shipped fully implemented and unit-tested, but nothing in production ever called them —formatMaintainerRecapimported none of the three. The same "built, tested, never called" shape as #6636.formatMaintainerRecapinstead carried its own inline per-repo map, a second implementation that had drifted from the dedicated builder: it did not sort, did not cap the list, and had no "(+N more)" remainder line, so a maintainer watching many repos got an unbounded, arbitrarily-ordered block.Separately,
runMaintainerRecaphad no way to pass a drift projection through toformatMaintainerRecap, whoseconfigDriftoption (#8214) was therefore unreachable from the orchestrator.Fix approach
formatMaintainerRecap.## Per-repokeeps its header and renders the builder's.linesthrough the existingrecapSectionLines/redactRecapLinepath; the inline map is deleted.## Calibrationand## Gate outcomesare appended unconditionally rather than behind an options flag — both builders read onlyreport.totals/report.windowDays, which everyRecapReportalways carries, so there is nothing for a caller to opt into.configDrift?: DriftRecapSectiontorunMaintainerRecap's options and forward it. Deliberately not sourced here: reading the knob-loosening sentinel state is its own data-sourcing concern. This is plumbing only, so the section stays absent until a caller passes one and every existing digest is byte-identical.Every added line goes through the existing redaction path — no new text reaches a channel unredacted.
Impact
Risk of regression is confined to the digest's rendered text; no data sourcing, delivery, or schema changes.
Two existing assertions describe output this issue asks to change, so I updated them rather than the source:
## Per-repoempty state is now the builder's ownNo repo activity in the last N day(s)., so the generic_No repositories…_fallback no longer fires (the section is never empty);repo: reviewed N, merged N, closed Nformat. The gate/override/reversal counts the old inline row carried are unchanged in## Totalsand are now broken out per-dimension by## Gate outcomes.Both tests gained assertions rather than losing them — the new section headers are asserted, and a new test covers the
configDriftpresent arm end-to-end (returned string and delivered payload).Risks
configDriftforwarding is inert until a caller supplies a projection, so it cannot regress current output.Validation
npm run typecheck— cleanmaintainer-recap*suites, on a branch rebased onto currentmain(ac97dee9)src/services/maintainer-recap.ts: zero uncovered lines; the only uncovered branches (129, 134) are pre-existing and outside every hunk in this diffoxlintclean on all three changed files