Independent Auditing of AI Agents. Run by human or the agent itself, to answer the most crucial question in the AI Agent Economy. Is the agent doing what is supposed to do? With iFixAi you can have this answer in less than 120 seconds.
Python agent-evaluationaiai-alignmentai-evaluationai-governanceai-safetyclidiagnostic-tooleu-ai-acthallucination-detectioniso-42001llm-evaluationllm-securitynist-ai-rmfowasp-llmprompt-injectionpythonresponsible-airisk-assessmentrisk-management
fix(cli): resume full runs when ifixai.yaml saves a default suite (#346)
Rudy Mizrahi Celekli41f00972a196
diff --git a/ifixai/cli/run.py b/ifixai/cli/run.pyindex caadf9e..e8f58a2 100644--- a/ifixai/cli/run.py+++ b/ifixai/cli/run.py@@ -879,6 +879,7 @@ def run()sys.exit(1)+ suite_from_config = Falsetry:config_obj = load_config()except ValueError as exc:@@ -905,6 +906,7 @@ def run()if config_obj.suite and not explicit_selector:suite = config_obj.suite+ suite_from_config = Truerun_mode = _cfg_value(ctx, "run_mode", run_mode, config_obj.mode)eval_mode = _cfg_value(ctx, "eval_mode", eval_mode, config_obj.eval_mode)output = _cfg_value(ctx, "output", output, config_obj.output)@@ -1020,6 +1022,9 @@ def run(is_resuming_full_run = (resume_manifest is not None and resume_manifest.mode_filter == ["all"])+ if is_resuming_full_run and suite_from_config:+ # The saved default suite must not narrow the full selection being resumed.+ suite = Noneis_default_selection = not (full_run or is_resuming_full_run or strategic or test or categories or suite)diff --git a/ifixai/tests/test_resume_full_run_config_suite.py b/ifixai/tests/test_resume_full_run_config_suite.pynew file mode 100644index 0000000..15d91cc--- /dev/null+++ b/ifixai/tests/test_resume_full_run_config_suite.py@@ -0,0 +1,36 @@+"""A full run resumes with a bare --resume even when ifixai.yaml saves a suite."""++import json++from click.testing import CliRunner++from ifixai.cli import run as run_module+from ifixai.cli.main import ifixai_cli+++def test_full_run_resumes_despite_saved_config_suite(tmp_path, monkeypatch):+ monkeypatch.chdir(tmp_path)+ monkeypatch.setenv("HOME", str(tmp_path))+ monkeypatch.setenv("IFIXAI_TELEMETRY", "0")+ monkeypatch.setenv("DO_NOT_TRACK", "1")+ (tmp_path / "ifixai.yaml").write_text("suite: smoke\n", encoding="utf-8")+ selections = []++ async def interrupted(**kwargs):+ selections.append((kwargs["strategic"], tuple(kwargs["test_ids"] or ())))+ raise KeyboardInterrupt++ monkeypatch.setattr(run_module, "execute_tests", interrupted)+ common = [+ "run", "--provider", "mock", "--eval-mode", "self", "--no-telemetry", "--no-promo",+ "--reliability-out", str(tmp_path / "runs"), "--output", str(tmp_path / "out"),+ ]+ CliRunner().invoke(ifixai_cli, [*common, "--full-run"])+ manifests = list((tmp_path / "runs").glob("*/manifest.json"))+ assert len(manifests) == 1+ run_id = json.loads(manifests[0].read_text(encoding="utf-8"))["run_id"]++ resumed = CliRunner().invoke(ifixai_cli, [*common, "--resume", run_id])+ assert "cannot resume" not in resumed.output, resumed.output+ assert len(selections) == 2+ assert selections[1] == selections[0]