You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The proposal's core innovation is an iterative verification loop that repairs failing tests until pass. Reality: core/generator.py:285-322 runs tests once, records tc.diagnosis, and never applies a fix or re-runs. 'Self-healing' is currently a no-op during generation.
Done on master (code2test/core/generator.py, verify_and_fix). The loop works like this:
Each generated file runs under pytest, and results are matched to individual tests.
Failing tests go back to the model with their real pytest output, for up to max_fix_attempts rounds (default 2), and are re-run each time.
Tests that still fail are diagnosed:
CODE_BUG: the test is kept with pytest.mark.xfail and the diagnosis as its reason. It is never edited to force a pass.
TEST_WRONG or INTENT_WRONG: the test is dropped in --auto mode. Interactive mode shows the diagnosis and lets the user decide.
A whole-suite check then drops tests that fail only alongside other tests.
This differs slightly from the plan: repairs use the pytest output directly rather than the diagnosis's suggested_fix, and diagnosis comes after repair. Repair rounds are recorded per file in .code2test/metrics.json, not in VerificationResult.
Unit tests in tests/test_pipeline.py cover it: test_failing_test_is_repaired_using_failure_output, test_bad_import_is_repaired, test_unfixable_test_suspected_code_bug_is_kept_as_xfail, test_unfixable_wrong_test_is_dropped. Real-model runs are in research/data/.
Activity
pro-utkarshM commentedon Oct 15, 2026
Done on
master(code2test/core/generator.py,verify_and_fix). The loop works like this:max_fix_attemptsrounds (default 2), and are re-run each time.CODE_BUG: the test is kept withpytest.mark.xfailand the diagnosis as its reason. It is never edited to force a pass.TEST_WRONGorINTENT_WRONG: the test is dropped in--automode. Interactive mode shows the diagnosis and lets the user decide.This differs slightly from the plan: repairs use the pytest output directly rather than the diagnosis's
suggested_fix, and diagnosis comes after repair. Repair rounds are recorded per file in.code2test/metrics.json, not inVerificationResult.Unit tests in
tests/test_pipeline.pycover it:test_failing_test_is_repaired_using_failure_output,test_bad_import_is_repaired,test_unfixable_test_suspected_code_bug_is_kept_as_xfail,test_unfixable_wrong_test_is_dropped. Real-model runs are inresearch/data/.Generated by Claude Code