Repository navigation
Fix #13: Stop endless regression-testing sessions when no coding work remains - #296
zwanski-start wants to merge 1 commit into
Conversation
…coding work remains - Orchestrator only spawns testing agents while coding agents are running, so a stalled project no longer burns tokens on repeated regression runs. - When nothing is ready or running, classify the stall: exit if remaining features can never start (failed too often, cyclic/unsatisfiable deps), wait quietly (one notice) if they are waiting on human input. - agent.py: detect completion from the features DB after every session instead of matching 'no more work to do' in the agent's response text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🔍 QA report: ✅ PassedTester: Dennis (cubefarm agent, in a fresh session) · Round: 1 · Author: Ada The PR stops the endless regression-testing loop from #13. In a mocked run on master, a project whose remaining features form a dependency cycle never exits and spawned 10 testing agents in 4 seconds. On this branch it prints a clear message and exits with no testing agents, and a project waiting on human input stays alive without spawning agents. agent.py now reads completion from the features DB: an errored session where every feature passes now stops, and a response that merely says 'all features are passing' no longer ends the run early. Lint, the new tests and the security tests pass; the remaining mypy errors and the 21 test_devserver_security failures are the same on master.
🧪 Commands run
No browser screenshots were taken in this round. Posted by cubefarm · merges automatically once GitHub's checks pass |
…coding work remains Adaptations: the ParallelOrchestrator docstring for testing_agent_ratio now says testing agents run only while a coding agent runs; new test_agent_completion.py covers the agent.py change (completion read from the database, not from the reply text). Integrates AutoForgeAI#296 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeH26pcsqoxPb3CDs8g1VN
) Adaptations: combined with AutoForgeAI#296's stall states, the report is printed for 'blocked' and 'human_input' stalls before the orchestrator stops (blocked) or waits (human input), replacing AutoForgeAI#296's one-line notices. Ported AutoForgeAI#255's 2-line rec_stack/path reset in _detect_cycles, which reported features that merely depend on a cycle as cyclic; new regression test. New test for the report's content and de-duplication. Integrates AutoForgeAI#306 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeH26pcsqoxPb3CDs8g1VN
Closes #13
Context
Most of the fix the issue proposes is already on master:
agent.pyexits when every feature passes, and the parallel orchestrator (now the only entry point) stops onget_all_complete(). The coding prompt no longer usesfeature_get_next, so the prompt change the issue suggests doesn't apply anymore.One path still produced the reported symptom: a stalled project. If nothing is ready and no coding agent is running (remaining features need human input, failed
MAX_FEATURE_RETRIEStimes, or depend on such features or on a cycle),get_all_complete()returns False. The orchestrator then looped forever printing "No ready features available", and_maintain_testing_agents()kept spawning regression-only testing sessions. That is the endless token burn from the issue.Changes
parallel_orchestrator.py_maintain_testing_agents()only spawns testing agents while coding agents are running. With no code changing, more regression runs can't find anything new.get_stall_state()explains why nothing can start right now:work(the snapshot was stale),testing(wait for running testers, which may flip a feature back to failing),human_input, orblocked.blocked, the orchestrator exits with a clear message. Onhuman_input, it waits without spawning any agents and prints the waiting notice once instead of every 10s.agent.py: after every session (whatever its status), completion is read from the features DB. This replaces matching"all features are passing"/"no more work to do"in the agent's response text: no tool emits those strings anymore, and a model's own wording could trigger them by accident. It also replaces the later check in thecontinuebranch, which ran only after "auto-continue in Ns" had already been printed.test_orchestrator_completion.py: 9 new tests covering stall classification and when testing agents are spawned.Verification
ruff check .: clean.mypyreports no errors in the changed files (the errors it shows elsewhere were already on master).pytest test_orchestrator_completion.py test_client.py test_dependency_resolver.py test_rate_limit_utils.py: all pass.python test_security.py: all pass.run_loop()on a temporary project with one passing feature and two pending features in a dependency cycle. It now prints "No remaining features can be started…" and exits with 0 testing agents spawned. Before this change, that setup looped forever and kept spawning testing agents.Assumptions
--continuous-regressionflag. Nothing in the codebase relies on testing agents running without coding agents.🤖 Generated with Claude Code