Skip to content

feat(core): support env interpolation across all config string fields#510

Merged
christso merged 5 commits intomainfrom
feat/506-env-interpolation
Mar 9, 2026
Merged

feat(core): support env interpolation across all config string fields#510
christso merged 5 commits intomainfrom
feat/506-env-interpolation

Conversation

@christso
Copy link
Copy Markdown
Collaborator

@christso christso commented Mar 9, 2026

Summary

Closes #506

  • Adds centralized ${{ VAR }} interpolation across all YAML/JSONL config string fields
  • New interpolateEnv() function recursively walks parsed objects and replaces ${{ VAR }} patterns
  • Applied after YAML/JSONL parsing at every entry point: eval files, external case files, workspace configs, sidecar metadata
  • Missing variables resolve to empty string (GitHub Actions convention); field validation catches blanks downstream
  • Supports both full-value (${{ VAR }}) and partial/inline (prefix/${{ VAR }}/suffix) interpolation

Files changed

  • packages/core/src/evaluation/interpolation.ts — new module with interpolateEnv()
  • packages/core/src/evaluation/yaml-parser.ts — integration at 3 parse points
  • packages/core/src/evaluation/loaders/case-file-loader.ts — integration for external YAML/JSONL
  • packages/core/src/evaluation/loaders/jsonl-parser.ts — integration for top-level JSONL + sidecar
  • packages/core/test/evaluation/interpolation.test.ts — 13 unit tests
  • packages/core/test/evaluation/interpolation-integration.test.ts — 7 integration tests
  • apps/web/src/content/docs/evaluation/eval-files.mdx — docs
  • plugins/agentv-dev/skills/agentv-eval-builder/SKILL.md — AI skill reference

Test plan

  • Unit tests for interpolateEnv (13 tests: replacement, partial, missing vars, recursion, immutability, edge cases)
  • Integration tests through loadTests() (7 tests: criteria, workspace, external workspace, external YAML, external JSONL, passthrough, missing vars)
  • Full test suite regression (1,167 tests pass, 0 failures)
  • Build, typecheck, lint all pass

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 9, 2026

Deploying agentv with  Cloudflare Pages  Cloudflare Pages

Latest commit: 18cedbc
Status: ✅  Deploy successful!
Preview URL: https://a5727a55.agentv.pages.dev
Branch Preview URL: https://feat-506-env-interpolation.agentv.pages.dev

View logs

christso and others added 4 commits March 9, 2026 10:26
)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@christso christso merged commit eba29c4 into main Mar 9, 2026
1 check passed
@christso christso deleted the feat/506-env-interpolation branch March 9, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support env interpolation consistently across all config string fields

1 participant