Remove orchestration_event_push feature flag; rename poller to streamer (#9265)

## Description

Removes the `orchestration_event_push` feature flag and the polling
fallback in the orchestration event delivery path. SSE-based event push
has been on in dogfood and staging long enough that it's now the only
path; the dual-mode `OrchestrationEventPoller` is renamed to
`OrchestrationEventStreamer` and only opens persistent SSE connections.

- Removed `FeatureFlag::OrchestrationEventPush` and the matching Cargo
feature.
- Renamed `app/src/ai/blocklist/orchestration_event_poller.rs` (and its
tests) to `orchestration_event_streamer.rs`. Renamed the public type to
`OrchestrationEventStreamer`; renamed the shared event-injection sink
`handle_poll_result` → `handle_event_batch`.
- Removed polling-only state (`poll_backoff_index`, `poll_in_flight`),
methods (`poll_and_inject`, `start_idle_poll_timer`), and constants
(`POLL_BACKOFF_STEPS`, `EVENT_POLL_BATCH_LIMIT`). Kept `event_cursor`,
`pending_delivery`, and `conversation_statuses` since they are also used
by the SSE path.
- Removed the now-dead `AIClient::poll_agent_events` trait method and
its `ServerApi` implementation in `app/src/server/server_api/ai.rs`.

The `OrchestrationV2` flag continues to gate streamer instantiation and
watched-run registration; runtime behavior under v2 is unchanged.

Pairs with the warp-server PR that drops the flag server-side:
https://github.com/warpdotdev/warp-server/pull/10736 — that PR should
land first so the polling endpoint stays available for older clients
during rollout.

## Testing
- `cargo build -p warp` clean.
- `cargo clippy -p warp -p warp_features --all-targets -- -D warnings`
clean (after `cargo fmt`).
- `cargo test -p warp --lib ai::blocklist::orchestration_event_streamer`
— all 7 tests pass.

## Agent Mode
- [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode

---

[Plan: Remove orchestration_event_push flag (server +
client)](https://staging.warp.dev/drive/notebook/yAlAxMAr4EO65A9LEy40cX)

[Conversation](https://staging.warp.dev/conversation/ff5e82cb-bba7-4cbf-ae0b-e51f2c542f4a)

---------

Co-authored-by: Oz <oz-agent@warp.dev>
This commit is contained in:
Matthew Albright
2026-04-29 09:42:02 -04:00
committed by GitHub
co-authored by Oz
parent 3f0ac51bc9
commit a6d1ece15e
9 changed files with 68 additions and 242 deletions
-23
View File
@@ -916,13 +916,6 @@ pub trait AIClient: 'static + Send + Sync {
request: ListAgentMessagesRequest,
) -> anyhow::Result<Vec<AgentMessageHeader>, anyhow::Error>;
async fn poll_agent_events(
&self,
run_ids: &[String],
since_sequence: i64,
limit: i32,
) -> anyhow::Result<Vec<AgentRunEvent>, anyhow::Error>;
/// Persists the latest observed event sequence number for a run on the
/// server. Used to keep the server-side cursor in sync with the client so
/// that driver/cloud restores can resume without replaying events the
@@ -1879,22 +1872,6 @@ impl AIClient for ServerApi {
Ok(response)
}
async fn poll_agent_events(
&self,
run_ids: &[String],
since_sequence: i64,
limit: i32,
) -> anyhow::Result<Vec<AgentRunEvent>, anyhow::Error> {
let run_ids_param: String = run_ids
.iter()
.map(|id| format!("run_ids={}", urlencoding::encode(id)))
.collect::<Vec<_>>()
.join("&");
let url = format!("agent/events?{run_ids_param}&since={since_sequence}&limit={limit}");
let events: Vec<AgentRunEvent> = self.get_public_api(&url).await?;
Ok(events)
}
async fn update_event_sequence_on_server(
&self,
run_id: &str,