chore: align all adapters with JobPhase SDK contract - #89
Conversation
Strip dead fields (progress, message, current_step, total_steps, completed_steps) from JobStatusUpdate calls, migrate ErrorInfo to error_message/MessageInfo on failure paths, and gate PERSISTING_ARTIFACTS phase on OCI export configuration across all 8 adapters. Add OCI artifact persistence to the deepeval adapter. Update test assertions for conditional PERSISTING_ARTIFACTS emission and add a JobPhase lifecycle guide to the README. Co-Authored-By: Claude <noreply@anthropic.com>
Avoid picking up the system python3 (currently 3.14) which triggers a uvloop segfault in guidellm on arm64. Pin PYTHON_VERSION=3.12 by default, overridable via make variable. Co-Authored-By: Claude <noreply@anthropic.com>
📝 WalkthroughWalkthroughAdapters now use minimal job-phase status updates and ChangesAdapter lifecycle and OCI exports
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Adapter
participant Callbacks
participant Results
Adapter->>Adapter: write result files
Adapter->>Callbacks: create OCI artifact
Callbacks-->>Adapter: return OCI artifact result
Adapter->>Results: attach OCI artifact
Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
The JobPhase alignment commit made PERSISTING_ARTIFACTS conditional on exports.oci being configured but removed the phase assertion from happy-path tests without adding coverage for the OCI-present path. Add test_oci_export_persists_artifacts to deepeval, inspect, lighteval, and mteb adapters verifying that the phase is emitted, create_oci_artifact is called with a valid files_path, and the artifact is attached to JobResults. Co-Authored-By: Claude <noreply@anthropic.com>
0c58dc0 to
81863d6
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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.
Inline comments:
In `@adapters/clear/main.py`:
- Around line 373-374: Move the JobStatusUpdate call that reports
JobStatus.RUNNING with JobPhase.LOADING_DATA to immediately after input
validation, before traversing /test_data or /data and enumerating JSON files.
Remove it from its current later position while preserving the existing status
payload.
In `@adapters/swebench/main.py`:
- Around line 165-170: Update the OCI export flow around _persist_oci_artifact
to pass config.exports.oci.coordinates through and use those configured
coordinates as the publication destination instead of creating a new
host/job-specific target. Make _persist_oci_artifact return the created
artifact, capture that return value at the caller, and include it in the
resulting JobResults.
In `@Makefile`:
- Around line 263-265: Recreate .venv when PYTHON_VERSION changes instead of
only checking whether the directory exists. Apply this update to the adapter
test recipes at Makefile lines 263-265, 272-274, 281-283, 290-292, 299-300,
310-311, 321-322, and 333-335, preserving the existing dependency installation
and pytest commands.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c13ad5e2-b54b-409d-80e9-56e567f25a6b
📒 Files selected for processing (15)
.gitignoreMakefileREADME.mdadapters/clear/main.pyadapters/deepeval/main.pyadapters/deepeval/tests/test_adapter.pyadapters/guidellm/main.pyadapters/inspect/main.pyadapters/inspect/tests/test_adapter.pyadapters/lighteval/main.pyadapters/lighteval/tests/test_adapter.pyadapters/mteb/main.pyadapters/mteb/tests/test_adapter.pyadapters/ragas/main.pyadapters/swebench/main.py
…oordinates Move CLEAR's LOADING_DATA status report to fire immediately after input validation, before directory traversal begins. Fix SWE-bench OCI export to use job-configured coordinates instead of hardcoded values, return the artifact result, and include it in JobResults. Co-Authored-By: Claude <noreply@anthropic.com>
What and why
Changes:
Closes # https://redhat.atlassian.net/browse/RHOAIENG-66845
Type
Testing
make testspassedTesting in local the new lighteval driver


Breaking changes
No
Summary by CodeRabbit