From 766f9fcccc72613f2929a87fe427f485560fde0a Mon Sep 17 00:00:00 2001 From: zz_y Date: Thu, 3 Sep 2026 22:26:54 -0600 Subject: [PATCH 1/2] test(promql): cover PR-derived fallback matrix --- .../asapquery_compatibility_process_e2e.rs | 38 ++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/data_plane/tests/asapquery_compatibility_process_e2e.rs b/data_plane/tests/asapquery_compatibility_process_e2e.rs index 3fc29c3d..5735ab87 100644 --- a/data_plane/tests/asapquery_compatibility_process_e2e.rs +++ b/data_plane/tests/asapquery_compatibility_process_e2e.rs @@ -470,10 +470,46 @@ async fn collector_free_profile_serves_complete_matrix_and_falls_back_exactly() "true" ); + // PR-derived negative half of the executable matrix. These queries are + // accepted by ASAPQuery, but their warm plans are tracked by the linked + // backend/Planner issues. Until those land, the production binary must + // fall back atomically rather than partially evaluating a warm subtree. + let fallback_matrix = [ + // ASAPQuery #700; backend #503. + "avg_over_time(asap_demo_gauge[5s])", + "count(asap_demo_gauge)", + "avg(asap_demo_gauge)", + // ASAPQuery #629/#700; backend #432. + "topk(5, asap_demo_gauge)", + // ASAPQuery #256/#572/#577/#644; Planner #343, backend #504. + "rate(asap_demo_counter_total[5s]) + rate(asap_demo_counter_total[5s])", + "rate(asap_demo_counter_total[5s]) / 2", + // ASAPQuery #466/#640; backend #473. + "sum_over_time(asap_demo_gauge[10s])", + ]; + for query in fallback_matrix { + let response: Value = client + .get(format!("{backend}/api/v1/query")) + .query(&[ + ("query", query.to_string()), + ("time", first_eval.to_string()), + ]) + .send() + .await + .unwrap_or_else(|error| panic!("fallback request failed for {query}: {error}")) + .json() + .await + .unwrap_or_else(|error| panic!("fallback JSON failed for {query}: {error}")); + assert_eq!( + response["data"]["result"][0]["metric"]["fallback"], "true", + "unsupported matrix row must fall back atomically: {query}: {response}" + ); + } + let calls = fallback_calls.lock().await; assert_eq!( calls.len(), - 2, + 2 + fallback_matrix.len(), "planned queries unexpectedly fell back: {calls:?}" ); assert_eq!(calls[0].0, "instant"); From eb4cb7370e525856ed7d11a368548622260e47eb Mon Sep 17 00:00:00 2001 From: zz_y Date: Tue, 8 Sep 2026 07:09:52 -0600 Subject: [PATCH 2/2] test: distinguish unregistered fallback from unsupported operators --- .../tests/asapquery_compatibility_process_e2e.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/data_plane/tests/asapquery_compatibility_process_e2e.rs b/data_plane/tests/asapquery_compatibility_process_e2e.rs index 1780379b..63a31e3a 100644 --- a/data_plane/tests/asapquery_compatibility_process_e2e.rs +++ b/data_plane/tests/asapquery_compatibility_process_e2e.rs @@ -760,10 +760,10 @@ async fn collector_free_profile_serves_complete_matrix_and_falls_back_exactly() "true" ); - // PR-derived negative half of the executable matrix. These queries are - // accepted by ASAPQuery, but their warm plans are tracked by the linked - // backend/Planner issues. Until those land, the production binary must - // fall back atomically rather than partially evaluating a warm subtree. + // These complete expressions are NOT registered in this snapshot. + // This tests routing fallback, not absence of operator support: registered + // exact arithmetic is covered by shared_exact_dashboard_executes_selected_workload. + // Never partially warm an unregistered expression using a registered child. let fallback_matrix = [ // ASAPQuery #700; backend #503. "avg_over_time(asap_demo_gauge[5s])", @@ -792,7 +792,7 @@ async fn collector_free_profile_serves_complete_matrix_and_falls_back_exactly() .unwrap_or_else(|error| panic!("fallback JSON failed for {query}: {error}")); assert_eq!( response["data"]["result"][0]["metric"]["fallback"], "true", - "unsupported matrix row must fall back atomically: {query}: {response}" + "unregistered matrix row must fall back atomically: {query}: {response}" ); }