Skip to content

fix(tests): align framework validator hint with praisonai-frameworks#2478

Merged
MervinPraison merged 1 commit into
mainfrom
fix/framework-validators-hint
Jun 30, 2026
Merged

fix(tests): align framework validator hint with praisonai-frameworks#2478
MervinPraison merged 1 commit into
mainfrom
fix/framework-validators-hint

Conversation

@MervinPraison

@MervinPraison MervinPraison commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Summary

Test plan

  • pytest tests/unit/test_framework_validators.py::TestAssertFrameworkAvailableRaises::test_unknown_framework_generic_hint passes locally
  • test-core green on CI

Made with Cursor

Summary by CodeRabbit

  • Tests
    • Updated a unit test to match the latest install hint shown when an unknown framework is requested.

…extra

Update test_unknown_framework_generic_hint to expect praisonai-frameworks[...]
after get_install_hint() switched from praisonai[...] during package split.
Unblocks test-core (root) on main and open PRs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more β†’

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account β†’

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us β†’

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates a unit test in test_framework_validators.py to assert that the error message contains 'praisonai-frameworks[some_unknown_framework_xyz]' instead of the previous 'pip install 'praisonai[some_unknown_framework_xyz]'' string. No review comments were provided, so there is no feedback to address.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@coderabbitai

coderabbitai Bot commented Jun 30, 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: e09d1e19-b9be-4f40-b7c9-82b2a03c7306

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between a7ca65f and 61cf52f.

πŸ“’ Files selected for processing (1)
  • src/praisonai/tests/unit/test_framework_validators.py

πŸ“ Walkthrough

Walkthrough

Updates one assertion in the unit test for unknown framework names: the expected ImportError message now checks for praisonai-frameworks[some_unknown_framework_xyz] instead of pip install 'praisonai[some_unknown_framework_xyz]'.

Changes

Framework Validator Test Fix

Layer / File(s) Summary
Unknown framework error hint assertion
src/praisonai/tests/unit/test_framework_validators.py
Updates the expected ImportError message string to match the praisonai-frameworks[...] install hint format.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • MervinPraison/PraisonAI#2464: Updates the same test file's ImportError install-hint assertions to the praisonai-frameworks[...] format following a package split.

Suggested labels

pipeline/blocked:ci

A tiny string swap, a test kept in tune,
The install hint hops from pip to a new rune,
praisonai-frameworks now leads the way,
One line changed to keep the CI at bay,
πŸ‡ hop hop, all assertions are okay!

πŸš₯ 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
Description Check βœ… Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check βœ… Passed The title is concise and accurately reflects the test expectation update to use praisonai-frameworks install hints.
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.
✨ 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/framework-validators-hint

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.

@MervinPraison

Copy link
Copy Markdown
Owner Author

@copilot Do a thorough review of this PR. Read ALL existing reviewer comments above from Qodo, Coderabbit, and Gemini first β€” incorporate their findings.

Review areas:

  1. Bloat check: Are changes minimal and focused? Any unnecessary code or scope creep?
  2. Security: Any hardcoded secrets, unsafe eval/exec, missing input validation?
  3. Performance: Any module-level heavy imports? Hot-path regressions?
  4. Tests: Are tests included? Do they cover the changes adequately?
  5. Backward compat: Any public API changes without deprecation?
  6. Code quality: DRY violations, naming conventions, error handling?
  7. Address reviewer feedback: If Qodo, Coderabbit, or Gemini flagged valid issues, include them in your review
  8. Suggest specific improvements with code examples where possible

@greptile-apps

greptile-apps Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates the framework validator test for the split framework package. The main change is:

  • The unknown-framework install hint expectation now looks for praisonai-frameworks[...].
  • The test is aligned with the new framework package name.

Confidence Score: 5/5

The changed test looks mergeable after tightening the fallback hint assertion.

  • The package name expectation matches the implementation.
  • The fallback test no longer checks the full install command.
  • No runtime or security issue was found in the changed code.

src/praisonai/tests/unit/test_framework_validators.py

Important Files Changed

Filename Overview
src/praisonai/tests/unit/test_framework_validators.py Updates the unknown-framework validator test to expect the new praisonai-frameworks[...] install hint.

Reviews (1): Last reviewed commit: "fix(tests): align framework validator hi..." | Re-trigger Greptile

assert_framework_available("some_unknown_framework_xyz")
assert "some_unknown_framework_xyz" in str(exc_info.value)
assert "pip install 'praisonai[some_unknown_framework_xyz]'" in str(exc_info.value)
assert "praisonai-frameworks[some_unknown_framework_xyz]" in str(exc_info.value)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Fallback Hint Format Unchecked

When the generic fallback path returns a malformed command that still contains praisonai-frameworks[some_unknown_framework_xyz], this assertion passes even though users would not get the intended pip install '...' command. This test covers the unknown-framework fallback, so it should keep checking the full install hint format.

Suggested change
assert "praisonai-frameworks[some_unknown_framework_xyz]" in str(exc_info.value)
assert "pip install 'praisonai-frameworks[some_unknown_framework_xyz]'" in str(exc_info.value)

@MervinPraison

Copy link
Copy Markdown
Owner Author

@claude You are the FINAL architecture reviewer. If the branch is under MervinPraison/PraisonAI (not a fork), you are able to make modifications to this branch and push directly. SCOPE: Focus ONLY on Python packages (praisonaiagents, praisonai). Do NOT modify praisonai-rust or praisonai-ts. Read ALL comments above from Gemini, Qodo, CodeRabbit, and Copilot carefully before responding.

Phase 1: Review per AGENTS.md

  1. Protocol-driven: check heavy implementations vs core SDK
  2. Backward compatible: ensure zero feature regressions
  3. Performance: no hot-path regressions
  4. SDK value: review in depth whether the change genuinely adds value to the SDK β€” never add features for the sake of adding them. It must strengthen the SDK (simpler, more user-friendly, robust, world-class, secure). If it does not clearly add value, request changes or recommend rejecting/closing rather than merging scope creep
  5. Do not bloat the Agent class with additional params β€” only if absolutely required; we already support many params.

Phase 2: FIX Valid Issues
5. For any VALID bugs or architectural flaws found by Gemini, CodeRabbit, Qodo, Copilot, or any other reviewer: implement the fix
6. Push all code fixes directly to THIS branch (do NOT create a new PR)
7. Comment a summary of exact files modified and what you skipped

Phase 3: Final Verdict
8. If all issues are resolved, approve the PR / close the Issue
9. If blocking issues remain, request changes / leave clear action items

@praisonai-triage-agent

praisonai-triage-agent Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Claude finished @MervinPraison's task β€”β€” View job β€’ claude/pr-2478-20260630-0908 β€’ Create PR βž”


Final Architecture Review β€” PR #2478

  • Read test file and validator implementation
  • Verify Greptile's P2 fallback-hint concern
  • Fix valid issue (tighten fallback assertion)
  • Run tests (10 passed)
  • Final verdict

Phase 1 β€” Review per AGENTS.md

Check Result
Protocol-driven βœ… Test-only change; protocol (assert_framework_available) lives in praisonai wrapper, no core SDK touched
Backward compatible βœ… Zero feature regressions β€” pure test assertion change
Performance βœ… No hot-path impact (test file only)
SDK value βœ… Strengthens test coverage; prevents silent regression in install hint
Agent class bloat βœ… N/A β€” agent.py untouched
Scope βœ… Python-only; no praisonai-rust / praisonai-ts changes

Phase 2 β€” Valid Issues Fixed

Greptile (P2) β€” valid βœ… β€” "Fallback Hint Format Unchecked"

The original PR weakened the assertion to a bare substring praisonai-frameworks[some_unknown_framework_xyz], which would still pass even if the surrounding pip install '...' wrapper were broken. I verified get_install_hint() returns exactly:

pip install 'praisonai-frameworks[some_unknown_framework_xyz]'

(src/praisonai/praisonai/framework_adapters/registry.py β€” the fallback return f"pip install 'praisonai-frameworks[{extra_name}]'").

Tightened the assertion accordingly:

# src/praisonai/tests/unit/test_framework_validators.py:84
assert "pip install 'praisonai-frameworks[some_unknown_framework_xyz]'" in str(exc_info.value)

Files modified:

  • src/praisonai/tests/unit/test_framework_validators.py (1 line)

Skipped (not actionable / not valid):

  • Gemini, Qodo, CodeRabbit, Copilot, Copilot-Greptile-summary: no actionable findings beyond the above.
  • CodeRabbit "Docstring Coverage" warning: not applicable to a single-line test assertion change.

Test result:

10 passed in 0.17s

(pytest src/praisonai/tests/unit/test_framework_validators.py)

Phase 3 β€” Final Verdict

βœ… Approved. The change is minimal, focused, backward-compatible, adds genuine value (tighter regression coverage), and introduces no scope creep or security/performance concerns.

⚠️ Note: PR #2478 (fix/framework-validators-hint) is already MERGED. This follow-up fix was committed to branch claude/pr-2478-20260630-0908 and needs its own PR to land on main:

--- β€’ Branch: claude/pr-2478-20260630-0908

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant