Repository navigation
Persist regression_count so testing agents stop re-testing the same features - #300
Open
zwanski-start wants to merge 1 commit into
Open
zwanski-start wants to merge 1 commit into
zwanski-start wants to merge 1 commit into
Conversation
…orgeAI#20) Testing agents previously chose features via random/in-memory tracking, so the same features were re-tested repeatedly (and coverage reset on every orchestrator restart). Add a persisted Feature.regression_count column (with migration) and select the least-tested passing features first, incrementing the counter on selection. Concurrent testing agents also now exclude every feature in other agents' batches, not just the primary one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
🔍 QA report: ✅ PassedTester: Dennis (cubefarm agent, in a fresh session) · Round: 1 · Author: Ada Adds a persisted, indexed Feature.regression_count column (auto-migrated on existing features.db files) and makes the orchestrator always pick the least-tested passing features, so every feature is covered before any repeat, even across orchestrator restarts. Concurrent testing agents now skip every feature already handed to another agent. New tests, ruff, mypy (no new errors), the security suites and the existing unit tests all pass; a master-created DB migrates cleanly and the app runs without errors.
🧪 Commands run
No browser screenshots were taken in this round. Posted by cubefarm · merges automatically once GitHub's checks pass |
cabana8471-arch
pushed a commit
to cabana8471-arch/autoforge
that referenced
this pull request
Nov 8, 2026
…orgeAI#20) Adaptations: a batch whose testing agent fails to start (limit re-check or Popen error) gives its regression_count back (_release_regression_selection); docstrings of _maintain_testing_agents and _spawn_testing_agent no longer claim concurrent agents test the same features or that testing runs independently of coding agents. Kept my-features' quality gate columns and migration next to regression_count. Migration verified on a copy of a real project: 442 rows unchanged, idempotent, pre-migration code still reads and inserts. Integrates AutoForgeAI#300 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeH26pcsqoxPb3CDs8g1VN
cabana8471-arch
pushed a commit
to cabana8471-arch/autoforge
that referenced
this pull request
Nov 8, 2026
Adaptations: merged with AutoForgeAI#334 (quality gates) and AutoForgeAI#300 (regression_count) in database.py, client.py, feature_mcp.py, prompts and the coding template. User decision 08.11.2026: dependents of a feature awaiting manual testing stay blocked until a human passes it (get_satisfied_ids dropped), and the manual verdict endpoint/UI accepts only features in the Manual Testing lane (footer Mark Passed removed). Orchestrator waits (stall state human_input) instead of reporting a blocked queue, explains manual-testing blockers, does not chain a manual-testing feature into a batch, and no longer prints 'All features complete!' while features await manual testing. Migration also creates the needs_manual_testing index. Integrates AutoForgeAI#245 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeH26pcsqoxPb3CDs8g1VN
cabana8471-arch
pushed a commit
to cabana8471-arch/autoforge
that referenced
this pull request
Nov 8, 2026
Adaptations: merged with AutoForgeAI#334 quality gates (evidence is built only after the gates pass, so a rejected call copies nothing), AutoForgeAI#245 manual testing and AutoForgeAI#300 in database.py/feature_mcp.py/client.py/templates; screenshot examples point at .autoforge/validation/ (Phase 3, AutoForgeAI#289). The unsandboxed MCP server no longer copies screenshots through a symlinked .autoforge/evidence path (agent-plantable), and copies that the stored evidence no longer references are deleted after each evidence write (re-tests and rejected calls used to accumulate copies). Tests RED->GREEN. Integrates AutoForgeAI#264 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeH26pcsqoxPb3CDs8g1VN
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.
Closes #20
Problem
Testing agents picked passing features randomly (
ORDER BY random()) or from an in-memory_recently_testedset held by the orchestrator. That set was lost every time the orchestrator restarted, so the same features got tested again and again while others were never tested. That wastes tokens and time.Changes
api/database.py: newFeature.regression_countcolumn (INTEGER NOT NULL DEFAULT 0, indexed) counts how many times a feature has been picked for regression testing. A new migration_migrate_add_regression_count_columnadds it to existingfeatures.dbfiles, andto_dict()now includes it.parallel_orchestrator.py:_get_test_batch()always picks the passing, not-in-progress features with the lowestregression_count. Ties are broken by impact (number of dependents, then the feature's own dependency count, capped at 3), then randomly. The counter goes up in the DB as soon as a feature is picked, so a feature is only tested again after every other passing feature has caught up. This carries over across orchestrator restarts._get_random_passing_feature()(legacy single mode) also picks least-tested first and increments the counter._recently_testedset. Each testing agent's full batch is now tracked (_testing_batch_ids), so concurrent testing agents skip every feature already handed to another agent, not just that agent's primary feature.test_regression_selection.py(new, 6 tests) covers: full coverage before any repeat, persistence across orchestrator instances, skipping failing and in-progress features, impact ordering within the same count, the legacy single-feature path, and the legacy DB migration.CLAUDE.md: added the new test file to the testing commands.Verification
python -m pytest test_regression_selection.py: 6 passedruff check .: cleanmypyon the changed files: no new errors (the remaining errors are intemp_cleanup.pyand already exist on master)python test_security.py,pytest test_dependency_resolver.py test_client.py: passAssumptions
regression_countis not reset when a feature regresses and is fixed again. The fix itself checks the feature, so leaving it later in the rotation is reasonable.🤖 Generated with Claude Code