feat: add workload-level library integration API (#453) - #478
Merged
Merged
Conversation
Cherry-pick of the PR #458 merge commit (4dd64e5) onto main. PR #458 was merged into refactor/issue-456-interface-names after that branch had already reached main via #457 and #445, so its content never landed on main. Adds the asap-planner facade crate (#429), the pluggable optimization pass (#430), and the ParsedWorkload boundary type. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Selvomega
added a commit
that referenced
this pull request
Sep 29, 2026
Brings in #469, #470 (ExecutableDag -> PostAsapDag), #472 and #478. Conflict resolution: keep the #466 any_measure_filtered guard on the TopK site and adopt main's relaxed `TopK { k, .. }` pattern; keep the #466 corr FILTER test with main's comment wording. Two Aggregate constructions added by #472 gained the #466 `filters` field. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Selvomega
added a commit
that referenced
this pull request
Sep 30, 2026
`PlanOutput` was an enum with a `Dag` variant (bare DAG roots) and a `DagWithLifecycle` variant (roots plus maintenance decisions), the variant chosen by whether `lifecycle` input was supplied. It is now a struct with one `plans: Vec<QueryLifecyclePlan>`; `QueryPlan` and the `Dag` variant are gone. `entry_indices`, `dags`, `len` and `is_empty` keep their signatures; `PlanOutput::new` is added. With one output shape, `lifecycle` input is required: `UserInput::new` and `OptimizationInput::new` take a `LifecycleInput`, `with_lifecycle` is gone, and `MajorPass` runs lifecycle-aware selection only. The cost-only selection is no longer reachable through the facade; callers who want it use `search_workload_with_targets`, `global_selection` and `assemble_selected_dag` directly, as before #478. `check_contract` drops the variant check and keeps the count and entry-order checks. Consequence pinned by a new test, not fixed here: `DefaultCostModel` cannot price any lifecycle, so lifecycle-aware selection finalizes every summary target as raw recompute. A facade caller on the built-in model therefore gets `KeepPreAsap` for every query that cost-only selection would have given a sketch. That is a defect of the built-in model and is tracked in its own issue. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Selvomega
added a commit
that referenced
this pull request
Sep 30, 2026
`PlanOutput` was an enum with a `Dag` variant (bare DAG roots) and a `DagWithLifecycle` variant (roots plus maintenance decisions), the variant chosen by whether `lifecycle` input was supplied. It is now a struct with one `plans: Vec<QueryLifecyclePlan>`; `QueryPlan` and the `Dag` variant are gone. `entry_indices`, `dags`, `len` and `is_empty` keep their signatures; `PlanOutput::new` is added. With one output shape, `lifecycle` input is required: `UserInput::new` and `OptimizationInput::new` take a `LifecycleInput`, `with_lifecycle` is gone, and `MajorPass` runs lifecycle-aware selection only. The cost-only selection is no longer reachable through the facade; callers who want it use `search_workload_with_targets`, `global_selection` and `assemble_selected_dag` directly, as before #478. `check_contract` drops the variant check and keeps the count and entry-order checks. Consequence pinned by a new test, not fixed here: `DefaultCostModel` cannot price any lifecycle, so lifecycle-aware selection finalizes every summary target as raw recompute. A facade caller on the built-in model therefore gets `KeepPreAsap` for every query that cost-only selection would have given a sketch. That is a defect of the built-in model, not of the interface. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
zzylol
added a commit
that referenced
this pull request
Sep 30, 2026
Start `asap-physical-operators` with thin summary kernels over `asap_sketchlib`, the kernel capability checks and the typed value model. The boundary is: - `asap_sketchlib` owns sketch algorithms and their state encodings. - Kernels hold one population's in-memory state. They expose `merge`, a typed sketch readout (`estimate(&SketchQuery)`) and memory accounting. Exact states answer a typed `ExactReadout`; empty MIN/MAX read as `None`. - Group-by belongs to physical operators. - Deployments own wire decoding, delta frames, edge sampling and storage statistics. So wire decoding, `SerializableToSink`, `AggregationType`, `aux_stats`, `reset_to_empty` and the keyed/sum/min/max kernels are not carried over from ASAPQuery-backend. The `asap_sketch_codec` crate is not carried over either; it moves to `asap_sketchlib`. Hydra KLL remains as the Hydra shared-grouping kernel. HLL uses sketchlib's classic estimator. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Rebased onto main: the Cargo.lock conflict with #478 (new asap-planner crate) was resolved by regenerating workspace entries with `cargo update -w --offline`.
zzylol
added a commit
that referenced
this pull request
Sep 30, 2026
#445, #470, #472, and #478 each described the Planner output from a different angle. Add an output-layers section that places them in order: candidate space, selected logical plan, and exported logical DAG. Say that PlanOutput is derived from PlanSpace rather than being a second output. Use "candidate" instead of "alternative" throughout input-output-workflow.md. Rebase note: conflicts in docs/design_docs/architecture/input-output-workflow.md with the stack below are resolved to this commit's version of the file, as integration merge e59640f resolved them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zzylol
added a commit
that referenced
this pull request
Sep 30, 2026
#445, #470, #472, and #478 each described the Planner output from a different angle. Add an output-layers section that places them in order: candidate space, selected logical plan, and exported logical DAG. Say that PlanOutput is derived from PlanSpace rather than being a second output. Use "candidate" instead of "alternative" throughout input-output-workflow.md. Rebase note: conflicts in docs/design_docs/architecture/input-output-workflow.md with the stack below are resolved to this commit's version of the file, as integration merge e59640f resolved them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zzylol
pushed a commit
that referenced
this pull request
Oct 1, 2026
`PlanOutput` was an enum with a `Dag` variant (bare DAG roots) and a `DagWithLifecycle` variant (roots plus maintenance decisions), the variant chosen by whether `lifecycle` input was supplied. It is now a struct with one `plans: Vec<QueryLifecyclePlan>`; `QueryPlan` and the `Dag` variant are gone. `entry_indices`, `dags`, `len` and `is_empty` keep their signatures; `PlanOutput::new` is added. With one output shape, `lifecycle` input is required: `UserInput::new` and `OptimizationInput::new` take a `LifecycleInput`, `with_lifecycle` is gone, and `MajorPass` runs lifecycle-aware selection only. The cost-only selection is no longer reachable through the facade; callers who want it use `search_workload_with_targets`, `global_selection` and `assemble_selected_dag` directly, as before #478. `check_contract` drops the variant check and keeps the count and entry-order checks. Consequence pinned by a new test, not fixed here: `DefaultCostModel` cannot price any lifecycle, so lifecycle-aware selection finalizes every summary target as raw recompute. A facade caller on the built-in model therefore gets `KeepPreAsap` for every query that cost-only selection would have given a sketch. That is a defect of the built-in model, not of the interface. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick of the PR #458 merge commit (4dd64e5) onto main. PR #458 was merged into refactor/issue-456-interface-names after that branch had already reached main via #457 and #445, so its content never landed on main. Adds the asap-planner facade crate (#429), the pluggable optimization pass (#430), and the ParsedWorkload boundary type.