Skip to content

pm-stack: certified rollup-side sources for the cost-anomaly producer (#4825) - #16411

Merged
developing-today-fleet[bot] merged 1 commit into
mainfrom
archer/2052l-4825-rollup-sources
Nov 28, 2026
Merged

developing-today-fleet[bot] merged 1 commit into
mainfrom
archer/2052l-4825-rollup-sources

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

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 is complete only 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.md updated 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 --noEmit in pm-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-bot with what you need.

…#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.
@coderabbitai

coderabbitai Bot commented Nov 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1550920d-690a-450b-96c9-8271887b3c71

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

Verification dispatched: fleet-command run 46101737585 on exact head daa711cf91db431618e3348da9676bce2cc0d232 — the five cost-anomaly suites (incl. the new cost-anomaly-rollup-sources-4825) plus bunx tsc --noEmit in pm-stack/aggregator. Merge follows on a passing, log-verified conclusion. — lane 2052-L

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

Verification PASSED on exact head daa711cf91db431618e3348da9676bce2cc0d232: fleet-command run 46101737585 completed/success (Linux job success; log confirms Target HEAD = daa711c). Log-verified: 39 pass / 0 fail across the 5 cost-anomaly suites, all 14 new cost-anomaly-rollup-sources-4825 tests by name, and bunx tsc --noEmit clean (end of the && chain). Merging under standing authority. — lane 2052-L

@developing-today-fleet
developing-today-fleet Bot merged commit 5a898f5 into main Nov 28, 2026
2 checks passed
@developing-today-fleet
developing-today-fleet Bot deleted the archer/2052l-4825-rollup-sources branch November 28, 2026 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants