Skip to content

feat(notifications): pure maintainer-recap builder — aggregate review activity into a RecapReport #2239

Description

@JSONbored

Foundation for the #1963 recap digest: a pure builder that folds a window of gittensory's own review-outcome data (PRs reviewed / merged / closed counts + gate false-positive / override counts + reversal count) into a single serializable RecapReport object. No delivery, no scheduling — just the data-shaping seam, exactly mirroring how src/services/weekly-value-report.ts:129 buildWeeklyValueReport takes injected inputs and returns a report. Reuse the existing aggregators (services/gate-precision.ts buildGatePrecisionReport, services/outcome-calibration.ts buildRepoOutcomeCalibration) referenced from src/review/ops-wire.ts:10-14 as the data sources so no new D1 queries are added.

Deliverables

  • New src/services/maintainer-recap.ts exporting a RecapReport type and a pure buildMaintainerRecap(inputs) function (inputs-injected, like buildWeeklyValueReport at src/services/weekly-value-report.ts:129)
  • RecapReport carries a window (days), per-repo counts (reviewed / merged / closed), and top-line gate/reversal totals — sourced from the GatePrecisionReport / OutcomeCalibration shapes already imported in src/review/ops-wire.ts:30-31
  • Add RecapReport to src/types.ts alongside WeeklyValueReport
  • Unit test in test/unit/ covering empty-window, single-repo, and multi-repo aggregation with both branches of every ?? / optional field (97% branch-counted)

References

  • src/services/weekly-value-report.ts:129
  • src/review/ops-wire.ts:10
  • src/services/gate-precision.ts
  • src/services/outcome-calibration.ts
  • src/types.ts:165

Part of #1963.


size: M · held for later release (gittensor:feature once activated)

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

    Projects

    Status
    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions