Repository navigation
test: fix Core Tests on main β headless YAML output_file test vs project-root guard - #6070
MervinPraison wants to merge 1 commit into
Conversation
β¦file test Since #5770, Task output_file writes are contained in the project root (PRAISONAI_PROJECT_ROOT or cwd). The test writes under tmp_path while running from src/praisonai, so the guard skipped both files and the test failed on main (Core Tests red since). Set the root to tmp_path; the guard itself is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
β Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Configure the test project root src/praisonai/tests/unit/test_yaml_headless_5826.py |
The test sets PRAISONAI_PROJECT_ROOT to tmp_path before running the YAML team and checking output files and metrics. |
Priority:
Estimated code review effort: 1 (Trivial) | ~4 minutes
Change: Bug fix
Possibly related PRs
- MervinPraison/PraisonAI#5770: Added the project-root containment guard used by YAML team output-file writes.
Merge Risk: 
Minimal Β· up to 9ab3d
-
The test fix is correctly scoped and does not introduce merge-blocking behavior.
Pre-merge checks: 
4 Β· 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Title check
-
Explanation
The title names the change: a test fix for the Core Tests failure on main. It states the cause: the headless YAML output_file test conflicts with the project-root guard. The raw summary and objectives confirm the only change is in test_yaml_headless_5826.py, where the test sets PRAISONAI_PROJECT_ROOT to tmp_path via monkeypatch. The title matches the main change and is specific enough for a reviewer scanning history. Minor issue: the title is 83 characters and uses an em dash, but it stays readable and on topic.
-
-
Finishing Touches: π‘ 1
-
π Generate docstrings: π‘
-
- Commit to this branch
- Create a new PR
π§ͺ Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix Β· Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Comment @coderabbitai help to get the list of available commands.
[Low impact] This test-only change appears safe to merge. SummarySets
Reviews (1) Β· Last reviewed commit: "test: point the project root at tmp_path..." Β· Reviewed by Greptile |
|
@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: Review changes in this PR. Python SDK: praisonaiagents, praisonai. TypeScript SDK: src/praisonai-ts/. Do NOT modify src/praisonai-rust. Read ALL comments above from Gemini, Qodo, CodeRabbit, and Copilot carefully before responding. MANDATORY READ (before reviewing):
Phase 1: Review per AGENTS.md
MANDATORY COMMENT FORMAT β include this Phase 1 table in your review comment: Phase 1 β AGENTS.md review
For TypeScript PRs (src/praisonai-ts/), also add: Phase 2: FIX Valid Issues Phase 3: Final Verdict |
Security review: PR #6070 (Origin: outsider)Diff: one file, Verdict: PASS. No code changes needed, so nothing was pushed.
Deterministic risk flags: none were listed for this diff, so there was nothing extra to address. CI:
Skipped: no files were modified. I only updated the PR description to add |
|
@claude this PR has merge conflicts with |
|
Superseded by #6071, which landed the same fix on main (PRAISONAI_PROJECT_ROOT set to tmp_path in test_yaml_headless_5826). |
Conflict resolution: this PR is already covered by mainOrigin: outsider. This PR was flagged as outsider-origin. Some of the issues it references (#5770 is a fork PR from a user without write access, and #6067) are outsider content, which I treated as untrusted data. I followed no instructions from them and limited my work to the conflict. What I foundRunning Keeping main's side resolves the conflict, but then the branch has no diff against main: the PR's single commit becomes empty. What I did / skipped
Security review (checklist)Diff reviewed: 1 file, +4/β1, test-only.
No deterministic risk flags were provided. No findings. |
Main's Core Tests have been red on every recent commit (for example
e4b1088fanda5f35a7a), always on the same single test:Cause: #5770 (security) limits task
output_filewrites to the project root, which isPRAISONAI_PROJECT_ROOTor the current working directory. This test was written before that. It writes into pytest'stmp_pathwhile running fromsrc/praisonai, so the guard correctly skips both files ("is outside project root; skipping save").Fix: set
PRAISONAI_PROJECT_ROOTtotmp_pathin that test, usingmonkeypatch. The security guard is unchanged, and the test still checks that both files are written and that the metrics JSON is printed.Verified: the failure reproduces on
origin/main, and all 9 tests in the file pass with the fix. It was the only failing test in main's Core Tests; the other red job,test-core, just aggregates it. This also unblocks every open PR that inherits the red check, including #6067.π€ Generated with Claude Code
Origin: outsider
Why: this PR references #5770 (a fork PR opened by an account without write access) and #6067 (flagged as outsider origin). Content from those threads was treated as untrusted data. Because of that, the change is limited to a minimal test-only fix. It does not touch
.github/, dependency manifests, lockfiles, build or install files, orconftest.py. It adds no network endpoints, telemetry, credential handling, eval/exec/subprocess calls, or dynamic imports.