Skip to content

feat(erp): select shape-matched profiles and model window costs - #377

Merged
zzylol merged 5 commits into
mainfrom
feat/shape-aware-erp-v1
Sep 10, 2026
Merged

feat(erp): select shape-matched profiles and model window costs#377
zzylol merged 5 commits into
mainfrom
feat/shape-aware-erp-v1

Conversation

@zzylol

@zzylol zzylol commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Why

Exact descriptor equality cannot reuse empirical sketch measurements across nearby production shapes, while window planning needs to compose atomic costs for recurrence, retention, panes, and sharing.

What

  • Select the nearest compatible ERP by explicit distribution family, family-specific parameters, log-cardinality distance, and benchmark sufficiency.
  • Compose update, merge, query, and retained-state counts for tumbling and pane-based windows.
  • Keep the complete ERP architecture in one canonical design document.
  • Preserve legal context-assigned fallback states in executable DAG validation.

How

erp_shape is extensible: {family, parameters, cardinality, benchmark_events}. Different families and unequal parameter schemas never interpolate. Event count is a minimum evidence gate rather than a distance axis. Eligible records are filtered by measured accuracy and ranked by composed workload cost.

Before this PR

ERP selection required exact distribution JSON and callers had to invent window operation multipliers. The DAG validator also rejected a legal shared raw fallback emitted by backend compilation.

After this PR

Deployments can match catalogued uniform, Zipf/discrete-power-law, continuous-power-law, normal, empirical, or future distribution families within explicit bounds. A miss remains observable so Hybrid callers can use Planner theoretical sizing or exact execution.

Verification

  • cargo test -p asap-aware-mapping erp --lib — 6 passed.
  • cargo test -p asap-types executable_dag — 2 passed before the shape-schema extension.
  • ASAPQuery-backend ERP unit tests against 378ed16 — 8 passed.

Limitations and follow-up

Planner consumes family descriptors but does not itself fit arbitrary distributions. Runtime observation/fitting belongs to the backend; benchmark catalog generation belongs to sketch-bench. Burst behavior remains scenario provenance rather than an interpolation axis.

@zzylol

zzylol commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up fix included: executable DAG validation now permits context-assigned maintenance/read states on shared raw fallback leaves. This was required for the backend full control-plane suite; Planner executable-DAG tests pass and the backend suite passes 716 library + 29 binary + 8 integration tests against commit 85cd1f7.

@zzylol zzylol changed the title feat(erp): match observed shapes and compose window costs feat(erp): select shape-matched profiles and model window costs Sep 10, 2026
@zzylol
zzylol force-pushed the feat/shape-aware-erp-v1 branch from 378ed16 to 628e1e9 Compare September 10, 2026 17:57
@zzylol
zzylol merged commit 68607aa into main Sep 10, 2026
3 of 6 checks passed
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