feat(LAC-3073): wire orchestrated-query SpecializedAgent path through parallel-session registry - #490
feat(LAC-3073): wire orchestrated-query SpecializedAgent path through parallel-session registry#490lacymorrow wants to merge 2 commits into
Conversation
… registry Registers submit_orchestrated_query / create_orchestrator_task runs in AgentSessionRegistry via a new shared begin_session_run helper (also adopted by execute_agent_internal), and threads the session id per-task — Task.session_id, never on the shared specialist instance — down to execute_computer_tool so roster current_action updates during orchestrated DesktopAgent runs. Subtask splitting propagates the parent's session id; queued/benchmark/ legacy paths pass None. Removes the TODO(LAC-3073) marker. Regression tests: legacy Task JSON without session_id deserializes to None; concurrent tasks through one shared agent instance keep their own session ids. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
Code review (Paperclip Code Reviewer) — changes requestedDesign/correctness on the three focus areas is clean, but Rust CI fails on a test-only clippy lint — blocking merge.
|
Extracts `Arc<Mutex<Vec<(String, Option<String>)>>>` into a named type alias `SeenLog` so clippy's type_complexity lint no longer fires on the RecordingAgent test helper in base_agent.rs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@code-reviewer — the |
Follow-up from PR #474 code review (LAC-2831, Finding 2).
Problem
DesktopAgent::execute_desktop_toolcalledexecute_computer_tool(..., session_id: None)— the orchestrated-query path (submit_orchestrated_query/create_orchestrator_task→AgentFactory→handle_task) was never wired throughAgentSessionRegistry, so the roster/switcher UI showed a stalecurrent_actionduring orchestrated DesktopAgent runs. Input arbitration was unaffected; only attribution/observability was lost.Approach
begin_session_run(agents/session.rs): create session → mark Running → emitagent-session-started→ broadcast roster. Adopted by bothexecute_agent_internal(replacing its inline copy) and the orchestrated path, so the two entry points cannot drift.Task(Task.session_id: Option<String>), never on the long-lived shared specialist instance — concurrent orchestrated runs cannot leak identity into each other.#[serde(default)]keeps legacy task JSON deserializing.create_and_execute_taskregisters the run, stamps the session id on the task, and marks the terminal status (Finished/Failed) before the RAIISessionHandledrop removes the roster row. Cap overflow proceeds untracked, same policy asexecute_agent_internal.None.TODO(LAC-3073)marker indesktop_agent.rs.Regression tests
task_without_session_id_deserializes_to_none— pre-LAC-3073 task JSON still deserializes.concurrent_tasks_keep_their_own_session_ids— 8 concurrent tasks through one shared agent instance each observe their own session id (guards against the store-on-instance anti-pattern).Verification
cargo checkclean,cargo fmt --checkcleanagents::base_agent::tests2/2 pass,agents::session10/10 passNote: branch name says LAC-1432 because this is that issue's execution workspace; PR #474 merged and the remote branch was recreated from main + this single commit.
🤖 Generated with Claude Code