Skip to content

Remove redundant CEL text helper + agent repo guidance#6528

Merged
vinibrsl merged 1 commit into
mainfrom
fix/flow-template-interpolation
Jul 13, 2026
Merged

Remove redundant CEL text helper + agent repo guidance#6528
vinibrsl merged 1 commit into
mainfrom
fix/flow-template-interpolation

Conversation

@vinibrsl

Copy link
Copy Markdown
Member

This commit removes the redundant CEL text helper, in favor of the easier interpolation syntax.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The custom CEL text(...) function and its runtime registration are removed. Flow documentation now requires direct ${...} interpolation without CEL + concatenation, and affected tests are updated accordingly.

Changes

CEL text removal and interpolation guidance

Layer / File(s) Summary
Remove custom CEL text evaluation
lib/crewai/src/crewai/flow/expressions.py
Removes the text(...) helper, registration, examples, documentation, and runtime injection from CEL evaluation.
Update action-mapping guidance
lib/cli/src/crewai_cli/templates/declarative_flow/AGENTS.md, lib/crewai/src/crewai/flow/templates/flow_definition_skill.md.j2, lib/crewai/src/crewai/flow/skill.py
Requires literal action-mapping text with direct ${...} interpolation, updates generated action documentation, and prohibits CEL + concatenation.
Migrate interpolation tests
lib/cli/tests/test_create_flow.py, lib/crewai/tests/test_flow_definition.py, lib/crewai/tests/test_flow_from_definition.py
Updates documentation assertions and Flow action tests to use direct state and input interpolation instead of text(...) expressions.

Suggested reviewers: lorenzejay, joaomdmoura, gabemilani, greysonlalonde

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title accurately reflects the main change: removing the CEL text helper and related guidance.
Description check ✅ Passed The description matches the PR's main intent of replacing the CEL text helper with simpler interpolation.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/flow-template-interpolation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
lib/crewai/tests/test_flow_from_definition.py (1)

1300-1323: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Rename stale test: test_agent_action_renders_text_custom_expression_input.

The test name still references "text_custom_expression" but the test body now uses direct ${...} interpolation. Rename to reflect the actual behavior being tested, e.g., test_agent_action_renders_interpolated_input.

♻️ Proposed rename
-def test_agent_action_renders_text_custom_expression_input(
+def test_agent_action_renders_interpolated_input(
     monkeypatch: pytest.MonkeyPatch,
 ):
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@lib/crewai/tests/test_flow_from_definition.py` around lines 1300 - 1323,
Rename the test function test_agent_action_renders_text_custom_expression_input
to reflect that it verifies direct interpolated input, using a name such as
test_agent_action_renders_interpolated_input; leave the test implementation
unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@lib/crewai/tests/test_flow_from_definition.py`:
- Around line 1300-1323: Rename the test function
test_agent_action_renders_text_custom_expression_input to reflect that it
verifies direct interpolated input, using a name such as
test_agent_action_renders_interpolated_input; leave the test implementation
unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f769e597-583e-42ec-988f-68ca9594add6

📥 Commits

Reviewing files that changed from the base of the PR and between fb8e93b and b15a126.

📒 Files selected for processing (6)
  • lib/cli/src/crewai_cli/templates/declarative_flow/AGENTS.md
  • lib/cli/tests/test_create_flow.py
  • lib/crewai/src/crewai/flow/expressions.py
  • lib/crewai/src/crewai/flow/templates/flow_definition_skill.md.j2
  • lib/crewai/tests/test_flow_definition.py
  • lib/crewai/tests/test_flow_from_definition.py

This commit removes the redundant CEL text helper, in favor of the
easier interpolation syntax.
@vinibrsl
vinibrsl force-pushed the fix/flow-template-interpolation branch from 1ca012f to d9207cf Compare July 13, 2026 17:59
@vinibrsl vinibrsl changed the title Remove redundant CEL text helper Remove redundant CEL text helper + Repository-backed agents guidance Jul 13, 2026
@vinibrsl vinibrsl changed the title Remove redundant CEL text helper + Repository-backed agents guidance Remove redundant CEL text helper + agent-repo guidance Jul 13, 2026
@vinibrsl vinibrsl changed the title Remove redundant CEL text helper + agent-repo guidance Remove redundant CEL text helper + agent repo guidance Jul 13, 2026
@vinibrsl
vinibrsl merged commit 9d72e26 into main Jul 13, 2026
56 of 57 checks passed
@vinibrsl
vinibrsl deleted the fix/flow-template-interpolation branch July 13, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants