Skip to content

Price installed retention and shared source maintenance consistently - #809

Open
zzylol wants to merge 3 commits into
fix/placement-pricing-lagfrom
fix/placement-pricing-evidence
Open

zzylol wants to merge 3 commits into
fix/placement-pricing-lagfrom
fix/placement-pricing-evidence

Conversation

@zzylol

@zzylol zzylol commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #808.

Why

Placement prices could disagree with the installed plan: downstream maintenance needed more panes than priced, and each raw selector inherited the entire workload's sample rate. Distinct logical lookbacks also charged a shared physical Sum producer twice.

What

  • Price source retention for downstream maintenance lookbacks.
  • Accept optional implementation.source_ingestion_rates evidence by metric, applying fresh rates consistently to retained updates and raw folds. Missing or stale evidence keeps the conservative workload rate.
  • Charge generated identical Sum panes within one query once, retaining the longest lookback and every logical read cost. Derived cohorts and provider-measured layouts retain their separate accounting.

Before this PR

A 1m and 10m read sharing one Sum producer charged 68 panes although only 61 were installed. A longer derived consumer could price two source panes when maintenance needed eleven.

After this PR

Those cases price 61 and eleven panes respectively. Explicit source rates replace workload totals for both placement alternatives without assuming label-filter selectivity.

Validation

  • Regression failures reproduced before fixes; all 16 lifecycle-placement tests and the focused derived-source regression pass.
  • Final-stack validation at Planner a049a3b: formatting, workspace clippy, workspace library tests, all control-plane tests, and all 30 compatibility process tests pass (122.91s). Native candidate retention pricing lives upstream in feat: adopt versioned Planner kernels and typed physical selection #810.
  • Independent agent review covered installed-window pricing, freshness, consistent source rates, shared maintenance, and independent mixed-assignment repricing; no blockers remained.

🤖 Generated with Claude Code

@zzylol
zzylol marked this pull request as draft September 30, 2026 15:03
@zzylol
zzylol force-pushed the fix/placement-pricing-lag branch from 8c8aeda to e899d10 Compare September 30, 2026 15:04
@zzylol
zzylol force-pushed the fix/placement-pricing-evidence branch from 797dbe5 to c976121 Compare September 30, 2026 15:04
zzylol and others added 3 commits September 30, 2026 15:18
…ntly

Price derived maintenance lookbacks and native retained candidates from installed window layouts. Use optional fresh per-metric sample-rate evidence for both retained updates and raw folds, and charge generated shared Sum panes once across logical lookbacks while preserving each read cost.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zzylol
zzylol force-pushed the fix/placement-pricing-lag branch from e899d10 to ec8786e Compare September 30, 2026 15:18
@zzylol
zzylol force-pushed the fix/placement-pricing-evidence branch from c976121 to e3de66f Compare September 30, 2026 15:18
@zzylol
zzylol marked this pull request as ready for review September 30, 2026 15:25
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.

1 participant