feat(eval): ondemand simulate — replay a dataset, evaluate synchronously - #2071
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## refactor #2071 +/- ##
============================================
+ Coverage 97.14% 97.16% +0.02%
============================================
Files 494 495 +1
Lines 32550 32676 +126
============================================
+ Hits 31622 31751 +129
+ Misses 928 925 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
jariy17
force-pushed
the
feat/eval-ondemand-simulate
branch
from
August 22, 2026 16:23
634f6f9 to
94a16ac
Compare
jariy17
force-pushed
the
feat/eval-ondemand-simulate
branch
from
August 27, 2026 20:53
94a16ac to
623bbfc
Compare
Contributor
|
Claude Security Review: no high-confidence findings. (run) |
jariy17
marked this pull request as ready for review
August 27, 2026 21:16
Contributor
|
Claude Security Review: no high-confidence findings. (run) |
jariy17
force-pushed
the
feat/eval-ondemand-simulate
branch
from
August 27, 2026 21:17
ec6636c to
f6776cc
Compare
Contributor
|
Claude Security Review: no high-confidence findings. (run) |
jariy17
force-pushed
the
feat/eval-ondemand-simulate
branch
from
August 27, 2026 21:20
f6776cc to
c29ad31
Compare
Contributor
|
Claude Security Review: no high-confidence findings. (run) |
jariy17
pushed a commit
that referenced
this pull request
Aug 31, 2026
… expectedResponse as a reference input Addresses review on #2071: swap the hand-rolled SIGINT/AbortController for the shared withUserCancellation helper, and include per-turn expectedResponse in the Evaluate reference inputs so an expected-response-only dataset still contributes ground truth.
jariy17
force-pushed
the
feat/eval-ondemand-simulate
branch
from
August 31, 2026 15:47
1b0ca37 to
2c20882
Compare
Contributor
|
Claude Security Review: no high-confidence findings. (run) |
added 6 commits
August 31, 2026 17:17
…ms, failures/sessions)
… expectedResponse as a reference input Addresses review on #2071: swap the hand-rolled SIGINT/AbortController for the shared withUserCancellation helper, and include per-turn expectedResponse in the Evaluate reference inputs so an expected-response-only dataset still contributes ground truth.
…late turn→traceId) Bug bash against a live agent showed the Evaluate API rejects expectedResponse under a session-only context. Correlate each turn's expectedResponse to its trace id instead, and extend the fixture golden dataset with an expected_response turn graded by Builtin.Correctness so the real Evaluate call validates the mapping at record time.
…fix stale-trace pollution)
jariy17
force-pushed
the
feat/eval-ondemand-simulate
branch
from
August 31, 2026 17:18
2c20882 to
0cfacfe
Compare
Contributor
|
Claude Security Review: no high-confidence findings. (run) |
notgitika
approved these changes
Aug 31, 2026
nborges-aws
reviewed
Aug 31, 2026
| ), | ||
| flag("header", "an ordered application header (repeatable)", z.array(z.string()).optional()), | ||
| flag( | ||
| "bearer-token", |
Contributor
There was a problem hiding this comment.
this and --header should be marked sensitive
jariy17
pushed a commit
that referenced
this pull request
Aug 31, 2026
Follow-up to #2071. These flags carry secrets (CUSTOM_JWT bearer token, auth headers) but were logged in cleartext by the withLogging debug middleware. The canonical 'runtime invoke' handler already marks both sensitive; apply the same to the on-demand and batch-evaluation simulate handlers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
eval ondemand simulate— replay a dataset against a runtime, then evaluate the sessions synchronously, client-side (scores print inline). The on-demand twin ofbatch-evaluation simulate.Pipeline:
invokeDataset(replay) →getTracesForAgent(CloudWatch) →evaluate(Evaluate API).Follows the batch-evaluation simulate pattern
--ingestion-wait-ms(default 180000; 0 to skip)invokeDatasetcompositionfailures[0])sessions[](exampleId ↔ sessionId) +failures[]Differs by design: no
--name/--kms-key-arn(no async job); output is inline scores, not a job id.Output
{ "sessionsEvaluated": 1, "results": [ { "evaluatorId": "Builtin.Helpfulness", "value": 0.83, "label": "Very Helpful", "explanation": "…", "tokenUsage": {…} } ], "examplesInvoked": 1, "examplesFailed": 0, "sessions": [ { "exampleId": "greet", "sessionId": "…" } ], "failures": [] }Tests (batch pattern)
ondemand.test.tsx(TestCoreClient): required-flag validation, refuse-when-nothing-invoked,--ingestion-wait-mspassthrough.ondemand.fixture.test.tsx: real invoke → CloudWatch traces → Evaluate, recorded against a live agent, replayed offline viamatchGolden. Deterministic via the injectednewSessionIdseam plus anow()clock seam — on-demand's trace-query window is otherwiseDate.now()-based, so itsStartQueryfixture key would drift between record and replay (batch has no client query;evaluatepins an explicit--start-time/--end-time).Notes
ignoredReferenceInputFields); the handler still forwards them (adapter exercised).refactor(was stacked on the pre-merge batch-simulate work).