From 84de30d8a30757acdfac482e1de1af14e8638f21 Mon Sep 17 00:00:00 2001 From: Ben Kunkle Date: Wed, 18 Feb 2026 11:27:04 -0600 Subject: [PATCH] ep_cli: Filter fetched examples by `can_collect_data` (#49506) Closes #ISSUE Before you mark this PR as ready for review, make sure that you have: - [ ] Added a solid test coverage and/or screenshots from doing manual testing - [ ] Done a self-review taking into account security and performance aspects - [ ] Aligned any UI changes with the [UI checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) Release Notes: - N/A *or* Added/Fixed/Improved ... --- crates/edit_prediction_cli/src/pull_examples.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/edit_prediction_cli/src/pull_examples.rs b/crates/edit_prediction_cli/src/pull_examples.rs index fbf4782db02fa6ef3d74c8f0cb7bf3c73fb42a30..e83d66226d90b5c0e8c9dfad7c78d987a2be4fa7 100644 --- a/crates/edit_prediction_cli/src/pull_examples.rs +++ b/crates/edit_prediction_cli/src/pull_examples.rs @@ -105,6 +105,7 @@ pub async fn fetch_captured_examples_after( FROM events WHERE event_type = ? AND time > TRY_TO_TIMESTAMP_NTZ(?) + AND event_properties:can_collect_data = true ORDER BY time ASC LIMIT ? OFFSET ? @@ -516,6 +517,7 @@ pub async fn fetch_rejected_examples_after( AND rej.event_type = ? AND req.event_properties:version = 'V3' AND rej.event_properties:was_shown = true + AND req.event_properties:can_collect_data = true AND req.time > TRY_TO_TIMESTAMP_NTZ(?) AND (? IS NULL OR ( TRY_CAST(SPLIT_PART(req.event_properties:zed_version::string, '.', 2) AS INTEGER) > ? @@ -669,6 +671,7 @@ pub async fn fetch_requested_examples_after( FROM events req WHERE req.event_type = ? AND req.event_properties:version = 'V3' + AND req.event_properties:can_collect_data = true AND req.time > TRY_TO_TIMESTAMP_NTZ(?) AND (? IS NULL OR ( TRY_CAST(SPLIT_PART(req.event_properties:zed_version::string, '.', 2) AS INTEGER) > ? @@ -840,6 +843,7 @@ pub async fn fetch_rated_examples_after( AND rated.event_properties:inputs IS NOT NULL AND rated.event_properties:inputs:cursor_excerpt IS NOT NULL AND rated.event_properties:output IS NOT NULL + AND rated.event_properties:can_collect_data = true AND (? IS NULL OR ( TRY_CAST(SPLIT_PART(rated.event_properties:zed_version::string, '.', 2) AS INTEGER) > ? OR (