Repository navigation
pm-stack: certified rollup-side sources for the cost-anomaly producer (#4825) - #16411
Conversation
…#4825) Implements the producer's three rollup-side seams (closedChildren, busiestRoot, sourceTotal) from caller-supplied per-window censuses, mirroring the charges-side certification contract: a record is complete only when an ok coverage span covers the whole rollup window; absent, partial, or conflicting census data certifies nothing and the detector stays silent. The busiest root is the maximum folded root total, certified only when every root entry is whole-window certified. COST-ANOMALY.md updated in the same change: all producer seams now have in-repository implementations; production rollup ingestion and activation remain open on #4825.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Verification dispatched: fleet-command run 46101737585 on exact head |
|
Verification PASSED on exact head |
Refs #4825 (slice: rollup-side certified sources; the issue stays open for production rollup ingestion and activation).
What
pm-stack/aggregator/src/cost-anomaly-rollup-sources.ts— in-repository implementations of the cost-anomaly producer's three rollup-side seams, mirroring the charges-side module (cost-anomaly-sources.ts, PR #16395):certifiedClosedChildren— per-scope-window closure census →ClosedChildrenRecord.certifiedBusiestRoot— per-epic-window root-session census (sub-sessions folded into their root by the census) → the maximum folded root total.certifiedSourceTotal— per-window source-population census (before attribution, keyed by unit + pool, never a sum of overlapping rollup rows) →SourceTotalRecord.Certification contract (the named oracle)
The #4825 contract in
COST-ANOMALY.md: a record iscompleteonly when an ok coverage span covers the whole rollup window as instants and the window is the canonical calendar window. Absent census entry → null (uncertified, suppresses); conflicting entries (same key, different values) → null; invalid counts (negative, non-integer, non-finite) → null. The busiest root is certified only when every root entry is whole-window certified — a partially covered root set could conceal a larger root. Each record is stamped with the queried rollup's window, scope, and attribution version, the pairing the detector's same-window/same-scope checks require.Tests
test/cost-anomaly-rollup-sources-4825.test.ts— 14 tests: per-seam absence/conflict/invalid/partial cases plus end-to-end producer→detector runs (burn + dominance fire on the constructed pattern and go silent on real closures, on an exactly-50% busiest root, and with the censuses withdrawn; unattributed growth fires on a 10%→30% rise with certified totals and is suppressed without them).COST-ANOMALY.mdupdated in the same change: all producer seams now have in-repository implementations; production rollup ingestion and activation remain open.Verification
Fleet Actions exec on the exact head: the four cost-anomaly suites plus
bunx tsc --noEmitinpm-stack/aggregator(run link posted on the PR before merge).{ "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-28T03:10:36Z", "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-botwith what you need.