Refs #4825 — charges-side certified sources slice (issue stays open for the rollup-side seams + activation).
What
New pure module pm-stack/aggregator/src/cost-anomaly-sources.ts: the first in-repository implementations of the cost-anomaly producer's auxiliary seams, covering the two charges-side seams:
monthlyChargeTotals / certifiedMonthlyCharges — deduplicated monthly totals from the charges pipeline's matched charges (feat(usage-hub): v3 charges auto-matching — Plaid + Gmail alerts to services #1057 output via matchedChargesFrom, spend-dollars rule (1): no new money path), exact integer-cent sums per service+month.
certifiedServiceActivity — per-service-month activity census → ServiceActivityRecord; absent entry, conflicting duplicates, or invalid counts return null (uncertified).
Certification follows the spend-rollups coverage rule applied to calendar months: complete only when an ok coverage span covers the whole month as instants; anything else is partial and suppresses in the detector — an absent/partial census never certifies a zero.
COST-ANOMALY.md "Still needed" updated in the same PR: charges-side seams landed; rollup-side seams (closure counts, busiest root, source-population totals), production ingestion, and activation remain.
Verification
Oracle: the #4825 certification contract — complete only on whole-month ok coverage; totals are the pipeline's matched rows summed exactly in cents. New tests in test/cost-anomaly-sources-4825.test.ts (grouping/cent exactness, coverage certification, absent/conflicting/invalid census, end-to-end producer→detector firing exactly the constructed charge anomaly). Exact-head fleet dispatch evidence to be posted on this PR before merge.
Author lane 1952-L (bravo SUSTAIN), claim: #4825 (comment)
{
"direct_parent": null,
"links": [],
"lineage": {
"design": null,
"roadmap_item": null,
"priority": null
},
"pm_meta": 1,
"provenance": {
"queue_id": null,
"scheduled_start": null,
"picked_up_at": null,
"work_started_at": null,
"created_at": "2026-11-28T02:06:25Z",
"session_id": null,
"lane": null,
"host": "htch-runtime",
"worktree": null,
"model": null,
"lane_start_issues": [],
"workspace_ref": null,
"auth_subject": "archer",
"stamped_by": "fleet 0.1.0 (native)"
}
}
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.