Skip to content

fix(notifications): render the dormant maintainer-recap section builders in the digest#8507

Closed
xfodev wants to merge 1 commit into
JSONbored:mainfrom
xfodev:fix/wire-maintainer-recap-sections-8372
Closed

fix(notifications): render the dormant maintainer-recap section builders in the digest#8507
xfodev wants to merge 1 commit into
JSONbored:mainfrom
xfodev:fix/wire-maintainer-recap-sections-8372

Conversation

@xfodev

@xfodev xfodev commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

The maintainer recap digest has four dedicated "content slice" section builders (buildCalibrationRecapSection #2243, buildGateOutcomesRecapSection #2242, buildPerRepoRecapSection #2241, buildDriftRecapSection #8214) — all fully built and unit-tested — but formatMaintainerRecap never called any of them, instead hand-rolling an inline, uncapped, unsorted per-repo block. So a maintainer running the live recap never saw the Calibration, Gate-outcomes, properly-capped Per-repo, or config-drift sections. (Same bug shape as closed #6636.)

  • Per-repo: replaced the inline perRepoLines block with buildPerRepoRecapSection({ windowDays, repos }) — now capped/sorted with the (+N more) remainder the inline version lacked — rendered under the same ## Per-repo header via recapSectionLines/redactRecapLine.
  • ## Calibration (new, unconditional): via buildCalibrationRecapSection({ windowDays, totals }).
  • ## Gate outcomes (new, unconditional): via buildGateOutcomesRecapSection({ windowDays, totals }).
  • Config drift plumbing: threaded an optional configDrift through runMaintainerRecap to formatMaintainerRecap, so a caller holding a DriftRecapSection actually renders it. No live drift is sourced here (a comment notes maintainer-recap-wire.ts, the cron caller, supplies none yet, so its live digests stay unchanged).
  • Section order: Summary, Totals, Per-repo, Calibration, Gate outcomes, Config drift (optional, last). RecapReport shape unchanged; buildTopContributorsRecapSection untouched (needs a contributors list not on RecapReport).

Tests

test/unit/maintainer-recap-format.test.ts + test/unit/maintainer-recap.test.ts (all maintainer-recap suites green, 109): assert the rendered digest now contains ## Calibration + ## Gate outcomes with the builders' content, that ## Per-repo renders via the capped builder (a 10-repo case shows top-8 + (+2 more)), the empty-window fallbacks, and both sides of the runMaintainerRecap configDrift forward (present → ## Config drift appears; absent → it does not).

Validation

  • tsc --noEmit clean (changed files); all maintainer-recap test files green.
  • Rebased on latest main; no base conflict.
  • No RecapReport shape change; every rendered line still goes through redactRecapLine; no secret/wallet/hotkey/trust/reward terms.

Closes #8372

…ers in the digest (JSONbored#8372)

formatMaintainerRecap hand-rolled an inline per-repo block and never called the
four dedicated section builders (JSONbored#2241-JSONbored#2243, JSONbored#8214), so a live maintainer recap
never showed the Calibration, Gate-outcomes, properly-capped Per-repo, or
config-drift sections despite all being built and unit-tested.

Wire them in: render ## Per-repo via buildPerRepoRecapSection (capped/sorted, with
the "(+N more)" remainder the inline version lacked), and add unconditional
## Calibration and ## Gate outcomes sections via their builders — all through the
same recapSectionLines/redactRecapLine path. Thread an optional configDrift option
through runMaintainerRecap to formatMaintainerRecap so a caller that has a
DriftRecapSection actually renders it (the cron caller supplies none yet; noted in
a comment). Section order: Summary, Totals, Per-repo, Calibration, Gate outcomes,
Config drift. RecapReport shape unchanged; top-contributors section left untouched.

Closes JSONbored#8372
@xfodev
xfodev requested a review from JSONbored as a code owner July 24, 2026 16:01
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.60%. Comparing base (12f2e14) to head (01c9e85).
⚠️ Report is 29 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #8507       +/-   ##
===========================================
+ Coverage   79.32%   89.60%   +10.28%     
===========================================
  Files         791       98      -693     
  Lines       79329    22781    -56548     
  Branches    23963     3893    -20070     
===========================================
- Hits        62929    20414    -42515     
+ Misses      13499     2187    -11312     
+ Partials     2901      180     -2721     
Flag Coverage Δ
shard-1 73.33% <66.66%> (+15.56%) ⬆️
shard-2 96.00% <100.00%> (+48.68%) ⬆️
shard-3 4.00% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/services/maintainer-recap.ts 97.33% <100.00%> (+20.77%) ⬆️

... and 693 files with indirect coverage changes

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 24, 2026
@loopover-orb

loopover-orb Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Caution

🛑 LoopOver review result - reject/close recommended

Review updated: 2026-07-24 16:52:45 UTC

3 files · 1 AI reviewer · 1 blocker · CI green · clean

🛑 Suggested Action - Reject/Close

Review summary
This PR wires the three previously dormant recap section builders (Per-repo, Calibration, Gate outcomes) into formatMaintainerRecap and threads an optional configDrift parameter through runMaintainerRecap, replacing the hand-rolled uncapped per-repo block. The change is small, additive, and well-tested — the diff shows corresponding test updates asserting the new section headers, the capped/sorted per-repo output with '(+N more)', and both drift-present/absent arms. The builder imports (buildPerRepoRecapSection, buildCalibrationRecapSection, buildGateOutcomesRecapSection) are consistent with the PR's stated intent of activating already-built, already-tested code paths.

Nits — 4 non-blocking
  • src/services/maintainer-recap.ts: Calibration and Gate outcomes sections are now unconditional (always rendered even for an all-zero window), which changes the digest's byte shape for every existing recipient — worth calling out explicitly in the PR description as a behavior change, not just an activation of dormant code.
  • test/unit/maintainer-recap.test.ts: the new configDrift test doesn't assert on `withDrift.formatted` ordering relative to the new Calibration/Gate-outcomes sections, only presence — a minor coverage gap for section ordering guarantees.
  • Consider a short migration note in the PR description clarifying that live digests will grow two new unconditional sections after this ships (Calibration + Gate outcomes), since that's a visible behavior change for anyone already consuming the recap output.
  • src/review/maintainer-recap-wire.ts's runMaintainerRecapJob still doesn't pass a configDrift value — if there's a follow-up issue to wire that in, link it in the description for traceability.

Why this is blocked

  • Linked issue does not appear to be satisfied: AI assessment: this PR does not appear to satisfy its linked issue's scope. The linked issue asks for resolveDispositionReason (in outcomes-wire.ts) to be wired into the Discord/Slack disposition-notification code path in the action executor, but this PR instead wires unrelated maintainer-recap section builders (calibration, gate-outcomes, per-repo, drift) into formatMaintainerRecap — a completely different file and feature area. — Confirm this PR actually addresses the linked issue's scope, or link the correct issue.
📋 Copy for AI agents — paste into your coding agent
Fix the following blocker(s) from this PR review:

1. Linked issue does not appear to be satisfied: AI assessment: this PR does not appear to satisfy its linked issue's scope. The linked issue asks for resolveDispositionReason \(in outcomes-wire.ts\) to be wired into the Discord/Slack disposition-notification code path in the action executor, but this PR instead wires unrelated maintainer-recap section builders \(calibration, gate-outcomes, per-repo, drift\) into formatMaintainerRecap — a completely different file and feature area. — Confirm this PR actually addresses the linked issue's scope, or link the correct issue.

Decision drivers

  • ❌ Code review — 1 blocker (1 reviewer)
  • ❌ Gate result — Blocking (Repo-configured hard blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #6636, #8372
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (2 linked issues).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 67 registered-repo PR(s), 30 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor xfodev; Gittensor profile; 67 PR(s), 0 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Not yet addressed
The linked issue asks for resolveDispositionReason (in outcomes-wire.ts) to be wired into the Discord/Slack disposition-notification code path in the action executor, but this PR instead wires unrelated maintainer-recap section builders (calibration, gate-outcomes, per-repo, drift) into formatMaintainerRecap — a completely different file and feature area.

Review context
  • Author: xfodev
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 67 PR(s), 0 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Triage stale or unlinked PRs.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask 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.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

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.

  • Re-run LoopOver review

@loopover-orb

loopover-orb Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

LoopOver is closing this pull request on the maintainer's behalf (Linked issue does not appear to be satisfied). 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.

@loopover-orb loopover-orb Bot closed this Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

1 participant