Files
cleveragents-core/robot/langgraph/pure_graph.robot
T
HAL9000 79d84c1d12
CI / push-validation (pull_request) Successful in 29s
CI / helm (pull_request) Successful in 35s
CI / lint (pull_request) Successful in 48s
CI / build (pull_request) Successful in 46s
CI / quality (pull_request) Successful in 58s
CI / typecheck (pull_request) Successful in 1m2s
CI / security (pull_request) Successful in 1m6s
CI / unit_tests (pull_request) Successful in 4m26s
CI / docker (pull_request) Successful in 1m30s
CI / integration_tests (pull_request) Successful in 9m49s
CI / coverage (pull_request) Successful in 9m4s
CI / status-check (pull_request) Successful in 3s
fix(robot): fix PureGraph Robot Framework tests and lint violations
- Remove unused `import ast` and fix `set_function_registry` to store
  callable values directly instead of calling eval() on a function object
- Replace try/except/pass with contextlib.suppress (SIM105)
- Add strict=False to zip() call (B905)
- Wrap long line in execute_graph (E501)
- Use list unpacking in assert_topo_order_equals (RUF005)
- Fix keyword name: Remove hyphen from 'Non-Functional' (Python method
  has no hyphen so Robot generates 'Non Functional')
- Rewrite Set Double And Increment Registry to evaluate lambdas directly
  rather than iterating a list of tuples (which paired whole tuples as
  loop variables instead of unpacking them)
- Pass node/function name lists via Robot list variables instead of
  space-delimited positional args

ISSUES CLOSED: #9531
2026-06-03 14:30:16 -04:00

50 lines
2.0 KiB
Plaintext

*** Settings ***
Documentation Integration tests for PureGraph execution and ordering
Library Collections
Library ${CURDIR}/pure_graph_lib.py
*** Keywords ***
Set Double And Increment Registry
${double}= Evaluate lambda x: x * 2
${increment}= Evaluate lambda x: x + 1
${registry}= Create Dictionary double=${double} increment=${increment}
Set Function Registry ${registry}
Set Empty Registry
${empty}= Create Dictionary
Set Function Registry ${empty}
*** Test Cases ***
PureGraph Topological Order
[Documentation] Verify topological ordering of graph nodes respects start/end boundaries
@{nodes}= Create List alpha beta
Create Linear Graph With Non Functional Nodes ${nodes}
Compute Topological Order
${topo}= Get Topological Order
@{expected}= Create List start alpha beta end
Lists Should Be Equal ${expected} ${topo}
PureGraph Execute With Functions
[Documentation] Verify function execution applies transformations sequentially in declaration order
@{node_names}= Create List double increment
@{func_names}= Create List double increment
Create Linear Graph With Function Nodes ${node_names} ${func_names}
Set Double And Increment Registry
${result}= Execute Graph ${1}
Should Be Equal As Integers ${result} 3
PureGraph Execute With Missing Function
[Documentation] Verify missing function nodes are skipped gracefully without error
Create Graph With Missing Function missing_fn
Set Empty Registry
${result}= Execute Graph 5
Should Be Equal As Integers ${result} 5
PureGraph Execute With Non-Functional Nodes
[Documentation] Verify non-functional (inert) nodes do not change the value
@{nodes}= Create List alpha beta
Create Linear Graph With Non Functional Nodes ${nodes}
Set Empty Registry
${result}= Execute Graph 7
Should Be Equal As Integers ${result} 7