Files
cleveragents-core/robot/routing_prefix_stripping.robot
T
brent.edwards 51a6e76e9e
CI / lint (pull_request) Successful in 16s
CI / typecheck (pull_request) Successful in 28s
CI / security (pull_request) Successful in 21s
CI / quality (pull_request) Successful in 14s
CI / integration_tests (pull_request) Failing after 6m34s
CI / unit_tests (pull_request) Successful in 6m46s
CI / build (pull_request) Successful in 15s
CI / docker (pull_request) Successful in 8s
CI / coverage (pull_request) Successful in 5m8s
fix(ci): merge duplicate Settings blocks, inject venv Python, add CI debug
Three fixes targeting CI integration_tests failures (18 failures on e8aa5ac):

1. Merge duplicate *** Settings *** blocks in 14 robot files into single
   blocks. Multiple Settings sections are non-standard RF practice and
   may cause resource import failures in certain Robot Framework versions
   or CI environments.

2. Replace bare 'python' with ${PYTHON} variable in all Run Process
   calls (14 files). Noxfile now passes --variable PYTHON:<venv-path>
   to robot so tests use the venv interpreter regardless of PATH. This
   fixes '/usr/local/bin/python: No module named cleveragents' on CI.

3. Add comprehensive CI debug output in noxfile.py: file existence
   checks for .resource files, PATH/Python resolution, fixture dir
   checks, and RF version. This will diagnose any remaining resource
   import issues.

Also: remove hardcoded '/app/src' sys.path.insert in
system_prompt_template_rendering.robot (not portable to CI), and
add trailing newline to common.resource.

All 204 tests pass locally (4 excluded: 2 slow, 2 discovery).
2026-02-13 03:43:44 +00:00

78 lines
2.9 KiB
Plaintext

*** Settings ***
Documentation Integration tests for routing prefix stripping functionality
Library Process
Library OperatingSystem
Library String
Resource ${CURDIR}/v2_paths.resource
*** Variables ***
${PYTHON} python
${DISCOVERY_CONFIG} ${V2_CONFIG_DIR}/routing_test_discovery_response.yaml
${BRAINSTORM_CONFIG} ${V2_CONFIG_DIR}/routing_test_goto_brainstorming.yaml
${NO_PREFIX_CONFIG} ${V2_CONFIG_DIR}/routing_test_no_prefix.yaml
${SET_TOPIC_CONFIG} ${V2_CONFIG_DIR}/routing_test_set_topic.yaml
${RUN_CMD} python -m cleveragents actor run
*** Test Cases ***
Routing Prefix Stripping In Application
[Documentation] Test that internal routing prefixes are stripped from output
[Tags] routing prefix integration
# Run the application with DISCOVERY_RESPONSE prefix
${result}= Run Process ${PYTHON} -m cleveragents actor run
... -c ${DISCOVERY_CONFIG}
... --unsafe
... --allow-rxpy-in-run-mode
... -p test input
... stderr=STDOUT
... timeout=30s
# Check that the output does NOT contain the prefix
Should Not Contain ${result.stdout} DISCOVERY_RESPONSE:
Should Contain ${result.stdout} What topic would you like to write about?
Multiple Routing Prefixes Are Stripped
[Documentation] Test that various routing prefixes are all stripped correctly
[Tags] routing prefix integration
# Test GOTO_BRAINSTORMING prefix
${result}= Run Process ${PYTHON} -m cleveragents actor run
... -c ${BRAINSTORM_CONFIG}
... --unsafe
... --allow-rxpy-in-run-mode
... -p test input
... stderr=STDOUT
... timeout=30s
Should Not Contain ${result.stdout} GOTO_BRAINSTORMING:
Should Contain ${result.stdout} Let's brainstorm ideas
Content Without Prefix Remains Unchanged
[Documentation] Test that content without routing prefixes is not modified
[Tags] routing prefix integration
${result}= Run Process ${PYTHON} -m cleveragents actor run
... -c ${NO_PREFIX_CONFIG}
... --unsafe
... --allow-rxpy-in-run-mode
... -p test input
... stderr=STDOUT
... timeout=30s
Should Contain ${result.stdout} This is normal text without any prefix
SET Prefix Family Stripped
[Documentation] Test that SET_* prefixes used for state updates are stripped
[Tags] routing prefix integration
${result}= Run Process ${PYTHON} -m cleveragents actor run
... -c ${SET_TOPIC_CONFIG}
... --unsafe
... --allow-rxpy-in-run-mode
... -p test input
... stderr=STDOUT
... timeout=30s
Should Not Contain ${result.stdout} SET_TOPIC:
Should Contain ${result.stdout} Neural networks in cognitive science