QUALITY-928: push-based child discovery + orchestration polling removal (client)#13253
Draft
cephalonaut wants to merge 4 commits into
Draft
QUALITY-928: push-based child discovery + orchestration polling removal (client)#13253cephalonaut wants to merge 4 commits into
cephalonaut wants to merge 4 commits into
Conversation
Co-Authored-By: Oz <oz-agent@warp.dev>
Implements TECH.md steps C1-C3: - Remove fully-rolled-out flags OrchestrationViewerStreamer and OwnerOrchestrationAncestorStreamer (enum, features.rs, Cargo.toml). - Delete the legacy OrchestrationViewerModel REST polling path (fetch_children/apply_children_fetch/schedule_next_poll/ maybe_kick_polling, interval consts, polling fields); the streamer-driven path is now the only path. pending_session_id_poll is retained (Task 2.1). - Simplify desired_sse_filter to unconditionally use the ancestor (include_self) stream for parents; drop the now-dead UnsupportedRunIdCount variant, its match arms, and MAX_RUN_ID_STREAM_FILTER. - Collapse the flag guard in terminal_manager::stop_orchestration_polling. - Update tests for the flag-removal fallout. No behavior change beyond removing the dead flag-off paths. Co-Authored-By: Oz <oz-agent@warp.dev>
…d (warp C4-C10) Consume the server-emitted `child_agent_started` event and open the owner-side ancestor stream when a root first calls `wait_for_events`, replacing the per-wait `get_ambient_agent_task` fetch and removing the viewer `session_id` polling timer. - C4: add `CHILD_AGENT_STARTED_EVENT` const; `lifecycle_event_type_from_wire` still returns None for it. - C5: add `ancestor_on_wait` to `ConversationStreamState`. - C6: replace `register_parent_on_wait` with `register_root_on_wait` (no network fetch); delete `finish_register_parent_on_wait`; update the `wait_for_events.rs` call site. - C7: honor `ancestor_on_wait` in `is_eligible` and `desired_sse_filter`. - C8: add ungated `register_children_from_events`, called from `drain_sse_events`, registering each `child_agent_started` ref_id into `watched_run_ids` (idempotent; reevaluates only on a newly inserted id). - C9: remove the viewer `pending_session_id_poll` timer (field, methods, const); keep `spawn_task_metadata_fetch` driven by `handle_child_status_changed`. - Update the `WaitForEventsParentRegistration` doc comment. Tests: rewrite the wait-registration suite for `register_root_on_wait` and add child_agent_started drain + unknown-event coverage; drop the viewer poll-timer tests. Co-Authored-By: Oz <oz-agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Client side of QUALITY-928 — push-based child-agent discovery + orchestration polling removal. Follow-up to QUALITY-919 (#13208). Tech spec:
specs/QUALITY-928/TECH.md(included in this PR).Part 1 — remove fully-rolled-out flags + legacy polling (no behavior change):
OrchestrationViewerStreamerandOwnerOrchestrationAncestorStreamerfeature flags (both already in thedefaultcargo set, i.e. on for all channels).OrchestrationViewerModelREST polling path (fetch_children/schedule_next_poll/maybe_kick_polling/apply_children_fetch, interval consts, polling fields). The SSE streamer-driven viewer path is now the only path.desired_sse_filterso a parent always uses theAncestorRunId { include_self: true }stream; removed the now-deadUnsupportedRunIdCountvariant +MAX_RUN_ID_STREAM_FILTER.Part 2 — push-based discovery via
child_agent_started:child_agent_startedevent (ref_id= child run id) and register the child on the owner side.AncestorRunId { include_self: true }stream on its firstwait_for_events, replacing the per-waitget_ambient_agent_taskfetch from QUALITY-919: register orchestrators for child events on wait_for_events #13208. Opening the ancestor (superset) stream directly avoids a cursor-handoff gap that a self→ancestor upgrade would introduce (see the spec's Risks).session_idpoll timer in favor of an event-driven metadata fetch.WaitForEventsParentRegistrationdogfood flag (no new flag); flag-off restores pre-QUALITY-919: register orchestrators for child events on wait_for_events #13208 behavior.Depends on the warp-server PR (the
child_agent_startedemit) for end-to-end behavior; the client tolerates its absence.Testing
orchestration_event_streamer_tests.rs: ancestor-stream-at-first-wait, child registration without reconnect, idempotency, flag-off no-op, child/remote-view exclusions, unknown-event-ignored-advances-cursor; plus rewritten viewer fixtures.cargo nextest run -p warp: 5404 passed, 0 failed../script/formatandcargo clippy(presubmit versions) clean.Agent Mode
Conversation: https://staging.warp.dev/conversation/b0596521-fc34-4c03-8316-8aa227fea159
CHANGELOG-NONE