Files
cleveragents-core/robot/tool_wrapping_runtime.robot
freemo b122ec7ed5
CI / lint (pull_request) Successful in 23s
CI / quality (pull_request) Successful in 51s
CI / typecheck (pull_request) Successful in 1m0s
CI / security (pull_request) Successful in 55s
CI / build (pull_request) Successful in 25s
CI / helm (pull_request) Successful in 32s
CI / push-validation (pull_request) Successful in 26s
CI / e2e_tests (pull_request) Successful in 3m38s
CI / integration_tests (pull_request) Successful in 6m42s
CI / unit_tests (pull_request) Successful in 8m19s
CI / docker (pull_request) Successful in 13s
CI / coverage (pull_request) Successful in 15m23s
CI / status-check (pull_request) Successful in 2s
fix(test-infra): remove redundant ${PYTHON} variable definitions from robot files
Remove the local ${PYTHON}    python (and python3) variable definitions from
the *** Variables *** sections of all affected robot files. These local
definitions were overriding the pabot-injected venv Python path passed via
--variable PYTHON:/path/to/venv/python, causing tests to use the system
Python (which lacks required packages like structlog, sqlalchemy, etc.)
instead of the nox venv Python.

The correct ${PYTHON} value is already set by Setup Test Environment in
common.resource via sys.executable, and pabot passes it via --variable.
The local fallback definitions are redundant and harmful in parallel runs.

Audit found 56 robot files with the pattern (more than the 9 originally
identified in the issue). All occurrences have been removed.

ISSUES CLOSED: #1309
2026-04-14 14:50:55 +00:00

56 lines
2.8 KiB
Plaintext

*** Settings ***
Documentation Tool wrapping runtime smoke tests
Library Process
Library OperatingSystem
*** Test Cases ***
Wrapping Package Is Importable
[Documentation] Verify tool wrapping module can be imported
${result}= Run Process ${PYTHON} -c
... from cleveragents.tool.wrapping import ArgumentMapper, TransformExecutor, WrappedToolExecutor, WrappedToolNotFoundError, WrappingCycleError, WrappingDepthExceededError, TransformExecutionError; print('OK')
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} OK
Wrapping Exports In Tool Init
[Documentation] Verify wrapping types are exported from tool package
${result}= Run Process ${PYTHON} -c
... from cleveragents.tool import ArgumentMapper, TransformExecutor, WrappedToolExecutor; print('OK')
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} OK
ArgumentMapper Identity Mapping
[Documentation] Verify ArgumentMapper with None mapping passes args through
${result}= Run Process ${PYTHON} robot/scripts/test_mapper_identity.py
Should Be Equal As Integers ${result.rc} 0 ${result.stderr}
Should Contain ${result.stdout} OK
ArgumentMapper With Mapping
[Documentation] Verify ArgumentMapper translates arguments
${result}= Run Process ${PYTHON} robot/scripts/test_mapper_configured.py
Should Be Equal As Integers ${result.rc} 0 ${result.stderr}
Should Contain ${result.stdout} OK
TransformExecutor Runs Transform
[Documentation] Verify TransformExecutor executes transform code
${result}= Run Process ${PYTHON} robot/scripts/test_transform_run.py
Should Be Equal As Integers ${result.rc} 0 ${result.stderr}
Should Contain ${result.stdout} OK
TransformExecutor Sandbox Blocks Import
[Documentation] Verify TransformExecutor blocks import in sandbox
${result}= Run Process ${PYTHON} robot/scripts/test_transform_sandbox.py
Should Be Equal As Integers ${result.rc} 0 ${result.stderr}
Should Contain ${result.stdout} blocked=True
WrappedToolExecutor Simple Delegation
[Documentation] Verify WrappedToolExecutor delegates to wrapped tool
${result}= Run Process ${PYTHON} robot/scripts/test_delegation.py
Should Be Equal As Integers ${result.rc} 0 ${result.stderr}
Should Contain ${result.stdout} OK
WrappedToolExecutor Missing Tool Error
[Documentation] Verify WrappedToolExecutor raises on missing wrapped tool
${result}= Run Process ${PYTHON} robot/scripts/test_missing_tool.py
Should Be Equal As Integers ${result.rc} 0 ${result.stderr}
Should Contain ${result.stdout} error_raised=True