chore(agent): remove dead code from agent-workflows#4809
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Act on the dead-code report review. Remove zero-caller and broken code, and demote the confusing in-process POC backend out of the shipped SDK. Deleted (zero callers / unimportable): - services/oss/src/agent/client.py (logic moved to the SDK platform package) - sdks: agents/ui_messages.py (Vercel-adapter shim, not the internal IR), agents/tools/wire.py (superseded by ToolSpec.to_wire()), parse_tool_configs, engines/running/registry.py (broken import since the 2026-05 SDK reorg), engines/running/sandbox.py::is_import_safe - services/agent/src/tracing/otel.ts::shutdownTracing (no process-exit path) InProcessPiBackend was a public 'reference backend' that the service never selects. Removed it from the SDK public API and moved the class to a test-only helper so the transport round-trip integration test still runs. Updated the design docs to match. Kept on review: the sandbox_agent.ts test re-exports, LocalBackend, the Claude and Agenta harnesses, and the service secret/gateway re-export shims (deletable later once their tests repoint to agenta.sdk.agents.platform). Tests green: SDK agents 158 unit + 3 transport integration, service agent 20 unit, runner 104 vitest. ruff and tsc clean. Claude-Session: https://claude.ai/code/session_01K1B1nizzup79YAnc2wF77L
d3c4902 to
2454f73
Compare
Railway Preview Environment
|
chore(agent): remove dead code from agent-workflows
What
Acts on the dead-code report review (PR #4806 scratch). Removes zero-caller and broken code
from the agent-workflows stack, and demotes the confusing in-process POC backend out of the
shipped SDK. Stacked on #4806.
Deleted (zero callers / unimportable)
services/oss/src/agent/client.py- logic moved toagenta.sdk.agents.platform.connection.sdks .../agents/ui_messages.py- a Vercel-adapter shim, not the internal IR (AgentRun/AgentEventis the IR).sdks .../agents/tools/wire.py(tool_spec_to_wire/tool_specs_to_wire) - superseded bythe
ToolSpec.to_wire()method.parse_tool_configs(tools/parsing.py) - no caller; the live path usescoerce_tool_configs.sdks .../engines/running/registry.py- imports arunning.typesmodule that does notexist, so it has never been importable (broken since the 2026-05 SDK reorg).
is_import_safe(engines/running/sandbox.py) - no caller.shutdownTracing(services/agent/src/tracing/otel.ts) - no process-exit flush path; therunner flushes per run.
All
__init__re-exports for the above were removed too.InProcessPiBackend: removed from the SDK, kept as a test helper
It was a public "reference backend" that the deployed service never selects, which read as a
deployment option and caused confusion. Removed from the SDK public API. The class moved to
sdks/python/oss/tests/pytest/integration/agents/_in_process_backend.pyso the transportround-trip integration test still exercises the real wire and subprocess transport. The
sidecar's in-process
piengine (engines/pi.ts) is unchanged and still reachable withbackend: "pi". Design docs updated to match.Kept on review
The
sandbox_agent.tstest re-exports,LocalBackend, the Claude and Agenta harnesses, andthe service
secrets.py/tools/secrets.py/tools/gateway.pyre-export shims (deletablelater once their tests repoint to
agenta.sdk.agents.platform).Tests
Green: SDK agents 158 unit + 3 transport integration, service agent 20 unit, runner 104
vitest.
ruff format/checkandtsc --noEmitclean.https://claude.ai/code/session_01K1B1nizzup79YAnc2wF77L