feat(create_executor): implement create_executor() factory and Executor.execute() returning ActorResult #38
No reviewers
Labels
No labels
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
1 participant
Notifications
Due date
No due date set.
Blocks
#13 feat(create_executor): implement create_executor() factory and Executor.execute() returning ActorResult
cleveragents/cleveractors-core
Reference
cleveragents/cleveractors-core!38
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/create-executor-api"
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
Implement the router-facing
create_executor()factory function andExecutorclass with asyncexecute()method returningActorResult.What This PR Does
Production Code
src/cleveractors/runtime.py—create_executor()factory,Executorclass,ActorResult/NodeUsagedataclasses (~218 lines)src/cleveractors/runtime_dispatch.py— Four dispatch methods:_execute_llm,_execute_graph,_execute_tool,_execute_multi_actor(~437 lines)src/cleveractors/runtime_tokens.py— Token estimation via tiktoken with heuristic fallback,lru_cacheon encoding lookup,encoding_for_modelwithKeyErrorfallbackAgentFactory(credentials=...)— storedconfig_dictnever modified (ADR-2026 AC8)_usage_log.clear()at start ofexecute()for AC5 compliance; direct assertion in testscopy.deepcopy()used in both_execute_graphand_execute_multi_actor;_execute_llmuses direct assignment (notsetdefault) to correctly apply top-level overridesWARNINGlevel for agent cleanup failures, now including exception message (not just class name)Quality Gates
nox -e lint— passesnox -e typecheck— passes (0 errors, 1 expected warning)nox -e unit_tests— 111/112 features pass (1 pre-existing failure:nodes_coverage_gaps.feature:111)nox -e integration_tests— 76 tests passnox -e coverage_report— 95.88% (pre-existing; modified files:runtime_dispatch.py99.59%,runtime_tokens.py94.34%)nox -e security_scan— 0 findingsnox -e dead_code— passesCode Review Fixes (Cycle 8 — this cycle)
parallel_executiondefault aligned withPureGraphConfigdataclass (True, notFalse) in_execute_graphprovider/modelconfig fallback changed fromorto explicitis Nonechecks in_execute_llmconfig:block valuesstep_execute_actormulti_actor seam now reproduces production default-actor resolution logicstep_assert_no_actors_errornow verifies error message contains "no actors"_execute_graphscenario strengthened with node usage and token assertionsProtocolimport reverted totyping—collections.abcpath is not available in Python 3.13_get_encodingnow usesencoding_for_modelwithKeyErrorfallback instead of fragile substring matchingWhen I import create_executortoGiven I import create_executor(semantic correctness)step_assert_completion_tokens_min/step_assert_prompt_tokens_mintostep_assert_heuristic_*runtime_tokens_steps.pyis a new file in this commit_estimate_tokensfromruntime.py(extracted toruntime_tokens.py), fixing bandit B110Closes #13
05cb9beb048921a0e9bf8921a0e9bf68c3fb7f9d68c3fb7f9df6ce512fb5f6ce512fb5ff2658e55eff2658e55ec623054253c623054253362b30bae0362b30bae0bc585e227dbc585e227dedd9af1c4fView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.