Skip to content

feat: add workload-level library integration API (#453) - #478

Merged
Selvomega merged 1 commit into
mainfrom
feat/issue-453-workflow-api-onto-main
Sep 29, 2026
Merged

Selvomega merged 1 commit into
mainfrom
feat/issue-453-workflow-api-onto-main

Conversation

@Selvomega

Copy link
Copy Markdown
Collaborator

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.

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
Selvomega merged commit 1eff04e into main Sep 29, 2026
3 checks passed
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>
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