Skip to content

feat(config): flatten results.export.* to results.*#1258

Merged
christso merged 1 commit into
mainfrom
flatten-results-config
May 21, 2026
Merged

feat(config): flatten results.export.* to results.*#1258
christso merged 1 commit into
mainfrom
flatten-results-config

Conversation

@christso
Copy link
Copy Markdown
Collaborator

Summary

The results.export.* schema in .agentv/config.yaml is redundant nesting — results has exactly one sibling (export), so results.export.{repo,path,auto_push,branch_prefix} carries no information that flat results.{repo,path,auto_push,branch_prefix} wouldn't. The export name is also misleading: the same block governs sync/read of the cached clone, not just push.

This PR flattens the schema.

Before:

results:
  export:
    repo: EntityProcess/agentv-evals
    path: runs
    auto_push: true

After:

results:
  repo: EntityProcess/agentv-evals
  path: runs
  auto_push: true

Why now

  • Schema is undocumented outside of the studio docs page (apps/web/src/content/docs/docs/tools/studio.mdx) and not used by any committed .agentv/config.yaml (template, example, or root). The introducing PR (feat(results): export remote runs and sync Studio #994) had no example file either. Flattening is free now, painful later.
  • PR feat(results): export remote runs and sync Studio #994 body and commit messages treat results.export as a single feature, not a namespace. No sibling under results was planned or implemented.
  • Sibling shape execution.* is flat (execution.trace_file, execution.otel_file) — flat results.* matches that convention.

Changes

Renames (internal):

  • ResultsExportConfigResultsConfig
  • normalizeResultsExportConfignormalizeResultsConfig
  • parseResultsExportConfig is inlined into parseResultsConfig.

Schema:

  • parseResultsConfig (packages/core/src/evaluation/loaders/config-loader.ts) reads repo/path/auto_push/branch_prefix directly off results.
  • validateConfig (packages/core/src/evaluation/validation/config-validator.ts) drops the nested export layer; error locations are now results.repo, results.path, etc.

Consumers:

  • apps/cli/src/commands/results/remote.tsconfig.results.exportconfig.results.
  • Studio user-facing copy (apps/studio/src/components/RunSourceToolbar.tsx, apps/studio/src/routes/index.tsx) updated to mention results instead of results.export.

Tests: YAML fixtures flattened in config-loader.test.ts, config-validator.test.ts, and apps/cli/test/commands/results/serve.test.ts (2 places).

Docs: apps/web/src/content/docs/docs/tools/studio.mdx example updated.

Breaking change

Existing .agentv/config.yaml files using results.export.{repo,path,...} will silently stop being detected (validator will warn that results.repo is missing). No backward-compat shim is shipped — the schema is undocumented and (per my knowledge) not yet in use.

Verification

  • bun --filter @agentv/core test → 1774 pass, 0 fail
  • bun --filter agentv test → 548 pass, 0 fail
  • bun --filter @agentv/core typecheck → clean
  • bun --filter agentv typecheck → clean
  • bunx tsc -p apps/studio/tsconfig.json --noEmit → clean
  • bun run lint → clean
  • Pre-push hook (lint + test + eval YAML validation) passed

Test plan

  • Confirm CI build / lint / test pass
  • Reviewer sanity-check that no in-flight branch has a .agentv/config.yaml using results.export.*
  • (Optional) Quick smoke: set results.repo/results.path locally, run agentv eval, verify auto-push or Studio /api/remote/status still works

🤖 Generated with Claude Code

….yaml

The `results` block currently only contains `export` as a single sibling,
so `results.export.{repo,path,auto_push,branch_prefix}` carries no information
that flat `results.{repo,path,auto_push,branch_prefix}` wouldn't. The `export`
name was also misleading — the same config governs sync/read (the cached
clone), not just push.

Rename:
- `ResultsExportConfig` → `ResultsConfig`
- `normalizeResultsExportConfig` → `normalizeResultsConfig`

Inline `parseResultsExportConfig` into `parseResultsConfig`. Flatten the
validator and all test fixtures, docs, and Studio user-facing copy.

Breaking change: configs using `results.export.{repo,path,...}` must move
to `results.{repo,path,...}`. The config is undocumented elsewhere and
zero committed examples used it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@christso christso merged commit 30331c0 into main May 21, 2026
4 checks passed
@christso christso deleted the flatten-results-config branch May 21, 2026 05:59
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.

1 participant