fix(v3.7.0): resolve issue #1431 #1489

Merged
HAL9000 merged 2 commits from fix/1431-subgraph into master 2026-05-06 04:08:26 +00:00

2 Commits

Author SHA1 Message Date
HAL9000 a7fb57ea9c fix(actor): remove type: ignore from subgraph cycle detection steps
CI / push-validation (pull_request) Successful in 35s
CI / helm (pull_request) Successful in 46s
CI / build (pull_request) Successful in 59s
CI / lint (pull_request) Successful in 1m8s
CI / benchmark-publish (pull_request) Has been skipped
CI / quality (pull_request) Successful in 1m25s
CI / typecheck (pull_request) Successful in 1m42s
CI / security (pull_request) Successful in 1m43s
CI / integration_tests (pull_request) Successful in 3m54s
CI / e2e_tests (pull_request) Successful in 4m20s
CI / unit_tests (pull_request) Successful in 7m18s
CI / docker (pull_request) Successful in 1m28s
CI / coverage (pull_request) Successful in 11m24s
CI / status-check (pull_request) Successful in 3s
CI / benchmark-regression (pull_request) Failing after 38m41s
Remove # type: ignore[import-untyped] suppression comments from
features/steps/actor_subgraph_cycle_detection_steps.py per
CONTRIBUTING.md zero-tolerance policy on inline type suppressions.
Pyright does not check the features/ directory so these suppressions
were unnecessary and violated project policy.
2026-05-05 11:21:17 +00:00
HAL9000 a1093430bd fix(actor): read actor_ref from NodeDefinition field in _detect_subgraph_cycles
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 45s
CI / typecheck (pull_request) Successful in 1m7s
CI / build (pull_request) Successful in 46s
CI / security (pull_request) Successful in 1m18s
CI / push-validation (pull_request) Successful in 21s
CI / quality (pull_request) Successful in 1m22s
CI / helm (pull_request) Successful in 42s
CI / integration_tests (pull_request) Successful in 4m16s
CI / e2e_tests (pull_request) Successful in 5m19s
CI / unit_tests (pull_request) Successful in 10m35s
CI / coverage (pull_request) Successful in 13m47s
CI / docker (pull_request) Successful in 2m3s
CI / status-check (pull_request) Successful in 3s
CI / benchmark-regression (pull_request) Successful in 1h4m16s
Fix cross-actor subgraph cycle detection in the actor compiler by reading
actor_ref from the top-level NodeDefinition field instead of the config dict.

The _detect_subgraph_cycles(), _map_node(), and compile_actor() functions
were all reading node.config.get("actor_ref", "") instead of node.actor_ref.
Because actor_ref is a typed, validated Pydantic field on NodeDefinition (not
a key inside the untyped config dict), the old code always returned an empty
string, causing cross-actor cycle detection to silently fail and leaving the
system vulnerable to infinite recursion at runtime.

Changes:
- Fix all three call sites in src/cleveragents/actor/compiler.py
- Add Behave regression tests (features/actor_subgraph_cycle_detection.feature)
  with @tdd_issue and @tdd_issue_1431 tags on all scenarios
- Add Robot Framework integration test (robot/actor_compiler.robot)
- Fix existing test helpers to use actor_ref as top-level field
- Add CHANGELOG entry

ISSUES CLOSED: #1431
2026-05-05 01:36:48 +00:00