Skip to content

fix(evaluator): derived --config, region fallback, base-id regex, llm-context - #2027

Merged
jariy17 merged 2 commits into
Dervived_evaluatorsfrom
derived_fixes
Aug 18, 2026
Merged

fix(evaluator): derived --config, region fallback, base-id regex, llm-context#2027
jariy17 merged 2 commits into
Dervived_evaluatorsfrom
derived_fixes

Conversation

@jariy17

@jariy17 jariy17 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Follow-up fixes from the derived-evaluators bug bash (P2/P3), stacked on Dervived_evaluators.

Fixes

  1. P2 — --config for derived--type derived --config x.json demanded --base-evaluator-id, and explicit derived flags + a nonexistent --config silently ignored the file. Cause: the derived arm ran before the config loader. Now --config is rejected for --type derived with a clear message (use --base-evaluator-id + --model).
  2. P2 — profile-only region — auto-level lookup failed on a fresh project (empty aws-targets.json) when the region came only from the AWS profile. resolveAWSDeploymentTargets() maps over an empty array and drops the fallback. Now uses ConfigIO.resolveRegionFallback() (made public) which returns the scalar env→profile fallback.
  3. P3 — loose base-id regexBASE_EVALUATOR_ID_PATTERN accepted malformed ids (ThirdParty.DeepEval, ThirdParty..ToolUse, ThirdParty.DeepEval.) which --level then persisted. Tightened to Builtin.<Metric> / ThirdParty.<Provider>.<Metric>.
  4. P3 — stale .llm-contextllm-compacted schema still described config as llmAsAJudge | codeBased; synced in the derived arm so generated project guidance matches runtime Zod.

Verification

  • Typecheck clean (pre-existing agentcore-control.ts:546 SDK-model error unrelated).
  • Evaluator schema + primitive unit tests pass.
  • Behavioral smokes: --type derived --config → rejected; ThirdParty.DeepEval (+--level) → rejected; valid derived still writes correct config.

…egex, llm-context

Follow-up fixes from the derived bug bash:
- Reject --config with --type derived instead of silently ignoring it (the
  derived arm ran before the config loader).
- Resolve the base metric's region via ConfigIO.resolveRegionFallback so a
  profile-only region works on a fresh project with no saved deploy targets
  (the old path mapped over an empty targets array and dropped the fallback).
- Tighten BASE_EVALUATOR_ID_PATTERN to Builtin.<Metric> / ThirdParty.<Provider>.<Metric>;
  rejects malformed ids (ThirdParty.DeepEval, ThirdParty..ToolUse, trailing dot)
  that --level previously let through.
- Sync llm-compacted schema so generated project guidance includes the derived arm.
@github-actions github-actions Bot added agentcore-harness-reviewing AgentCore Harness review in progress and removed agentcore-harness-reviewing AgentCore Harness review in progress labels Aug 18, 2026
resolveRegionFallback already checks env vars first and returns undefined
rather than throwing (it's called bare in resolveAWSDeploymentTargets), so the
catch that re-read the env vars was dead.
@jariy17
jariy17 merged commit 5faa177 into Dervived_evaluators Aug 18, 2026
2 checks passed
@jariy17
jariy17 deleted the derived_fixes branch August 18, 2026 21:56
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.

2 participants