forked from HAL9000/cleveragents-core
73d5552467
ActorRegistry._actor_name() built names via f"{provider}/{model}", which
produced names with multiple slashes when providers included models
containing "/" (e.g. OpenRouter's "anthropic/claude-sonnet-4-20250514").
The resulting name violated the spec pattern ^[a-z0-9_-]+/[a-z0-9_-]+$
and triggered a ValidationError during actor upsert.
Now sanitises both provider and model components by replacing "/" with "-"
and lowercasing, so multi-slash provider models no longer break actor
listing.
Includes 6 Behave BDD regression scenarios (covering zero-provider,
multi-slash, consecutive-slash, leading-slash, and name-validation
cases), Robot Framework integration smoke tests, and ASV benchmarks.
ISSUES CLOSED: #592
52 lines
3.0 KiB
Plaintext
52 lines
3.0 KiB
Plaintext
*** Settings ***
|
|
Documentation Integration smoke test for actor list on fresh project (bug #592).
|
|
... Verifies that ``agents actor list`` on a fresh project exits
|
|
... cleanly without validation errors.
|
|
Resource ${CURDIR}/common.resource
|
|
Library Process
|
|
Library OperatingSystem
|
|
Library String
|
|
Suite Setup Setup Test Environment
|
|
Suite Teardown Cleanup Test Environment
|
|
|
|
*** Test Cases ***
|
|
Actor List On Fresh Project Exits Without Error
|
|
[Documentation] On a fresh project with no actors, actor list should
|
|
... exit cleanly (code 0) without a validation 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}
|
|
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}
|
|
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
|
|
... msg=actor list should not contain VALIDATION_FAILED: ${result.stdout}
|
|
Should Not Contain ${result.stderr} VALIDATION_FAILED
|
|
... msg=actor list stderr should not contain VALIDATION_FAILED: ${result.stderr}
|
|
[Teardown] Remove Directory ${tmpdir} recursive=True
|
|
|
|
Actor List On Fresh Project Does Not Show Slash Validation Message
|
|
[Documentation] On a fresh project, actor list should never mention the
|
|
... slash-separator validation error in stdout or stderr.
|
|
... Note: this test validates fresh-env behavior; it does NOT
|
|
... configure a multi-slash provider (that code path is covered
|
|
... 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}
|
|
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}
|
|
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
|
|
... msg=actor list should not show slash error: ${result.stdout}
|
|
Should Not Contain ${result.stderr} must include exactly one
|
|
... msg=actor list stderr should not show slash error: ${result.stderr}
|
|
[Teardown] Remove Directory ${tmpdir} recursive=True
|