Pure-graph edge evaluator does not implement content_not_contains, causing mutually-exclusive branch conditions to both fire #95
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
Depends on
#77 Epic: LLM Agent Runtime Stabilization — reliability, resource enforcement & correctness hardening
cleveragents/cleveractors-core
#96 TDD: Pure-graph edge evaluator does not implement
content_not_contains, causing mutually-exclusive branch conditions to both fire
cleveragents/cleveractors-core
#100 fix(langgraph): implement content_not_contains condition in pure graph edge evaluator
cleveragents/cleveractors-core
Reference
cleveragents/cleveractors-core#95
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Metadata
fix(langgraph): implement content_not_contains condition in pure graph edge evaluatorbugfix/m1-pure-graph-content-not-containsBackground and context
The Actor Configuration Standard defines
content_not_containsas a conditiontype that MUST be honored by "Stream router, conditional nodes, bridge router"
(§5.4). §5.4.1 additionally specifies that for pure-graph edge conditions,
an unknown condition type defaults to
True(with a warning emitted).PureLangGraph._evaluate_edge_condition()(
src/cleveractors/langgraph/pure_graph.py, starting around line 2013)implements
always,content_contains,context_value,output_pattern, andmessage_pattern— but has no branch forcontent_not_contains. Any edgeconfigured with
content_not_containstherefore falls into the catch-all:This produces the log line
Unknown condition type: content_not_contains,reproduced verbatim (three times) during a real run against
packages/porting-actor-tools-graph-no_prune-single_thread-skills_b.yaml.That graph route encodes a classic exclusive if/else branch via a pair of
sibling edges out of each classifier node, e.g.:
Because
content_not_containsalways evaluates toTrueregardless ofmessage content, whenever the classifier output does contain
NO_FIXES,both edges are satisfied simultaneously:
content_containscorrectly matches(→
ui_coder), and the brokencontent_not_containsalso returnsTrue(→
bl_fixes1)._get_next_nodes()(pure_graph.py:1990-2011) returns bothtargets instead of the single one the author intended.
Combined with a second, independently-filed defect in parallel-dispatch
gating (companion issue), this causes both branches to execute concurrently
via
asyncio.gather, even though the graph draws them as a mutuallyexclusive choice.
Current behavior
{type: content_not_contains, text: "<X>"}in apure-graph route always evaluates to
True, regardless of whether themessage content actually contains
<X>.Unknown condition type: content_not_containsis logged everytime such an edge is evaluated.
content_containsedge on a siblingbranch (the common if/else idiom), both edges can be satisfied at once, so
_get_next_nodes()returns more candidate next-nodes than intended.Expected behavior
_evaluate_edge_condition()MUST implementcontent_not_containsper§5.4: true if the substring is NOT present in the (stringified) message
content, matching the existing correct implementations in
nodes.py:812,bridge.py:468, andreactive/stream_router.py:550.content_contains: X, onecontent_not_contains: X— MUST yield exactly one next-node, whichevermatches the actual message content.
Unknown condition type: content_not_containswarning should belogged for a correctly configured edge.
Acceptance criteria
_evaluate_edge_condition()returnsTruewhen the configured text isabsent from the message content, and
Falsewhen present, fortype: content_not_contains.content_contains: X/content_not_contains: Xfrom the same source node,_get_next_nodes()returns exactly one target for any message content (containing or not
containing
X).Unknown condition type: content_not_containswarning is logged fora correctly configured edge.
content_contains,always,context_value,output_pattern,message_patternbehavior is unchanged (noregression).
Supporting information
docs/index.md§5.4 (condition table,content_not_containsrow),§5.4.1 (subsystem-specific defaults for pure-graph edges).
packages/porting-actor-tools-graph-no_prune-single_thread-skills_b.yaml,route
main, edges out ofbl_classifier1/bl_classifier2/bl_classifier3and
project_classifier1/project_classifier2/project_classifier3.client/test_app.pyrun: three occurrences ofUnknown condition type: content_not_contains, followed by interleavedtool calls from agents (
code-review-fixes1,ui-coder-designer,code-adjustments-classifier1) that the graph places in strict sequence.by a separately-filed parallel-dispatch-gating defect in the same file
(
pure_graph.pylines 1078, 1860, 1965), which is what actually causes thetwo branches to run concurrently once both are returned as next-nodes.
Subtasks
content_not_containsbranch toPureLangGraph._evaluate_edge_condition()insrc/cleveractors/langgraph/pure_graph.py, mirroring the existinglogic in
nodes.py,bridge.py, andreactive/stream_router.py.content_not_containstrue/false cases,and a combined
content_contains/content_not_containssibling-edgescenario asserting exactly one next-node is selected.
with the sibling if/else pattern end-to-end, asserting only the
correct branch executes.
nox -s coverage_report.nox(all default sessions), fix any errors.Definition of Done
This issue is complete when:
Metadata exactly.
@tdd_issue/@tdd_issue_N) passeswith
@tdd_expected_failremoved.master, reviewed, and merged.content_not_contains, causing mutually-exclusive branch conditions to both fire #96content_not_contains, causing mutually-exclusive branch conditions to both fireparallelflag #97