Skip to content

chore: remove leftovers from the deleted per-task agents and demos - #4626

Merged
kovtcharov-amd merged 3 commits into
amd:mainfrom
kovtcharov:kalin/remove-deleted-agent-leftovers
Oct 4, 2026
Merged

kovtcharov-amd merged 3 commits into
amd:mainfrom
kovtcharov:kalin/remove-deleted-agent-leftovers

Conversation

@kovtcharov

Copy link
Copy Markdown
Contributor

The routing, code, docker, and jira agents are gone, but parts of the repo still point to them. .env.example asked new contributors for six variables nothing reads. gaia cache status said "the Code Agent will use embedded knowledge". The security workflow claims coverage of DockerAgent and CodeAgent. Every output handler still had to implement a routing hook that nothing calls. This PR removes those leftovers so the config template, CLI hints, and CI summaries describe what actually ships.

Also removes src/gaia/talk/app.py, an unreferenced TalkSDK demo, and its README, which documented flags the demo never had. Removing print_agent_selected from the OutputHandler ABC doesn't break anyone: subclasses that still define it keep working.

Test plan

  • A repo-wide search for print_agent_selected and agent_selected finds nothing in src, hub, tests, or docs.
  • Each removed .env.example variable has no reader in src/hub/tests/util/installer (only mentions in plan docs remain).
  • Nothing references gaia.talk.app or src/gaia/talk/app.py (setup.py, docs, workflows).
  • pytest tests/unit/agents tests/unit/api tests/unit/chat/ui tests/unit/messaging tests/test_sdk.py plus the console/SSE unit files and three offline integration files: 3651 passed. One xdist-only order flake in test_sidecar_relay_profiles.py passes when run alone.
  • test_security.yml parses. util/check_test_lane_coverage.py and util/check_workflow_triggers.py pass. black and isort are clean.

The routing, code, docker, and jira agents were deleted, but code, config,
and CI output that only existed for them stayed behind and still points
contributors at agents that no longer ship.

- print_agent_selected (the routing agent's hook) was an abstract
  OutputHandler method with five implementations and no callers. Removed,
  along with the API SSE agent_selected event, its test, and the spec
  entries. Subclasses that still define it keep working.
- .env.example drops variables nothing reads: OPENAI_API_KEY, GROQ_API_KEY,
  PHOENIX_API_KEY, AGENT_ROUTING_MODEL, ATLASSIAN_*.
- Comments, the cache-status hint, and the security workflow summary no
  longer name CodeAgent or DockerAgent.
- src/gaia/talk/app.py, an unreferenced TalkSDK demo, is deleted with its
  README, which documented flags the demo never had.
@github-actions github-actions Bot added documentation Documentation changes devops DevOps/infrastructure changes talk Talk agent changes cli CLI changes tests Test changes security Security-sensitive changes agents labels Oct 4, 2026
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Verdict: Approve

This PR cleans up what the deleted routing, code, docker and jira agents left behind: unused variables in the config template, a cache-status hint that still mentioned the Code Agent, security-coverage lines for agents that no longer exist, an output hook nothing calls, and an orphaned voice demo. I found nothing left behind that still uses any of it, so it's safe to merge.

  • I searched the whole repo, including the web UI frontend, for the removed output hook and its event name. Nothing references either one.
  • Nothing points at the deleted voice demo: no packaging entry, doc or workflow.
  • No code in src, hub, util or installer reads the six variables removed from .env.example. The only hits are test fixtures that use those names as fake secret-scanning strings.
  • Removing a required method from the output-handler base class can only loosen the contract. Handlers that still define it keep working.

Real-world evidence

N/A. This is a cleanup PR, and no evidence bundle was produced. The one user-visible change is one line of gaia cache status output when Context7 is unavailable. The verdict rests on static review plus the author's unit-test run (3651 passed).

🔍 Technical details

Issues found

🟢 The cache-status hint names an internal tool (src/gaia/cli.py:6505): "Library documentation search (search_documentation) is unavailable." is accurate, since the tool exists at src/gaia/mcp/external_services.py:288. A user doesn't need the tool identifier, though, and a plainer line reads better. Optional:

                print("  Library documentation search is unavailable.")

Strengths

  • The base-class change, both SSE handlers, SilentConsole, the test stubs, docs/spec/console.mdx and the SSE contract table are all updated together, so the spec and the code still match.
  • The edits that removed CodeAgent from the comments in agent.py keep the one-line why (no double-counting of nested tool time) and drop only the stale example. That follows the CLAUDE.md comment rule.
  • The API SSE handler's streamable_events set and its formatter both lost agent_selected, so no event type is left registered without an emitter.

Kalin Ovtcharov added 2 commits October 4, 2026 02:42
src/gaia/talk/README.md documented the removed talk/app.py demo, so its
test now fails on a missing file. The guide users actually read already
has its own checks; the one claim only the README test covered, the
"restart" voice command, moves there.
@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Oct 4, 2026
Merged via the queue into amd:main with commit 6c5de67 Oct 4, 2026
@kovtcharov-amd
kovtcharov-amd deleted the kalin/remove-deleted-agent-leftovers branch October 4, 2026 13:23
kovtcharov added a commit to kovtcharov/gaia that referenced this pull request Oct 5, 2026
File tools now all check the same allowed-folders rule. Before,
`read_file` and `write_file` checked a path against the session's
allowed folders (asking the user when it was outside), but several
neighbouring tools did not: folder browsing and directory search, recent
files, document and code indexing, folder watching, `list_files`, and
the paths screenshots, transcripts, speech and exports are saved to. Now
every one goes through the same check and the same approval prompt, so a
chat scoped to its documents behaves the same whichever tool the model
picks.

- **One rule, not a second one.** Tools call the existing
`PathValidator.validate_read` / `validate_write` through a thin helper.
The validator now expands `~` before resolving symlinks and `..`, so it
judges the path the tool actually opens.
- **Approving a folder now covers document indexing too.** The chat
agent's RAG SDK kept a separate validator, so a folder approved in the
chat was still refused at indexing time. It now shares the agent's.
- **Wider on purpose, and documented:** name search over the common
document folders (it returns paths only, and opening one is checked),
GAIA's own output folders, and `capture_skill`, which asks the user on
every call.

<details>
<summary>🔍 Technical details</summary>

- Helper: `gaia.agents.tools.path_access` (`read_access_error`,
`write_access_error`, `readable_entry`). Folder walks call
`readable_entry` per file, which never prompts.
- Model-visible changes: refusal text from these tools is now the
validator's standard message, `list_recent_files` reports
`locations_not_searched`, and `search_directory` with no root searches
the allowed folders instead of the whole home folder. No tool docstrings
changed.
- Overlap with amd#4642: both PRs add the same `~` expansion to
`browse_directory`, `get_file_info`, `analyze_data_file` and
`search_file_content`, with identical lines, so either merge order
applies cleanly. Merging amd#4642 first is the simplest order.
- Nearby open PRs: amd#4613 and amd#4648 (`rag_tools.py`), amd#4644
(`code_index_tools.py`), amd#4626 (`filesystem_tools.py`), and amd#4647
(flagship CHANGELOG). Their hunks don't overlap these, but whichever
lands second may need a trivial rebase.
</details>

## Test plan
- [x] `pytest tests/unit/test_file_tools_allowed_folders.py
hub/agents/chat/python/tests/test_chat_file_tools_allowed_folders.py`:
66 tests. For each tool, a path outside the allowed folders (direct,
through `..`, and through a symlink) goes through the approval prompt
and is refused, and a path inside still works. 41 of them fail on main.
The ChatAgent tests live in the chat package, so the chat-agent lane
runs them; the core unit lane has no `gaia_agent_chat`.
- [x] Existing file, RAG, audio, screenshot, code-index, security and
chat-agent unit tests pass. The two local failures
(`test_persisted_grants_are_not_unioned_into_a_host_scope`,
`test_backups_directory_is_owner_only`) also fail on main on this
machine.
- [x] black, isort, flake8 and pylint are clean on the changed files.
- [ ] Follow-up after the core release that ships `path_access`: raise
the chat and flagship `amd-gaia` floors to it, as the chat CHANGELOG
records.
- [ ] CI eval re-run, since refusal text and the default search scope
are model-visible: `gaia_files`, `gaia_core`, `gaia_data`,
`tool_selection`.

---------

Co-authored-by: Kalin Ovtcharov <[email protected]>
Co-authored-by: Kalin Ovtcharov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents cli CLI changes devops DevOps/infrastructure changes documentation Documentation changes security Security-sensitive changes talk Talk agent changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants