Repository navigation
Conversation
Tag the six local-stack evals with `area` and `journeyPhase`, so every cli-suite eval now carries both. Add the two keys as optional, closed-set fields on the eval metadata schema, which previously stripped them, and pass them through to exported results and Braintrust row metadata. Fixes CLI-2700
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
jgoux
left a comment
There was a problem hiding this comment.
Thanks for this. The six local-stack evals are tagged as described, and all 26 evals/cli prompts now carry enum-valid area/journeyPhase values. No other suite sets these keys, so nothing else starts failing validation. The fields reach eval-results.json and Braintrust metadata, and the core and framework tests for this change pass, as does pnpm -r typecheck.
There's one small inline consistency note; it doesn't block merging. One FYI: fetch-braintrust.ts only assembles benchmark-suite rows today, so its new area/journey_phase mapping won't show up for CLI evals until that fetcher covers the cli suite.
On your two questions: a closed area enum fits how topic works, and widening it when a second suite needs areas seems fine. A separate journeyPhase field next to stage makes sense because the two sets don't line up.
| area: promptData?.area, | ||
| journeyPhase: promptData?.journeyPhase, |
There was a problem hiding this comment.
P3 (non-blocking): these two fields only come from promptData, but stage/product/topic/suite/interface above all fall back to the recorded result. The result file does record these tags now: run-eval.ts writes ...ev.metadata into result.json, and rawEvalResultSchema keeps area/journeyPhase.
So if a saved result is exported after its PROMPT.md is deleted or renamed (readPrompt() returns undefined), its tags are dropped silently while its stage and topic survive. The same gap exists in upload-braintrust.ts (area: promptData?.area, journey_phase: promptData?.journeyPhase).
The normal CI path isn't affected, because export and upload run in the same checkout as the eval run. Suggest matching the neighbouring fields for consistency:
area: promptData?.area ?? parsedResult.area,
journeyPhase: promptData?.journeyPhase ?? parsedResult.journeyPhase,(and ?? result.area / ?? result.journeyPhase in the upload row), plus an export test where only the recorded result carries the tags.
There was a problem hiding this comment.
good shout, thanks! both now fall back to the recorded result in export-results.ts and upload-braintrust.ts, with an export test where only the result carries the tags
Current Behavior
19 of the 25
clievals already setareaandjourneyPhasein theirPROMPT.mdfrontmatter, but the six original local-stack evals don't.evalFrontmatterSchemaalso strips both keys, so none of them reach the exported results or Braintrust, and the coverage grid and dashboard have nothing to slice by.Expected Behavior
area: local-stacks. The fourbuild-*evals arejourneyPhase: designand the tworesolve-*evals arejourneyPhase: resolve. Everyclieval now carries both keys.areaandjourneyPhaseare optional, closed-set fields on the eval metadata schema, normalised the same way asstage/topic:journeyPhase: the KPI 2 phasesdesign,deploy,observe,detect,resolve. These don't matchstage, which is why it's a separate field.area: the 10 CLI areas from the coverage grid.eval-results.json(viatoEvalResult), to Braintrust row metadata asarea/journey_phase, and back out offetch-braintrust.ts.A couple of things I'd like a second opinion on from the AI team, since this touches
packages/coreandapps/framework:areaa closed enum liketopic, because it catches typos. It's CLI-specific at the minute though, so if another suite wants areas later it'd need extending. Happy to loosen it to a string, or rename it to something likecliArea, if you'd prefer.journeyPhasefield" we asked about. If you'd rather own the shape of it, I'm more than happy to adjust 🙂The new fields will only show up in Braintrust and the published results once this merges and the next CLI run uploads.
Related Issue(s)
Fixes CLI-2700