🔨 chore: add agent eval experiment schema#14990
Conversation
|
@cy948 is attempting to deploy a commit to the LobeHub OSS Team on Vercel. A member of the Team first needs to authorize it. |
|
@nekomeowww @arvinxx - This PR adds the agent eval experiment schema with database migrations and schema changes under |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## canary #14990 +/- ##
========================================
Coverage 66.39% 66.39%
========================================
Files 2995 2995
Lines 266178 266178
Branches 26337 27244 +907
========================================
+ Hits 176737 176742 +5
+ Misses 89278 89273 -5
Partials 163 163
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 81f283318d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| ALTER TABLE "agent_eval_runs" DROP CONSTRAINT IF EXISTS "agent_eval_runs_experiment_id_agent_eval_experiments_id_fk";--> statement-breakpoint | ||
| ALTER TABLE "agent_eval_runs" ADD CONSTRAINT "agent_eval_runs_experiment_id_agent_eval_experiments_id_fk" FOREIGN KEY ("experiment_id") REFERENCES "public"."agent_eval_experiments"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint | ||
| ALTER TABLE "agent_eval_runs" DROP CONSTRAINT IF EXISTS "agent_eval_runs_parent_run_id_agent_eval_runs_id_fk";--> statement-breakpoint | ||
| ALTER TABLE "agent_eval_runs" ADD CONSTRAINT "agent_eval_runs_parent_run_id_agent_eval_runs_id_fk" FOREIGN KEY ("parent_run_id") REFERENCES "public"."agent_eval_runs"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint |
There was a problem hiding this comment.
Allow deleting parent eval runs
Defining agent_eval_runs.parent_run_id with ON DELETE no action makes deleteRun fail whenever the target run has child runs. The existing deletion flow (AgentEvalRunService.deleteRun → runModel.delete(id)) assumes a single run can always be removed, so once parent_run_id is populated this introduces runtime FK violations and prevents users from deleting parent runs (and from reaching the orphan-topic cleanup path). Use a non-blocking policy such as ON DELETE set null (or explicit child cleanup) for this self-reference.
Useful? React with 👍 / 👎.
…tables (#15126) 🔨 chore(db): combine llm_generation_tracing and agent eval experiment tables into 0103 Merges the schema work from #14990 with the new llm_generation_tracing table into a single idempotent 0103 migration so the two streams can land together without a migration-number conflict. Also adds user_id (FK + index) to agent_eval_experiment_benchmarks so the junction table is scoped per user, matching agent_eval_run_topics. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
💻 Change Type
🔗 Related Issue
🔀 Description of Change
🧪 How to Test
📸 Screenshots / Videos
📝 Additional Information