Repository navigation
refactor: remove the agent code no command can reach - #650
Merged
Merged
Conversation
The #331 mapping found about 5,600 lines that nothing runs and that neither choice for the remaining agents needs: the two dormant orchestrators, the factory, the workflow package, the executor, risk and scanner agents, TradingPipeline, the OrderManager whose broker calls the wrapper client doesn't have, and decision_formatter. BaseAgent, the voter, the bus, the market tools and the CLI tools stay, so #331's remaining question is still open. No routine or command changes. Add a test that every project import in src/, scripts/ and main.py resolves, lazy ones included, because a stale import in src/trading's __init__ files would stop every cron run with the error only in cron's stderr. The cron import test now also forbids the agent package. Refs #331 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 1, 2026
Closed
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.
Refs #331. Stage 1 of the owner's decision; #331 stays open for the rest.
What's removed
About 5,600 lines of Python that nothing runs, and that neither choice for the remaining agents needs:
autogen_agents/orchestration/:trading_orchestrator.py,orchestrator.py,agent_factory.pyautogen_agents/workflow/autogen_agents/agents/:executor_agent.py,risk_agent.py,scanner_agent.pytrading/scheduling/trading_pipeline.pytrading/orders/order_manager.py, whose broker calls don't exist on the client it was givencli/utils/decision_formatter.pyWith them: their four test files, two already-broken scripts in
docs/scripts/,README_PIPELINE.md, and the executor's prompt.No routine or command changes.
BaseAgent, the voter, the bus, the market tools and the CLI tools all stay.How this was checked
main.pyand the scheduler, lazy imports included, reaches no agent or CLI module, andimport mainloads none.RealVoterStrategy,scanner_config,VoterAgentand all 108 tools load.pytest tests/ -m "not db": 1855 passed, 2 skipped.New guards
A stale line in
src/trading's__init__files would stop every cron run, with the error only in cron's stderr.test_internal_imports_resolve.pyreads every project import insrc/,scripts/andmain.py, lazy ones included, and fails if one doesn't resolve. The import test that runsmain.pycan't see lazy imports. It found none broken.test_run_due_imports.pynow also forbids the agent package on the cron path.What this affects