feat(core): adopt nunjucks eval templating#1597
Conversation
Deploying agentv with
|
| Latest commit: |
c654e97
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://36b0ed96.agentv.pages.dev |
| Branch Preview URL: | https://feat-av-kfik-4-templating.agentv.pages.dev |
|
Dogfood gate completed and pushed in The live dogfood initially exposed a real gap: target secret fields rejected Validation now passed:
Private evidence: |
Independent review findingsI reviewed PR #1597 at
|
|
Verified
Focused local validation passed:
GitHub CI for head |
Summary
AgentV eval files can now use Nunjucks as the shared templating language for per-case data and config-load environment values. Authors can render
{{ vars.foo }}, loops, filters, and customnunjucks_filtersin templated eval fields, while config env interpolation moves to{{ env.VAR }}/{{ env.VAR | default("x") }}without colliding with runtime shell$VARor${VAR}in CLI target commands.This also covers promptfoo-style row expansion for top-level string-array vars and renders chat-array prompt strings before parsing them into message arrays. The docs and examples now show the new
varsandenvnamespaces.Follow-up fix
c0b8f47cmakes target secret fields accept whole-value{{ env.* }}templates while still rejecting inline templated secrets such asBearer {{ env.API_KEY }}.Related: Bead av-kfik.4
Validation
git diff --checkbun --filter @agentv/core typecheckbun --filter @agentv/core lintbun run lintbun --filter @agentv/core buildbun --filter @agentv/core test(2128 pass)bun run validate:examples(62 valid)bun test packages/core/test/evaluation/providers/targets.test.ts packages/core/test/evaluation/interpolation.test.ts packages/core/test/evaluation/interpolation-integration.test.ts packages/core/test/evaluation/suite-level-input.test.ts(132 pass)bun run --cwd packages/core typecheckbun run --cwd packages/core lintbun run --cwd packages/core buildagentv validateagainst private dogfood eval + targets YAMLhttp://127.0.0.1:10531/v1, modelgpt-5.3-codex-spark: PASS 4/4, mean score 100%c0b8f47cPrivate evidence:
EntityProcess/agentv-private:evidence/av-kfik4-templatingatd945e7a, folderdogfood/target-env-templates/.Post-Deploy Monitoring & Validation
No additional production monitoring required. This is local/CI eval-loading behavior with no deployed service surface; validation should come from CI, the live dogfood run, and a release smoke using an eval file with
{{ vars.* }}, custom filters, array expansion, chat-array prompts, and{{ env.* }}config values.Failure signals: eval YAML that previously validated now fails during config loading, target secret fields unexpectedly reject whole-value
{{ env.* }}references, shell command targets unexpectedly lose$VAR/${VAR}literals, or custom filter imports fail in the packaged CLI runtime. Rollback trigger: revert this PR before release if CI or live dogfood finds a templating regression.