Files
crewAI/lib/cli/tests
João MouraandClaude Opus 5.5 a8877f0cdf
CodeQL Advanced / Analyze (actions) (push) Canceled after 0s
CodeQL Advanced / Analyze (python) (push) Canceled after 0s
Check Documentation Broken Links / Check broken links (push) Canceled after 0s
Vulnerability Scan / Detect changes (push) Canceled after 0s
Vulnerability Scan / pip-audit (push) Canceled after 0s
feat(cli): every crewai eval keeps the evaluation's full data in the project (#8326)
* feat(cli): every crewai eval keeps the evaluation's full data in the project

An evaluation's report opens for one five-minute sitting after it is first
read, and the verdict `crewai eval` waits for is that read. A coding agent
that wants a check's quotes, the outputs or the trace after its edits ran
`crewai eval export` and found it closed ("has been read already").

Right after the verdict, `crewai eval` now saves the export into
`.crewai/evaluations/<id>/` (report.md, run/checks.md, run/outputs.md,
run/trace.json, beside a `.gitignore` of `*`) and says where. Graded again
with nothing changed, it points at what it saved instead of asking AMP a
second time. Only inside a project; the ten newest are kept. A service that
does not export yet says nothing, and any other failure is one line: the
verdict and the exit code are never the save's.

The export writer now raises an error its callers decide about instead of
exiting, and writes into a nested folder the same way it wrote into one:
each folder opened inside the one before it, never through a link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(cli): a saved evaluation is marked whole, pruned only by its owner, and fetched briefly

Review on #8326:
- the save asks AMP with its own short timeout (20 s to read) instead of
  export's two minutes: the verdict is already printed, and CI waits on the
  command (`PlusAPI.export_evaluation(..., timeout=)`);
- a marker is written last, and only when every file was; it, not report.md,
  says an evaluation is saved, so a save cut short is tried again;
- a save that skipped a file says "Part of its data was saved … N skipped"
  and leaves no marker, instead of claiming the full data;
- only a folder this command saved whole (the marker, a plain file) is ever
  removed to keep the newest ten; never a link or a junction, and nothing at
  all when `.crewai/` or `.crewai/evaluations/` is a link;
- the path writer (Windows) refuses a link anywhere on the folder's way
  before making anything through it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(cli): AMP cannot send a saved evaluation's marker

Review on #8326: `_export_target` reserved the folder's `.gitignore` but not
the marker that says a save was whole. A payload carrying
`.crewai-eval-saved` and one file that is skipped would have left that
marker on a partial save: read as whole, never tried again, and kept over a
complete one. The marker is now reserved the same way, compared as a
case-insensitive filesystem that drops trailing dots sees it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 15:27:26 -03:00
..