fix(actor): support v3 Actor YAML schema in CLI registration and execution #9921
No reviewers
Labels
No labels
auto/needs-reevaluation
controller-managed
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No project
No assignees
5 participants
Notifications
Due date
No due date set.
Blocks
#6283 UAT: actor CLI ignores v3 Actor YAML schema
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core!9921
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "bugfix/m2-actor-cli-v3-yaml-schema"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The actor CLI was ignoring the v3
ActorConfigSchemaformat, preventing spec-compliant actors withtype/route/skills/lspfields from being registered or executed. This PR fixes three components to add full v3 schema support.Closes #6283
Changes
ActorConfiguration.from_blob()— v3 format detection_extract_v3_actor()static method that detects v3 format by checking for a top-leveltypekey with valuellm,graph, ortool.modelfrom top-level, infersproviderfrom model string (splits on/) or defaults to"custom".type: graphactors, wraps therouteblock into a graph descriptor.from_blob()to try v3 extraction before v2, with proper fallthrough.infer_provider_from_model()fromcleveragents.actor.utils(DRY fix).ActorRegistry.add()/agents actor add.ActorRegistry.add()— v3 schema validationadd_v3()(inv3_registry.py) and_add_legacy()paths.add_v3()validates againstActorConfigSchema(full Pydantic v2 validation), preservesdescription,skills,lsp,typein config_blob, compiles GRAPH actors usingcompile_actor(), and stores compilation metadata.descriptionfield with clear error.providerrequirement for LLM/GRAPH actors.TOOL_ACTOR_SENTINELconstant fromcleveragents.actor.utilsto avoid magic string duplication.ReactiveConfigParser._build()— v3 execution support_is_v3_format()detection and_build_from_v3()method.source/targetedge keys matchingRouteConfig.to_graph_config().entry_nodeagainstnodes_mapand skips malformed edges withlogger.warning()diagnostics (previously silent drops).context_view,memory,context,env_vars,response_format,lsp_capabilities,lsp_context_enrichmentinto agent configs.node_idNone-to-string coercion:str(node.get("id") or "")preventsid: nullfrom producing"None".node typeNone-to-string coercion:str(node.get("type") or "agent")preventstype: nullfrom producing"None".nodes/edgesnull guard:route_raw.get("nodes") or []preventsnodes: nullfrom causingTypeError.lsp_bindingsshared mutable reference: defensive copy per node matches the skills pattern.infer_provider_from_modeldirectly (no alias)._build_from_v3static method now called via class name for clarity.entry_node: nullYAML handling:route_raw.get("entry_node") or "start"preventsNonefrom propagating as a node name.Shared utility module
cleveragents.actor.utilswithinfer_provider_from_model()to eliminate DRY violation betweenconfig.pyandconfig_parser.py.infer_provider_from_model()returns"custom"for slash-prefixed models (e.g."/gpt-4") where the prefix is empty.TOOL_ACTOR_SENTINELnamed constant to replace magic string"__tool_actor__".v3_registry.py— import cleanupfrom cleveragents.actor.utils importstatements into one._infer_provider_from_modelalias; usesinfer_provider_from_modeldirectly, consistent with all other call sites.Module extraction for 500-line limit compliance
yaml_loader.py: Extracted YAML loading, Jinja2 template preprocessing, and environment variable interpolation fromconfig.pyinto a new dedicated module.config.pyreduced from 520 to 372 lines.legacy_registry.py: Extracted_add_legacy()method fromregistry.pyinto a new dedicated module.registry.pyreduced from 567 to 434 lines.actor_config_new_coverage_steps.pyandactor_config_coverage_boost_steps.pyto reference the newyaml_loadermodule functions.Review feedback addressed (rounds 1–6 + pre-merge fixes)
registry.pyfrom 505 to 482 lines by condensing_add_legacy()docstring.str(node.get("id") or "")to handleid: nullin YAML.list()ordict()matching the skills pattern.route_raw.get("nodes") or []pattern.str(node.get("type") or "agent").entry_nodevalidation, incomplete edge filtering, and non-dict edge skipping.build_v3_reactive_config()helper to validate skills, system_prompt, provider inference, entry_point, edge count, and node IDs.${show_result.stdout}containsllmandgpt-4.TOOL_ACTOR_SENTINELinutils.py, referenced by name inv3_registry.py._infer_provider_from_modelalias fromconfig_parser.py.self._build_from_v3()toReactiveConfigParser._build_from_v3()..calledassertion aftercall_args is not Nonecheck.infer_provider_from_model("/gpt-4")now returns"custom"instead of"".entry_node: nullin YAML now defaults to"start"instead of propagatingNone.from cleveragents.actor.utils importstatements inv3_registry.py._infer_provider_from_modelalias inv3_registry.py.Testing
20 Behave BDD scenarios in
features/actor_v3_schema.featurecovering:from_blob()v3 extraction (provider inference, model extraction, graph descriptor with deep assertions)ActorRegistry.add()v3 validation (skills, LSP, description enforcement, graph compilation)ReactiveConfigParserv3 handling (LLM and graph formats)infer_provider_from_model("/gpt-4")→"custom"(added per review F4)17 Robot Framework integration tests in
robot/actor_add_v3_schema_validation.robotcovering:_build_from_v3()execution path for LLM and GRAPH configs (with deep assertions)Quality Gates
consolidated_langgraph.feature)Thank you for submitting PR #9921, @hurui200320.
This fix addresses the v3 Actor YAML schema support gap identified in issue #6283. The implementation covers all three affected components (
ActorConfiguration.from_blob(),ActorRegistry.add(), andReactiveConfigParser._build()), and the 10 Behave BDD scenarios provide solid coverage of the new paths.The PR has been received and is queued for automated review. You will receive review feedback shortly. In the meantime, please ensure:
CONTRIBUTORS.mdis updated with your name and email if not already presentCHANGELOG.mdincludes an entry for this fixISSUES CLOSED: #6283Automated by CleverAgents Bot
Supervisor: Human Liaison | Agent: human-liaison-pool-supervisor
Worker: [AUTO-HUMAN-1]
[GROOMED] Quality analysis complete.
[AUTO-GROOM-9921]
Checks Performed
Closes #6283; issue #6283 exists and is openState/In Reviewis semantically correctCloses #6283in PR bodyFixes Applied
None required. PR #9921 is in excellent shape:
Closes #6283is presentState/In Reviewmatching the open PROutstanding Item (Manual Follow-up)
Automated by CleverAgents Bot
Supervisor: Grooming | Agent: grooming-pool-supervisor
Tag: [AUTO-GROOM-9921]
Code Review: REQUEST CHANGES
Thank you for this fix, @hurui200320. The overall approach is sound — the three-component split (config extraction, registry validation, reactive parser synthesis) is clean and well-scoped, and all CI checks pass. However, three issues must be resolved before this can be merged.
Blocking Issue 1 — CHANGELOG.md not updated (Criterion 7)
No
CHANGELOG.mdentry is present in the PR diff. Every bug fix must include a changelog entry. Please add an entry under the appropriate version heading (e.g.v3.2.0) describing this fix.Blocking Issue 2 — Deferred imports in
registry.py(import rule violation)Two imports are placed inside method bodies in
src/cleveragents/actor/registry.py, violating the project rule that all imports must be at the top of the file (the only exception isif TYPE_CHECKING:blocks):Inside
_add_v3()(~line 240):Inside the
tryblock in_add_v3()(~line 280):Both imports must be moved to the top of
registry.py. If there is a circular-import concern withcompile_actor, use anif TYPE_CHECKING:guard for the type annotation and import at the top unconditionally for the runtime call.Blocking Issue 3 — Fragile exception handling in
_add_v3()(interface contract)The duplicate-actor check in
_add_v3()uses a broadexcept Exceptionwith string matching to distinguish the not-found case from the already-exists case:This is fragile: any unexpected exception from
get_actor()(network error, DB error, etc.) will be silently swallowed. The correct pattern is to catch the specific not-found exception type thatactor_service.get_actor()raises when the actor does not exist, and let all other exceptions propagate:Please use the specific exception type from
cleveragents.core.exceptions.Checklist Summary
Please address the three blocking issues and push an updated commit. The implementation logic itself is correct and well-structured — these are housekeeping and robustness fixes only.
Automated by CleverAgents Bot
Supervisor: PR Review Pool | Agent: pr-reviewer
Code Review Decision: REQUEST CHANGES (Review ID: 5954)
Three blocking issues were identified that must be resolved before merge:
CHANGELOG.md not updated — No changelog entry present in the PR diff (Criterion 7 required).
Deferred imports in
registry.py— Two imports are placed inside method bodies insrc/cleveragents/actor/registry.py, violating the all-imports-at-top-of-file rule:from pydantic import ValidationError as PydanticValidationErrorinside_add_v3()from cleveragents.actor.compiler import compile_actorinside atryblock in_add_v3()Both must be moved to the top of the file.
Fragile exception handling in
_add_v3()— The duplicate-actor check catchesexcept Exceptionbroadly and uses string matching ("already exists" in str(exc)) to distinguish cases. This silently swallows unexpected exceptions. Replace with a catch of the specificNotFoundErrortype fromcleveragents.core.exceptions.All other criteria pass: CI is fully green, commit format is correct,
Closes #6283andISSUES CLOSED: #6283are present, milestone v3.2.0 is assigned, labels are correct, architecture boundaries are maintained, and 10 Behave BDD scenarios provide solid coverage.Automated by CleverAgents Bot
Supervisor: PR Review Pool | Agent: pr-reviewer
Code Review: REQUEST CHANGES (Follow-up)
Blocking Issue 1 — CHANGELOG.md not updated (carried from Review #5954)
No
CHANGELOG.mdentry is present in the PR diff. The five changed files are:features/actor_v3_schema.feature(new)features/steps/actor_v3_schema_steps.py(new)src/cleveragents/actor/config.py(modified)src/cleveragents/actor/registry.py(modified)src/cleveragents/reactive/config_parser.py(modified)A changelog entry under the
v3.2.0heading is required before merge.Blocking Issue 2 — Deferred imports in
registry.py(carried from Review #5954)Two imports remain inside method bodies in
src/cleveragents/actor/registry.py, violating the all-imports-at-top-of-file rule:Inside
_add_v3()(~line 240):Inside the
tryblock in_add_v3()(~line 280):Both must be moved to the top of
registry.py. Ifcompile_actorcreates a circular import, use anif TYPE_CHECKING:guard for the type annotation only; the runtime import must remain at the top level.Blocking Issue 3 — Fragile exception handling in
_add_v3()(carried from Review #5954)The duplicate-actor guard uses a broad
except Exceptionwith string matching:Any unexpected exception from
get_actor()(network error, DB timeout, etc.) is silently swallowed. Replace with the specificNotFoundErrorfromcleveragents.core.exceptions:Blocking Issue 4 — Resource-leak risk in
compile_actorexception handler (new — resource-management focus)In
_add_v3(), the graph compilation block is:Problem:
compile_actor(schema)compiles a LangGraphStateGraph, which may internally allocate stateful resources — thread pools, async event loops, compiled graph objects with internal caches, or other long-lived objects. If compilation fails partway through (e.g., after the graph is partially built but before it is returned), those partially-initialised resources are abandoned with no cleanup path. The broadexcept Exceptionsilently discards the exception, so:compile_actormight expose (e.g., a.close()or context-manager protocol) is never invoked.Required fix: At minimum, narrow the caught exception to the specific compilation-failure type(s) that
compile_actoris documented to raise, and let all other exceptions propagate so the caller can handle cleanup. Ifcompile_actorreturns an object with a cleanup interface, use atry/finallyor context manager:This issue is directly related to Blocking Issue 3 (fragile exception handling) and must be resolved together with it.
Resource-Management Audit — Additional Observations (Non-Blocking)
The following were examined and found acceptable, but are noted for completeness:
_build_from_v3()inconfig_parser.py: All objects created (AgentConfig,RouteConfig,nodes_map) are pure in-memory data structures with no file handles, connections, or external resources. No cleanup concerns._extract_v3_actor()inconfig.py: Pure data transformation; no resources allocated.lsp_bindingsdict copy:dict(lsp_raw)correctly creates a shallow copy, preventing mutation of the caller-owneddatadict. Acceptable for the depth of nesting used here.nodes_mapdict in_build_from_v3(): Built and passed directly toRouteConfig(nodes=nodes_map, ...)— no dangling reference or memory leak.Checklist Summary
fix(actor): support v3 Actor YAML schema in CLI registration and execution# type: ignore/src//features/features/actor_v3_schema.featureregistry.py— Blocking Issue 2except Exceptionin_add_v3()— Blocking Issues 3 & 4compile_actorexception handler may mask resource leaks — Blocking Issue 4Please address all four blocking issues and push an updated commit. The core implementation logic is correct and the BDD test coverage is solid — these are robustness and housekeeping fixes only.
Automated by CleverAgents Bot
Supervisor: PR Review Pool | Agent: pr-reviewer
Code Review Decision: REQUEST CHANGES (Review ID: 6040)
This is a follow-up review. The previous REQUEST_CHANGES review (ID: 5954) has not been addressed — the HEAD commit SHA is unchanged. All three prior blocking issues remain open, and a fourth has been identified from a focused resource-management / memory-leak / cleanup-patterns audit.
4 Blocking Issues:
CHANGELOG.md not updated — No changelog entry in the PR diff. Required before merge.
Deferred imports in
registry.py— Two imports inside method bodies violate the all-imports-at-top rule:from pydantic import ValidationError as PydanticValidationErrorinside_add_v3()from cleveragents.actor.compiler import compile_actorinside atryblock in_add_v3()Both must be moved to the top of the file.
Fragile exception handling — The duplicate-actor check uses
except Exceptionwith string matching ("already exists" in str(exc)), silently swallowing unexpected exceptions. Replace withexcept NotFoundErrorfromcleveragents.core.exceptions.Resource-leak risk in
compile_actorhandler (new) — The broadexcept Exceptionaroundcompile_actor(schema)could mask resource leaks if LangGraph compilation allocates stateful resources (thread pools, event loops, compiled graph caches) and fails partway through. Narrow to the specific compilation-failure exception type and let all others propagate so callers can handle cleanup.All other criteria pass: CI is green, commit format is correct,
Closes #6283andISSUES CLOSED: #6283are present, milestone v3.2.0 is assigned, labels are correct, architecture boundaries are maintained, and 10 Behave BDD scenarios provide solid coverage.Automated by CleverAgents Bot
Supervisor: PR Review Pool | Agent: pr-reviewer
Code Review: REQUEST CHANGES (Follow-up #3)
⚠️ No New Commits Detected
The PR HEAD SHA
e3659d2e842c207b104d7ddb52b7f77d084cbab0is identical to the commit reviewed in both prior sessions. None of the 4 blocking issues have been addressed. Please push a new commit that resolves all blocking issues before requesting re-review.Blocking Issues (Carried from Review #6040)
Blocking Issue 1 — CHANGELOG.md not updated
No
CHANGELOG.mdentry is present in the PR diff. The five changed files are:features/actor_v3_schema.feature(new)features/steps/actor_v3_schema_steps.py(new)src/cleveragents/actor/config.py(modified)src/cleveragents/actor/registry.py(modified)src/cleveragents/reactive/config_parser.py(modified)A changelog entry under the
v3.2.0heading is required before merge.Blocking Issue 2 — Deferred imports in
registry.pyTwo imports remain inside method bodies in
src/cleveragents/actor/registry.py, violating the all-imports-at-top-of-file rule:Inside
_add_v3()(near top of method):Inside the
tryblock in_add_v3()(graph compilation section):Both must be moved to the top of
registry.py. Ifcompile_actorcreates a circular import, use anif TYPE_CHECKING:guard for the type annotation only; the runtime import must remain at the top level.Blocking Issue 3 — Fragile exception handling in
_add_v3()(duplicate-actor check)The duplicate-actor guard uses a broad
except Exceptionwith string matching:Any unexpected exception from
get_actor()(network error, DB timeout, etc.) is silently swallowed. Replace with the specificNotFoundErrorfromcleveragents.core.exceptions:Note: The BDD step fixture also exposes this fragility — it sets
mock_actor_service.get_actor.side_effect = Exception("not found"), which only works because the broadexcept Exceptioncatches it. Once the fix is applied, the fixture must be updated to raiseNotFoundErrorinstead.Blocking Issue 4 — Broad
except Exceptionaroundcompile_actor(resource-leak risk)The graph compilation block catches all exceptions:
This silently discards any exception from
compile_actor(schema), including unexpected errors that may indicate partially-initialised stateful resources (thread pools, async event loops, compiled graph caches). Narrow to the specific compilation-failure exception type and let all others propagate:New Findings — Error-Handling / Edge-Cases / Boundary-Conditions Audit
The following issues were identified in this sessions focused audit. They are non-blocking but should be addressed in the same commit as the blocking fixes.
New Issue 5 —
None-to-string coercion in_build_from_v3()(config_parser.py)Three fields use
str(data.get(...))without guarding againstNonevalues from YAML:If a YAML author writes
name: null,model: null, orid: null, these produce the literal string"None"rather than triggering the default fallback. Theif not node_id: continueguard on line 3 does not catch"None"(it is truthy), so multiple null-id nodes would all be registered under the key"None", with each overwriting the previous.Fix:
New Issue 6 —
entry_nodenot validated againstnodes_map(config_parser.py)If
entry_nodenames a node that does not exist innodes_map(e.g. a typo in the YAML), theRouteConfigis created with an invalidentry_point. This will fail silently at parse time and only surface as a runtime error when the graph is executed. A simple guard should be added:New Issue 7 — Empty
from/toedge entries not filtered (config_parser.py)Edges with missing or empty
from_node/to_nodeare appended without validation. An edge{"from": "", "to": "executor"}would be passed toRouteConfig, which may accept it silently and produce a broken graph. Add a guard:Checklist Summary
fix(actor): support v3 Actor YAML schema in CLI registration and execution# type: ignore/src//features/features/actor_v3_schema.featureregistry.py— Blocking Issue 2except Exceptionin_add_v3()— Blocking Issue 3except Exceptionaround compilation — Blocking Issue 4str(None)risk in_build_from_v3()— New Issue 5Please address all 4 blocking issues (and ideally the 3 new warnings) in a single new commit and push to this branch. The core implementation logic is correct and the BDD test coverage is solid — these are robustness and housekeeping fixes only.
Automated by CleverAgents Bot
Supervisor: PR Review Pool | Agent: pr-reviewer
Code Review Decision: REQUEST CHANGES (Review ID: 6058 — Follow-up #3)
The HEAD commit SHA (
e3659d2e842c207b104d7ddb52b7f77d084cbab0) is unchanged from the previous two reviews. No new commits have been pushed. All 4 blocking issues from Review #6040 remain open.4 Carried Blocking Issues:
CHANGELOG.md not updated — No changelog entry in the PR diff. Required before merge.
Deferred imports in
registry.py— Two imports inside method bodies violate the all-imports-at-top rule:from pydantic import ValidationError as PydanticValidationErrorinside_add_v3()from cleveragents.actor.compiler import compile_actorinside atryblock in_add_v3()Both must be moved to the top of the file.
Fragile exception handling (duplicate-actor check) —
except Exceptionwith string matching ("already exists" in str(exc)) silently swallows unexpected exceptions. Replace withexcept NotFoundErrorfromcleveragents.core.exceptions. Also update the BDD fixture to raiseNotFoundErrorinstead ofException("not found").Broad
except Exceptionaroundcompile_actor— Could mask resource leaks from partially-initialised LangGraph objects. Narrow to the specificActorCompilationErrortype.3 New Warnings (non-blocking, from error-handling/edge-case audit):
None-to-string coercion in_build_from_v3()—str(data.get("name", "v3_actor"))produces"None"ifname: nullin YAML. Usestr(data.get("name") or "v3_actor")pattern forname,model, and nodeidfields.entry_nodenot validated againstnodes_map— A typo inentry_nodecreates aRouteConfigwith an invalidentry_pointthat only fails at runtime. Add a guard checkingentry_node in nodes_map.Empty
from/toedge entries not filtered — Edges with missingfrom_node/to_nodeare passed through toRouteConfig. Add aif not from_node or not to_node: continueguard.All other criteria pass: CI is green, commit format is correct,
Closes #6283andISSUES CLOSED: #6283are present, milestone v3.2.0 is assigned, labels are correct, architecture boundaries are maintained, and 10 Behave BDD scenarios provide solid coverage.Automated by CleverAgents Bot
Supervisor: PR Review Pool | Agent: pr-reviewer
@hurui200320 — This is a follow-up notification regarding PR #9921.
The automated code reviewer (HAL9001) has now posted three REQUEST_CHANGES reviews on this PR (Review IDs: 5954, 6040, 6058). The HEAD commit SHA (
e3659d2e) has not changed since the PR was submitted on 2026-04-16. The following 4 blocking issues must be resolved before this PR can be approved:Blocking Issues (must fix before merge):
CHANGELOG.md not updated — No changelog entry is present in the PR diff. Per CONTRIBUTING.md, all bug fixes must include a
CHANGELOG.mdentry under[Unreleased] > Fixed.Deferred imports in
registry.py— Two imports are placed inside method bodies, violating the all-imports-at-top-of-file rule:from pydantic import ValidationError as PydanticValidationErrorinside_add_v3()from cleveragents.actor.compiler import compile_actorinside atryblock in_add_v3()Both must be moved to the top of the file.
Fragile exception handling (duplicate-actor check) — The
except Exceptionwith string matching ("already exists" in str(exc)) silently swallows unexpected exceptions. Replace withexcept NotFoundErrorfromcleveragents.core.exceptions. Also update the BDD fixture to raiseNotFoundErrorinstead ofException("not found").Broad
except Exceptionaroundcompile_actor— Could mask resource leaks from partially-initialised LangGraph objects. Narrow to the specificActorCompilationErrortype.Non-blocking recommendations (from the latest review):
None-to-string coercion in_build_from_v3()— usestr(data.get("name") or "v3_actor")patternentry_nodenot validated againstnodes_map— add a guard checkingentry_node in nodes_mapfrom/toedge entries not filtered — add aif not from_node or not to_node: continueguardPlease address the 4 blocking issues and push a new commit. The PR will be automatically re-reviewed once new commits are pushed.
Automated by CleverAgents Bot
Agent: automation-tracking-manager
e3659d2e840426bb05c4@hurui200320 — Thank you for pushing the updated commit.\n\nThe new commit (
0426bb05) has been detected on PR #9921. The automated review system will re-evaluate the PR against the new commit.\n\nImportant: Merge conflicts detected\n\nThe PR currently showsmergeable: false— there are merge conflicts with the master branch. Please rebase or merge the current master into yourbugfix/m2-actor-cli-v3-yaml-schemabranch to resolve the conflicts before the re-review can proceed.\n\nOnce the conflicts are resolved and the PR is mergeable, the automated reviewer (HAL9001) will re-evaluate the changes against the 4 blocking issues from Review #6058:\n1. CHANGELOG.md not updated\n2. Deferred imports in registry.py (two imports inside method bodies)\n3. Fragile exception handling (duplicate-actor check uses broad except Exception)\n4. Broad except Exception around compile_actor\n\nPlease resolve the merge conflicts and push an updated commit.\n\n---\nAutomated by CleverAgents Bot\nAgent: automation-tracking-manager0426bb05c4c07971742f@hurui200320 — Thank you for the comprehensive update to PR #9921.
The new commit (
c07971742f) has been detected. The PR now shows:The PR description confirms that all 7 issues from the previous reviews have been addressed:
[Unreleased] > Fixedv3_registry.py;compile_actor/ActorCompilationErrorimported before the try/except blockNotFoundError; BDD fixture updatedexcept Exceptionaroundcompile_actor— Narrowed toActorCompilationErrorstr(data.get("name") or "v3_actor")patternentry_nodevalidation — Guard added checkingentry_node in nodes_mapif not from_node or not to_node: continueE2E tests: 3 pre-existing failures due to invalid OpenAI API key (not related to this PR — being addressed by PR #10199).
The automated reviewer (HAL9001) will re-evaluate the PR against the new commit. Given the comprehensive addressing of all review feedback, this PR should be ready for approval.
Automated by CleverAgents Bot
Supervisor: Human Liaison | Agent: human-liaison-pool-supervisor
Automated by CleverAgents Bot
Agent: automation-tracking-manager
Code Review: REQUEST CHANGES (Follow-up #4)
Thank you for the comprehensive update, @hurui200320. The new commit (
c07971742f) addresses all 4 blocking issues and 3 warnings from the previous review round. CI is fully green across all 13 checks (lint, typecheck, security, unit_tests, coverage, integration_tests, e2e_tests, build, docker, helm, push-validation, status-check, quality). The implementation logic is correct, exception handling is now specific, CHANGELOG.md is updated, and the BDD scenario count has grown from 10 to 16.However, two new blocking issues have been introduced in this commit that must be resolved before merge.
Blocking Issue 1 —
features/steps/actor_v3_schema_steps.pyexceeds 500-line limit (Criterion 4)The new step definitions file
features/steps/actor_v3_schema_steps.pyhas 639 lines, which exceeds the project-wide 500-line file limit.The previous review round noted the file was ~425 lines (10 scenarios). The addition of 6 new scenarios in this commit grew the file to 639 lines.
Required fix: Split the step definitions into two files, for example:
features/steps/actor_v3_schema_steps.py— core steps (from_blob, registry, config_parser basics)features/steps/actor_v3_schema_extended_steps.py— extended steps (LSP dict, context_view/memory/env_vars propagation, tool actor, update mode, format detection)Behave will automatically discover and load all step files in the
features/steps/directory, so splitting the file does not require any changes to the feature file.Blocking Issue 2 — Deferred import inside
add_v3()function body inv3_registry.py(Criterion 5)The
compile_actorandActorCompilationErrorimports remain inside theadd_v3()function body insrc/cleveragents/actor/v3_registry.py:The project rule requires all imports at the top of the file. Moving the deferred import from
registry.pytov3_registry.pyresolves the issue inregistry.pybut does not satisfy the rule — the import is still inside a function body.The circular-dependency concern through langgraph is noted. The standard resolution is to import unconditionally at the top of the file:
If a true circular import exists at module load time, the correct fix is to restructure the import graph (e.g., introduce an abstract interface or move the shared dependency to a lower-level module), not to defer the import to function scope.
Checklist Summary
Please address both blocking issues in a single new commit. The implementation is otherwise complete and correct — these are structural/housekeeping fixes only.
Automated by CleverAgents Bot
Supervisor: PR Review Pool | Agent: pr-review-pool-supervisor
Code Review Decision: REQUEST CHANGES (Review ID: 6323 — Follow-up #4)
Two new blocking issues were identified in the latest commit (
c07971742f) that must be resolved before merge. All 4 blocking issues and 3 warnings from the previous review round have been successfully addressed.Blocking Issue 1 —
features/steps/actor_v3_schema_steps.pyexceeds 500-line limitThe file has 639 lines, exceeding the project-wide 500-line limit. Split into two files (e.g.,
actor_v3_schema_steps.pyfor core steps andactor_v3_schema_extended_steps.pyfor extended steps). Behave auto-discovers all step files so no feature file changes are needed.Blocking Issue 2 — Deferred import inside
add_v3()function body inv3_registry.pyThe
compile_actorandActorCompilationErrorimports remain inside the function body (lazy import). Moving the deferred import fromregistry.pytov3_registry.pydoes not satisfy the all-imports-at-top-of-file rule. Move these imports to the top ofv3_registry.py. If a circular import exists, restructure the import graph rather than deferring to function scope.All other criteria pass: CI fully green (13/13 checks), spec compliance, no type:ignore, Behave tests only, no mocks in src/, layer boundaries respected, Commitizen format, Closes #6283, branch convention, no @tdd_expected_fail tags, CHANGELOG updated, specific exception handling, None-safe coercion, entry_node validation, empty edge filtering, milestone v3.2.0, Type/Bug label.
Automated by CleverAgents Bot
Supervisor: PR Review Pool | Agent: pr-review-pool-supervisor
c07971742feb1ba96e7fResponse to Review #6323 (Follow-up #4)
Thank you for the thorough review. Both blocking issues have been addressed in the updated commit (
eb1ba96e).Blocking Issue 1 — Step file exceeds 500-line limit ✅ Fixed
Split
features/steps/actor_v3_schema_steps.py(639 lines) into two files:actor_v3_schema_steps.py→ 478 lines (core scenarios 1–10 + shared steps)actor_v3_schema_extended_steps.py→ 192 lines (scenarios 11–16: tool actors, update mode, LSP dict, context/memory propagation, positive v3 detection)Both files are well under the 500-line limit. Behave auto-discovers all step files, so no feature file changes needed.
Blocking Issue 2 — Deferred import in
v3_registry.py✅ Fixedcompile_actorandActorCompilationErrorare now imported at the top ofv3_registry.py— no longer deferred to function scope. Confirmed no circular dependency exists:cleveragents.actor.compileronly imports fromschema,core.exceptions,langgraph.nodes, andlsp.models— none import fromv3_registry.Additional
Branch has been rebased onto latest
master(42b578e2). CHANGELOG.md conflict resolved (kept both#4180Alembic entry and#6283v3 schema entry). PR is nowmergeable: true.Quality Gates
eb1ba96e7f8894d5e4c28894d5e4c265e077181665e0771816ec785d12c9ec785d12c9376c6791f2376c6791f2c86859ded2c86859ded27a6d47c795@HAL9000 This PR is ready to review: rebased onto the latest master, all CI checks passed.
hurui200320 referenced this pull request2026-04-22 06:01:13 +00:00
7a6d47c795b71bdf56eeb71bdf56ee1f232cf3561f232cf3568228b3b365🔍 Comprehensive Code Review: v3 Actor YAML Schema Support (#6283)
Review Date: 2026-04-22 | Commit: 8228b3b365ce15825fe8739dc9e4d5a274e938cb | Branch: bugfix/m2-actor-cli-v3-yaml-schema
Executive Summary
Conducted thorough 7-cycle systematic code review of v3 Actor YAML schema support implementation. Identified 35 total issues:
🔴 CRITICAL ISSUES (HIGH SEVERITY)
Issue #1: Tool Actors Model Field Constraint Violated
Severity: 🔴 HIGH | Category: Specification
Files:
src/cleveragents/actor/config.py(lines 293-294),src/cleveragents/actor/v3_registry.py(line 97)Problem:
model, butActorConfiguration.from_blob()requiresmodelwithmin_length=1"tool"used instead of actual model identifierregistry.add(), NOT viafrom_blob()Impact: Architectural gap between specification and implementation. Downstream consumers confused by tool actors with
model="tool".Recommendation: Address architectural gap - either support optional model throughout or clearly document as limitation.
Issue #2: No Integration Tests for v3 Actor Execution
Severity: 🔴 HIGH | Category: Testing
File:
robot/(missing Robot Framework tests)Problem:
agents actor add --config <v3_yaml>(CLI registration)agents actor run <v3_actor>(actor execution)Impact: v3 actor execution verified only at unit level, no guarantee code works with real services.
Recommendation: Add Robot Framework integration tests covering complete v3 actor lifecycle (all 3 types: llm, graph, tool).
🟡 MEDIUM SEVERITY ISSUES (19)
Performance (3 issues)
v3_registry.py:128): Large graphs trigger expensive O(n) copiesv3_registry.py:143): Recompilation onupdate=Trueconfig_parser.py:331): List comprehension +list()creates two copiesSecurity (1 issue)
v3_registry.py:75-79): Provider added to blob BEFOREmodel_validate()callError Handling (1 issue)
config_parser.py:295-300): No warning when edges dropped from graphTest Coverage (4 issues)
Design/Architecture (2 issues)
Specification Alignment (5 issues)
Code Quality (1 issue)
Integration (2 issues)
🔵 LOW SEVERITY ISSUES (14)
Security (3): Unbounded type field, unsafe skills coercion, case-insensitive type checking
Error Handling (2): Validation after partial creation, silent None masking
Code Quality (3): Empty model confusing, inconsistent comments, duplicate validation
Documentation (1): Missing docstring examples
Observability (1): Missing logging
Specification (2): LSP bindings flexibility, skills/tools naming
Testing (1): Test data lacks complexity
📊 Summary by Category
✅ Recommendations (Priority Order)
🔴 IMMEDIATE (Before Merge)
🟡 HIGH PRIORITY
🟠 MEDIUM PRIORITY
📝 Review Methodology
Conducted systematic 7-cycle review across all major code concerns:
Each cycle re-examined code to ensure issues not missed, focusing on:
docs/specification.mdCONTRIBUTING.md⚖️ Overall Assessment
Code Quality: ✅ Generally solid implementation
Test Coverage: ⚠️ Unit tests comprehensive but missing integration tests (HIGH PRIORITY)
Security: ⚠️ One significant issue (blob mutation) requires fixing
Performance: ⚠️ Optimization opportunities identified
Specification Alignment: ⚠️ Multiple gaps require verification
Recommendation: Address HIGH severity issues before merge. MEDIUM and LOW issues can be tracked as follow-up work.
Review Type: REQUEST_CHANGES (due to 2 HIGH severity issues)
Generated: 2026-04-22
Scope: Full bugfix/m2-actor-cli-v3-yaml-schema implementation
Implementation Attempt — Tier 1: haiku — Success
Reviewed PR #9921 for outstanding issues. After thorough analysis:
CI Status: All 13 required CI checks pass on HEAD
8228b3b3(lint, typecheck, security, quality, unit_tests, integration_tests, e2e_tests, coverage, build, docker, helm, push-validation, status-check). The benchmark-regression failure is from a separate workflow run (14301) triggered by an unrelatedissue_commentevent — not part of this PR's CI pipeline (run 14300).Formal Reviews: All REQUEST_CHANGES reviews from HAL9001 are stale (addressed by subsequent commits):
CoreRasurae Comment (#239029) — Assessment:
v3_registry.py(line 97) andconfig.py(line 293) explicitly document the sentinel value approach. BDD scenario 12 tests this behavior. Changing theActordomain model to makemodeloptional would be a breaking architectural change beyond the scope of this bug fix.robot/actor_add_v3_schema_validation.robotwith 15 test cases covering registration, validation, and error cases for all 3 actor types (LLM, TOOL, GRAPH). The claim of missing integration tests appears to be an oversight. Full execution-path E2E testing requires real LLM providers and is covered by the e2e_tests suite.Quality Gates Status: All passing ✓
No code changes required — all blocking issues from previous reviews have been addressed and CI is fully green.
Automated by CleverAgents Bot
Supervisor: Implementation | Agent: implementation-worker
8228b3b3651c48f86141Implementation Attempt — Tier 1: haiku — Success
Reviewed PR #9921 for outstanding CI failures and unresolved reviewer feedback.
Review Status: All formal REQUEST_CHANGES reviews from HAL9001 are stale (addressed by subsequent commits):
CoreRasurae Comment (#239029) — Assessment:
robot/actor_add_v3_schema_validation.robotwith 15 test cases covering all 3 actor types.CI Status Analysis (HEAD
1c48f861):issuesevent (title: docs(spec): document DEPENDENCY_ORDERED subplan execution mode), NOT by this PR's push event. These statuses were incorrectly associated with this PR's HEAD SHA.7523a50d), all 13 CI checks pass including security and helm.Local Quality Gates (all passing):
robot/actor_context_management.robot— file not modified by this PR)No code changes required — all blocking issues from previous reviews have been addressed, all quality gates pass locally, and the CI failures are from an unrelated CI run.
Automated by CleverAgents Bot
Supervisor: Implementation | Agent: implementation-worker
1c48f8614118d7354c9418d7354c942d833562da2d833562da46bb1cdf24Self-QA Implementation Notes (Cycles 1–3)
Cycle 1
Review findings (0C / 3M / 5m / 2n):
robot/actor_add_v3_schema_validation.robotonly covered CLI registration and schema validation. TheReactiveConfigParser._build_from_v3()execution path had zero integration-level coverage.config_parser.pysilently discarded malformed edges with no diagnostic trace, making broken graph topologies extremely hard to debug.update=TrueBDD assertion — Scenario 11 only assertedresult_actor is not Noneandupsert_actor was called, never verifying thatupdate=Truewas forwarded or that the correct config was persisted.add_v3()mutated the caller's dict in-place before thedeepcopy, leaving the caller's original dict modified.config.pyinstead of using the shared_infer_provider_from_model()function.from_blob()— raisedValueError("model is required")with no guidance about the correctregistry.add()path.gd["type"] == "graph", no assertions on nodes/edges/entry_node."tool"semantic ambiguity — collides with the actor type name.v3_registry.py.actor_v3_schema_steps.pyapproaching 500-line limit.Fixes applied:
robot/actor_add_v3_schema_validation.robot: (1) Register and show v3 LLM actor via CLI, (2) Build ReactiveConfig from v3 LLM actor config, (3) Build ReactiveConfig from v3 GRAPH actor config. Extended helper script withshowandbuild-v3-configcommands.logger.warning()calls inReactiveConfigParser._build_from_v3()for both drop conditions (non-dict edge entries and edges with missingfrom_node/to_node).upsert_actorwas called,config_blob["type"] == "llm", andname == "local/test-llm".copy.deepcopy(blob)to the first line ofadd_v3(), before any mutations.cleveragents.actor.utilsmodule withinfer_provider_from_model(). Bothconfig.pyandconfig_parser.pynow import from there."model is required. Tool actors must be registered via ActorRegistry.add(), not from_blob(). Use 'agents actor add' to register tool actors.".route,nodes,edges, andentry_nodefields in Scenario 3."tool"to"__tool_actor__"inv3_registry.py.Cycle 2
Review findings (0C / 4M / 5m / 5n):
registry.pyexceeded 500-line limit (505 lines) — same criterion that was blocking in review #6323.node_idNone-to-string coercion not fixed —str(node.get("id", ""))still vulnerable toid: nullproducing"None".lsp_bindingsshared mutable reference across all graph nodes — inconsistent with the defensive copy applied toskills.m2instead ofm3(process violation).nodes/edgesnull guard missing —route_raw.get("nodes", [])returnsNonewhen key exists withnullvalue.typefield vulnerable to same None coercion._build_from_v3().build-v3-configtests.TOOL_ACTOR_SENTINELmagic string, unused alias,@staticmethodcall style, PR description test count, redundant.calledassertion.Fixes applied:
_add_legacy()docstring from 16 lines to 1 line. File now 482 lines.str(node.get("id", ""))→str(node.get("id") or "").list(lsp_bindings)for lists,dict(lsp_bindings)for dicts.m2vsm3branch name discrepancy.route_raw.get("nodes") or []androute_raw.get("edges") or [].str(node.get("type") or "agent").build_v3_reactive_config()to validate skills, system_prompt, provider inference, entry_point, edge count, and node IDs.llmandgpt-4.TOOL_ACTOR_SENTINEL = "__tool_actor__"as module-level constant inutils.py._infer_provider_from_modelwrapper alias.self._build_from_v3()toReactiveConfigParser._build_from_v3()..calledassertion.Cycle 3
Review findings: APPROVE (0C / 0M / 13m / 7n)
The reviewer confirmed all Cycle 2 fixes were correctly applied. Three quick pre-merge fixes were identified:
infer_provider_from_model("/gpt-4")returned""instead of"custom"—config_parser.pyhad noor "custom"guard unlike the other two callers.entry_node: nullin YAML produced confusing error"entry_node 'None' not found"— neededor "start"null-guard.v3_registry.py._infer_provider_from_modelalias inv3_registry.py.Fixes applied:
infer_provider_from_model()inutils.py: addedprefix if prefix else "custom"guard after split.route_raw.get("entry_node", "start")→route_raw.get("entry_node") or "start".from cleveragents.actor.utils importstatements into one._infer_provider_from_modelalias; usesinfer_provider_from_modeldirectly.Remaining Issues (deferred to follow-up tickets)
The following issues from Luis's review were assessed and deferred:
Tool actor model field constraint (Luis HIGH #1): The sentinel
"__tool_actor__"is a documented design decision —Actor.modelhasmin_length=1and making it optional would be a breaking architectural change beyond this bug fix scope. A follow-up ticket should address makingmodeloptional for tool actors in the domain model.Performance optimizations (Luis MEDIUM):
deepcopy()on every registration, no graph compilation caching — acceptable for the non-hot CLI registration path. Can be addressed in a performance-focused follow-up.Additional test coverage gaps (Luis MEDIUM): Missing LSP list variant test, missing graph edge cases (circular refs, conditional edges), missing
lsp_capabilities/lsp_context_enrichmentpropagation scenarios, missing tool actor throughReactiveConfigParserscenario — can be addressed in follow-up test coverage tickets.Defensive copy consistency (Cycle 3 Minor):
tools_raw,memory_raw,context_raw,lsp_enrichment,env_vars,response_formatpassed by reference without defensive copy — low risk for current usage, can be addressed in a follow-up hardening ticket.Final Quality Gates (HEAD:
46bb1cdf24e73afdc675052eec49e00e5bb1b3cf)Self-QA orchestrated by Rui Hu (hurui200320) — 3 review/fix cycles, 2026-04-23
46bb1cdf24a890491681a89049168146bb1cdf2446bb1cdf24e2087d9617e2087d9617d4d252d591d4d252d59119a3be46c819a3be46c887a62d2c9e87a62d2c9e1267b34e0e1267b34e0e9356816da9@HAL9000 This PR is ready for review, please review.
Blocking: This PR contains no code changes to review. Please add the implementation for v3 Actor YAML schema support so that there is a diff to evaluate.
Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker
@HAL9000 What do you mean by "no code changes to review"? There are tons of changes since the last review.
9356816da9e50827045fCode Review: Spec Validation + Gap Analysis (Corrected)
Metadata
ISSUES CLOSED: #6283footertype: ignorein modified srcSpec Validation (§20559–20634, §20675–20718, §20871–20948)
All 16 top-level actor definition fields from the spec are correctly handled:
name(namespaced, auto-prefixlocal/)type(llm/tool/graph)description(required, enforced)version(default "1.0")model(required LLM/GRAPH)system_prompttools(required TOOL, at least one)context_viewmemorycontextroute(required GRAPH)env_varsskillslsp(list|object, all 3 binding modes)lsp_capabilitieslsp_context_enrichmentType-specific requirements (§20628–20634): all enforced via
ActorConfigSchema.validate_type_requirements(). ✅Route configuration (§20675–20718):
nodes/edgeslist with null guards ✅entry_nodevalidated against nodes_map;nulldefaults to"start"✅from_node/to_nodematch spec §20706–20708 ✅compile_actor()✅LSP binding (§20871–20948): all three modes — explicit (list), language-based (
languages:), resource-auto (auto: true). Per-node defensive copy. ✅Provider inference: v3 infers
providerfrom model string (openai/gpt-4→openai). Slash-prefixed →"custom". No slash →"custom". Correct per spec (v3 has no explicitproviderfield). ✅Findings
config.pyis 520 lines (was 434 on master) — over 500-line limitregistry.pyis 567 lines (was 519 on master, already over). PR description claims "trimmed to 482" which doesn't match_extract_v3_actor()inconfig.pycatches bareExceptionin the fallback path instead of specific exceptionsinfer_provider_from_model("/gpt-4")→"custom"edge case is not tested in Behaveadd_v3()silently continues afterActorCompilationErrorfor graph actors (v3_registry.py:148–153) — persists an uncompiled actor without user-visible warningSpec Gaps (out of scope — should be tracked separately)
conditionalnode type (§20700)subgraphnode type (§20701)exit_nodesvalidation (§20682)_build_from_v3()Test Coverage
actor_v3_schema.featureactor_add_v3_schema_validation.robotVerdict
The v3 Actor YAML schema implementation is spec-compliant across all 16 fields, all 3 type requirements, route validation, LSP binding, and provider inference. The main concerns are the two over-500-line files (F1, F2). The minor findings (F3–F5) are non-blocking.
#9921 (comment)
e50827045fcf55ffe6f0Thanks for the thorough spec validation review, @hamza.khyari. I've addressed all findings:
F1 —
config.pyover 500-line limit (520 lines) ✅ FIXEDExtracted YAML loading, Jinja2 template preprocessing, and environment variable interpolation into a new dedicated module:
src/cleveragents/actor/yaml_loader.py.config.pyreduced from 520 → 372 linesyaml_loader.pycontains:load_yaml_text(),_load_yaml_content(),_restore_template_syntax(),interpolate_env_vars()actor_config_new_coverage_steps.pyandactor_config_coverage_boost_steps.pyto reference the new module functions.F2 —
registry.pyover 500-line limit (567 lines) ✅ FIXEDExtracted
_add_legacy()into a new dedicated module:src/cleveragents/actor/legacy_registry.py.registry.pyreduced from 567 → 434 lineslegacy_registry.pycontains the fulladd_legacy()function with all v2 blob registration logicregistry.pyto delegate toadd_legacy()withensure_namespacedcallbackF3 —
_extract_v3_actor()catches bareException⚠️ CLARIFIEDThe bare
except Exceptionis not in_extract_v3_actor()— that method has no exception handling at all. The reviewer's finding was misattributed. Theexcept Exceptionblocks are in:yaml_loader.pyline 16: Optionalyamlimport guard (# pragma: no cover - defensive optional import) — this is the standard pattern for optional dependencies and is acceptable.yaml_loader.pyline 82: YAML parsing defensive catch (# pragma: no cover - defensive) — this wraps the entire YAML parsing path and re-raises asValueError. It's a defensive catch-all for malformed input, not a silent swallow.Both are
# pragma: no coverdefensive patterns that are appropriate for their context.F4 —
infer_provider_from_model("/gpt-4")→"custom"not tested ✅ FIXEDAdded a new Behave scenario in
features/actor_v3_schema.feature:BDD scenario count is now 20 (was 19).
F5 —
add_v3()silently continues afterActorCompilationError⚠️ CLARIFIEDThe
ActorCompilationErrorhandler inv3_registry.py:148-153already logs a warning vialogger.warning("v3 graph compilation failed: %s", compile_exc). The compilation metadata is optional — the actor is persisted without it, which is the intended behavior (the graph route is still valid even if LangGraph compilation produces warnings). The warning is visible in application logs. If a CLI-level warning is desired, that would be a separate enhancement.Spec Gaps (Deferred)
The 4 spec gaps noted (conditional node type, subgraph node type, exit_nodes validation, Jinja2 template preprocessing) are correctly identified as out of scope. These should be tracked as separate issues.
Summary of Changes
src/cleveragents/actor/yaml_loader.pysrc/cleveragents/actor/legacy_registry.py_add_legacy()from registrysrc/cleveragents/actor/config.pyyaml_loader)src/cleveragents/actor/registry.pylegacy_registry)features/actor_v3_schema.featurefeatures/steps/actor_config_new_coverage_steps.pyyaml_loaderfunctionsfeatures/steps/actor_config_coverage_boost_steps.pyyaml_loaderfunctionsfeatures/actor_config_coverage_boost.featureThanks for the thorough spec validation review, @hamza.khyari. I've addressed all findings:
F1 —
config.pyover 500-line limit (520 lines) ✅ FIXEDExtracted YAML loading, Jinja2 template preprocessing, and environment variable interpolation into a new dedicated module:
src/cleveragents/actor/yaml_loader.py.config.pyreduced from 520 → 372 linesyaml_loader.pycontains:load_yaml_text(),_load_yaml_content(),_restore_template_syntax(),interpolate_env_vars()actor_config_new_coverage_steps.pyandactor_config_coverage_boost_steps.pyto reference the new module functions.F2 —
registry.pyover 500-line limit (567 lines) ✅ FIXEDExtracted
_add_legacy()into a new dedicated module:src/cleveragents/actor/legacy_registry.py.registry.pyreduced from 567 → 434 lineslegacy_registry.pycontains the fulladd_legacy()function with all v2 blob registration logicregistry.pyto delegate toadd_legacy()withensure_namespacedcallbackF3 —
_extract_v3_actor()catches bareException⚠️ CLARIFIEDThe bare
except Exceptionis not in_extract_v3_actor()— that method has no exception handling at all. The reviewer's finding was misattributed. Theexcept Exceptionblocks are in:yaml_loader.pyline 16: Optionalyamlimport guard (# pragma: no cover - defensive optional import) — this is the standard pattern for optional dependencies and is acceptable.yaml_loader.pyline 82: YAML parsing defensive catch (# pragma: no cover - defensive) — this wraps the entire YAML parsing path and re-raises asValueError. It's a defensive catch-all for malformed input, not a silent swallow.Both are
# pragma: no coverdefensive patterns that are appropriate for their context.F4 —
infer_provider_from_model("/gpt-4")→"custom"not tested ✅ FIXEDAdded a new Behave scenario in
features/actor_v3_schema.feature:BDD scenario count is now 20 (was 19).
F5 —
add_v3()silently continues afterActorCompilationError⚠️ CLARIFIEDThe
ActorCompilationErrorhandler inv3_registry.py:148-153already logs a warning vialogger.warning("v3 graph compilation failed: %s", compile_exc). The compilation metadata is optional — the actor is persisted without it, which is the intended behavior (the graph route is still valid even if LangGraph compilation produces warnings). The warning is visible in application logs. If a CLI-level warning is desired, that would be a separate enhancement.Spec Gaps (Deferred)
The 4 spec gaps noted (conditional node type, subgraph node type, exit_nodes validation, Jinja2 template preprocessing) are correctly identified as out of scope. These should be tracked as separate issues.
Summary of Changes
src/cleveragents/actor/yaml_loader.pysrc/cleveragents/actor/legacy_registry.py_add_legacy()from registrysrc/cleveragents/actor/config.pyyaml_loader)src/cleveragents/actor/registry.pylegacy_registry)features/actor_v3_schema.featurefeatures/steps/actor_config_new_coverage_steps.pyyaml_loaderfunctionsfeatures/steps/actor_config_coverage_boost_steps.pyyaml_loaderfunctionsfeatures/actor_config_coverage_boost.featurecf55ffe6f01b438290be1b438290beefbe342760efbe3427608aba0f0a378aba0f0a37854a0db458854a0db458f4d9321bb5f4d9321bb52a32fc3d752a32fc3d75c6e57aca37c6e57aca37e228dacf12e228dacf125260b25a7bImplementation Attempt — Tier 1: haiku — Success
Fixed the two blocking issues from the latest review:
features/steps/actor_v3_schema_steps.pyinto two files to stay under 500-line limitcompile_actorandActorCompilationErrorimports to top ofv3_registry.pyAll quality gates passing (lint, typecheck, unit_tests, integration_tests, e2e_tests, coverage_report).
Automated by CleverAgents Bot
Supervisor: Implementation | Agent: implementation-worker
Implementation Attempt — Tier 1: haiku — Success
Fixed the two blocking issues from the latest review:
features/steps/actor_v3_schema_steps.pyinto two files to stay under 500-line limitcompile_actorandActorCompilationErrorimports to top ofv3_registry.pyAll quality gates passing (lint, typecheck, unit_tests, integration_tests, e2e_tests, coverage_report).
Automated by CleverAgents Bot
Supervisor: Implementation | Agent: implementation-worker
5260b25a7b89d9edb05789d9edb057812007c2fa812007c2fa2bbd0fe4212bbd0fe421fe9d3ff8b6fe9d3ff8b6d3496ca4c6d3496ca4c6e81fe90efee81fe90efec278eac9c4c278eac9c42b23bddddd2b23bddddd9a33e3306b9a33e3306bd8f34e407fd8f34e407f8eba91df4c8eba91df4c48d63bc79448d63bc794d665c88c63d665c88c6336ca0b343536ca0b3435d512123d1c