From 3eecb79003278bc20ed36a4ad36c1b7c21d2894e Mon Sep 17 00:00:00 2001 From: "Brent E. Edwards" Date: Mon, 16 Mar 2026 01:45:50 +0000 Subject: [PATCH] test(plan): TDD failing tests for checkpoint real rollback (bug #822) TDD expected-fail tests proving bug #822 exists: CheckpointService.rollback_to_checkpoint() returns a successful RollbackResult but does not execute git reset --hard. Files modified after the checkpoint remain unchanged after rollback. Also fixes Robot Framework timeout robustness across the entire test suite: all Run Process calls now use on_timeout=kill (prevents SIGTERM-induced -15 exit codes under CI load) and timeouts increased to 120s (prevents premature kills during heavy parallel execution). ISSUES CLOSED: #839 --- .../tdd_checkpoint_real_rollback_steps.py | 183 +++++++++++++++ features/tdd_checkpoint_real_rollback.feature | 26 +++ robot/actor_context_management.robot | 2 +- robot/actor_list_empty.robot | 8 +- robot/changeset_persistence.robot | 6 +- robot/ci_nox_validation.robot | 2 +- robot/cli.robot | 16 +- robot/cli_core.robot | 22 +- robot/cli_init_yes_flag.robot | 6 +- robot/cli_plan_context_commands.robot | 56 ++--- robot/concurrency_locks.robot | 2 +- robot/container_tool_exec.robot | 20 +- robot/core_cli_commands.robot | 76 +++---- robot/database_integration.robot | 2 +- robot/decision_di_wiring_smoke.robot | 4 +- robot/decision_persistence.robot | 16 +- robot/decision_recording.robot | 14 +- robot/domain_analyzers.robot | 12 +- robot/helper_tdd_checkpoint_real_rollback.py | 210 ++++++++++++++++++ robot/initial_next_command_test.robot | 4 +- robot/legacy_plan_removal.robot | 2 +- robot/m1_sourcecode_smoke.robot | 16 +- robot/m2_actor_tool_smoke.robot | 12 +- robot/m3_decision_validation_smoke.robot | 16 +- robot/m3_e2e_verification.robot | 20 +- robot/m4_correction_subplan_smoke.robot | 16 +- robot/m4_e2e_verification.robot | 28 +-- robot/m5_e2e_verification.robot | 38 ++-- robot/m6_autonomy_acceptance.robot | 22 +- robot/persistence_lifecycle.robot | 14 +- robot/plan_generation_graph.robot | 4 +- robot/plan_lifecycle_persistence.robot | 2 +- robot/plan_persistence_e2e.robot | 10 +- robot/plan_repository.robot | 2 +- robot/project_create_persist.robot | 14 +- robot/project_show_after_create.robot | 16 +- robot/repl_smoke.robot | 4 +- robot/repo_indexing.robot | 6 +- robot/resource_cli.robot | 6 +- robot/resource_type_bootstrap_fs.robot | 4 +- robot/resource_type_bootstrap_git.robot | 4 +- robot/retry_patterns.robot | 22 +- robot/retry_policy_wiring.robot | 2 +- robot/routing_prefix_stripping.robot | 8 +- robot/rxpy_route_validation.robot | 16 +- robot/scale_test.robot | 12 +- robot/scientific_paper_basic.robot | 6 +- robot/scientific_paper_e2e_test.robot | 10 +- robot/scientific_paper_writer_test.robot | 6 +- robot/security_async.robot | 8 +- robot/session_create_error.robot | 10 +- robot/session_list_error.robot | 8 +- robot/system_prompt_template_rendering.robot | 8 +- robot/tdd_checkpoint_real_rollback.robot | 34 +++ robot/tdd_session_create_di.robot | 6 +- robot/tdd_session_list_di.robot | 6 +- robot/tdd_session_list_missing_db.robot | 4 +- robot/uow_lifecycle.robot | 2 +- robot/version_comprehensive_test.robot | 6 +- robot/version_test.robot | 8 +- 60 files changed, 789 insertions(+), 336 deletions(-) create mode 100644 features/steps/tdd_checkpoint_real_rollback_steps.py create mode 100644 features/tdd_checkpoint_real_rollback.feature create mode 100644 robot/helper_tdd_checkpoint_real_rollback.py create mode 100644 robot/tdd_checkpoint_real_rollback.robot diff --git a/features/steps/tdd_checkpoint_real_rollback_steps.py b/features/steps/tdd_checkpoint_real_rollback_steps.py new file mode 100644 index 000000000..809b5fbc9 --- /dev/null +++ b/features/steps/tdd_checkpoint_real_rollback_steps.py @@ -0,0 +1,183 @@ +"""Step definitions for TDD Bug #822 — checkpoint rollback is simulated. + +These steps exercise ``CheckpointService.rollback_to_checkpoint()`` against +a real git repository to prove that the method does **not** execute a +``git reset --hard`` and therefore leaves the filesystem unchanged. + +On ``master`` (before the fix), ``rollback_to_checkpoint()`` constructs a +``RollbackResult`` with the checkpoint metadata but skips the actual git +operation. Files modified after the checkpoint remain modified after +rollback, which is the bug. + +The feature is tagged ``@tdd_expected_fail`` so the assertion failure +(proving the bug) is inverted to a pass by the Behave environment hook. +""" + +from __future__ import annotations + +import os +import shutil +import subprocess +import tempfile +from pathlib import Path + +from behave import given, then, when +from behave.runner import Context + +from cleveragents.application.services.checkpoint_service import CheckpointService + +# --------------------------------------------------------------------------- +# Constants +# --------------------------------------------------------------------------- + +_INITIAL_CONTENT = "initial content\n" +_MODIFIED_CONTENT = "modified after checkpoint\n" +_TRACKED_FILENAME = "tracked.txt" +_NEW_FILENAME = "extra.txt" + + +# --------------------------------------------------------------------------- +# Helpers +# --------------------------------------------------------------------------- + + +def _run_git(args: list[str], cwd: str) -> subprocess.CompletedProcess[str]: + """Run a git command and return the completed process.""" + return subprocess.run( + ["git", *args], + cwd=cwd, + capture_output=True, + text=True, + check=True, + timeout=30, + ) + + +def _get_head_sha(cwd: str) -> str: + """Return the HEAD commit SHA of a git repository.""" + result = _run_git(["rev-parse", "HEAD"], cwd=cwd) + return result.stdout.strip() + + +# --------------------------------------------------------------------------- +# Given steps +# --------------------------------------------------------------------------- + + +@given("a temporary git workspace with an initial committed file") +def step_create_workspace(context: Context) -> None: + """Create a temp directory with a git repo containing a tracked file.""" + tmpdir = tempfile.mkdtemp(prefix="tdd_checkpoint_822_") + context.workspace_dir = tmpdir + + # Register cleanup early to avoid leaks if subsequent steps fail + def _cleanup() -> None: + shutil.rmtree(tmpdir, ignore_errors=True) + + context.add_cleanup(_cleanup) + + # Initialise git repo + _run_git(["init", "--initial-branch=main"], cwd=tmpdir) + _run_git(["config", "user.email", "test@example.com"], cwd=tmpdir) + _run_git(["config", "user.name", "Test"], cwd=tmpdir) + + # Create and commit the tracked file + tracked_path = os.path.join(tmpdir, _TRACKED_FILENAME) + Path(tracked_path).write_text(_INITIAL_CONTENT) + _run_git(["add", _TRACKED_FILENAME], cwd=tmpdir) + _run_git(["commit", "-m", "Initial commit"], cwd=tmpdir) + + context.tracked_file_path = tracked_path + context.initial_sha = _get_head_sha(tmpdir) + + +@given("a checkpoint is created from the current commit") +def step_create_checkpoint(context: Context) -> None: + """Create a checkpoint referencing the current HEAD commit.""" + plan_id_value = "01JBG822CHKPT000PXAN000000" + sandbox_ref = context.initial_sha + + service = CheckpointService() + service.register_sandbox(plan_id_value, context.workspace_dir) + + checkpoint = service.create_checkpoint( + plan_id=plan_id_value, + sandbox_ref=sandbox_ref, + reason="TDD checkpoint for bug #822", + checkpoint_type="manual", + ) + + context.checkpoint_service = service + context.checkpoint = checkpoint + context.plan_id = plan_id_value + + +@given("the tracked file is modified after the checkpoint") +def step_modify_tracked_file(context: Context) -> None: + """Overwrite the tracked file and commit the change.""" + Path(context.tracked_file_path).write_text(_MODIFIED_CONTENT) + _run_git(["add", _TRACKED_FILENAME], cwd=context.workspace_dir) + _run_git(["commit", "-m", "Modify tracked file"], cwd=context.workspace_dir) + + +@given("a new file is added and committed after the checkpoint") +def step_add_new_file(context: Context) -> None: + """Create a new file and commit it after the checkpoint.""" + new_path = os.path.join(context.workspace_dir, _NEW_FILENAME) + Path(new_path).write_text("new file content\n") + _run_git(["add", _NEW_FILENAME], cwd=context.workspace_dir) + _run_git(["commit", "-m", "Add new file"], cwd=context.workspace_dir) + context.new_file_path = new_path + + +# --------------------------------------------------------------------------- +# When steps +# --------------------------------------------------------------------------- + + +@when("I invoke rollback_to_checkpoint targeting the checkpoint") +def step_invoke_rollback(context: Context) -> None: + """Call rollback_to_checkpoint and store the result.""" + service: CheckpointService = context.checkpoint_service + result = service.rollback_to_checkpoint( + plan_id=context.plan_id, + checkpoint_id=context.checkpoint.checkpoint_id, + ) + context.rollback_result = result + + +# --------------------------------------------------------------------------- +# Then steps +# --------------------------------------------------------------------------- + + +@then("the tracked file content should match the checkpoint state") +def step_assert_file_reverted(context: Context) -> None: + """Assert that the tracked file has been reverted to its initial content. + + This assertion FAILS on master because rollback_to_checkpoint() does + not execute git reset --hard — the file still contains the modified + content. The failure proves bug #822 exists. + """ + actual = Path(context.tracked_file_path).read_text() + assert actual == _INITIAL_CONTENT, ( + f"Expected tracked file to be reverted to checkpoint content.\n" + f"Expected: {_INITIAL_CONTENT!r}\n" + f"Actual: {actual!r}\n" + f"Bug #822: rollback_to_checkpoint() did not execute git reset --hard." + ) + + +@then("the new file should not exist in the workspace") +def step_assert_new_file_removed(context: Context) -> None: + """Assert that the file added after the checkpoint no longer exists. + + This assertion FAILS on master because rollback_to_checkpoint() does + not execute git reset --hard — the new file remains on disk. The + failure proves bug #822 exists. + """ + assert not os.path.exists(context.new_file_path), ( + f"Expected new file to be removed after rollback.\n" + f"File still exists: {context.new_file_path}\n" + f"Bug #822: rollback_to_checkpoint() did not execute git reset --hard." + ) diff --git a/features/tdd_checkpoint_real_rollback.feature b/features/tdd_checkpoint_real_rollback.feature new file mode 100644 index 000000000..4e7d516b9 --- /dev/null +++ b/features/tdd_checkpoint_real_rollback.feature @@ -0,0 +1,26 @@ +@tdd_expected_fail @tdd_bug @tdd_bug_822 +Feature: TDD Bug #822 — checkpoint rollback is simulated, does not execute real git reset + As a developer + I want to verify that CheckpointService.rollback_to_checkpoint() + actually restores file system state via git reset --hard + So that rollback is not merely simulated and the bug is captured + + The rollback_to_checkpoint() method constructs a RollbackResult with + checkpoint metadata but skips the real git reset --hard operation. + After rollback, files modified since the checkpoint should be reverted + to their checkpoint-time content. Currently they are not, proving the + bug exists. + + Scenario: Rollback restores file content to checkpoint state + Given a temporary git workspace with an initial committed file + And a checkpoint is created from the current commit + And the tracked file is modified after the checkpoint + When I invoke rollback_to_checkpoint targeting the checkpoint + Then the tracked file content should match the checkpoint state + + Scenario: Rollback removes files added after the checkpoint + Given a temporary git workspace with an initial committed file + And a checkpoint is created from the current commit + And a new file is added and committed after the checkpoint + When I invoke rollback_to_checkpoint targeting the checkpoint + Then the new file should not exist in the workspace diff --git a/robot/actor_context_management.robot b/robot/actor_context_management.robot index 2503d67b6..a0b409b80 100644 --- a/robot/actor_context_management.robot +++ b/robot/actor_context_management.robot @@ -91,7 +91,7 @@ Test Actor-Based Workflow ${result} = Run Process ${PYTHON} -m cleveragents build # Normal duration: ~10-15s. Timeout raised from 30s to 120s for pabot # cold-start (16 parallel processes) + Alembic migration overhead. - ... cwd=${project_dir} env:CLEVERAGENTS_TESTING_USE_MOCK_AI=true timeout=120s + ... cwd=${project_dir} env:CLEVERAGENTS_TESTING_USE_MOCK_AI=true timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 # Apply changes diff --git a/robot/actor_list_empty.robot b/robot/actor_list_empty.robot index 1a5fd5c0f..4d4f3a3c0 100644 --- a/robot/actor_list_empty.robot +++ b/robot/actor_list_empty.robot @@ -16,11 +16,11 @@ Actor List On Fresh Project Exits Without Error ... Expected to FAIL while bug #592 is present. ${tmpdir}= Evaluate __import__('tempfile').mkdtemp(prefix='actor_592_') ${init}= Run Process ${PYTHON} -m cleveragents init actor-test - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${init.rc} 0 ... msg=agents init failed: ${init.stderr} ${result}= Run Process ${PYTHON} -m cleveragents actor list - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${result.rc} 0 ... msg=actor list should exit 0 but got ${result.rc}. stderr: ${result.stderr} Should Not Contain ${result.stdout} VALIDATION_FAILED @@ -37,11 +37,11 @@ Actor List On Fresh Project Does Not Show Slash Validation Message ... by the Behave and benchmark tests). ${tmpdir}= Evaluate __import__('tempfile').mkdtemp(prefix='actor_592_slash_') ${init}= Run Process ${PYTHON} -m cleveragents init actor-slash-test - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${init.rc} 0 ... msg=agents init failed: ${init.stderr} ${result}= Run Process ${PYTHON} -m cleveragents actor list - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${result.rc} 0 ... msg=actor list should exit 0 but got ${result.rc}. stderr: ${result.stderr} Should Not Contain ${result.stdout} must include exactly one diff --git a/robot/changeset_persistence.robot b/robot/changeset_persistence.robot index 4b65a380a..8de57c594 100644 --- a/robot/changeset_persistence.robot +++ b/robot/changeset_persistence.robot @@ -20,7 +20,7 @@ Set Suite Variables Run Agents Command [Arguments] @{args} ${result}= Run Process ${PYTHON} -m cleveragents.cli.main @{args} - ... timeout=${TIMEOUT} + ... timeout=${TIMEOUT} on_timeout=kill ... env:CLEVERAGENTS_TESTING_USE_MOCK_AI=true ... env:CLEVERAGENTS_AUTO_APPLY_MIGRATIONS=true ... env:NO_COLOR=1 @@ -49,7 +49,7 @@ Changeset Persistence Module Is Importable [Documentation] Verify the changeset_repository module can be imported. ${result}= Run Process ${PYTHON} -c ... from cleveragents.infrastructure.database.changeset_repository import SqliteChangeSetStore; print("OK") - ... timeout=${TIMEOUT} + ... timeout=${TIMEOUT} on_timeout=kill ... env:PYTHONPATH=src Should Be Equal As Strings ${result.stdout.strip()} OK @@ -82,7 +82,7 @@ SqliteChangeSetStore Round Trip Via CLI Script ... assert cs2 is None or len(cs2.entries) == 0 ... print("PASS") ${result}= Run Process ${PYTHON} -c ${script} - ... timeout=${TIMEOUT} + ... timeout=${TIMEOUT} on_timeout=kill ... env:PYTHONPATH=src Should Contain ${result.stdout} PASS ... msg=SqliteChangeSetStore round-trip failed: ${result.stderr} diff --git a/robot/ci_nox_validation.robot b/robot/ci_nox_validation.robot index 4017f4ff2..baa4e420f 100644 --- a/robot/ci_nox_validation.robot +++ b/robot/ci_nox_validation.robot @@ -28,5 +28,5 @@ CI Workflow File Exists Nox Lint Session Runs Successfully [Documentation] Verify that nox lint session can be invoked [Tags] ci quality slow - ${result}= Run Process nox -s lint timeout=120s + ${result}= Run Process nox -s lint timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 msg=nox -s lint failed: ${result.stderr} diff --git a/robot/cli.robot b/robot/cli.robot index 559194ae3..baa3b49ff 100644 --- a/robot/cli.robot +++ b/robot/cli.robot @@ -17,7 +17,7 @@ ${PYTHON} python CLI Help Command Performance [Documentation] Benchmark help command execution time ${start_time}= Get Time epoch - ${result}= Run Process ${PYTHON} -m cleveragents --help timeout=60s + ${result}= Run Process ${PYTHON} -m cleveragents --help timeout=120s on_timeout=kill ${end_time}= Get Time epoch ${duration}= Evaluate ${end_time} - ${start_time} Should Be True ${duration} < 60 Help command took too long: ${duration}s @@ -28,7 +28,7 @@ CLI Help Command Performance CLI Version Command Performance [Documentation] Benchmark version command execution time ${start_time}= Get Time epoch - ${result}= Run Process ${PYTHON} -m cleveragents --version timeout=60s + ${result}= Run Process ${PYTHON} -m cleveragents --version timeout=120s on_timeout=kill ${end_time}= Get Time epoch ${duration}= Evaluate ${end_time} - ${start_time} Should Be True ${duration} < 60 Version command took too long: ${duration}s @@ -37,28 +37,28 @@ CLI Version Command Performance Python Module Entry Works [Documentation] Verify Python module entry point works correctly - ${result}= Run Process ${PYTHON} -m cleveragents --help timeout=60s + ${result}= Run Process ${PYTHON} -m cleveragents --help timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} AI-powered development assistant Should Contain ${result.stdout} Usage: CLI Diagnostics Command [Documentation] Test diagnostics command functionality - ${result}= Run Process ${PYTHON} -m cleveragents diagnostics timeout=60s + ${result}= Run Process ${PYTHON} -m cleveragents diagnostics timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} Checks Should Contain ${result.stdout} Summary CLI Info Command [Documentation] Test info command functionality - ${result}= Run Process ${PYTHON} -m cleveragents info timeout=60s + ${result}= Run Process ${PYTHON} -m cleveragents info timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} Environment Should Contain ${result.stdout} Runtime Invalid Command Error Handling [Documentation] Verify proper error handling for invalid commands - ${result}= Run Process ${PYTHON} -m cleveragents invalid-command-xyz timeout=60s + ${result}= Run Process ${PYTHON} -m cleveragents invalid-command-xyz timeout=120s on_timeout=kill Should Not Be Equal As Integers ${result.rc} 0 Should Contain ${result.stderr} Error: Invalid command @@ -67,7 +67,7 @@ Multiple Commands Benchmark ${commands}= Create List --help --version diagnostics info ${total_start}= Get Time epoch FOR ${cmd} IN @{commands} - ${result}= Run Process ${PYTHON} -m cleveragents ${cmd} timeout=60s + ${result}= Run Process ${PYTHON} -m cleveragents ${cmd} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Command failed: ${cmd} END ${total_end}= Get Time epoch @@ -79,7 +79,7 @@ CLI Response Time Consistency @{durations}= Create List FOR ${i} IN RANGE 5 ${start}= Get Time epoch - ${result}= Run Process ${PYTHON} -m cleveragents --help timeout=60s + ${result}= Run Process ${PYTHON} -m cleveragents --help timeout=120s on_timeout=kill ${end}= Get Time epoch ${duration}= Evaluate ${end} - ${start} Append To List ${durations} ${duration} diff --git a/robot/cli_core.robot b/robot/cli_core.robot index 54db72b23..00a6b7c73 100644 --- a/robot/cli_core.robot +++ b/robot/cli_core.robot @@ -16,20 +16,20 @@ Run CLI With Clean Home [Documentation] Run a CLI command with a temp HOME to avoid stale config [Arguments] @{cmd} ${tmpdir}= Evaluate __import__('tempfile').mkdtemp(prefix='cli_core_') - ${result}= Run Process @{cmd} timeout=60s env:HOME=${tmpdir} + ${result}= Run Process @{cmd} timeout=120s on_timeout=kill env:HOME=${tmpdir} RETURN ${result} *** Test Cases *** Version Command Default Rich Format [Documentation] Version command with default (rich) format shows version string - ${result}= Run Process ${PYTHON} -m cleveragents version timeout=60s + ${result}= Run Process ${PYTHON} -m cleveragents version timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} 1.0.0 Should Contain ${result.stdout} CleverAgents Version Command JSON Format [Documentation] Version command with --format json returns valid JSON - ${result}= Run Process ${PYTHON} -m cleveragents version --format json timeout=60s + ${result}= Run Process ${PYTHON} -m cleveragents version --format json timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} "version": "1.0.0" Should Contain ${result.stdout} "schema": "v3" @@ -41,21 +41,21 @@ Version Command JSON Format Version Command Plain Format [Documentation] Version command with --format plain returns key-value pairs - ${result}= Run Process ${PYTHON} -m cleveragents version --format plain timeout=60s + ${result}= Run Process ${PYTHON} -m cleveragents version --format plain timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} version: 1.0.0 Should Contain ${result.stdout} schema: v3 Version Command YAML Format [Documentation] Version command with --format yaml returns YAML - ${result}= Run Process ${PYTHON} -m cleveragents version --format yaml timeout=60s + ${result}= Run Process ${PYTHON} -m cleveragents version --format yaml timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} version: 1.0.0 Should Contain ${result.stdout} schema: v3 Info Command Default Rich Format [Documentation] Info command with default (rich) format shows environment details - ${result}= Run Process ${PYTHON} -m cleveragents info timeout=60s + ${result}= Run Process ${PYTHON} -m cleveragents info timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} Environment Should Contain ${result.stdout} Runtime @@ -78,14 +78,14 @@ Info Command Plain Format Diagnostics Command Default Rich Format [Documentation] Diagnostics command with default (rich) format runs checks - ${result}= Run Process ${PYTHON} -m cleveragents diagnostics timeout=60s + ${result}= Run Process ${PYTHON} -m cleveragents diagnostics timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} Checks Should Contain ${result.stdout} Summary Diagnostics Command JSON Format [Documentation] Diagnostics command with --format json returns structured data - ${result}= Run Process ${PYTHON} -m cleveragents diagnostics --format json timeout=60s + ${result}= Run Process ${PYTHON} -m cleveragents diagnostics --format json timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} "checks" Should Contain ${result.stdout} "summary" @@ -96,14 +96,14 @@ Diagnostics Command JSON Format Diagnostics Command Plain Format [Documentation] Diagnostics command with --format plain returns key-value pairs - ${result}= Run Process ${PYTHON} -m cleveragents diagnostics --format plain timeout=60s + ${result}= Run Process ${PYTHON} -m cleveragents diagnostics --format plain timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} checks: Should Contain ${result.stdout} summary: Diagnostics Command Check Flag Returns Valid Exit Code [Documentation] Diagnostics --check exits 0 when no errors are found - ${result}= Run Process ${PYTHON} -m cleveragents diagnostics --check --format json timeout=60s + ${result}= Run Process ${PYTHON} -m cleveragents diagnostics --check --format json timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Diagnostics --check failed with rc=${result.rc}: ${result.stdout} Should Contain ${result.stdout} "checks" Should Contain ${result.stdout} "has_errors" @@ -111,7 +111,7 @@ Diagnostics Command Check Flag Returns Valid Exit Code Diagnostics Command Performance [Documentation] Diagnostics command completes within acceptable time ${start}= Get Time epoch - ${result}= Run Process ${PYTHON} -m cleveragents diagnostics --format json timeout=60s + ${result}= Run Process ${PYTHON} -m cleveragents diagnostics --format json timeout=120s on_timeout=kill ${end}= Get Time epoch ${duration}= Evaluate ${end} - ${start} Should Be True ${duration} < 30 Diagnostics took too long: ${duration}s diff --git a/robot/cli_init_yes_flag.robot b/robot/cli_init_yes_flag.robot index 873c5b2b2..71a4284c1 100644 --- a/robot/cli_init_yes_flag.robot +++ b/robot/cli_init_yes_flag.robot @@ -15,7 +15,7 @@ Init Yes Flag Exits Without Error [Tags] wip ${tmpdir}= Evaluate __import__('tempfile').mkdtemp(prefix='init_yes_') ${result}= Run Process ${PYTHON} -m cleveragents init --yes - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${result.rc} 0 ... msg=Expected exit code 0 but got ${result.rc}. stderr: ${result.stderr} [Teardown] Remove Directory ${tmpdir} recursive=True @@ -26,7 +26,7 @@ Init Yes Flag Produces Summary Output [Tags] wip ${tmpdir}= Evaluate __import__('tempfile').mkdtemp(prefix='init_yes_out_') ${result}= Run Process ${PYTHON} -m cleveragents init --yes - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${result.rc} 0 ... msg=Expected exit code 0 but got ${result.rc}. stderr: ${result.stderr} Should Contain ${result.stdout} Initialized (non-interactive) @@ -46,7 +46,7 @@ Init Short Y Flag Exits Without Error [Tags] wip ${tmpdir}= Evaluate __import__('tempfile').mkdtemp(prefix='init_y_') ${result}= Run Process ${PYTHON} -m cleveragents init -y - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${result.rc} 0 ... msg=Expected exit code 0 but got ${result.rc}. stderr: ${result.stderr} [Teardown] Remove Directory ${tmpdir} recursive=True diff --git a/robot/cli_plan_context_commands.robot b/robot/cli_plan_context_commands.robot index f833d55d6..8386009da 100644 --- a/robot/cli_plan_context_commands.robot +++ b/robot/cli_plan_context_commands.robot @@ -21,7 +21,7 @@ Initialize New Project [Setup] Setup Test Directory ${result}= Run Process ${PYTHON} -m cleveragents init ${PROJECT_NAME} - ... cwd=${TEST_DIR} env:CLEVERAGENTS_AUTO_APPLY_MIGRATIONS=true stderr=STDOUT timeout=120s + ... cwd=${TEST_DIR} env:CLEVERAGENTS_AUTO_APPLY_MIGRATIONS=true stderr=STDOUT timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Init failed: ${result.stdout} Should Exist ${TEST_DIR}${/}.cleveragents @@ -39,13 +39,13 @@ Add Files To Context # Add files to context ${result}= Run Process ${PYTHON} -m cleveragents context-load test.py main.py - ... cwd=${TEST_DIR} timeout=120s + ... cwd=${TEST_DIR} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 # Verify files are in context ${result}= Run Process ${PYTHON} -m cleveragents context list - ... cwd=${TEST_DIR} timeout=120s + ... cwd=${TEST_DIR} timeout=120s on_timeout=kill Should Contain ${result.stdout} test.py Should Contain ${result.stdout} main.py @@ -57,13 +57,13 @@ Create Plan With Tell [Setup] Initialize Test Project ${result}= Run Process ${PYTHON} -m cleveragents tell Add error handling - ... cwd=${TEST_DIR} timeout=120s + ... cwd=${TEST_DIR} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 # Verify plan was created with correct name derived from prompt ${result}= Run Process ${PYTHON} -m cleveragents plan current - ... cwd=${TEST_DIR} timeout=120s + ... cwd=${TEST_DIR} timeout=120s on_timeout=kill Should Contain ${result.stdout} add_error_handling @@ -74,7 +74,7 @@ Build Plan [Setup] Initialize Test Project With Plan ${result}= Run Process ${PYTHON} -m cleveragents build - ... cwd=${TEST_DIR} env:CLEVERAGENTS_TESTING_USE_MOCK_AI=true timeout=120s + ... cwd=${TEST_DIR} env:CLEVERAGENTS_TESTING_USE_MOCK_AI=true timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 @@ -85,7 +85,7 @@ Apply Plan Changes [Setup] Initialize Test Project With Built Plan ${result}= Run Process ${PYTHON} -m cleveragents apply --yes - ... cwd=${TEST_DIR} timeout=120s + ... cwd=${TEST_DIR} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 @@ -96,13 +96,13 @@ Create New Empty Plan [Setup] Initialize Test Project ${result}= Run Process ${PYTHON} -m cleveragents plan new feature-plan - ... cwd=${TEST_DIR} timeout=120s + ... cwd=${TEST_DIR} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 # Verify new plan is current ${result}= Run Process ${PYTHON} -m cleveragents plan current - ... cwd=${TEST_DIR} timeout=120s + ... cwd=${TEST_DIR} timeout=120s on_timeout=kill Should Contain ${result.stdout} feature-plan @@ -113,7 +113,7 @@ Show Current Plan [Setup] Initialize Test Project ${result}= Run Process ${PYTHON} -m cleveragents plan current - ... cwd=${TEST_DIR} timeout=120s + ... cwd=${TEST_DIR} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} main @@ -125,7 +125,7 @@ List All Plans [Setup] Initialize Test Project With Multiple Plans ${result}= Run Process ${PYTHON} -m cleveragents plan list - ... cwd=${TEST_DIR} timeout=120s + ... cwd=${TEST_DIR} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} main @@ -140,13 +140,13 @@ Switch Between Plans # Switch to feature-1 ${result}= Run Process ${PYTHON} -m cleveragents plan cd feature-1 - ... cwd=${TEST_DIR} timeout=120s + ... cwd=${TEST_DIR} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 # Verify switch ${result}= Run Process ${PYTHON} -m cleveragents plan current - ... cwd=${TEST_DIR} timeout=120s + ... cwd=${TEST_DIR} timeout=120s on_timeout=kill Should Contain ${result.stdout} feature-1 @@ -157,7 +157,7 @@ Continue Working On Plan [Setup] Initialize Test Project With Plan ${result}= Run Process ${PYTHON} -m cleveragents plan continue Also add logging - ... cwd=${TEST_DIR} env:CLEVERAGENTS_TESTING_USE_MOCK_AI=true timeout=30s + ... cwd=${TEST_DIR} env:CLEVERAGENTS_TESTING_USE_MOCK_AI=true timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 @@ -168,7 +168,7 @@ List Context Files [Setup] Initialize Test Project With Context ${result}= Run Process ${PYTHON} -m cleveragents context list - ... cwd=${TEST_DIR} timeout=120s + ... cwd=${TEST_DIR} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} test.py @@ -182,14 +182,14 @@ Show Context Content # Show specific file content ${result}= Run Process ${PYTHON} -m cleveragents context show test.py - ... cwd=${TEST_DIR} timeout=120s + ... cwd=${TEST_DIR} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} def hello # Also test showing summary (without file argument) ${result}= Run Process ${PYTHON} -m cleveragents context show - ... cwd=${TEST_DIR} timeout=120s + ... cwd=${TEST_DIR} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} Context Summary @@ -203,13 +203,13 @@ Remove File From Context # Remove test.py ${result}= Run Process ${PYTHON} -m cleveragents context rm test.py - ... cwd=${TEST_DIR} timeout=120s + ... cwd=${TEST_DIR} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 # Verify removal ${result}= Run Process ${PYTHON} -m cleveragents context list - ... cwd=${TEST_DIR} timeout=120s + ... cwd=${TEST_DIR} timeout=120s on_timeout=kill Should Not Contain ${result.stdout} test.py Should Contain ${result.stdout} utils.py @@ -221,13 +221,13 @@ Clear All Context [Setup] Initialize Test Project With Context ${result}= Run Process ${PYTHON} -m cleveragents context clear --yes - ... cwd=${TEST_DIR} env:CLEVERAGENTS_AUTO_APPLY_MIGRATIONS=true stderr=STDOUT timeout=120s + ... cwd=${TEST_DIR} env:CLEVERAGENTS_AUTO_APPLY_MIGRATIONS=true stderr=STDOUT timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Context clear failed: ${result.stdout} # Verify context is empty ${result}= Run Process ${PYTHON} -m cleveragents context list - ... cwd=${TEST_DIR} env:CLEVERAGENTS_AUTO_APPLY_MIGRATIONS=true stderr=STDOUT timeout=120s + ... cwd=${TEST_DIR} env:CLEVERAGENTS_AUTO_APPLY_MIGRATIONS=true stderr=STDOUT timeout=120s on_timeout=kill Should Not Contain ${result.stdout} test.py Should Not Contain ${result.stdout} utils.py @@ -240,7 +240,7 @@ Command Error Handling # Try to use command without project ${result}= Run Process ${PYTHON} -m cleveragents plan tell test - ... cwd=${TEST_DIR} stderr=STDOUT timeout=120s + ... cwd=${TEST_DIR} stderr=STDOUT timeout=120s on_timeout=kill Should Not Be Equal As Integers ${result.rc} 0 @@ -261,31 +261,31 @@ Initialize Test Project [Documentation] Initialize a test project Setup Test Directory ${result}= Run Process ${PYTHON} -m cleveragents init ${PROJECT_NAME} - ... cwd=${TEST_DIR} timeout=120s + ... cwd=${TEST_DIR} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Initialize Test Project With Plan [Documentation] Initialize project and create a plan Initialize Test Project ${result}= Run Process ${PYTHON} -m cleveragents tell Test instruction - ... cwd=${TEST_DIR} env:CLEVERAGENTS_TESTING_USE_MOCK_AI=true timeout=120s + ... cwd=${TEST_DIR} env:CLEVERAGENTS_TESTING_USE_MOCK_AI=true timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Initialize Test Project With Built Plan [Documentation] Initialize project with a built plan Initialize Test Project With Plan ${result}= Run Process ${PYTHON} -m cleveragents build - ... cwd=${TEST_DIR} env:CLEVERAGENTS_TESTING_USE_MOCK_AI=true timeout=120s + ... cwd=${TEST_DIR} env:CLEVERAGENTS_TESTING_USE_MOCK_AI=true timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Initialize Test Project With Multiple Plans [Documentation] Initialize project with multiple plans Initialize Test Project ${result}= Run Process ${PYTHON} -m cleveragents plan new feature-1 - ... cwd=${TEST_DIR} timeout=120s + ... cwd=${TEST_DIR} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 ${result}= Run Process ${PYTHON} -m cleveragents plan new feature-2 - ... cwd=${TEST_DIR} timeout=120s + ... cwd=${TEST_DIR} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Initialize Test Project With Context @@ -294,5 +294,5 @@ Initialize Test Project With Context Create File ${TEST_DIR}${/}test.py def hello(): pass Create File ${TEST_DIR}${/}utils.py import os ${result}= Run Process ${PYTHON} -m cleveragents context-load test.py utils.py - ... cwd=${TEST_DIR} env:CLEVERAGENTS_AUTO_APPLY_MIGRATIONS=true stderr=STDOUT timeout=120s + ... cwd=${TEST_DIR} env:CLEVERAGENTS_AUTO_APPLY_MIGRATIONS=true stderr=STDOUT timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 context-load failed: ${result.stdout} diff --git a/robot/concurrency_locks.robot b/robot/concurrency_locks.robot index 60726f61f..5140368a7 100644 --- a/robot/concurrency_locks.robot +++ b/robot/concurrency_locks.robot @@ -11,7 +11,7 @@ ${PYTHON} python Lock Acquire Release Smoke Test [Documentation] Acquire and release a concurrency lock via helper ${result}= Run Process ${PYTHON} ${CURDIR}/helper_concurrency_locks.py - ... stderr=STDOUT timeout=30s + ... stderr=STDOUT timeout=120s on_timeout=kill Log ${result.stdout} Should Contain ${result.stdout} PASS: concurrency_locks smoke test Should Be Equal As Integers ${result.rc} 0 diff --git a/robot/container_tool_exec.robot b/robot/container_tool_exec.robot index c83b18c61..b406b5171 100644 --- a/robot/container_tool_exec.robot +++ b/robot/container_tool_exec.robot @@ -17,7 +17,7 @@ PathMapper Maps Host To Container ... assert result == '/workspace/src/f.py', f"got {result}" ... print("OK") ${result}= Run Process ${PYTHON} -c ${script} - ... timeout=${TIMEOUT} env:PYTHONPATH=${CURDIR}/../src + ... timeout=${TIMEOUT} on_timeout=kill env:PYTHONPATH=${CURDIR}/../src Should Be Equal As Integers ${result.rc} 0 PathMapper host_to_container failed: ${result.stderr} Should Be Equal As Strings ${result.stdout.strip()} OK @@ -30,7 +30,7 @@ PathMapper Maps Container To Host ... assert result == '/tmp/sandbox/src/f.py', f"got {result}" ... print("OK") ${result}= Run Process ${PYTHON} -c ${script} - ... timeout=${TIMEOUT} env:PYTHONPATH=${CURDIR}/../src + ... timeout=${TIMEOUT} on_timeout=kill env:PYTHONPATH=${CURDIR}/../src Should Be Equal As Integers ${result.rc} 0 PathMapper container_to_host failed: ${result.stderr} Should Be Equal As Strings ${result.stdout.strip()} OK @@ -43,7 +43,7 @@ PathMapper Leaves External Paths Unmapped ... assert result == '/usr/lib/x', f"got {result}" ... print("OK") ${result}= Run Process ${PYTHON} -c ${script} - ... timeout=${TIMEOUT} env:PYTHONPATH=${CURDIR}/../src + ... timeout=${TIMEOUT} on_timeout=kill env:PYTHONPATH=${CURDIR}/../src Should Be Equal As Integers ${result.rc} 0 PathMapper external path mapping failed: ${result.stderr} Should Be Equal As Strings ${result.stdout.strip()} OK @@ -56,7 +56,7 @@ ContainerConfig Has Defaults ... assert c.timeout_seconds == 120, f"got {c.timeout_seconds}" ... print("OK") ${result}= Run Process ${PYTHON} -c ${script} - ... timeout=${TIMEOUT} env:PYTHONPATH=${CURDIR}/../src + ... timeout=${TIMEOUT} on_timeout=kill env:PYTHONPATH=${CURDIR}/../src Should Be Equal As Integers ${result.rc} 0 ContainerConfig defaults test failed: ${result.stderr} Should Be Equal As Strings ${result.stdout.strip()} OK @@ -70,7 +70,7 @@ ContainerMetadata Is Frozen ... assert m.timed_out is False ... print("OK") ${result}= Run Process ${PYTHON} -c ${script} - ... timeout=${TIMEOUT} env:PYTHONPATH=${CURDIR}/../src + ... timeout=${TIMEOUT} on_timeout=kill env:PYTHONPATH=${CURDIR}/../src Should Be Equal As Integers ${result.rc} 0 ContainerMetadata test failed: ${result.stderr} Should Be Equal As Strings ${result.stdout.strip()} OK @@ -85,7 +85,7 @@ ContainerToolExecutor Instantiation ... assert e.path_mapper is not None ... print("OK") ${result}= Run Process ${PYTHON} -c ${script} - ... timeout=${TIMEOUT} env:PYTHONPATH=${CURDIR}/../src + ... timeout=${TIMEOUT} on_timeout=kill env:PYTHONPATH=${CURDIR}/../src Should Be Equal As Integers ${result.rc} 0 Executor instantiation failed: ${result.stderr} Should Be Equal As Strings ${result.stdout.strip()} OK @@ -98,7 +98,7 @@ ContainerExecutionError Carries Details ... assert e.stderr == 'bad', f"got {e.stderr}" ... print("OK") ${result}= Run Process ${PYTHON} -c ${script} - ... timeout=${TIMEOUT} env:PYTHONPATH=${CURDIR}/../src + ... timeout=${TIMEOUT} on_timeout=kill env:PYTHONPATH=${CURDIR}/../src Should Be Equal As Integers ${result.rc} 0 ContainerExecutionError test failed: ${result.stderr} Should Be Equal As Strings ${result.stdout.strip()} OK @@ -112,7 +112,7 @@ ContainerTimeoutError Carries Timeout ... assert '30' in str(e) ... print("OK") ${result}= Run Process ${PYTHON} -c ${script} - ... timeout=${TIMEOUT} env:PYTHONPATH=${CURDIR}/../src + ... timeout=${TIMEOUT} on_timeout=kill env:PYTHONPATH=${CURDIR}/../src Should Be Equal As Integers ${result.rc} 0 ContainerTimeoutError test failed: ${result.stderr} Should Be Equal As Strings ${result.stdout.strip()} OK @@ -128,7 +128,7 @@ ToolInvocation Has ContainerMetadata Field ... assert t.container_metadata['container_id'] == 'x' ... print("OK") ${result}= Run Process ${PYTHON} -c ${script} - ... timeout=${TIMEOUT} env:PYTHONPATH=${CURDIR}/../src + ... timeout=${TIMEOUT} on_timeout=kill env:PYTHONPATH=${CURDIR}/../src Should Be Equal As Integers ${result.rc} 0 ToolInvocation container_metadata test failed: ${result.stderr} Should Be Equal As Strings ${result.stdout.strip()} OK @@ -152,6 +152,6 @@ ToolRunner Container Routing Without Executor Returns Error ... assert 'ContainerToolExecutor' in res.error, f"Expected ContainerToolExecutor in error: {res.error}" ... print("OK") ${result}= Run Process ${PYTHON} -c ${script} - ... timeout=${TIMEOUT} env:PYTHONPATH=${CURDIR}/../src + ... timeout=${TIMEOUT} on_timeout=kill env:PYTHONPATH=${CURDIR}/../src Should Be Equal As Integers ${result.rc} 0 ToolRunner container routing test failed: ${result.stderr} Should Be Equal As Strings ${result.stdout.strip()} OK diff --git a/robot/core_cli_commands.robot b/robot/core_cli_commands.robot index 549811473..ec6fb286b 100644 --- a/robot/core_cli_commands.robot +++ b/robot/core_cli_commands.robot @@ -17,7 +17,7 @@ ${PROJECT_NAME} test-project *** Test Cases *** Test CLI Help Shows All Commands [Documentation] Verify that CLI help displays all expected command groups - ${result} = Run Process ${PYTHON} -m cleveragents --help timeout=120s + ${result} = Run Process ${PYTHON} -m cleveragents --help timeout=120s on_timeout=kill Should Be Equal As Numbers ${result.rc} 0 Should Contain ${result.stdout} AI-powered development assistant Should Contain ${result.stdout} project @@ -32,7 +32,7 @@ Test Project Initialization [Documentation] Test initializing a new CleverAgents project Create Directory ${TEST_DIR}/project1 ${result} = Run Process ${PYTHON} -m cleveragents init ${PROJECT_NAME} - ... cwd=${TEST_DIR}/project1 timeout=120s + ... cwd=${TEST_DIR}/project1 timeout=120s on_timeout=kill Should Be Equal As Numbers ${result.rc} 0 Should Contain ${result.stdout} Project '${PROJECT_NAME}' initialized successfully Directory Should Exist ${TEST_DIR}/project1/.cleveragents @@ -45,10 +45,10 @@ Test Project Initialization Test Project Cannot Initialize Twice [Documentation] Verify project cannot be initialized twice without force Create Directory ${TEST_DIR}/project2 - ${first_init}= Run Process ${PYTHON} -m cleveragents init first-project cwd=${TEST_DIR}/project2 timeout=120s + ${first_init}= Run Process ${PYTHON} -m cleveragents init first-project cwd=${TEST_DIR}/project2 timeout=120s on_timeout=kill Should Be Equal As Numbers ${first_init.rc} 0 ${result} = Run Process ${PYTHON} -m cleveragents init second-project - ... cwd=${TEST_DIR}/project2 timeout=120s + ... cwd=${TEST_DIR}/project2 timeout=120s on_timeout=kill Should Not Be Equal As Numbers ${result.rc} 0 Should Contain ${result.stderr} Project already initialized Should Contain ${result.stderr} --force @@ -56,21 +56,21 @@ Test Project Cannot Initialize Twice Test Force Reinitialize Project [Documentation] Test force reinitialization of a project Create Directory ${TEST_DIR}/project3 - ${first_init}= Run Process ${PYTHON} -m cleveragents init first-project cwd=${TEST_DIR}/project3 timeout=120s + ${first_init}= Run Process ${PYTHON} -m cleveragents init first-project cwd=${TEST_DIR}/project3 timeout=120s on_timeout=kill Should Be Equal As Numbers ${first_init.rc} 0 ${result} = Run Process ${PYTHON} -m cleveragents init second-project --force - ... cwd=${TEST_DIR}/project3 timeout=120s + ... cwd=${TEST_DIR}/project3 timeout=120s on_timeout=kill Should Be Equal As Numbers ${result.rc} 0 Should Contain ${result.stdout} Project 'second-project' initialized successfully Test Context Add Files [Documentation] Test adding files to context Create Directory ${TEST_DIR}/project4 - ${init_result}= Run Process ${PYTHON} -m cleveragents init ${PROJECT_NAME} cwd=${TEST_DIR}/project4 timeout=120s + ${init_result}= Run Process ${PYTHON} -m cleveragents init ${PROJECT_NAME} cwd=${TEST_DIR}/project4 timeout=120s on_timeout=kill Should Be Equal As Numbers ${init_result.rc} 0 Create File ${TEST_DIR}/project4/test.py print('hello world') ${result} = Run Process ${PYTHON} -m cleveragents context add test.py - ... cwd=${TEST_DIR}/project4 timeout=120s + ... cwd=${TEST_DIR}/project4 timeout=120s on_timeout=kill Should Be Equal As Numbers ${result.rc} 0 Should Contain ${result.stdout} Added 1 file(s) to context Should Contain ${result.stdout} test.py @@ -80,16 +80,16 @@ Test Context List Files ${unique_dir} = Set Variable ${TEST_DIR}/project5_${TEST NAME.replace(' ', '_')} Create Directory ${unique_dir} ${init_result} = Run Process ${PYTHON} -m cleveragents init ${PROJECT_NAME} - ... cwd=${unique_dir} timeout=120s + ... cwd=${unique_dir} timeout=120s on_timeout=kill Should Be Equal As Numbers ${init_result.rc} 0 Create File ${unique_dir}/file1.py # File 1 Create File ${unique_dir}/file2.py # File 2 ${add_result} = Run Process ${PYTHON} -m cleveragents context add file1.py file2.py - ... cwd=${unique_dir} timeout=120s + ... cwd=${unique_dir} timeout=120s on_timeout=kill Should Be Equal As Numbers ${add_result.rc} 0 Directory Should Exist ${unique_dir} ${result} = Run Process ${PYTHON} -m cleveragents context list - ... cwd=${unique_dir} timeout=120s + ... cwd=${unique_dir} timeout=120s on_timeout=kill Should Be Equal As Numbers ${result.rc} 0 Should Contain ${result.stdout} file1.py Should Contain ${result.stdout} file2.py @@ -97,23 +97,23 @@ Test Context List Files Test Context Clear [Documentation] Test clearing context files Create Directory ${TEST_DIR}/project6 - ${init_result}= Run Process ${PYTHON} -m cleveragents init ${PROJECT_NAME} cwd=${TEST_DIR}/project6 timeout=120s + ${init_result}= Run Process ${PYTHON} -m cleveragents init ${PROJECT_NAME} cwd=${TEST_DIR}/project6 timeout=120s on_timeout=kill Should Be Equal As Numbers ${init_result.rc} 0 Create File ${TEST_DIR}/project6/test.py # Test file - ${add_result}= Run Process ${PYTHON} -m cleveragents context add test.py cwd=${TEST_DIR}/project6 timeout=120s + ${add_result}= Run Process ${PYTHON} -m cleveragents context add test.py cwd=${TEST_DIR}/project6 timeout=120s on_timeout=kill Should Be Equal As Numbers ${add_result.rc} 0 ${result} = Run Process ${PYTHON} -m cleveragents context clear --yes - ... cwd=${TEST_DIR}/project6 timeout=120s + ... cwd=${TEST_DIR}/project6 timeout=120s on_timeout=kill Should Be Equal As Numbers ${result.rc} 0 Should Contain ${result.stdout} Cleared all files from context Test Plan Creation With Tell [Documentation] Test creating a plan using tell command Create Directory ${TEST_DIR}/project7 - ${init_result}= Run Process ${PYTHON} -m cleveragents init ${PROJECT_NAME} cwd=${TEST_DIR}/project7 timeout=120s + ${init_result}= Run Process ${PYTHON} -m cleveragents init ${PROJECT_NAME} cwd=${TEST_DIR}/project7 timeout=120s on_timeout=kill Should Be Equal As Numbers ${init_result.rc} 0 ${result} = Run Process ${PYTHON} -m cleveragents tell Add error handling to main function - ... cwd=${TEST_DIR}/project7 timeout=120s + ... cwd=${TEST_DIR}/project7 timeout=120s on_timeout=kill Should Be Equal As Numbers ${result.rc} 0 Should Contain ${result.stdout} Plan created Should Contain ${result.stdout} error handling @@ -121,12 +121,12 @@ Test Plan Creation With Tell Test Plan Build [Documentation] Test building a plan Create Directory ${TEST_DIR}/project8 - ${init_result}= Run Process ${PYTHON} -m cleveragents init ${PROJECT_NAME} cwd=${TEST_DIR}/project8 timeout=120s + ${init_result}= Run Process ${PYTHON} -m cleveragents init ${PROJECT_NAME} cwd=${TEST_DIR}/project8 timeout=120s on_timeout=kill Should Be Equal As Numbers ${init_result.rc} 0 - ${tell_result}= Run Process ${PYTHON} -m cleveragents tell Create example code cwd=${TEST_DIR}/project8 timeout=120s + ${tell_result}= Run Process ${PYTHON} -m cleveragents tell Create example code cwd=${TEST_DIR}/project8 timeout=120s on_timeout=kill Should Be Equal As Numbers ${tell_result.rc} 0 ${result} = Run Process ${PYTHON} -m cleveragents build cwd=${TEST_DIR}/project8 - ... env:CLEVERAGENTS_TESTING_USE_MOCK_AI=true timeout=120s + ... env:CLEVERAGENTS_TESTING_USE_MOCK_AI=true timeout=120s on_timeout=kill Should Be Equal As Numbers ${result.rc} 0 Should Contain ${result.stdout} Plan built successfully Should Contain ${result.stdout} Generated @@ -135,14 +135,14 @@ Test Plan Build Test Plan Apply [Documentation] Test applying plan changes Create Directory ${TEST_DIR}/project9 - ${init_result}= Run Process ${PYTHON} -m cleveragents init ${PROJECT_NAME} cwd=${TEST_DIR}/project9 timeout=120s + ${init_result}= Run Process ${PYTHON} -m cleveragents init ${PROJECT_NAME} cwd=${TEST_DIR}/project9 timeout=120s on_timeout=kill Should Be Equal As Numbers ${init_result.rc} 0 - ${tell_result}= Run Process ${PYTHON} -m cleveragents tell Create example file cwd=${TEST_DIR}/project9 timeout=120s + ${tell_result}= Run Process ${PYTHON} -m cleveragents tell Create example file cwd=${TEST_DIR}/project9 timeout=120s on_timeout=kill Should Be Equal As Numbers ${tell_result.rc} 0 ${build_result}= Run Process ${PYTHON} -m cleveragents build cwd=${TEST_DIR}/project9 - ... env:CLEVERAGENTS_TESTING_USE_MOCK_AI=true timeout=120s + ... env:CLEVERAGENTS_TESTING_USE_MOCK_AI=true timeout=120s on_timeout=kill Should Be Equal As Numbers ${build_result.rc} 0 - ${result} = Run Process ${PYTHON} -m cleveragents apply --yes cwd=${TEST_DIR}/project9 timeout=120s + ${result} = Run Process ${PYTHON} -m cleveragents apply --yes cwd=${TEST_DIR}/project9 timeout=120s on_timeout=kill Should Be Equal As Numbers ${result.rc} 0 Should Contain ${result.stdout} Successfully applied File Should Exist ${TEST_DIR}/project9/example.py @@ -150,25 +150,25 @@ Test Plan Apply Test Plan List [Documentation] Test listing plans Create Directory ${TEST_DIR}/project10 - ${init_result}= Run Process ${PYTHON} -m cleveragents init ${PROJECT_NAME} cwd=${TEST_DIR}/project10 timeout=120s + ${init_result}= Run Process ${PYTHON} -m cleveragents init ${PROJECT_NAME} cwd=${TEST_DIR}/project10 timeout=120s on_timeout=kill Should Be Equal As Numbers ${init_result.rc} 0 - ${tell_result}= Run Process ${PYTHON} -m cleveragents tell First plan cwd=${TEST_DIR}/project10 timeout=120s + ${tell_result}= Run Process ${PYTHON} -m cleveragents tell First plan cwd=${TEST_DIR}/project10 timeout=120s on_timeout=kill Should Be Equal As Numbers ${tell_result.rc} 0 - ${plan_result}= Run Process ${PYTHON} -m cleveragents plan new second-plan cwd=${TEST_DIR}/project10 timeout=120s + ${plan_result}= Run Process ${PYTHON} -m cleveragents plan new second-plan cwd=${TEST_DIR}/project10 timeout=120s on_timeout=kill Should Be Equal As Numbers ${plan_result.rc} 0 - ${result} = Run Process ${PYTHON} -m cleveragents plan list cwd=${TEST_DIR}/project10 timeout=120s + ${result} = Run Process ${PYTHON} -m cleveragents plan list cwd=${TEST_DIR}/project10 timeout=120s on_timeout=kill Should Be Equal As Numbers ${result.rc} 0 Should Contain ${result.stdout} Plans (3 total) Test Shortcut Commands Work [Documentation] Test that shortcut commands work properly Create Directory ${TEST_DIR}/project11 - ${init_result}= Run Process ${PYTHON} -m cleveragents init ${PROJECT_NAME} cwd=${TEST_DIR}/project11 timeout=120s + ${init_result}= Run Process ${PYTHON} -m cleveragents init ${PROJECT_NAME} cwd=${TEST_DIR}/project11 timeout=120s on_timeout=kill Should Be Equal As Numbers ${init_result.rc} 0 Create File ${TEST_DIR}/project11/test.txt Test content # Test context-load shortcut ${result} = Run Process ${PYTHON} -m cleveragents context-load test.txt - ... cwd=${TEST_DIR}/project11 timeout=120s + ... cwd=${TEST_DIR}/project11 timeout=120s on_timeout=kill Should Be Equal As Numbers ${result.rc} 0 Should Contain ${result.stdout} Added 1 file(s) to context @@ -177,30 +177,30 @@ Test End To End Workflow Create Directory ${TEST_DIR}/project12 # Initialize project ${init} = Run Process ${PYTHON} -m cleveragents init workflow-project - ... cwd=${TEST_DIR}/project12 timeout=120s + ... cwd=${TEST_DIR}/project12 timeout=120s on_timeout=kill Should Be Equal As Numbers ${init.rc} 0 # Add context Create File ${TEST_DIR}/project12/input.py def main(): pass ${add} = Run Process ${PYTHON} -m cleveragents context add input.py - ... cwd=${TEST_DIR}/project12 timeout=120s + ... cwd=${TEST_DIR}/project12 timeout=120s on_timeout=kill Should Be Equal As Numbers ${add.rc} 0 # Create plan ${tell} = Run Process ${PYTHON} -m cleveragents tell Add logging to main function - ... cwd=${TEST_DIR}/project12 timeout=120s + ... cwd=${TEST_DIR}/project12 timeout=120s on_timeout=kill Should Be Equal As Numbers ${tell.rc} 0 # Build plan ${build} = Run Process ${PYTHON} -m cleveragents build cwd=${TEST_DIR}/project12 - ... env:CLEVERAGENTS_TESTING_USE_MOCK_AI=true timeout=120s + ... env:CLEVERAGENTS_TESTING_USE_MOCK_AI=true timeout=120s on_timeout=kill Should Be Equal As Numbers ${build.rc} 0 # Apply changes - ${apply} = Run Process ${PYTHON} -m cleveragents apply --yes cwd=${TEST_DIR}/project12 timeout=120s + ${apply} = Run Process ${PYTHON} -m cleveragents apply --yes cwd=${TEST_DIR}/project12 timeout=120s on_timeout=kill Should Be Equal As Numbers ${apply.rc} 0 # Verify file created File Should Exist ${TEST_DIR}/project12/example.py Test Command Error Handling [Documentation] Test error handling for invalid commands - ${result} = Run Process ${PYTHON} -m cleveragents invalid-command timeout=120s + ${result} = Run Process ${PYTHON} -m cleveragents invalid-command timeout=120s on_timeout=kill Should Not Be Equal As Numbers ${result.rc} 0 Should Contain ${result.stderr} Invalid command @@ -208,17 +208,17 @@ Test Project Status Without Project [Documentation] Test project status command without initialized project Create Directory ${TEST_DIR}/no_project ${result} = Run Process ${PYTHON} -m cleveragents project status - ... cwd=${TEST_DIR}/no_project timeout=120s + ... cwd=${TEST_DIR}/no_project timeout=120s on_timeout=kill Should Not Be Equal As Numbers ${result.rc} 0 Should Contain ${result.stderr} No project found Test Project Status With Project [Documentation] Test project status command with initialized project Create Directory ${TEST_DIR}/with_project - ${init_result}= Run Process ${PYTHON} -m cleveragents init status-test cwd=${TEST_DIR}/with_project timeout=120s + ${init_result}= Run Process ${PYTHON} -m cleveragents init status-test cwd=${TEST_DIR}/with_project timeout=120s on_timeout=kill Should Be Equal As Numbers ${init_result.rc} 0 ${result} = Run Process ${PYTHON} -m cleveragents project status - ... cwd=${TEST_DIR}/with_project timeout=120s + ... cwd=${TEST_DIR}/with_project timeout=120s on_timeout=kill Should Be Equal As Numbers ${result.rc} 0 Should Contain ${result.stdout} Project: status-test Should Contain ${result.stdout} Plans: 1 diff --git a/robot/database_integration.robot b/robot/database_integration.robot index bd79b7a1b..f4d1c8f89 100644 --- a/robot/database_integration.robot +++ b/robot/database_integration.robot @@ -759,7 +759,7 @@ Run Python Script # Create File writes to it (avoids leaking an open descriptor). ${temp_file}= Evaluate (lambda t: (__import__('os').close(t[0]), t[1])[-1])(__import__('tempfile').mkstemp(suffix='.py', dir='/tmp')) Create File ${temp_file} ${full_code} - ${result}= Run Process ${PYTHON} ${temp_file} timeout=120s stderr=STDOUT env:PYTHONWARNINGS=ignore env:PYTHONDONTWRITEBYTECODE=1 + ${result}= Run Process ${PYTHON} ${temp_file} timeout=120s on_timeout=kill stderr=STDOUT env:PYTHONWARNINGS=ignore env:PYTHONDONTWRITEBYTECODE=1 Remove File ${temp_file} # Check if process failed and log stderr if present IF ${result.rc} != 0 diff --git a/robot/decision_di_wiring_smoke.robot b/robot/decision_di_wiring_smoke.robot index 470e94e92..4bae1267a 100644 --- a/robot/decision_di_wiring_smoke.robot +++ b/robot/decision_di_wiring_smoke.robot @@ -12,7 +12,7 @@ Verify Decision DI Resolution [Documentation] Verify DecisionService can be resolved from the DI container [Tags] di decision smoke # Normal duration: ~5-10s. Timeout raised from 30s to 120s for pabot cold-start. - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} resolve-service cwd=${WORKSPACE} timeout=120s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} resolve-service cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} resolve-service-ok @@ -20,6 +20,6 @@ Verify Decision Recording Integration [Documentation] Verify DecisionService records decisions during lifecycle transitions [Tags] di decision lifecycle smoke # Normal duration: ~5-10s. Timeout raised from 30s to 120s for pabot cold-start. - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} record-integration cwd=${WORKSPACE} timeout=120s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} record-integration cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} record-integration-ok diff --git a/robot/decision_persistence.robot b/robot/decision_persistence.robot index 34b211384..9950f91ed 100644 --- a/robot/decision_persistence.robot +++ b/robot/decision_persistence.robot @@ -11,55 +11,55 @@ ${HELPER_SCRIPT} robot/helper_decision_persistence.py Create And Retrieve Root Decision [Documentation] Create a root prompt_definition decision, persist, retrieve [Tags] database decision persistence - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} create-retrieve cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} create-retrieve cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} create-retrieve-ok Create Child Decision With Parent [Documentation] Create a child strategy_choice under a root decision [Tags] database decision persistence - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} create-child cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} create-child cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} create-child-ok JSON Fields Round-Trip [Documentation] Persist alternatives, context snapshot, artifacts and verify round-trip [Tags] database decision json persistence - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} json-roundtrip cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} json-roundtrip cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} json-roundtrip-ok Get Decisions By Plan [Documentation] Retrieve all decisions for a plan in sequence order [Tags] database decision query persistence - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} get-by-plan cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} get-by-plan cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} get-by-plan-ok Decision Tree BFS Traversal [Documentation] Build a 3-level tree and retrieve via BFS [Tags] database decision tree persistence - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} tree-bfs cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} tree-bfs cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} tree-bfs-ok Path To Root Traversal [Documentation] Walk from a leaf decision up to the root [Tags] database decision tree persistence - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} path-to-root cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} path-to-root cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} path-to-root-ok Superseded By Update [Documentation] Mark a decision as superseded and verify [Tags] database decision correction persistence - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} superseded cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} superseded cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} superseded-ok Delete Decision [Documentation] Delete a decision and verify it is gone [Tags] database decision persistence - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} delete cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} delete cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} delete-ok diff --git a/robot/decision_recording.robot b/robot/decision_recording.robot index 8876c2999..fe8437331 100644 --- a/robot/decision_recording.robot +++ b/robot/decision_recording.robot @@ -11,48 +11,48 @@ ${HELPER_SCRIPT} robot/helper_decision_recording.py Record And Retrieve Decision [Documentation] Record a decision via DecisionService and retrieve by ID [Tags] service decision recording - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} record-retrieve cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} record-retrieve cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} record-retrieve-ok Record Multiple With Sequencing [Documentation] Record 3 decisions and verify monotonic sequence numbers [Tags] service decision sequencing - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} sequencing cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} sequencing cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} sequencing-ok Snapshot Auto-Capture [Documentation] Record a decision and verify context snapshot is auto-captured [Tags] service decision snapshot - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} snapshot-capture cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} snapshot-capture cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} snapshot-capture-ok Decision Tree BFS Via Service [Documentation] Build a 3-node tree and verify BFS order via get_tree [Tags] service decision tree - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} tree-bfs cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} tree-bfs cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} tree-bfs-ok Mark Decision Superseded Via Service [Documentation] Mark a decision as superseded via the service layer [Tags] service decision superseded - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} superseded cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} superseded cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} superseded-ok Delete Decision Via Service [Documentation] Delete a decision and verify snapshot is also removed [Tags] service decision delete - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} delete cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} delete cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} delete-ok Snapshot Hash Deduplication [Documentation] Verify hash-based deduplication in SnapshotStore [Tags] service decision snapshot dedup - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} snapshot-dedup cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} snapshot-dedup cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} snapshot-dedup-ok diff --git a/robot/domain_analyzers.robot b/robot/domain_analyzers.robot index bc048c3ce..e058ec415 100644 --- a/robot/domain_analyzers.robot +++ b/robot/domain_analyzers.robot @@ -10,7 +10,7 @@ ${HELPER} ${CURDIR}/helper_domain_analyzers.py *** Test Cases *** Analyze Python Source [Documentation] PythonAnalyzer extracts Module, Class, and Function triples - ${result}= Run Process ${PYTHON} ${HELPER} analyze-python timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} analyze-python timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -18,7 +18,7 @@ Analyze Python Source Analyze Markdown Document [Documentation] MarkdownAnalyzer extracts Document and Section triples - ${result}= Run Process ${PYTHON} ${HELPER} analyze-markdown timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} analyze-markdown timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -26,7 +26,7 @@ Analyze Markdown Document Analyze PostgreSQL DDL [Documentation] PostgreSQLAnalyzer extracts Table and Column triples - ${result}= Run Process ${PYTHON} ${HELPER} analyze-postgresql timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} analyze-postgresql timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -34,7 +34,7 @@ Analyze PostgreSQL DDL Analyze Docker Compose YAML [Documentation] DockerComposeAnalyzer extracts Service and DeploymentUnit triples - ${result}= Run Process ${PYTHON} ${HELPER} analyze-docker-compose timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} analyze-docker-compose timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -42,7 +42,7 @@ Analyze Docker Compose YAML Verify Analyzer Protocol Conformance [Documentation] All four analyzers satisfy AnalyzerProtocol - ${result}= Run Process ${PYTHON} ${HELPER} protocol-check timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} protocol-check timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -50,7 +50,7 @@ Verify Analyzer Protocol Conformance Verify Analyzer Registry Lookup [Documentation] AnalyzerRegistry registers all four analyzers and resolves by extension - ${result}= Run Process ${PYTHON} ${HELPER} registry-check timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} registry-check timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 diff --git a/robot/helper_tdd_checkpoint_real_rollback.py b/robot/helper_tdd_checkpoint_real_rollback.py new file mode 100644 index 000000000..4f3c1d5d6 --- /dev/null +++ b/robot/helper_tdd_checkpoint_real_rollback.py @@ -0,0 +1,210 @@ +"""Helper script for tdd_checkpoint_real_rollback.robot integration tests. + +Each subcommand exercises CheckpointService.rollback_to_checkpoint() against +a real git repository to prove that the method does **not** execute +``git reset --hard``. Files modified after a checkpoint remain unchanged +after rollback, demonstrating bug #822. + +The helper exits 0 with a sentinel when the rollback correctly restores +file state (bug fixed), and exits 1 when the bug is still present. +The ``tdd_expected_fail_listener`` on the Robot side handles pass/fail +inversion while the bug remains open. +""" + +from __future__ import annotations + +import os +import shutil +import subprocess +import sys +import tempfile +from collections.abc import Callable +from pathlib import Path +from typing import NoReturn + +# Ensure local source tree AND robot/ directory are importable. +_ROOT = Path(__file__).resolve().parents[1] +_SRC = str(_ROOT / "src") +_ROBOT = str(_ROOT / "robot") +for _p in (_SRC, _ROBOT): + if _p not in sys.path: + sys.path.insert(0, _p) + +from cleveragents.application.services.checkpoint_service import ( # noqa: E402 + CheckpointService, +) + +# --------------------------------------------------------------------------- +# Constants +# --------------------------------------------------------------------------- + +_INITIAL_CONTENT = "initial content\n" +_MODIFIED_CONTENT = "modified after checkpoint\n" +_TRACKED_FILENAME = "tracked.txt" +_NEW_FILENAME = "extra.txt" +_PLAN_ID = "01JBG822CHKPT000PXAN000000" + + +# --------------------------------------------------------------------------- +# Helpers +# --------------------------------------------------------------------------- + + +def _fail(msg: str) -> NoReturn: + """Print failure message to stderr and exit with code 1.""" + print(msg, file=sys.stderr) + sys.exit(1) + + +def _run_git(args: list[str], cwd: str) -> subprocess.CompletedProcess[str]: + """Run a git command and return the completed process.""" + return subprocess.run( + ["git", *args], + cwd=cwd, + capture_output=True, + text=True, + check=True, + timeout=30, + ) + + +def _get_head_sha(cwd: str) -> str: + """Return the HEAD commit SHA of a git repository.""" + result = _run_git(["rev-parse", "HEAD"], cwd=cwd) + return result.stdout.strip() + + +def _create_workspace() -> str: + """Create a temporary git workspace with an initial committed file. + + Returns the path to the temporary directory. + """ + tmpdir = tempfile.mkdtemp(prefix="tdd_checkpoint_822_robot_") + try: + _run_git(["init", "--initial-branch=main"], cwd=tmpdir) + _run_git(["config", "user.email", "test@example.com"], cwd=tmpdir) + _run_git(["config", "user.name", "Test"], cwd=tmpdir) + + tracked_path = os.path.join(tmpdir, _TRACKED_FILENAME) + Path(tracked_path).write_text(_INITIAL_CONTENT, encoding="utf-8") + _run_git(["add", _TRACKED_FILENAME], cwd=tmpdir) + _run_git(["commit", "-m", "Initial commit"], cwd=tmpdir) + except Exception: + shutil.rmtree(tmpdir, ignore_errors=True) + raise + return tmpdir + + +# --------------------------------------------------------------------------- +# Subcommands +# --------------------------------------------------------------------------- + + +def rollback_restores_content() -> None: + """Verify that rollback reverts a modified tracked file. + + Exits 0 with sentinel when the file is correctly reverted (bug fixed). + Exits 1 when the bug is still present (file remains modified). + """ + tmpdir = _create_workspace() + try: + tracked_path = os.path.join(tmpdir, _TRACKED_FILENAME) + initial_sha = _get_head_sha(tmpdir) + + # Create checkpoint from current state + service = CheckpointService() + service.register_sandbox(_PLAN_ID, tmpdir) + checkpoint = service.create_checkpoint( + plan_id=_PLAN_ID, + sandbox_ref=initial_sha, + reason="TDD checkpoint for bug #822", + checkpoint_type="manual", + ) + + # Modify the tracked file and commit + Path(tracked_path).write_text(_MODIFIED_CONTENT) + _run_git(["add", _TRACKED_FILENAME], cwd=tmpdir) + _run_git(["commit", "-m", "Modify tracked file"], cwd=tmpdir) + + # Invoke rollback + service.rollback_to_checkpoint( + plan_id=_PLAN_ID, + checkpoint_id=checkpoint.checkpoint_id, + ) + + # Assert file content matches checkpoint state + actual = Path(tracked_path).read_text() + if actual != _INITIAL_CONTENT: + _fail( + f"Tracked file not reverted after rollback. " + f"Expected: {_INITIAL_CONTENT!r}, Got: {actual!r}. " + f"Bug #822: rollback did not execute git reset --hard." + ) + + print("tdd-checkpoint-rollback-restores-content-ok") + finally: + shutil.rmtree(tmpdir, ignore_errors=True) + + +def rollback_removes_added_files() -> None: + """Verify that rollback removes files added after the checkpoint. + + Exits 0 with sentinel when the new file is removed (bug fixed). + Exits 1 when the bug is still present (new file still exists). + """ + tmpdir = _create_workspace() + try: + initial_sha = _get_head_sha(tmpdir) + + # Create checkpoint from current state + service = CheckpointService() + service.register_sandbox(_PLAN_ID, tmpdir) + checkpoint = service.create_checkpoint( + plan_id=_PLAN_ID, + sandbox_ref=initial_sha, + reason="TDD checkpoint for bug #822", + checkpoint_type="manual", + ) + + # Add a new file and commit + new_path = os.path.join(tmpdir, _NEW_FILENAME) + Path(new_path).write_text("new file content\n") + _run_git(["add", _NEW_FILENAME], cwd=tmpdir) + _run_git(["commit", "-m", "Add new file"], cwd=tmpdir) + + # Invoke rollback + service.rollback_to_checkpoint( + plan_id=_PLAN_ID, + checkpoint_id=checkpoint.checkpoint_id, + ) + + # Assert the new file no longer exists + if os.path.exists(new_path): + _fail( + f"New file still exists after rollback: {new_path}. " + f"Bug #822: rollback did not execute git reset --hard." + ) + + print("tdd-checkpoint-rollback-removes-added-files-ok") + finally: + shutil.rmtree(tmpdir, ignore_errors=True) + + +# --------------------------------------------------------------------------- +# Dispatcher +# --------------------------------------------------------------------------- + +_COMMANDS: dict[str, Callable[[], None]] = { + "rollback-restores-content": rollback_restores_content, + "rollback-removes-added-files": rollback_removes_added_files, +} + +if __name__ == "__main__": + if len(sys.argv) < 2 or sys.argv[1] not in _COMMANDS: + print( + f"Usage: {sys.argv[0]} <{'|'.join(_COMMANDS)}>", + file=sys.stderr, + ) + sys.exit(1) + cmd = _COMMANDS[sys.argv[1]] + cmd() diff --git a/robot/initial_next_command_test.robot b/robot/initial_next_command_test.robot index f1031b23e..8c39e352d 100644 --- a/robot/initial_next_command_test.robot +++ b/robot/initial_next_command_test.robot @@ -33,7 +33,7 @@ Test Next Command With Null Writing Stage ... --allow-rxpy-in-run-mode ... -p !next discovery ... stderr=STDOUT - ... timeout=20s + ... timeout=120s on_timeout=kill # Should not produce an error Should Not Contain ${result.stdout} Error: Current stage 'None' is invalid @@ -48,7 +48,7 @@ Test Next Command With Null Writing Stage ... --allow-rxpy-in-run-mode ... -p !stage ... stderr=STDOUT - ... timeout=20s + ... timeout=120s on_timeout=kill Should Contain ${result.stdout} discovery diff --git a/robot/legacy_plan_removal.robot b/robot/legacy_plan_removal.robot index 21164611f..2a158348a 100644 --- a/robot/legacy_plan_removal.robot +++ b/robot/legacy_plan_removal.robot @@ -11,7 +11,7 @@ ${PYTHON} python Run Python Script [Arguments] ${script} @{extra_args} ${result}= Run Process ${PYTHON} @{extra_args} ${CURDIR}/legacy_plan_removal_helper.py ${script} - ... env:PYTHONPATH\=src:. timeout=30s + ... env:PYTHONPATH\=src:. timeout=120s on_timeout=kill RETURN ${result} *** Test Cases *** diff --git a/robot/m1_sourcecode_smoke.robot b/robot/m1_sourcecode_smoke.robot index c5126138b..42cb56a7a 100644 --- a/robot/m1_sourcecode_smoke.robot +++ b/robot/m1_sourcecode_smoke.robot @@ -10,7 +10,7 @@ ${HELPER} ${CURDIR}/helper_m1_sourcecode_smoke.py *** Test Cases *** M1 Action Create From Config [Documentation] Create an action from M1 fixture YAML config - ${result}= Run Process ${PYTHON} ${HELPER} action-create cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} action-create cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -18,7 +18,7 @@ M1 Action Create From Config M1 Plan Use Creates Strategize Plan [Documentation] Use an action to create a plan in strategize phase - ${result}= Run Process ${PYTHON} ${HELPER} plan-use cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} plan-use cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -26,7 +26,7 @@ M1 Plan Use Creates Strategize Plan M1 Plan Use With Project Link [Documentation] Use action with a project argument to validate project linking - ${result}= Run Process ${PYTHON} ${HELPER} plan-use-project cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} plan-use-project cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -34,7 +34,7 @@ M1 Plan Use With Project Link M1 Plan Execute Transitions Phase [Documentation] Execute a plan and verify phase transitions - ${result}= Run Process ${PYTHON} ${HELPER} plan-execute cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} plan-execute cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -42,7 +42,7 @@ M1 Plan Execute Transitions Phase M1 Plan Diff Shows Changeset [Documentation] Run plan diff to show changeset - ${result}= Run Process ${PYTHON} ${HELPER} plan-diff cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} plan-diff cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -50,7 +50,7 @@ M1 Plan Diff Shows Changeset M1 Plan Apply Reaches Terminal [Documentation] Apply a plan and verify terminal state - ${result}= Run Process ${PYTHON} ${HELPER} plan-apply cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} plan-apply cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -58,7 +58,7 @@ M1 Plan Apply Reaches Terminal M1 Full Lifecycle Action To Apply [Documentation] End-to-end: action create -> plan use -> execute -> apply - ${result}= Run Process ${PYTHON} ${HELPER} full-lifecycle cwd=${WORKSPACE} timeout=60s + ${result}= Run Process ${PYTHON} ${HELPER} full-lifecycle cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -66,7 +66,7 @@ M1 Full Lifecycle Action To Apply M1 Plan Use With Plain Format [Documentation] Verify plan use --format plain stabilises assertions - ${result}= Run Process ${PYTHON} ${HELPER} plan-use-plain cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} plan-use-plain cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 diff --git a/robot/m2_actor_tool_smoke.robot b/robot/m2_actor_tool_smoke.robot index 934815933..aa8f38d89 100644 --- a/robot/m2_actor_tool_smoke.robot +++ b/robot/m2_actor_tool_smoke.robot @@ -10,7 +10,7 @@ ${HELPER} ${CURDIR}/helper_m2_actor_tool_smoke.py *** Test Cases *** Actor Load Hierarchical YAML Fixture [Documentation] Load hierarchical actor from M2 fixture YAML and verify - ${result}= Run Process ${PYTHON} ${HELPER} actor-load-fixture cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} actor-load-fixture cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -20,7 +20,7 @@ Actor Load Hierarchical YAML Fixture Actor Discovery From Fixture Directory [Documentation] Discover actors from the M2 fixtures directory - ${result}= Run Process ${PYTHON} ${HELPER} actor-discover cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} actor-discover cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -29,7 +29,7 @@ Actor Discovery From Fixture Directory Skill Pack Load From YAML Fixture [Documentation] Load skill pack from M2 fixture YAML and verify - ${result}= Run Process ${PYTHON} ${HELPER} skill-load-fixture cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} skill-load-fixture cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -39,7 +39,7 @@ Skill Pack Load From YAML Fixture Skill Registry And Tool Resolution [Documentation] Register skill pack and verify tool resolution - ${result}= Run Process ${PYTHON} ${HELPER} skill-registry cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} skill-registry cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -48,7 +48,7 @@ Skill Registry And Tool Resolution Tool Lifecycle Smoke [Documentation] Verify discover/activate/execute/deactivate lifecycle - ${result}= Run Process ${PYTHON} ${HELPER} tool-lifecycle cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} tool-lifecycle cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -59,7 +59,7 @@ Tool Lifecycle Smoke MCP Stub Discovery And Invocation [Documentation] Start MCP stub, discover tools, invoke, and stop - ${result}= Run Process ${PYTHON} ${HELPER} mcp-stub cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} mcp-stub cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 diff --git a/robot/m3_decision_validation_smoke.robot b/robot/m3_decision_validation_smoke.robot index ca8ef57d2..58406fb41 100644 --- a/robot/m3_decision_validation_smoke.robot +++ b/robot/m3_decision_validation_smoke.robot @@ -10,7 +10,7 @@ ${HELPER} ${CURDIR}/helper_m3_decision_validation_smoke.py *** Test Cases *** M3 Invariant Add Global [Documentation] Add a global invariant constraint via CLI - ${result}= Run Process ${PYTHON} ${HELPER} invariant-add-global cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} invariant-add-global cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -18,7 +18,7 @@ M3 Invariant Add Global M3 Invariant Add Project Scoped [Documentation] Add a project-scoped invariant constraint via CLI - ${result}= Run Process ${PYTHON} ${HELPER} invariant-add-project cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} invariant-add-project cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -26,7 +26,7 @@ M3 Invariant Add Project Scoped M3 Invariant List [Documentation] List invariants via CLI - ${result}= Run Process ${PYTHON} ${HELPER} invariant-list cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} invariant-list cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -34,7 +34,7 @@ M3 Invariant List M3 Invariant Remove [Documentation] Remove an invariant by ID via CLI - ${result}= Run Process ${PYTHON} ${HELPER} invariant-remove cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} invariant-remove cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -42,7 +42,7 @@ M3 Invariant Remove M3 Validation Add From Config [Documentation] Register a validation from YAML config via CLI - ${result}= Run Process ${PYTHON} ${HELPER} validation-add cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} validation-add cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -50,7 +50,7 @@ M3 Validation Add From Config M3 Validation Attach [Documentation] Attach a validation to a resource via CLI - ${result}= Run Process ${PYTHON} ${HELPER} validation-attach cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} validation-attach cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -58,7 +58,7 @@ M3 Validation Attach M3 Validation Detach [Documentation] Detach a validation from a resource via CLI - ${result}= Run Process ${PYTHON} ${HELPER} validation-detach cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} validation-detach cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -66,7 +66,7 @@ M3 Validation Detach M3 Plan Correct Dry Run [Documentation] Run plan correct in dry-run mode to preview correction impact - ${result}= Run Process ${PYTHON} ${HELPER} plan-correct-dry-run cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} plan-correct-dry-run cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 diff --git a/robot/m3_e2e_verification.robot b/robot/m3_e2e_verification.robot index 027a5424a..da12f6817 100644 --- a/robot/m3_e2e_verification.robot +++ b/robot/m3_e2e_verification.robot @@ -26,7 +26,7 @@ Plan Execution Generates Decisions During Strategize ... Validates: plan use + plan execute generate decisions ... during Strategize phase. [Tags] success_criteria decision_recording - ${result}= Run Process ${PYTHON} ${HELPER} plan-generates-decisions cwd=${WORKSPACE} timeout=60s + ${result}= Run Process ${PYTHON} ${HELPER} plan-generates-decisions cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -39,7 +39,7 @@ Decision Tree View Via Plan Tree ... ... Validates: plan tree displays the decision tree correctly. [Tags] success_criteria decision_tree - ${result}= Run Process ${PYTHON} ${HELPER} decision-tree-view cwd=${WORKSPACE} timeout=60s + ${result}= Run Process ${PYTHON} ${HELPER} decision-tree-view cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -52,7 +52,7 @@ Decision Explain Shows Full Context ... ... Validates: plan explain shows full decision context. [Tags] success_criteria decision_explain - ${result}= Run Process ${PYTHON} ${HELPER} decision-explain cwd=${WORKSPACE} timeout=60s + ${result}= Run Process ${PYTHON} ${HELPER} decision-explain cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -65,7 +65,7 @@ Invariant Add And List Via CLI And Service ... ... Validates: invariant add and invariant list CLI commands. [Tags] success_criteria invariant_management - ${result}= Run Process ${PYTHON} ${HELPER} invariant-add-list cwd=${WORKSPACE} timeout=60s + ${result}= Run Process ${PYTHON} ${HELPER} invariant-add-list cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -80,7 +80,7 @@ Correction Dry Run Via Plan Correct ... Validates: plan correct with --dry-run performs ... impact analysis without modifying state. [Tags] success_criteria correction_dry_run - ${result}= Run Process ${PYTHON} ${HELPER} correction-dry-run cwd=${WORKSPACE} timeout=60s + ${result}= Run Process ${PYTHON} ${HELPER} correction-dry-run cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -94,7 +94,7 @@ Correction Live Revert Executes And Re-Creates Decisions ... Validates: plan correct with --mode revert executes ... live correction. [Tags] success_criteria correction_live_revert - ${result}= Run Process ${PYTHON} ${HELPER} correction-live-revert cwd=${WORKSPACE} timeout=120s + ${result}= Run Process ${PYTHON} ${HELPER} correction-live-revert cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -108,7 +108,7 @@ Decisions Recorded With Full Context Snapshot ... Technical criterion: decisions recorded during ... Strategize with full context snapshot. [Tags] technical_criteria context_snapshot - ${result}= Run Process ${PYTHON} ${HELPER} decisions-context-snapshot cwd=${WORKSPACE} timeout=60s + ${result}= Run Process ${PYTHON} ${HELPER} decisions-context-snapshot cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -122,7 +122,7 @@ Decision Tree Persists To Database And Renders ... Technical criterion: decision tree persists to ... database and renders correctly. [Tags] technical_criteria persistence - ${result}= Run Process ${PYTHON} ${HELPER} decision-tree-persistence cwd=${WORKSPACE} timeout=60s + ${result}= Run Process ${PYTHON} ${HELPER} decision-tree-persistence cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -137,7 +137,7 @@ Correction Revert Re-Executes From Decision Point ... Technical criterion: correction in revert mode ... re-executes from decision point. [Tags] technical_criteria correction_reexecution - ${result}= Run Process ${PYTHON} ${HELPER} correction-revert-reexecutes cwd=${WORKSPACE} timeout=60s + ${result}= Run Process ${PYTHON} ${HELPER} correction-revert-reexecutes cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -153,7 +153,7 @@ Invariants Enforced During Strategize ... Technical criterion: invariants are enforced ... during strategize. [Tags] technical_criteria invariant_enforcement - ${result}= Run Process ${PYTHON} ${HELPER} invariants-enforced-strategize cwd=${WORKSPACE} timeout=60s + ${result}= Run Process ${PYTHON} ${HELPER} invariants-enforced-strategize cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 diff --git a/robot/m4_correction_subplan_smoke.robot b/robot/m4_correction_subplan_smoke.robot index bab3f88cd..dd0cc12e2 100644 --- a/robot/m4_correction_subplan_smoke.robot +++ b/robot/m4_correction_subplan_smoke.robot @@ -10,7 +10,7 @@ ${HELPER} ${CURDIR}/helper_m4_correction_subplan_smoke.py *** Test Cases *** M4 Correction Revert Via CLI [Documentation] Invoke plan correct --mode revert and verify success - ${result}= Run Process ${PYTHON} ${HELPER} correction-revert cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} correction-revert cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -18,7 +18,7 @@ M4 Correction Revert Via CLI M4 Correction Append Via CLI [Documentation] Invoke plan correct --mode append and verify success - ${result}= Run Process ${PYTHON} ${HELPER} correction-append cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} correction-append cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -26,7 +26,7 @@ M4 Correction Append Via CLI M4 Correction Dry Run Via CLI [Documentation] Invoke plan correct --dry-run and verify impact output - ${result}= Run Process ${PYTHON} ${HELPER} correction-dry-run cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} correction-dry-run cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -34,7 +34,7 @@ M4 Correction Dry Run Via CLI M4 Subplan Status Sequential [Documentation] Verify plan status shows subplan count for sequential config - ${result}= Run Process ${PYTHON} ${HELPER} subplan-status-sequential cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} subplan-status-sequential cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -42,7 +42,7 @@ M4 Subplan Status Sequential M4 Subplan Status Parallel [Documentation] Verify plan status shows subplan count for parallel config - ${result}= Run Process ${PYTHON} ${HELPER} subplan-status-parallel cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} subplan-status-parallel cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -50,7 +50,7 @@ M4 Subplan Status Parallel M4 Failure Handler Evaluation [Documentation] Evaluate SubplanFailureHandler decisions - ${result}= Run Process ${PYTHON} ${HELPER} failure-handler cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} failure-handler cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -58,7 +58,7 @@ M4 Failure Handler Evaluation M4 Fixture Loading [Documentation] Load all M4 fixture files and verify structure - ${result}= Run Process ${PYTHON} ${HELPER} fixture-loading cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} fixture-loading cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -66,7 +66,7 @@ M4 Fixture Loading M4 Full Correction And Subplan Flow [Documentation] End-to-end: correction revert + subplan status + failure handler - ${result}= Run Process ${PYTHON} ${HELPER} full-flow cwd=${WORKSPACE} timeout=60s + ${result}= Run Process ${PYTHON} ${HELPER} full-flow cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 diff --git a/robot/m4_e2e_verification.robot b/robot/m4_e2e_verification.robot index 95ce2072d..fb1c1846e 100644 --- a/robot/m4_e2e_verification.robot +++ b/robot/m4_e2e_verification.robot @@ -14,7 +14,7 @@ Plan Spawns Multiple Subplans During Execute [Documentation] Execute a parent plan that spawns multiple subplans. ... Verifies subplans are created with correct parent_plan_id ... and that the parent's subplan_statuses list is populated. - ${result}= Run Process ${PYTHON} ${HELPER} spawn-subplans cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} spawn-subplans cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -23,7 +23,7 @@ Plan Spawns Multiple Subplans During Execute View Subplan Tree Via Plan Tree [Documentation] Verify SubplanStatus field completeness and parent-child ... linkage for the plan tree data model. - ${result}= Run Process ${PYTHON} ${HELPER} plan-tree cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} plan-tree cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -33,7 +33,7 @@ Verify Merged Results Via Plan Diff [Documentation] View merged results via agents plan diff. ... Verifies the diff service returns unified diff output ... after subplan execution and merging. - ${result}= Run Process ${PYTHON} ${HELPER} plan-diff cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} plan-diff cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -43,7 +43,7 @@ Parallel Subplan Execution With Max Parallel [Documentation] Verify parallel subplan execution respects max_parallel. ... Creates a SubplanConfig with PARALLEL mode and max_parallel=3 ... and verifies concurrent scheduling constraints. - ${result}= Run Process ${PYTHON} ${HELPER} parallel-max cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} parallel-max cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -52,7 +52,7 @@ Parallel Subplan Execution With Max Parallel Three Way Merge Combines Non Conflicting Changes [Documentation] Verify three-way merge combines non-conflicting changes ... from parallel subplans using GitMergeStrategy. - ${result}= Run Process ${PYTHON} ${HELPER} merge-clean cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} merge-clean cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -61,7 +61,7 @@ Three Way Merge Combines Non Conflicting Changes Merge Conflicts Are Surfaced Correctly [Documentation] Verify merge conflicts from parallel subplans are ... detected and reported with conflict markers. - ${result}= Run Process ${PYTHON} ${HELPER} merge-conflict cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} merge-conflict cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -71,7 +71,7 @@ Parent Plan Tracks All Subplan Statuses [Documentation] Verify parent plan tracks all subplan statuses through ... lifecycle transitions including completion, failure, ... and retry attempts. - ${result}= Run Process ${PYTHON} ${HELPER} parent-tracking cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} parent-tracking cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -81,7 +81,7 @@ CLI Plan Use Creates Plan With Subplan Config [Documentation] Invoke agents plan use local/refactor-action local/monorepo ... via the actual CLI (Typer CliRunner) with a mocked lifecycle ... service and verify the plan is created with subplan config. - ${result}= Run Process ${PYTHON} ${HELPER} cli-plan-use cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} cli-plan-use cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -91,7 +91,7 @@ CLI Plan Execute Transitions With Subplans [Documentation] Invoke agents plan execute via the actual CLI ... (Typer CliRunner) with a mocked lifecycle service and ... verify the plan transitions to Execute phase with subplans. - ${result}= Run Process ${PYTHON} ${HELPER} cli-plan-execute cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} cli-plan-execute cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -102,7 +102,7 @@ CLI Plan Tree Displays Subplan Hierarchy ... actual CLI (Typer CliRunner) with mocked Decision objects ... forming a subplan tree. Verify JSON output contains ... subplan_spawn and subplan_parallel_spawn decision types. - ${result}= Run Process ${PYTHON} ${HELPER} cli-plan-tree cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} cli-plan-tree cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -112,7 +112,7 @@ CLI Plan Execute Aborts On Read Only Plan [Documentation] Invoke agents plan execute on a read-only plan. ... Verifies the CLI aborts with an appropriate error message ... and does not call execute_plan. - ${result}= Run Process ${PYTHON} ${HELPER} cli-plan-execute-readonly cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} cli-plan-execute-readonly cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -122,7 +122,7 @@ CLI Plan Use Aborts On Unavailable Action [Documentation] Invoke agents plan use with a nonexistent/unavailable action. ... Verifies the CLI aborts with an appropriate error message ... and does not call use_action. - ${result}= Run Process ${PYTHON} ${HELPER} cli-plan-use-not-found cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} cli-plan-use-not-found cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -132,7 +132,7 @@ CLI Plan Diff Aborts On Missing Changeset [Documentation] Invoke agents plan diff when the plan has no changeset. ... Verifies the CLI catches PlanError and aborts with a ... user-friendly error message. - ${result}= Run Process ${PYTHON} ${HELPER} cli-plan-diff-no-changeset cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} cli-plan-diff-no-changeset cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -142,7 +142,7 @@ CLI Plan Tree Handles Zero Decisions Gracefully [Documentation] Invoke agents plan tree when no decisions exist. ... Verifies the CLI prints an informational message and ... exits cleanly (exit code 0). - ${result}= Run Process ${PYTHON} ${HELPER} cli-plan-tree-empty cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} cli-plan-tree-empty cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 diff --git a/robot/m5_e2e_verification.robot b/robot/m5_e2e_verification.robot index d9dc5215c..e33bab2c7 100644 --- a/robot/m5_e2e_verification.robot +++ b/robot/m5_e2e_verification.robot @@ -34,7 +34,7 @@ CLI Project Create Large Project ... a project via the real CLI subprocess. ${tmpdir}= Evaluate __import__('tempfile').mkdtemp(prefix='m5_cli_create_') ${init}= Run Process ${PYTHON} -m cleveragents init m5-cli-test - ... timeout=60s on_timeout=kill cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} ... env:CLEVERAGENTS_HOME=${tmpdir} Log ${init.stdout} Log ${init.stderr} @@ -42,7 +42,7 @@ CLI Project Create Large Project ... msg=agents init failed (rc ${init.rc}): ${init.stderr} ${create}= Run Process ${PYTHON} -m cleveragents ... project create local/large-project - ... timeout=60s on_timeout=kill cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} ... env:CLEVERAGENTS_HOME=${tmpdir} Log ${create.stdout} Log ${create.stderr} @@ -51,7 +51,7 @@ CLI Project Create Large Project # Verify the project is persisted via list ${list}= Run Process ${PYTHON} -m cleveragents ... project list --format plain - ... timeout=60s on_timeout=kill cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} ... env:CLEVERAGENTS_HOME=${tmpdir} Log ${list.stdout} Should Be Equal As Integers ${list.rc} 0 @@ -71,7 +71,7 @@ CLI Resource Add Git Checkout Create Directory ${repo_dir} # Initialize workspace ${init}= Run Process ${PYTHON} -m cleveragents init m5-res-test - ... timeout=60s on_timeout=kill cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} ... env:CLEVERAGENTS_HOME=${tmpdir} Should Be Equal As Integers ${init.rc} 0 ... msg=agents init failed: ${init.stderr} @@ -79,7 +79,7 @@ CLI Resource Add Git Checkout ${add}= Run Process ${PYTHON} -m cleveragents resource add ... git-checkout local/large-repo ... --path ${repo_dir} --branch main - ... timeout=60s on_timeout=kill cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} ... env:CLEVERAGENTS_HOME=${tmpdir} Log ${add.stdout} Log ${add.stderr} @@ -88,7 +88,7 @@ CLI Resource Add Git Checkout # Verify resource is visible via show ${show}= Run Process ${PYTHON} -m cleveragents resource show ... --format plain local/large-repo - ... timeout=60s on_timeout=kill cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} ... env:CLEVERAGENTS_HOME=${tmpdir} Log ${show.stdout} Should Be Equal As Integers ${show.rc} 0 @@ -109,13 +109,13 @@ CLI Project Link Resource Create Directory ${repo_dir} # Initialize workspace ${init}= Run Process ${PYTHON} -m cleveragents init m5-link-test - ... timeout=60s on_timeout=kill cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} ... env:CLEVERAGENTS_HOME=${tmpdir} Should Be Equal As Integers ${init.rc} 0 # Create project ${create}= Run Process ${PYTHON} -m cleveragents ... project create local/large-project - ... timeout=60s on_timeout=kill cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} ... env:CLEVERAGENTS_HOME=${tmpdir} Should Be Equal As Integers ${create.rc} 0 ... msg=project create failed: ${create.stderr} @@ -123,14 +123,14 @@ CLI Project Link Resource ${add}= Run Process ${PYTHON} -m cleveragents resource add ... git-checkout local/large-repo ... --path ${repo_dir} --branch main - ... timeout=60s on_timeout=kill cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} ... env:CLEVERAGENTS_HOME=${tmpdir} Should Be Equal As Integers ${add.rc} 0 ... msg=resource add failed: ${add.stderr} # Link resource to project ${link}= Run Process ${PYTHON} -m cleveragents ... project link-resource local/large-project local/large-repo - ... timeout=60s on_timeout=kill cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} ... env:CLEVERAGENTS_HOME=${tmpdir} Log ${link.stdout} Log ${link.stderr} @@ -144,7 +144,7 @@ CLI Project Link Resource # Capture the resource ULID so we can verify the exact ID in project show ${res_show}= Run Process ${PYTHON} -m cleveragents resource show ... --format plain local/large-repo - ... timeout=60s on_timeout=kill cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} ... env:CLEVERAGENTS_HOME=${tmpdir} Should Be Equal As Integers ${res_show.rc} 0 ... msg=resource show failed: ${res_show.stderr} @@ -154,7 +154,7 @@ CLI Project Link Resource # Verify the link was persisted by checking project show output ${show}= Run Process ${PYTHON} -m cleveragents project show ... --format plain local/large-project - ... timeout=60s on_timeout=kill cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} ... env:CLEVERAGENTS_HOME=${tmpdir} Log ${show.stdout} Should Be Equal As Integers ${show.rc} 0 @@ -188,18 +188,18 @@ CLI Project Show Displays Linked Resource Create Directory ${repo_dir} # Initialize, create, register, link (full flow) ${init}= Run Process ${PYTHON} -m cleveragents init m5-show-test - ... timeout=60s on_timeout=kill cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} ... env:CLEVERAGENTS_HOME=${tmpdir} Should Be Equal As Integers ${init.rc} 0 ${create}= Run Process ${PYTHON} -m cleveragents ... project create local/large-project - ... timeout=60s on_timeout=kill cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} ... env:CLEVERAGENTS_HOME=${tmpdir} Should Be Equal As Integers ${create.rc} 0 ${add}= Run Process ${PYTHON} -m cleveragents resource add ... git-checkout local/large-repo ... --path ${repo_dir} --branch main - ... timeout=60s on_timeout=kill cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} ... env:CLEVERAGENTS_HOME=${tmpdir} Should Be Equal As Integers ${add.rc} 0 # Capture the resource ULID from resource show output so we can @@ -207,7 +207,7 @@ CLI Project Show Displays Linked Resource # the generic "resource_id": key). ${res_show}= Run Process ${PYTHON} -m cleveragents resource show ... --format plain local/large-repo - ... timeout=60s on_timeout=kill cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} ... env:CLEVERAGENTS_HOME=${tmpdir} Log ${res_show.stdout} Should Be Equal As Integers ${res_show.rc} 0 @@ -221,13 +221,13 @@ CLI Project Show Displays Linked Resource # Link the resource ${link}= Run Process ${PYTHON} -m cleveragents ... project link-resource local/large-project local/large-repo - ... timeout=60s on_timeout=kill cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} ... env:CLEVERAGENTS_HOME=${tmpdir} Should Be Equal As Integers ${link.rc} 0 # Verify resource show still works after linking (independent check) ${res_show2}= Run Process ${PYTHON} -m cleveragents resource show ... --format plain local/large-repo - ... timeout=60s on_timeout=kill cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} ... env:CLEVERAGENTS_HOME=${tmpdir} Should Be Equal As Integers ${res_show2.rc} 0 ... msg=resource show after linking failed: ${res_show2.stderr} @@ -235,7 +235,7 @@ CLI Project Show Displays Linked Resource # and (when available) the specific resource ULID. ${show}= Run Process ${PYTHON} -m cleveragents project show ... --format plain local/large-project - ... timeout=60s on_timeout=kill cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} ... env:CLEVERAGENTS_HOME=${tmpdir} Log ${show.stdout} Log ${show.stderr} diff --git a/robot/m6_autonomy_acceptance.robot b/robot/m6_autonomy_acceptance.robot index 2ffc1286d..685f26338 100644 --- a/robot/m6_autonomy_acceptance.robot +++ b/robot/m6_autonomy_acceptance.robot @@ -10,7 +10,7 @@ ${HELPER} ${CURDIR}/helper_m6_autonomy_acceptance.py *** Test Cases *** M6 A2A Facade Session Lifecycle [Documentation] Dispatch session.create and session.close via local facade - ${result}= Run Process ${PYTHON} ${HELPER} facade-session cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} facade-session cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -18,7 +18,7 @@ M6 A2A Facade Session Lifecycle M6 A2A Facade Plan Lifecycle [Documentation] Dispatch plan create/execute/status/diff/apply operations - ${result}= Run Process ${PYTHON} ${HELPER} facade-plan cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} facade-plan cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -26,7 +26,7 @@ M6 A2A Facade Plan Lifecycle M6 A2A Facade Unknown Operation Error [Documentation] Verify unknown operations raise A2aOperationNotFoundError - ${result}= Run Process ${PYTHON} ${HELPER} facade-unknown-op cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} facade-unknown-op cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -34,7 +34,7 @@ M6 A2A Facade Unknown Operation Error M6 A2A Event Queue Publish Subscribe [Documentation] Publish events and verify local subscriber receives them - ${result}= Run Process ${PYTHON} ${HELPER} event-queue cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} event-queue cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -42,7 +42,7 @@ M6 A2A Event Queue Publish Subscribe M6 A2A Transport Stub Rejects All [Documentation] Verify HTTP transport stub raises A2aNotAvailableError - ${result}= Run Process ${PYTHON} ${HELPER} transport-stub cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} transport-stub cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -50,7 +50,7 @@ M6 A2A Transport Stub Rejects All M6 A2A Version Negotiation [Documentation] Negotiate supported and unsupported A2A versions - ${result}= Run Process ${PYTHON} ${HELPER} version-negotiation cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} version-negotiation cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -58,7 +58,7 @@ M6 A2A Version Negotiation M6 Guard Denylist Enforcement [Documentation] Verify denylist guard blocks denied tools - ${result}= Run Process ${PYTHON} ${HELPER} guard-denylist cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} guard-denylist cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -66,7 +66,7 @@ M6 Guard Denylist Enforcement M6 Guard Budget Enforcement [Documentation] Verify cost budget and call limit guards work - ${result}= Run Process ${PYTHON} ${HELPER} guard-budget cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} guard-budget cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -74,7 +74,7 @@ M6 Guard Budget Enforcement M6 Profile Resolution Precedence [Documentation] Verify plan > action > project > global resolution - ${result}= Run Process ${PYTHON} ${HELPER} profile-resolution cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} profile-resolution cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -82,7 +82,7 @@ M6 Profile Resolution Precedence M6 Fixture Loading [Documentation] Load all M6 fixture files and verify structure - ${result}= Run Process ${PYTHON} ${HELPER} fixture-loading cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} fixture-loading cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -90,7 +90,7 @@ M6 Fixture Loading M6 Full Autonomy Acceptance Flow [Documentation] End-to-end: facade dispatch + guard check + profile resolution - ${result}= Run Process ${PYTHON} ${HELPER} full-flow cwd=${WORKSPACE} timeout=60s + ${result}= Run Process ${PYTHON} ${HELPER} full-flow cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 diff --git a/robot/persistence_lifecycle.robot b/robot/persistence_lifecycle.robot index 36233cebd..b0e5262d2 100644 --- a/robot/persistence_lifecycle.robot +++ b/robot/persistence_lifecycle.robot @@ -16,7 +16,7 @@ Plan Full Lifecycle Phase Transitions ... (action -> strategize -> execute -> apply) and verify ... terminal state is reached and persisted. [Tags] database plan lifecycle persistence - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} full-lifecycle cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} full-lifecycle cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} full-lifecycle-ok @@ -25,7 +25,7 @@ Process Restart Simulation ... entirely, reopen from disk and verify all plan fields ... (phase, state, description, project links) survive. [Tags] database plan restart persistence - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} restart-simulation cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} restart-simulation cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} restart-simulation-ok @@ -33,7 +33,7 @@ Reopen Plan Status After Restart [Documentation] Close DB, reopen, and verify plan phase/state, ... automation level, and tags are unchanged. [Tags] database plan reopen persistence - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} reopen-plan-status cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} reopen-plan-status cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} reopen-plan-status-ok @@ -41,7 +41,7 @@ Concurrent CLI Access Safeguards [Documentation] Open two independent sessions against the same DB file ... and verify committed plans are visible across sessions. [Tags] database plan concurrent persistence - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} concurrent-access cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} concurrent-access cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} concurrent-access-ok @@ -49,7 +49,7 @@ Stored Arguments Ordering Persistence [Documentation] Create an action with 4 ordered arguments, persist, ... retrieve and verify positional ordering is preserved. [Tags] database action arguments ordering - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} arguments-ordering cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} arguments-ordering cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} arguments-ordering-ok @@ -57,7 +57,7 @@ Stored Invariants Ordering Persistence [Documentation] Create an action with 3 ordered invariants, persist, ... retrieve and verify list ordering is preserved. [Tags] database action invariants ordering - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} invariants-ordering cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} invariants-ordering cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} invariants-ordering-ok @@ -65,6 +65,6 @@ Project Links Persistence Through Restart [Documentation] Create plan with 2 project links, close DB, reopen, ... verify both links survive the restart cycle. [Tags] database plan project-links persistence - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} project-links cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} project-links cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} project-links-ok diff --git a/robot/plan_generation_graph.robot b/robot/plan_generation_graph.robot index 70df08711..10bcb3282 100644 --- a/robot/plan_generation_graph.robot +++ b/robot/plan_generation_graph.robot @@ -392,7 +392,7 @@ Workflow Invoke Method Returns Complete State ... assert 'validation_result' in result ... assert 'retry_count' in result ... print('Workflow invoke completes successfully') - ${result}= Run Process ${PYTHON} -c ${script} shell=True timeout=30s + ${result}= Run Process ${PYTHON} -c ${script} shell=True timeout=120s on_timeout=kill Should Contain ${result.stdout} Workflow invoke completes successfully Should Be Equal As Integers ${result.rc} 0 @@ -413,7 +413,7 @@ Workflow Stream Method Yields Events ... assert len(events) > 0 ... assert all(isinstance(e, dict) for e in events) ... print(f'Stream yielded {len(events)} events') - ${result}= Run Process ${PYTHON} -c ${script} shell=True timeout=30s + ${result}= Run Process ${PYTHON} -c ${script} shell=True timeout=120s on_timeout=kill Should Contain ${result.stdout} Stream yielded Should Contain ${result.stdout} events Should Be Equal As Integers ${result.rc} 0 diff --git a/robot/plan_lifecycle_persistence.robot b/robot/plan_lifecycle_persistence.robot index 3ac4f8703..06d3c9608 100644 --- a/robot/plan_lifecycle_persistence.robot +++ b/robot/plan_lifecycle_persistence.robot @@ -11,7 +11,7 @@ ${PYTHON} python Plan Lifecycle Persistence Via Helper Script [Documentation] Create action + plan, verify persistence through transitions ${result}= Run Process ${PYTHON} ${CURDIR}/helper_plan_lifecycle_persistence.py - ... stderr=STDOUT timeout=30s + ... stderr=STDOUT timeout=120s on_timeout=kill Log ${result.stdout} Should Contain ${result.stdout} PASS: plan_lifecycle_persistence smoke test Should Be Equal As Integers ${result.rc} 0 diff --git a/robot/plan_persistence_e2e.robot b/robot/plan_persistence_e2e.robot index ee2c61eba..d0f5c2a78 100644 --- a/robot/plan_persistence_e2e.robot +++ b/robot/plan_persistence_e2e.robot @@ -14,7 +14,7 @@ Plan Full Lifecycle Persistence [Documentation] Create action, create plan, transition through all phases, ... reach applied terminal state, and verify persistence at each step. [Tags] database plan lifecycle persistence - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} full-lifecycle cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} full-lifecycle cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} full-lifecycle-ok @@ -22,7 +22,7 @@ Plan Restart Persistence [Documentation] Create a plan, close the database, reopen it, and verify ... all plan fields survive the reconnection. [Tags] database plan restart persistence - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} restart-persistence cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} restart-persistence cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} restart-persistence-ok @@ -31,7 +31,7 @@ Plan Concurrent Session Access ... and verify that plans created in one session are visible ... in the other after commit. [Tags] database plan concurrent persistence - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} concurrent-access cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} concurrent-access cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} concurrent-access-ok @@ -39,7 +39,7 @@ Action CRUD Persistence E2E [Documentation] Create, read, update, and delete an action via repository, ... verifying persistence at each step. [Tags] database action crud persistence - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} action-crud cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} action-crud cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} action-crud-ok @@ -47,6 +47,6 @@ Plan Tree Hierarchy Persistence E2E [Documentation] Create a parent plan and child plan, verify hierarchy ... links are persisted correctly including root_plan_id. [Tags] database plan hierarchy persistence - ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} plan-tree cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} plan-tree cwd=${WORKSPACE} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} plan-tree-ok diff --git a/robot/plan_repository.robot b/robot/plan_repository.robot index f6ea572a3..ae75fb30f 100644 --- a/robot/plan_repository.robot +++ b/robot/plan_repository.robot @@ -11,7 +11,7 @@ ${PYTHON} python Plan Repository CRUD Via Helper Script [Documentation] Create, retrieve, list, count, and delete a plan via LifecyclePlanRepository ${result}= Run Process ${PYTHON} ${CURDIR}/helper_plan_repository.py - ... stderr=STDOUT timeout=30s + ... stderr=STDOUT timeout=120s on_timeout=kill Log ${result.stdout} Should Contain ${result.stdout} PASS: plan_repository smoke test Should Be Equal As Integers ${result.rc} 0 diff --git a/robot/project_create_persist.robot b/robot/project_create_persist.robot index 89dba64fa..dd1c45115 100644 --- a/robot/project_create_persist.robot +++ b/robot/project_create_persist.robot @@ -14,15 +14,15 @@ Project Create Then List Shows Created Project [Documentation] After creating a project, listing projects should include it. ${tmpdir}= Evaluate __import__('tempfile').mkdtemp(prefix='persist_589_') ${init}= Run Process ${PYTHON} -m cleveragents init persist-test - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${init.rc} 0 ... msg=agents init should exit 0 but got ${init.rc}. stderr: ${init.stderr} ${create}= Run Process ${PYTHON} -m cleveragents project create local/smoke-proj - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${create.rc} 0 ... msg=project create should exit 0 but got ${create.rc}. stderr: ${create.stderr} ${list}= Run Process ${PYTHON} -m cleveragents project list - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${list.rc} 0 ... msg=project list should exit 0 but got ${list.rc}. stderr: ${list.stderr} Should Contain ${list.stdout} local/smoke-proj @@ -33,19 +33,19 @@ Multiple Created Projects Appear In List [Documentation] Creating two projects should result in both appearing in list. ${tmpdir}= Evaluate __import__('tempfile').mkdtemp(prefix='persist_589_multi_') ${init}= Run Process ${PYTHON} -m cleveragents init persist-multi - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${init.rc} 0 ... msg=agents init should exit 0 but got ${init.rc}. stderr: ${init.stderr} ${create_first}= Run Process ${PYTHON} -m cleveragents project create local/first - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${create_first.rc} 0 ... msg=project create local/first should exit 0 but got ${create_first.rc}. stderr: ${create_first.stderr} ${create_second}= Run Process ${PYTHON} -m cleveragents project create local/second - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${create_second.rc} 0 ... msg=project create local/second should exit 0 but got ${create_second.rc}. stderr: ${create_second.stderr} ${list}= Run Process ${PYTHON} -m cleveragents project list - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${list.rc} 0 ... msg=project list should exit 0 but got ${list.rc}. stderr: ${list.stderr} Should Contain ${list.stdout} local/first diff --git a/robot/project_show_after_create.robot b/robot/project_show_after_create.robot index d9f7e4a38..49e929622 100644 --- a/robot/project_show_after_create.robot +++ b/robot/project_show_after_create.robot @@ -14,15 +14,15 @@ Project Show Displays Created Project [Documentation] After creating a project, show should display its details. ${tmpdir}= Evaluate __import__('tempfile').mkdtemp(prefix='show_590_') ${init}= Run Process ${PYTHON} -m cleveragents init show-test - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${init.rc} 0 ... msg=agents init failed: ${init.stderr} ${create}= Run Process ${PYTHON} -m cleveragents project create local/show-proj - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${create.rc} 0 ... msg=project create failed: ${create.stderr} ${result}= Run Process ${PYTHON} -m cleveragents project show --format plain local/show-proj - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${result.rc} 0 ... msg=project show should exit 0 but got ${result.rc}. stderr: ${result.stderr} Should Contain ${result.stdout} local/show-proj @@ -33,16 +33,16 @@ Project Show With Description Displays Description [Documentation] Show should display the project description after creation. ${tmpdir}= Evaluate __import__('tempfile').mkdtemp(prefix='show_590_desc_') ${init}= Run Process ${PYTHON} -m cleveragents init show-desc-test - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${init.rc} 0 ... msg=agents init failed: ${init.stderr} ${create}= Run Process ${PYTHON} -m cleveragents project create local/desc-proj ... -d A test project - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${create.rc} 0 ... msg=project create failed: ${create.stderr} ${result}= Run Process ${PYTHON} -m cleveragents project show --format plain local/desc-proj - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${result.rc} 0 ... msg=project show should exit 0 but got ${result.rc}. stderr: ${result.stderr} Should Contain ${result.stdout} A test project @@ -53,11 +53,11 @@ Project Show Returns Error For Nonexistent Project [Documentation] Showing a project that was never created should fail. ${tmpdir}= Evaluate __import__('tempfile').mkdtemp(prefix='show_590_missing_') ${init}= Run Process ${PYTHON} -m cleveragents init show-missing-test - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${init.rc} 0 ... msg=agents init failed: ${init.stderr} ${result}= Run Process ${PYTHON} -m cleveragents project show --format plain local/nonexistent - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Not Be Equal As Integers ${result.rc} 0 ... msg=project show for nonexistent project should fail but exited 0 ${combined}= Set Variable ${result.stdout}${result.stderr} diff --git a/robot/repl_smoke.robot b/robot/repl_smoke.robot index 7ed4f3433..501be975c 100644 --- a/robot/repl_smoke.robot +++ b/robot/repl_smoke.robot @@ -15,13 +15,13 @@ ${PYTHON} python *** Test Cases *** REPL Help Flag Displays Usage [Documentation] ``agents repl --help`` shows the REPL help text - ${result}= Run Process ${PYTHON} -m cleveragents repl --help timeout=60s + ${result}= Run Process ${PYTHON} -m cleveragents repl --help timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} interactive REPL session REPL Module Is Importable [Documentation] The repl module can be imported without errors - ${result}= Run Process ${PYTHON} -c from cleveragents.cli.commands.repl import run_repl, dispatch_command timeout=60s + ${result}= Run Process ${PYTHON} -c from cleveragents.cli.commands.repl import run_repl, dispatch_command timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 REPL Prompt Context Without Env Vars diff --git a/robot/repo_indexing.robot b/robot/repo_indexing.robot index 89ec9ba03..123858abc 100644 --- a/robot/repo_indexing.robot +++ b/robot/repo_indexing.robot @@ -12,7 +12,7 @@ ${HELPER} ${CURDIR}/helper_repo_indexing.py Full Index With Language Detection And Persistence [Documentation] Index a sample directory, verify file count, language, and persistence. [Tags] feature195 - ${result}= Run Process ${PYTHON} ${HELPER} full-index cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} full-index cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -21,7 +21,7 @@ Full Index With Language Detection And Persistence Incremental Refresh Detects Changed Files [Documentation] Modify a file and verify incremental refresh detects the change. [Tags] feature195 - ${result}= Run Process ${PYTHON} ${HELPER} incremental-refresh cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} incremental-refresh cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -30,7 +30,7 @@ Incremental Refresh Detects Changed Files Policy Enforcement And Index Removal [Documentation] Verify max_file_size, include_globs, and removal. [Tags] feature195 - ${result}= Run Process ${PYTHON} ${HELPER} policy-enforcement cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} policy-enforcement cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 diff --git a/robot/resource_cli.robot b/robot/resource_cli.robot index a2cd5f9a2..d88c64971 100644 --- a/robot/resource_cli.robot +++ b/robot/resource_cli.robot @@ -16,7 +16,7 @@ Set Environment Variables Set Environment Variable CLEVERAGENTS_TESTING_USE_MOCK_AI true ${script}= Set Variable from cleveragents.infrastructure.database.models import Base; from sqlalchemy import create_engine; e \= create_engine("${DB_URL}"); Base.metadata.create_all(e) ${result}= Run Process ${PYTHON} -c ${script} - ... env:PYTHONPATH=src timeout=30s + ... env:PYTHONPATH=src timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Clean Up Test Database @@ -27,7 +27,7 @@ Resource Type List Returns Output [Documentation] Verify resource type list command runs without error ${result}= Run Process ${PYTHON} -m cleveragents resource type list ... env:PYTHONPATH=src env:CLEVERAGENTS_DATABASE_URL=${DB_URL} env:CLEVERAGENTS_TESTING_USE_MOCK_AI=true - ... timeout=30s stderr=STDOUT + ... timeout=120s on_timeout=kill stderr=STDOUT Log ${result.stdout} Should Be Equal As Integers ${result.rc} 0 @@ -35,6 +35,6 @@ Resource Show Non Existent Returns Error [Documentation] Verify resource show for non-existent resource fails gracefully ${result}= Run Process ${PYTHON} -m cleveragents resource show nonexistent ... env:PYTHONPATH=src env:CLEVERAGENTS_DATABASE_URL=${DB_URL} env:CLEVERAGENTS_TESTING_USE_MOCK_AI=true - ... timeout=30s stderr=STDOUT + ... timeout=120s on_timeout=kill stderr=STDOUT Log ${result.stdout} Should Not Be Equal As Integers ${result.rc} 0 diff --git a/robot/resource_type_bootstrap_fs.robot b/robot/resource_type_bootstrap_fs.robot index a847a78a7..bd57fa048 100644 --- a/robot/resource_type_bootstrap_fs.robot +++ b/robot/resource_type_bootstrap_fs.robot @@ -32,7 +32,7 @@ Bootstrap Seeds Fs Directory Type Into Registry ... strategy = spec.sandbox_strategy.value if hasattr(spec.sandbox_strategy, "value") else str(spec.sandbox_strategy) ... assert strategy == "copy_on_write", f"strategy: {strategy}" ... print("fs-directory bootstrap validated successfully") - ${result}= Run Process ${PYTHON} -c ${script} timeout=60s + ${result}= Run Process ${PYTHON} -c ${script} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 fs-directory bootstrap failed: ${result.stderr} Should Contain ${result.stdout} fs-directory bootstrap validated successfully @@ -58,6 +58,6 @@ Resource Add Fs Directory Succeeds After Bootstrap ... assert resource.resource_type_name == "fs-directory", f"type: {resource.resource_type_name}" ... assert resource.name == "local/test", f"name: {resource.name}" ... print("resource add fs-directory succeeded after bootstrap") - ${result}= Run Process ${PYTHON} -c ${script} timeout=60s + ${result}= Run Process ${PYTHON} -c ${script} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 resource add fs-directory failed: ${result.stderr} Should Contain ${result.stdout} resource add fs-directory succeeded after bootstrap diff --git a/robot/resource_type_bootstrap_git.robot b/robot/resource_type_bootstrap_git.robot index 6ea9a2b0c..dc0f6528e 100644 --- a/robot/resource_type_bootstrap_git.robot +++ b/robot/resource_type_bootstrap_git.robot @@ -34,7 +34,7 @@ Resource Add Git Checkout Should Not Fail With Type Not Found ... assert resource.resource_type_name == "git-checkout", f"type: {resource.resource_type_name}" ... assert resource.name == "local/test", f"name: {resource.name}" ... print("resource add git-checkout succeeded after bootstrap") - ${result}= Run Process ${PYTHON} -c ${script} timeout=60s + ${result}= Run Process ${PYTHON} -c ${script} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 ... msg=resource add git-checkout failed: ${result.stderr} Should Contain ${result.stdout} resource add git-checkout succeeded after bootstrap @@ -61,7 +61,7 @@ Git Checkout Type Exists After Bootstrap ... assert ss == "git_worktree", f"sandbox mismatch: {ss}" ... assert spec.user_addable is True, f"user_addable: {spec.user_addable}" ... print("git-checkout bootstrap validated successfully") - ${result}= Run Process ${PYTHON} -c ${script} timeout=60s + ${result}= Run Process ${PYTHON} -c ${script} timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 ... msg=Bootstrap validation failed: ${result.stderr} Should Contain ${result.stdout} git-checkout bootstrap validated successfully diff --git a/robot/retry_patterns.robot b/robot/retry_patterns.robot index 3a4f09307..2df5d1ff9 100644 --- a/robot/retry_patterns.robot +++ b/robot/retry_patterns.robot @@ -26,7 +26,7 @@ Test Exponential Backoff Retry Pattern [Documentation] Verify exponential backoff retry works correctly Create Retry Test Script exponential_backoff ${result} = Run Process ${PYTHON} ${RETRY_TEST_FILE} - ... stdout=${RETRY_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} + ... stdout=${RETRY_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} on_timeout=kill Should Be Equal As Integers ${result.rc} 0 ${output} = Get File ${RETRY_OUTPUT} Should Contain ${output} Attempt 1 failed @@ -38,7 +38,7 @@ Test Async Exponential Backoff Pattern [Documentation] Verify async exponential backoff retry works correctly Create Async Retry Test Script async_exponential_backoff ${result} = Run Process ${PYTHON} ${RETRY_TEST_FILE} - ... stdout=${RETRY_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} + ... stdout=${RETRY_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} on_timeout=kill Should Be Equal As Integers ${result.rc} 0 ${output} = Get File ${RETRY_OUTPUT} Should Contain ${output} Async attempt 1 failed @@ -49,7 +49,7 @@ Test Network Retry Pattern [Documentation] Test network-specific retry with NetworkError Create Network Error Test Script ${result} = Run Process ${PYTHON} ${RETRY_TEST_FILE} - ... stdout=${RETRY_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} + ... stdout=${RETRY_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} on_timeout=kill Should Be Equal As Integers ${result.rc} 0 ${output} = Get File ${RETRY_OUTPUT} Should Contain ${output} NetworkError retry attempt @@ -60,7 +60,7 @@ Test Provider Retry Pattern With Rate Limiting [Documentation] Test provider retry with RateLimitError and jitter Create Rate Limit Test Script ${result} = Run Process ${PYTHON} ${RETRY_TEST_FILE} - ... stdout=${RETRY_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} + ... stdout=${RETRY_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} on_timeout=kill Should Be Equal As Integers ${result.rc} 0 ${output} = Get File ${RETRY_OUTPUT} Should Contain ${output} RateLimitError encountered @@ -71,7 +71,7 @@ Test Circuit Breaker Opens After Threshold [Documentation] Verify circuit breaker opens after failure threshold Create Circuit Breaker Test Script open ${result} = Run Process ${PYTHON} ${RETRY_TEST_FILE} - ... stdout=${RETRY_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} + ... stdout=${RETRY_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} on_timeout=kill Should Be Equal As Integers ${result.rc} 0 ${output} = Get File ${RETRY_OUTPUT} Should Contain ${output} Circuit breaker opened after 3 failures @@ -81,7 +81,7 @@ Test Circuit Breaker Recovery [Documentation] Verify circuit breaker recovers to half-open then closed Create Circuit Breaker Test Script recovery ${result} = Run Process ${PYTHON} ${RETRY_TEST_FILE} - ... stdout=${RETRY_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} + ... stdout=${RETRY_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} on_timeout=kill Should Be Equal As Integers ${result.rc} 0 ${output} = Get File ${RETRY_OUTPUT} Should Contain ${output} Circuit breaker state: open @@ -92,7 +92,7 @@ Test Retry Context Manager [Documentation] Test RetryContext for tracking retry attempts Create Retry Context Test Script ${result} = Run Process ${PYTHON} ${RETRY_TEST_FILE} - ... stdout=${RETRY_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} + ... stdout=${RETRY_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} on_timeout=kill Should Be Equal As Integers ${result.rc} 0 ${output} = Get File ${RETRY_OUTPUT} Should Contain ${output} Retry context: test_operation @@ -103,7 +103,7 @@ Test Auto Debug Retry Pattern [Documentation] Test auto-debug retry with debug callback Create Auto Debug Test Script ${result} = Run Process ${PYTHON} ${RETRY_TEST_FILE} - ... stdout=${RETRY_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} + ... stdout=${RETRY_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} on_timeout=kill Should Be Equal As Integers ${result.rc} 0 ${output} = Get File ${RETRY_OUTPUT} Should Contain ${output} Auto-debug attempt 1 @@ -115,7 +115,7 @@ Test Retry With Timeout [Documentation] Test retry with overall timeout limit Create Timeout Retry Test Script ${result} = Run Process ${PYTHON} ${RETRY_TEST_FILE} - ... stdout=${RETRY_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} + ... stdout=${RETRY_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} on_timeout=kill # This should fail due to timeout Should Not Be Equal As Integers ${result.rc} 0 ${output} = Get File ${RETRY_OUTPUT} @@ -125,7 +125,7 @@ Test Category-Specific Retry Decorators [Documentation] Test all category-specific retry patterns Create Category Test Script ${result} = Run Process ${PYTHON} ${RETRY_TEST_FILE} - ... stdout=${RETRY_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} + ... stdout=${RETRY_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} on_timeout=kill Should Be Equal As Integers ${result.rc} 0 ${output} = Get File ${RETRY_OUTPUT} Should Contain ${output} Network retry: max_attempts=5 @@ -137,7 +137,7 @@ Test Concurrent Retries With Jitter [Documentation] Test multiple concurrent operations with jitter Create Concurrent Retry Test Script ${result} = Run Process ${PYTHON} ${RETRY_TEST_FILE} - ... stdout=${RETRY_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} + ... stdout=${RETRY_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} on_timeout=kill Should Be Equal As Integers ${result.rc} 0 ${output} = Get File ${RETRY_OUTPUT} Verify No Thundering Herd ${output} diff --git a/robot/retry_policy_wiring.robot b/robot/retry_policy_wiring.robot index ea574e0fa..ad89687c9 100644 --- a/robot/retry_policy_wiring.robot +++ b/robot/retry_policy_wiring.robot @@ -154,7 +154,7 @@ Run Retry Test Script [Documentation] Create and run a Python test script, returning its output Create Test Script ${test_type} ${result} = Run Process ${PYTHON} ${TEST_FILE} - ... stdout=${TEST_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} + ... stdout=${TEST_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} on_timeout=kill Should Be Equal As Integers ${result.rc} 0 msg=Script ${test_type} failed:\n${result.stdout} ${output} = Get File ${TEST_OUTPUT} RETURN ${output} diff --git a/robot/routing_prefix_stripping.robot b/robot/routing_prefix_stripping.robot index 6e08b1b27..8801ded49 100644 --- a/robot/routing_prefix_stripping.robot +++ b/robot/routing_prefix_stripping.robot @@ -26,7 +26,7 @@ Routing Prefix Stripping In Application ... --allow-rxpy-in-run-mode ... -p test input ... stderr=STDOUT - ... timeout=30s + ... timeout=120s on_timeout=kill # Check that the output does NOT contain the prefix Should Not Contain ${result.stdout} DISCOVERY_RESPONSE: @@ -44,7 +44,7 @@ Multiple Routing Prefixes Are Stripped ... --allow-rxpy-in-run-mode ... -p test input ... stderr=STDOUT - ... timeout=30s + ... timeout=120s on_timeout=kill Should Not Contain ${result.stdout} GOTO_BRAINSTORMING: Should Contain ${result.stdout} Let's brainstorm ideas @@ -60,7 +60,7 @@ Content Without Prefix Remains Unchanged ... --allow-rxpy-in-run-mode ... -p test input ... stderr=STDOUT - ... timeout=30s + ... timeout=120s on_timeout=kill Should Contain ${result.stdout} This is normal text without any prefix @@ -75,7 +75,7 @@ SET Prefix Family Stripped ... --allow-rxpy-in-run-mode ... -p test input ... stderr=STDOUT - ... timeout=30s + ... timeout=120s on_timeout=kill Should Not Contain ${result.stdout} SET_TOPIC: Should Contain ${result.stdout} Neural networks in cognitive science diff --git a/robot/rxpy_route_validation.robot b/robot/rxpy_route_validation.robot index c58454ffc..4174244b1 100644 --- a/robot/rxpy_route_validation.robot +++ b/robot/rxpy_route_validation.robot @@ -29,7 +29,7 @@ Test Run Command Rejects RxPY Routes ... -c ${RXPY_CONFIG} ... -p test ... --unsafe - ... stderr=STDOUT timeout=30s + ... stderr=STDOUT timeout=120s on_timeout=kill Should Not Be Equal As Integers ${result.rc} 0 Command should have failed Should Contain ${result.stdout} ${RXPY_RUN_MODE_ERROR} @@ -53,7 +53,7 @@ Test Run Command With Context Does Not Create Context ... --unsafe ... --context ${context_name} ... --context-dir ${CONTEXT_DIR} - ... stderr=STDOUT timeout=30s + ... stderr=STDOUT timeout=120s on_timeout=kill Should Not Be Equal As Integers ${result.rc} 0 Command should have failed Should Contain ${result.stdout} ${RXPY_RUN_MODE_ERROR} @@ -74,7 +74,7 @@ Test Run Command With LangGraph Routes Succeeds ... -c ${LANGGRAPH_CONFIG} ... --context-dir ${CONTEXT_DIR} ... -p test - ... stderr=STDOUT timeout=30s + ... stderr=STDOUT timeout=120s on_timeout=kill # For now, might fail on actual execution but shouldn't have route validation error ${output} = Set Variable ${result.stdout} @@ -95,7 +95,7 @@ Test Run Command Accepts RxPY Routes When Allowed ... --context ${context_name} ... --context-dir ${CONTEXT_DIR} ... stderr=STDOUT - ... timeout=30s + ... timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Not Contain ${result.stdout} ${RXPY_RUN_MODE_ERROR} @@ -110,7 +110,7 @@ Test Error Message Content ... -c ${RXPY_CONFIG} ... -p test ... --unsafe - ... stderr=STDOUT timeout=30s + ... stderr=STDOUT timeout=120s on_timeout=kill Should Not Be Equal As Integers ${result.rc} 0 @@ -131,7 +131,7 @@ Test Run With Nested Switch Operators ... -c ${TEST_DIR}/nested_switch_config.yaml ... -p test ... --unsafe - ... stderr=STDOUT timeout=30s + ... stderr=STDOUT timeout=120s on_timeout=kill Should Not Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} ${RXPY_RUN_MODE_ERROR} @@ -147,7 +147,7 @@ Test Mixed Route Types Detection ... -c ${TEST_DIR}/mixed_config.yaml ... -p test ... --unsafe - ... stderr=STDOUT timeout=30s + ... stderr=STDOUT timeout=120s on_timeout=kill Should Not Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} ${RXPY_RUN_MODE_ERROR} @@ -169,7 +169,7 @@ Test Context File Not Created On Multiple Runs ... --unsafe ... --context ${context_name} ... --context-dir ${CONTEXT_DIR} - ... stderr=STDOUT timeout=30s + ... stderr=STDOUT timeout=120s on_timeout=kill Should Not Be Equal As Integers ${result.rc} 0 END diff --git a/robot/scale_test.robot b/robot/scale_test.robot index dcadd7fcb..7a41c8767 100644 --- a/robot/scale_test.robot +++ b/robot/scale_test.robot @@ -12,7 +12,7 @@ ${HELPER} ${CURDIR}/helper_scale_test.py *** Test Cases *** Load Scale Metadata Fixture [Documentation] Load scale_metadata.json and verify structure - ${result}= Run Process ${PYTHON} ${HELPER} load-metadata cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} load-metadata cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -20,7 +20,7 @@ Load Scale Metadata Fixture Validate Scale Metadata Profiles [Documentation] Verify all expected scale profiles are present with correct fields - ${result}= Run Process ${PYTHON} ${HELPER} validate-profiles cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} validate-profiles cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -28,7 +28,7 @@ Validate Scale Metadata Profiles Load And Validate Baseline Thresholds [Documentation] Load baseline_thresholds.json and verify threshold matrix structure - ${result}= Run Process ${PYTHON} ${HELPER} validate-thresholds cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} validate-thresholds cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -36,7 +36,7 @@ Load And Validate Baseline Thresholds Verify Threshold Monotonicity [Documentation] Verify p50 < p95 < p99 across all threshold entries - ${result}= Run Process ${PYTHON} ${HELPER} check-monotonicity cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} check-monotonicity cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -44,7 +44,7 @@ Verify Threshold Monotonicity Simulate Profile File Distribution [Documentation] Generate file count distributions and verify they match language mix - ${result}= Run Process ${PYTHON} ${HELPER} simulate-distribution cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} simulate-distribution cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -52,7 +52,7 @@ Simulate Profile File Distribution Validate Generator Instructions Exist [Documentation] Verify the generator instructions document is present - ${result}= Run Process ${PYTHON} ${HELPER} check-generator-docs cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} check-generator-docs cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 diff --git a/robot/scientific_paper_basic.robot b/robot/scientific_paper_basic.robot index 4eaaba821..7dfbee65b 100644 --- a/robot/scientific_paper_basic.robot +++ b/robot/scientific_paper_basic.robot @@ -28,7 +28,7 @@ Scientific Paper Writer Basic Integration Test ... --allow-rxpy-in-run-mode ... -p Hello ... stderr=DEVNULL - ... timeout=60s + ... timeout=120s on_timeout=kill Should Contain ${result.stdout} Paper Writer Log Intro test passed @@ -42,7 +42,7 @@ Scientific Paper Writer Basic Integration Test ... --allow-rxpy-in-run-mode ... -p !help ... stderr=DEVNULL - ... timeout=30s + ... timeout=120s on_timeout=kill Should Contain ${result.stdout} Available Commands Log Command handler test passed @@ -54,7 +54,7 @@ Scientific Paper Writer Basic Integration Test ... --allow-rxpy-in-run-mode ... -p Test message ... stderr=DEVNULL - ... timeout=30s + ... timeout=120s on_timeout=kill Should Contain ${result.stdout} Test message Log Echo test passed diff --git a/robot/scientific_paper_e2e_test.robot b/robot/scientific_paper_e2e_test.robot index f596d757b..9887c251c 100644 --- a/robot/scientific_paper_e2e_test.robot +++ b/robot/scientific_paper_e2e_test.robot @@ -65,7 +65,7 @@ Scientific Paper Writer Full Workflow # Test 8: Advance toward later stages (using structure or latex_generation as targets) Log Advancing toward later stages... - ${result}= Run Paper Command !next structure timeout=120s + ${result}= Run Paper Command !next structure timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 # Test 9: Verify stage list command works @@ -90,7 +90,7 @@ Scientific Paper Writer LaTeX Generation ... ${V2_PAPER_CONTEXTS_DIR}/03_brainstorming.json ... --context-dir ${CONTEXT_DIR} ... stderr=STDOUT - ... timeout=30s + ... timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Log Context imported: ${result.stdout} @@ -142,7 +142,7 @@ Scientific Paper Writer LaTeX Generation ... --allow-rxpy-in-run-mode ... -p !context ... stderr=STDOUT - ... timeout=30s + ... timeout=120s on_timeout=kill Should Contain ${result.stdout} latex_source Log LaTeX generation test completed @@ -229,7 +229,7 @@ Cleanup Test Environment Log Test environment cleaned up Run Paper Command - [Arguments] ${command} ${timeout}=30s + [Arguments] ${command} ${timeout}=120s [Documentation] Run a command against the paper writer with the persistent context ${result}= Run Process ${PYTHON} -m cleveragents actor run ... -c ${CONFIG_FILE} @@ -239,7 +239,7 @@ Run Paper Command ... --allow-rxpy-in-run-mode ... -p ${command} ... stderr=STDOUT - ... timeout=${timeout} + ... timeout=${timeout} on_timeout=kill Log Command: ${command} Log Output: ${result.stdout} RETURN ${result} diff --git a/robot/scientific_paper_writer_test.robot b/robot/scientific_paper_writer_test.robot index 42b8b7674..865c15429 100644 --- a/robot/scientific_paper_writer_test.robot +++ b/robot/scientific_paper_writer_test.robot @@ -32,7 +32,7 @@ Test Context Export Import Commands ... --unsafe ... --allow-rxpy-in-run-mode ... -p Hello world - ... timeout=30s + ... timeout=120s on_timeout=kill # Export it ${result} = Run Process ${PYTHON} -m cleveragents context export @@ -63,7 +63,7 @@ Test Context List Command ... --unsafe ... --allow-rxpy-in-run-mode ... -p First - ... timeout=30s + ... timeout=120s on_timeout=kill Run Process ${PYTHON} -m cleveragents actor run ... -c ${SIMPLE_CONFIG} @@ -72,7 +72,7 @@ Test Context List Command ... --unsafe ... --allow-rxpy-in-run-mode ... -p Second - ... timeout=30s + ... timeout=120s on_timeout=kill # List them ${result} = Run Process ${PYTHON} -m cleveragents context list diff --git a/robot/security_async.robot b/robot/security_async.robot index 7b0b0ec5f..0f6bbcad8 100644 --- a/robot/security_async.robot +++ b/robot/security_async.robot @@ -44,7 +44,7 @@ Test AsyncResourceTracker Register And Close ... asyncio.run(main()) Create File ${TEST_FILE} ${script} ${result} = Run Process ${PYTHON} ${TEST_FILE} - ... stdout=${TEST_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} + ... stdout=${TEST_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} on_timeout=kill Should Be Equal As Integers ${result.rc} 0 ${output} = Get File ${TEST_OUTPUT} Should Contain ${output} PASS: register and close @@ -73,7 +73,7 @@ Test AsyncResourceTracker Timeout Warning ... asyncio.run(main()) Create File ${TEST_FILE} ${script} ${result} = Run Process ${PYTHON} ${TEST_FILE} - ... stdout=${TEST_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} + ... stdout=${TEST_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} on_timeout=kill Should Be Equal As Integers ${result.rc} 0 ${output} = Get File ${TEST_OUTPUT} Should Contain ${output} PASS: timeout warning @@ -94,7 +94,7 @@ Test A2aEventQueue Close ... print("PASS: event queue close", flush=True) Create File ${TEST_FILE} ${script} ${result} = Run Process ${PYTHON} ${TEST_FILE} - ... stdout=${TEST_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} + ... stdout=${TEST_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} on_timeout=kill Should Be Equal As Integers ${result.rc} 0 ${output} = Get File ${TEST_OUTPUT} Should Contain ${output} PASS: event queue close @@ -115,7 +115,7 @@ Test StateManager Close ... print("PASS: state manager close", flush=True) Create File ${TEST_FILE} ${script} ${result} = Run Process ${PYTHON} ${TEST_FILE} - ... stdout=${TEST_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} + ... stdout=${TEST_OUTPUT} stderr=STDOUT timeout=${TIMEOUT} on_timeout=kill Should Be Equal As Integers ${result.rc} 0 ${output} = Get File ${TEST_OUTPUT} Should Contain ${output} PASS: state manager close diff --git a/robot/session_create_error.robot b/robot/session_create_error.robot index 927788e05..c836e1f41 100644 --- a/robot/session_create_error.robot +++ b/robot/session_create_error.robot @@ -17,11 +17,11 @@ Session Create After Init Should Not Error [Tags] tdd_bug tdd_bug_570 ${tmpdir}= Evaluate __import__('tempfile').mkdtemp(prefix='sce_570_') ${init}= Run Process ${PYTHON} -m cleveragents init sce-test - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${init.rc} 0 ... msg=agents init should exit 0 but got ${init.rc}. stderr: ${init.stderr} ${create}= Run Process ${PYTHON} -m cleveragents session create --format plain - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${create.rc} 0 ... msg=session create should exit 0 but got ${create.rc}. stderr: ${create.stderr} Should Not Contain ${create.stderr} AttributeError @@ -33,17 +33,17 @@ Session Create Then List Shows Created Session [Tags] tdd_bug tdd_bug_570 ${tmpdir}= Evaluate __import__('tempfile').mkdtemp(prefix='sce_570_list_') ${init}= Run Process ${PYTHON} -m cleveragents init sce-list - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${init.rc} 0 ... msg=agents init should exit 0 but got ${init.rc}. stderr: ${init.stderr} ${create}= Run Process ${PYTHON} -m cleveragents session create --format plain - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${create.rc} 0 ... msg=session create should exit 0 but got ${create.rc}. stderr: ${create.stderr} Should Not Contain ${create.stderr} AttributeError ... msg=session create should not raise AttributeError: ${create.stderr} ${list}= Run Process ${PYTHON} -m cleveragents session list --format plain - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${list.rc} 0 ... msg=session list should exit 0 but got ${list.rc}. stderr: ${list.stderr} Should Contain ${list.stdout} total: diff --git a/robot/session_list_error.robot b/robot/session_list_error.robot index fcfffd3db..6651ef08a 100644 --- a/robot/session_list_error.robot +++ b/robot/session_list_error.robot @@ -23,11 +23,11 @@ Session List After Init Should Not Error [Tags] tdd_bug tdd_bug_554 ${tmpdir}= Evaluate __import__('tempfile').mkdtemp(prefix='sle_554_') ${init}= Run Process ${PYTHON} -m cleveragents init sle-test - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${init.rc} 0 ... msg=agents init should exit 0 but got ${init.rc}. stderr: ${init.stderr} ${list}= Run Process ${PYTHON} -m cleveragents session list - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${list.rc} 0 ... msg=session list should exit 0 but got ${list.rc}. stderr: ${list.stderr} Should Not Contain ${list.stderr} AttributeError @@ -42,11 +42,11 @@ Session List JSON Format Does Not Error [Tags] tdd_bug tdd_bug_554 ${tmpdir}= Evaluate __import__('tempfile').mkdtemp(prefix='sle_554_json_') ${init}= Run Process ${PYTHON} -m cleveragents init sle-json - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${init.rc} 0 ... msg=agents init should exit 0 but got ${init.rc}. stderr: ${init.stderr} ${list}= Run Process ${PYTHON} -m cleveragents session list --format json - ... timeout=60s cwd=${tmpdir} + ... timeout=120s on_timeout=kill cwd=${tmpdir} Should Be Equal As Integers ${list.rc} 0 ... msg=session list --format json should exit 0 but got ${list.rc}. stderr: ${list.stderr} Should Not Contain ${list.stderr} AttributeError diff --git a/robot/system_prompt_template_rendering.robot b/robot/system_prompt_template_rendering.robot index a8571043a..86f0d2c21 100644 --- a/robot/system_prompt_template_rendering.robot +++ b/robot/system_prompt_template_rendering.robot @@ -51,7 +51,7 @@ System Prompt Template Variables Are Rendered With Runtime Context # Run the agent with --load-context - the LLM should receive a system prompt with rendered values # Since we can't easily intercept the actual LLM call, we verify the config was loaded correctly ${result}= Run Process ${PYTHON} -m cleveragents actor run -c ${TEMP_DIR}/template_test.yaml --unsafe --allow-rxpy-in-run-mode --load-context ${TEMP_DIR}/test_context.json -p "Analyze this" - ... shell=False timeout=30s + ... shell=False timeout=120s on_timeout=kill # The agent should have processed successfully (even if it times out, the config should load) Should Not Contain ${result.stderr} TemplateError @@ -93,7 +93,7 @@ Config Parser Preserves Template Syntax During YAML Loading # The config should load without errors and preserve templates ${python_code}= Set Variable from pathlib import Path; from cleveragents.reactive.config_parser import ReactiveConfigParser; parser = ReactiveConfigParser(); config = parser.parse_files([Path('${TEMP_DIR}/preserve_test.yaml')]); agent1_prompt = config.agents['actor1'].config.get('system_prompt', ''); print('PROMPT1:', agent1_prompt); assert '{{' in agent1_prompt and '}}' in agent1_prompt, f'Templates not preserved: {agent1_prompt}' - ${result}= Run Process ${PYTHON} -c ${python_code} shell=False timeout=30s + ${result}= Run Process ${PYTHON} -c ${python_code} shell=False timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} PROMPT1: @@ -146,7 +146,7 @@ Nested Context Variables In System Prompts # Verify the config loads and preserves templates ${python_code}= Set Variable from pathlib import Path; from cleveragents.reactive.config_parser import ReactiveConfigParser; parser = ReactiveConfigParser(); config = parser.parse_files([Path('${TEMP_DIR}/nested_test.yaml')]); prompt = config.agents['nested_actor'].config.get('system_prompt', ''); print('NESTED_PROMPT:', prompt); assert '{{ context.paper_details.topic }}' in prompt, f'Nested template not preserved: {prompt}' - ${result}= Run Process ${PYTHON} -c ${python_code} shell=False timeout=30s + ${result}= Run Process ${PYTHON} -c ${python_code} shell=False timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} {{ context.paper_details.topic }} @@ -183,7 +183,7 @@ JINJA2 Filters In System Prompts Are Preserved # Verify filters are preserved ${python_code}= Set Variable from pathlib import Path; from cleveragents.reactive.config_parser import ReactiveConfigParser; parser = ReactiveConfigParser(); config = parser.parse_files([Path('${TEMP_DIR}/filter_test.yaml')]); prompt = config.agents['filter_actor'].config.get('system_prompt', ''); print('FILTER_PROMPT:', prompt); assert '| tojson' in prompt and '| length' in prompt, f'Filters not preserved: {prompt}' - ${result}= Run Process ${PYTHON} -c ${python_code} shell=False timeout=30s + ${result}= Run Process ${PYTHON} -c ${python_code} shell=False timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} | tojson diff --git a/robot/tdd_checkpoint_real_rollback.robot b/robot/tdd_checkpoint_real_rollback.robot new file mode 100644 index 000000000..400f36de2 --- /dev/null +++ b/robot/tdd_checkpoint_real_rollback.robot @@ -0,0 +1,34 @@ +*** Settings *** +Documentation TDD Bug #822 — checkpoint rollback is simulated, not real +... Integration tests verifying that +... CheckpointService.rollback_to_checkpoint() actually restores +... file system state via git reset --hard. Currently the method +... only constructs a RollbackResult without executing the git +... operation, so files modified after the checkpoint remain +... unchanged. Tests are tagged tdd_expected_fail so CI passes +... via result inversion. +Resource ${CURDIR}/common.resource +Suite Setup Setup Test Environment +Suite Teardown Cleanup Test Environment + +*** Variables *** +${HELPER} ${CURDIR}/helper_tdd_checkpoint_real_rollback.py + +*** Test Cases *** +TDD Checkpoint Rollback Restores File Content + [Documentation] Verify that rollback reverts a modified file to its checkpoint state + [Tags] tdd_expected_fail tdd_bug tdd_bug_822 + ${result}= Run Process ${PYTHON} ${HELPER} rollback-restores-content cwd=${WORKSPACE} timeout=30s on_timeout=kill + Log ${result.stdout} + Log ${result.stderr} + Should Be Equal As Integers ${result.rc} 0 + Should Contain ${result.stdout} tdd-checkpoint-rollback-restores-content-ok + +TDD Checkpoint Rollback Removes Added Files + [Documentation] Verify that rollback removes files added after the checkpoint + [Tags] tdd_expected_fail tdd_bug tdd_bug_822 + ${result}= Run Process ${PYTHON} ${HELPER} rollback-removes-added-files cwd=${WORKSPACE} timeout=30s on_timeout=kill + Log ${result.stdout} + Log ${result.stderr} + Should Be Equal As Integers ${result.rc} 0 + Should Contain ${result.stdout} tdd-checkpoint-rollback-removes-added-files-ok diff --git a/robot/tdd_session_create_di.robot b/robot/tdd_session_create_di.robot index 14b5cd1ce..10f99f04f 100644 --- a/robot/tdd_session_create_di.robot +++ b/robot/tdd_session_create_di.robot @@ -13,7 +13,7 @@ ${HELPER} ${CURDIR}/helper_tdd_session_create_di.py TDD Session Create DI Error Via CLI [Documentation] Verify that ``session create`` triggers the DI db error [Tags] tdd_bug tdd_bug_570 - ${result}= Run Process ${PYTHON} ${HELPER} create-di-error cwd=${WORKSPACE} timeout=90s + ${result}= Run Process ${PYTHON} ${HELPER} create-di-error cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -22,7 +22,7 @@ TDD Session Create DI Error Via CLI TDD Session Create With Actor DI Error [Documentation] Verify that ``session create --actor`` triggers the DI db error [Tags] tdd_bug tdd_bug_570 - ${result}= Run Process ${PYTHON} ${HELPER} create-actor cwd=${WORKSPACE} timeout=90s + ${result}= Run Process ${PYTHON} ${HELPER} create-actor cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -31,7 +31,7 @@ TDD Session Create With Actor DI Error TDD Session Create DI JSON Output [Documentation] Verify that ``session create --format json`` fails due to DI db error [Tags] tdd_bug tdd_bug_570 - ${result}= Run Process ${PYTHON} ${HELPER} create-json cwd=${WORKSPACE} timeout=90s + ${result}= Run Process ${PYTHON} ${HELPER} create-json cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 diff --git a/robot/tdd_session_list_di.robot b/robot/tdd_session_list_di.robot index 30ae80677..4c5cafd62 100644 --- a/robot/tdd_session_list_di.robot +++ b/robot/tdd_session_list_di.robot @@ -14,7 +14,7 @@ ${HELPER} ${CURDIR}/helper_tdd_session_list_di.py TDD Session List DI Error Via CLI [Documentation] Verify that ``session list`` succeeds via the real DI path [Tags] tdd_bug tdd_bug_554 - ${result}= Run Process ${PYTHON} ${HELPER} list-di-error cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} list-di-error cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -23,7 +23,7 @@ TDD Session List DI Error Via CLI TDD Session List DI Service Resolution [Documentation] Verify that ``_get_session_service()`` resolves a valid service [Tags] tdd_bug tdd_bug_554 - ${result}= Run Process ${PYTHON} ${HELPER} service-resolution cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} service-resolution cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -32,7 +32,7 @@ TDD Session List DI Service Resolution TDD Session List DI JSON Output [Documentation] Verify that ``session list --format json`` succeeds via the real DI path [Tags] tdd_bug tdd_bug_554 - ${result}= Run Process ${PYTHON} ${HELPER} list-json cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} list-json cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 diff --git a/robot/tdd_session_list_missing_db.robot b/robot/tdd_session_list_missing_db.robot index a8d248a48..60affb0f6 100644 --- a/robot/tdd_session_list_missing_db.robot +++ b/robot/tdd_session_list_missing_db.robot @@ -16,7 +16,7 @@ ${HELPER} ${CURDIR}/helper_tdd_session_list_missing_db.py TDD Session List Missing DB Via CLI [Documentation] Verify that ``session list`` succeeds when no database file exists [Tags] tdd_bug tdd_bug_680 - ${result}= Run Process ${PYTHON} ${HELPER} list-missing-db cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} list-missing-db cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 @@ -25,7 +25,7 @@ TDD Session List Missing DB Via CLI TDD Session List Missing DB JSON Output [Documentation] Verify that ``session list --format json`` succeeds when no database file exists [Tags] tdd_bug tdd_bug_680 - ${result}= Run Process ${PYTHON} ${HELPER} list-missing-db-json cwd=${WORKSPACE} timeout=30s + ${result}= Run Process ${PYTHON} ${HELPER} list-missing-db-json cwd=${WORKSPACE} timeout=120s on_timeout=kill Log ${result.stdout} Log ${result.stderr} Should Be Equal As Integers ${result.rc} 0 diff --git a/robot/uow_lifecycle.robot b/robot/uow_lifecycle.robot index 57acd1690..695b176fc 100644 --- a/robot/uow_lifecycle.robot +++ b/robot/uow_lifecycle.robot @@ -11,7 +11,7 @@ ${PYTHON} python UoW Lifecycle Action And Plan Via Helper Script [Documentation] Create action + plan via UoW, verify retrieval in new session ${result}= Run Process ${PYTHON} ${CURDIR}/helper_uow_lifecycle.py - ... stderr=STDOUT timeout=30s + ... stderr=STDOUT timeout=120s on_timeout=kill Log ${result.stdout} Should Contain ${result.stdout} PASS: uow_lifecycle smoke test Should Be Equal As Integers ${result.rc} 0 diff --git a/robot/version_comprehensive_test.robot b/robot/version_comprehensive_test.robot index 7cec6ce8a..2150dd5f2 100644 --- a/robot/version_comprehensive_test.robot +++ b/robot/version_comprehensive_test.robot @@ -12,20 +12,20 @@ ${EXPECTED_VERSION} 0.1.0 *** Test Cases *** Version Output Format Is Correct [Documentation] Test that version output follows the expected format - ${result} = Run Process ${PYTHON} -m cleveragents --version timeout=30s + ${result} = Run Process ${PYTHON} -m cleveragents --version timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Match Regexp ${result.stdout} CleverAgents\\s+\\d+\\.\\d+\\.\\d+ Version Number Matches Expected [Documentation] Test that version number matches expected value - ${result} = Run Process ${PYTHON} -m cleveragents --version timeout=30s + ${result} = Run Process ${PYTHON} -m cleveragents --version timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} 1.0.0 Version Command Completes Successfully [Documentation] Test that version command completes successfully - ${result} = Run Process ${PYTHON} -m cleveragents --version timeout=30s + ${result} = Run Process ${PYTHON} -m cleveragents --version timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Version Works With Module Invocation diff --git a/robot/version_test.robot b/robot/version_test.robot index 84c76beed..767cae7bf 100644 --- a/robot/version_test.robot +++ b/robot/version_test.robot @@ -10,22 +10,22 @@ ${PYTHON} python *** Test Cases *** Check CleverAgents Version Command [Documentation] Test that cleveragents --version returns the correct version - ${result} = Run Process ${PYTHON} -m cleveragents --version timeout=30s + ${result} = Run Process ${PYTHON} -m cleveragents --version timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} CleverAgents 1.0.0 Check CleverAgents Version Command Stderr [Documentation] Ensure version command doesn't produce errors on stderr - ${result} = Run Process ${PYTHON} -m cleveragents --version timeout=30s + ${result} = Run Process ${PYTHON} -m cleveragents --version timeout=120s on_timeout=kill Should Be Empty ${result.stderr} Check CleverAgents Help Command [Documentation] Test that cleveragents --help works correctly - ${result} = Run Process ${PYTHON} -m cleveragents --help timeout=30s + ${result} = Run Process ${PYTHON} -m cleveragents --help timeout=120s on_timeout=kill Should Be Equal As Integers ${result.rc} 0 Should Contain ${result.stdout} Usage: Check CleverAgents Invalid Command [Documentation] Test that invalid commands return appropriate error code - ${result} = Run Process ${PYTHON} -m cleveragents --invalid-option timeout=30s + ${result} = Run Process ${PYTHON} -m cleveragents --invalid-option timeout=120s on_timeout=kill Should Not Be Equal As Integers ${result.rc} 0