Skip to content

fix(template): align data analysis CodeExec prompt - #18958

Merged
JinHai-CN merged 2 commits into
infiniflow:mainfrom
huyua9:fix/data-analysis-template-codeexec-huyua9-5906
Sep 11, 2026
Merged

JinHai-CN merged 2 commits into
infiniflow:mainfrom
huyua9:fix/data-analysis-template-codeexec-huyua9-5906

Conversation

@huyua9

@huyua9 huyua9 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

The data-analysis template stores the agent system prompt twice: the DSL component says CodeExec supports Python while the graph node says Python/SQL/R, and both copies contain the malformed word programmaticallyand.

Align both prompt copies with the supported CodeExec prompt and add a JSON regression test that keeps the two representations synchronized and rejects the typo.

Validation:

  • JSON parse: passed
  • Python compile check: passed
  • git diff --check: passed
  • Focused pytest: not run; pytest is unavailable in this environment

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. 🐞 bug Something isn't working, pull request that fix bug. 🧪 test Pull requests that update test cases. labels Aug 28, 2026
@coderabbitai

coderabbitai Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a02e9deb-19ce-4bbb-aaee-1d50bc198c61

📥 Commits

Reviewing files that changed from the base of the PR and between c84713f and d5c9ee3.

📒 Files selected for processing (2)
  • agent/templates/data_analysis_beginner_assistant.json
  • test/unit_test/agent/test_data_analysis_beginner_template.py

Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

The data analysis template now describes CodeExec as Python-only and corrects a spacing typo in both prompt copies. A new test loads the template, finds both prompts, and verifies their content and equality.

Changes

Data analysis prompt consistency

Layer / File(s) Summary
Update duplicated analyst prompts
agent/templates/data_analysis_beginner_assistant.json
Both sys_prompt copies now use Python-only CodeExec wording and correct programmatically and.
Validate prompt copies
test/unit_test/agent/test_data_analysis_beginner_template.py
The test recursively finds analyst prompts, then verifies that exactly two identical prompts contain the corrected wording and exclude the previous text.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to d5c9e

The PR aligns the data-analysis prompt copies, removes the typo, and adds a regression test to prevent drift; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: aligning the data-analysis template's CodeExec prompt.
Description check ✅ Passed The description explains the prompt mismatch, the typo correction, the regression test, and validation results. It does not use the template's "### Summary" heading, but the required summary content i…
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.
Full details: Description check

Explanation

The description explains the prompt mismatch, the typo correction, the regression test, and validation results. It does not use the template's "### Summary" heading, but the required summary content is present.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (1 skipped: 1 unsupported.)


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

A rabbit checks the prompts with care
Python-only words now fill the air
Two copies match in line
A typo hops out of sight
Tests guard the template bright

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

@JinHai-CN JinHai-CN added the ci Continue Integration label Sep 11, 2026
@codecov

codecov Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 37.35%. Comparing base (2e6003c) to head (c69602a).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18958      +/-   ##
==========================================
- Coverage   37.37%   37.35%   -0.03%     
==========================================
  Files          54       54              
  Lines       15374    15384      +10     
  Branches      125      125              
==========================================
  Hits         5746     5746              
- Misses       9601     9611      +10     
  Partials       27       27              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JinHai-CN
JinHai-CN merged commit 56966c0 into infiniflow:main Sep 11, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration size:XS This PR changes 0-9 lines, ignoring generated files. 🧪 test Pull requests that update test cases.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants