Repository navigation
Conversation
Switch run() from unconditional POST …/evaluations to GET → POST|PATCH
on …/offline-evaluations with required key+name. Reuse stable keys across
CI; patch a full config snapshot when desired state drifts. Runs remain
under …/evaluations/{id}/runs until nested routes ship.
Co-authored-by: doneill <doneill@launchdarkly.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 64b20b6. Configure here.
| for field in ("parameters", "promptSnippets"): | ||
| if field not in desired and current.get(field) not in (None, {}): | ||
| return False | ||
| return True |
There was a problem hiding this comment.
Config match treats extras as drift
Medium Severity
_evaluation_config_matches compares GET payloads to the harness wire objects with exact !=. LaunchDarkly injects successDirection onto judge criteria at create time, and GET bodies can also add ids or other server fields on criteria, tools, or messages. A semantically unchanged config then looks different, so every later run() with judges PATCHes and bumps version instead of taking the documented no-op path.
Reviewed by Cursor Bugbot for commit 64b20b6. Configure here.
|
|
||
| path = f"projects/{segment(project_key)}/evaluations" | ||
| raw = require_mapping(self._api.post(path, body=body), description="evaluation") | ||
| return body |
There was a problem hiding this comment.
PATCH omits emptied config fields
Medium Severity
_evaluation_config_body drops empty tools, criteria, parameters, and promptSnippets from the PATCH snapshot, while _evaluation_config_matches treats those omissions as “must be empty on the server” and triggers a PATCH. messages is always sent, including as []. A later run() that removes judges, tools, or parameters therefore PATCHes a body that does not name the fields being cleared, so stale config can remain and every following run PATCHes again.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 64b20b6. Configure here.


Overview
Implements the SDK side of the idempotent offline-eval create plan (
docs/idempotent-eval-create.md).run(key=…)now reconciles via public…/offline-evaluations:…/offline-evaluations/{key}key+name(name defaults to key); on 409 race, re-GET and continue…/evaluations/{id}/runs(runs stay on the legacy by-id prefix until nested offline-evaluations runs ship server-side)No PUT. Legacy
POST …/evaluationscreate-always remains on the server for SDK 1.0 clients; this release no longer calls it.Depends on server stack: ai-evaluator#922 (schema), ai-evaluator#923 (API).
Contract update: companion draft on
ai-sdks-monorepoforTESTING.md§8.4–§8.5.Version / docs
>=1.1.0for this reconcile behavior (release-please will bump fromfeat(evaluations):on merge).key="support-qa"instead of timestamp-suffixed keys.Testing strategy
265 passed, including new coverage for:
LDApiClient.patchJSON bodyOther
Out of scope here: moving runs/summary/upload under
…/offline-evaluations/{id}/…(server follow-on); soft-hide null-key UI; Mintlify docs.