feat(ai-builder): Push agent intent eval cases from data/agents and drop synced case files (no-changelog)#34957
feat(ai-builder): Push agent intent eval cases from data/agents and drop synced case files (no-changelog)#34957JoseBra wants to merge 1 commit into
Conversation
…rop synced case files (no-changelog) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
PR review overviewBased on ownership of the 46 changed files in this PR:
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
No issues found across 46 files
Architecture diagram
sequenceDiagram
participant Dev as Developer
participant CLI as eval CLI
participant LoadWf as Loader (workflows)
participant LoadAg as Loader (agents)
participant Git as Git Repo
participant LTRClient as LangTracer Client
participant LTRAPI as LangTracer API
Note over Dev,LTRAPI: Flow A: eval:langtracer-push (upsert cases)
Dev->>CLI: pnpm eval:langtracer-push --suite agents --tier agents --dry-run(optional)
CLI->>LoadWf: loadWorkflowTestCasesWithFiles(filter, exclude)
LoadWf-->>CLI: workfow cases + fileSlugs
CLI->>LoadAg: loadAgentEvalTestCasesWithFiles(filter, exclude)
LoadAg-->>CLI: agent cases + fileSlugs
CLI->>CLI: Detect duplicate slugs across both dirs
alt Duplicate slug found
CLI-->>Dev: Error: duplicate case slug(s)
else No duplicates
CLI->>CLI: Apply --tier filter (datasets.includes("agents"))
alt --changed flag set
CLI->>Git: git status --porcelain (data/workflows/ + data/agents/)
Git-->>CLI: modified/new/untracked .json paths
CLI->>CLI: Intersect changed slugs
end
alt --dry-run
CLI-->>Dev: Print selected cases, stop
else Real push
CLI->>LTRClient: upsert suite with case payloads
LTRClient->>LTRAPI: POST /api/v1/suites/:id/export
LTRAPI-->>LTRClient: Success
LTRClient-->>CLI: Upsert results
CLI-->>Dev: Done
end
end
Note over Dev,LTRAPI: Flow B: eval:agents (run from LangTracer)
Dev->>CLI: pnpm eval:agents (source langtracer, suite agents, tier agents)
CLI->>LTRClient: GET suite export (agents)
LTRClient->>LTRAPI: GET /api/v1/suites/:id/export
LTRAPI-->>LTRClient: Suite data with 42 cases
LTRClient-->>CLI: Parsed EvalTestCase array
CLI->>CLI: Filter by tier "agents"
CLI-->>Dev: Run evaluations (no local file read)
Instance AI Discovery Eval ✅Branch: Eval output |
Instance AI Workflow EvalImportant This eval does not re-run on new commits. To test your latest push, re-run it against the PR head: gh workflow run ci-instance-ai-evals.yml -f pr=34957…or use the Run workflow button and set pr = Caution 🔴 1 of 21 units not green over 3 runs. Gate: pass@k = 100% (every unit passes at least once across k runs) — 92.1% pass (58/63 trials over 21 units · k=3) pass@3 95.2% · pass^3 88.5% · LangSmith experiment Failures (3)
Per-test-case results (7)
Workflow checksScored over 21 successful build(s). N/A = check did not apply to that workflow. Error = check could not be measured (e.g. judge timeout).
All workflow checks (3 failing of 34 checks)
|
Summary
The agents-team eval corpus now lives fully in the LangTracer
agentssuite (42 cases: 8 agent-artifact + 34 intent-resolution). This PR makes the tooling and the repo reflect that:eval:langtracer-pushnow loadsdata/agents/too (previouslydata/workflows/only): both directories feed the same upsert planner,--changeddetects case edits in either, and a duplicate-slug guard refuses ambiguous selections across the two dirs.pnpm eval:agentsto--source langtracer --suite agents --tier agentsso the command keeps selecting the intent subset now that the corpus is remote.data/agents/index.tsheader updated: both data dirs are authoring scratch (author → calibrate → push → delete); only seeded carve-outs are committed.How to test
From
packages/@n8n/instance-aiwithLANGTRACER_URL/LANGTRACER_API_KEYset:# planner sees both dirs; everything already synced reads as unchanged/none selected pnpm eval:langtracer-push --suite agents --tier agents --dry-runIntent cases require a backend with
N8N_ENABLED_MODULES=instance-ai,agentsto run end-to-end (pnpm eval:agents --base-url ...).Related Linear tickets, Github issues, and Community forum posts
Follow-up to the TRUST-268 agents suite work.
Review / Merge checklist
Backport to Beta,Backport to Stable, orBackport to v1(if the PR is an urgent fix that needs to be backported)🤖 PR Summary generated by AI
🤖 Generated with Claude Code