Problem
asap-planner-rs already exposes a Rust library crate (asap_planner), but asap-query-engine has no dependency on it and cannot invoke config generation in-process. This is a prerequisite for the embedded auto-discovery query tracker.
Goal
Wire asap-query-engine to call the asap_planner library directly when it needs to generate sketch configs from observed queries.
Details
- Add
asap_planner as a workspace dependency in asap-query-engine/Cargo.toml
- Identify the correct public API entry points in
asap_planner::lib for generating inference_config and streaming_config structs from a list of PromQL expressions
- Expose an internal
PlannerClient trait/struct in asap-query-engine that wraps the library call, so it can be swapped for a mock in tests
- The embedded query tracker (separate issue) will call this once it identifies queries worth accelerating
Acceptance Criteria
- asap-query-engine compiles with
asap_planner as a dependency
- A unit test demonstrates calling planner config generation in-process from asap-query-engine with a sample PromQL expression
- No user-facing change: the planner binary remains usable standalone
Notes
asap-planner-rs is already structured as [lib] + [[bin]], so no refactoring of the planner is needed — this is purely an integration task on the asap-query-engine side.
Problem
asap-planner-rs already exposes a Rust library crate (
asap_planner), but asap-query-engine has no dependency on it and cannot invoke config generation in-process. This is a prerequisite for the embedded auto-discovery query tracker.Goal
Wire asap-query-engine to call the
asap_plannerlibrary directly when it needs to generate sketch configs from observed queries.Details
asap_planneras a workspace dependency inasap-query-engine/Cargo.tomlasap_planner::libfor generatinginference_configandstreaming_configstructs from a list of PromQL expressionsPlannerClienttrait/struct in asap-query-engine that wraps the library call, so it can be swapped for a mock in testsAcceptance Criteria
asap_planneras a dependencyNotes
asap-planner-rs is already structured as
[lib]+[[bin]], so no refactoring of the planner is needed — this is purely an integration task on the asap-query-engine side.