Skip to content

feat(post-asap): model and validate execution phases - #300

Open
zzylol wants to merge 1 commit into
mainfrom
feat/exact-summary-composition-171
Open

feat(post-asap): model and validate execution phases#300
zzylol wants to merge 1 commit into
mainfrom
feat/exact-summary-composition-171

Conversation

@zzylol

@zzylol zzylol commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Introduces the generic Post-ASAP execution-phase contract used by later planner strategies:

  • ExecutionAvailability::{UpdateValue, SummaryState, ReadoutValue};
  • UpdateTransform and ReadoutPostProcess with extensible ValueOperator payloads;
  • explicit child-edge phase assignment;
  • typed phase and exact-operator schema errors;
  • whole-DAG validation, including ambiguous shared uses;
  • execution stages in post-ASAP DAG export.

This PR deliberately contains no exact-composition strategy, workload model, lifecycle planning, or cost-selection policy.

Verification

  • cargo test -p asap-types post_asap::phase — 11 passed, including a non-exact extension operator.
  • cargo fmt --all -- --check

Stack

Next: #314.

@zzylol

zzylol commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

Current-main integration review: this PR is not ready to merge as-is after #295 and #299. The conflict is architectural rather than mechanical. #295 now owns the canonical recurrence vocabulary (recurrence::{CostRate, EvaluationRate, UpdateRate, Horizon}) and recurrence-aware selection APIs, while this branch independently introduces duplicate CostRate/EvaluationRate types and a second recurring-cost path in cost_model.rs. #299 now also owns nested-summary legality through ResultGuarantee/AccuracyModel; phase validation must compose with that model rather than independently rejecting or admitting the same nested candidates. Please rebase on current main, reuse the recurrence types and profiles instead of defining parallel units, and make exact composition preserve/propagate the guarantees introduced by #299. The merged implementation should retain the conservative missing-statistics fallback and phase tests from this PR.

@zzylol

zzylol commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

Implemented the workload model and summary lifecycle maintenance from #310 on top of this PR's phase-aware exact composition.

Highlights:

  • normalized batch + repeated query workloads with recurrence, predictability, independent time selection, accuracy/latency requirements, and uncertain demand
  • separate data workload with arrival, fresh evidence, cardinality, and DataDistribution
  • workload-derived recurrence/update profiles and accuracy evidence
  • explicit ephemeral/prepared/shared/continuously-maintained lifecycle alternatives
  • horizon-normalized lifecycle costs, capability/phase validation, assumptions, and structured rejection reasons
  • materialize_with_lifecycles bridge from this PR's GlobalSelection to plan + state deployments

Validation: workspace check, workload/lifecycle/accuracy tests, all PromQL and SQL frontend tests, and all 11 exact_composition integration tests pass.

@zzylol

zzylol commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the four follow-up review findings in e117dcb:

  • lifecycle planning now takes an explicit WorkloadDemand binding, so unrelated workload entries cannot create false reuse for a target
  • recurrence profiles require an explicit root-to-workload-entry index mapping instead of assuming batch/repeating container order
  • scheduled evaluation rates count only executions inside the optimization horizon
  • future-dated data evidence and demand estimates are not considered fresh

Added regression coverage for all four cases. Local validation passes: 5 workload tests, all 237 asap-aware-mapping tests, all 11 exact-composition integration tests, workspace strict Clippy, rustfmt, and diff checks.

@zzylol zzylol changed the title feat(post-asap): compose exact operators with summary plans across explicit update/readout boundaries (#171) feat: model query workloads, data workloads, and summary lifecycle maintenance Aug 29, 2026
@zzylol

zzylol commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the second code-and-doc review in ec714b6:

  • lifecycle-aware materialization now compares aggregate summary deployment cost with raw recomputation and can fall back to KeepPreAsap
  • per-summary incremental-update/delete capabilities gate maintained lifecycles; moving real-time windows require deletion support
  • prepared state is legal only when every bound consumer is predictable and covered by the declared window
  • empty and duplicate WorkloadDemand bindings are rejected
  • docs now distinguish implemented latency/provenance behavior from future integrations, update the stale glossary-gap table, and state the remaining broader sibling-candidate search boundary

Regression coverage was added for raw fallback, unsupported deletion, mixed predictable/ad-hoc consumers, and invalid bindings. Local strict Clippy, rustfmt, 241 mapping tests, 5 workload tests, and 11 exact-composition integration tests pass.

@zzylol zzylol changed the title feat: model query workloads, data workloads, and summary lifecycle maintenance feat: plan query/data workloads and phase-aware summary lifecycles Aug 29, 2026
@zzylol zzylol changed the title feat: plan query/data workloads and phase-aware summary lifecycles feat: plan query/data workloads with generic phase-aware summary lifecycles Aug 29, 2026
@zzylol zzylol changed the title feat: plan query/data workloads with generic phase-aware summary lifecycles feat: generalize query/data workloads and summary lifecycle maintenance Aug 29, 2026
@zzylol
zzylol force-pushed the feat/exact-summary-composition-171 branch from 16b364a to b2d6151 Compare August 29, 2026 20:48
@zzylol zzylol changed the title feat: generalize query/data workloads and summary lifecycle maintenance feat(post-asap): compose exact operators across update/readout boundaries Aug 29, 2026
@zzylol
zzylol force-pushed the feat/exact-summary-composition-171 branch from b2d6151 to 5b33949 Compare August 29, 2026 22:47
@zzylol zzylol changed the title feat(post-asap): compose exact operators across update/readout boundaries feat(post-asap): model and validate execution phases Aug 29, 2026
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