Skip to content

feat: wire observability client to harness and evals - #2182

Merged
nborges-aws merged 5 commits into
refactorfrom
harness-and-eval-wiring
Sep 4, 2026
Merged

feat: wire observability client to harness and evals#2182
nborges-aws merged 5 commits into
refactorfrom
harness-and-eval-wiring

Conversation

@nborges-aws

@nborges-aws nborges-aws commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Description

Extend shared observability abstraction to Batch Evaluation and Harness. Plus, add endpoint qualifier support to Runtime observability commands.

  • adds log stream reader to the shared CloudWatch client using GetLogEvents
  • moves CloudWatch logic hosted in batch eval stream (e.g. pagination, normalization) to the shared CloudWatch client
  • resolves Harness resources to their underlying Runtime IDs for observability
  • reuse Harness runtime resolution in existing Eval agent resolution
  • adds harness logs and harness traces list/get functionality
  • adds optional --qualifier flag to Runtime and Harness (falls back to default endpoint)
  • updates shared trace output handling and test coverage for CloudWatch, Eval, Harness, and Runtime wiring

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe):

Testing

How have you tested the change?

  • bun run test (2809 pass, 0 fail)
  • I ran npm run test:unit and npm run test:integ
  • I ran npm run typecheck
  • I ran npm run lint
  • If I modified src/assets/, I ran npm run test:update-snapshots and committed the updated snapshots

Stack created with GitHub Stacks CLIGive Feedback 💬

@github-actions github-actions Bot added the size/xl PR size: XL label Sep 3, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the agentcore-harness-reviewing AgentCore Harness review in progress label Sep 3, 2026
@nborges-aws
nborges-aws force-pushed the harness-and-eval-wiring branch from 648c527 to 7c4f499 Compare September 3, 2026 16:16
@github-actions github-actions Bot added size/l PR size: L and removed size/xl PR size: XL labels Sep 3, 2026
@agentcore-devx-automation agentcore-devx-automation Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Sep 3, 2026
@codecov-commenter

codecov-commenter commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.08065% with 37 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.97%. Comparing base (3fcf406) to head (cadd0ae).

Files with missing lines Patch % Lines
src/handlers/harness/logs/index.tsx 44.11% 19 Missing ⚠️
src/handlers/harness/traces/get/index.tsx 65.38% 9 Missing ⚠️
src/handlers/harness/traces/list/index.tsx 62.50% 9 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           refactor    #2182      +/-   ##
============================================
- Coverage     97.05%   96.97%   -0.09%     
============================================
  Files           555      559       +4     
  Lines         38386    38581     +195     
============================================
+ Hits          37254    37412     +158     
- Misses         1132     1169      +37     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot added size/l PR size: L and removed size/l PR size: L labels Sep 3, 2026
@nborges-aws
nborges-aws force-pushed the harness-and-eval-wiring branch from 7c4f499 to 9564d5a Compare September 3, 2026 17:21
@github-actions github-actions Bot added size/l PR size: L and removed size/l PR size: L labels Sep 3, 2026
@nborges-aws
nborges-aws force-pushed the harness-and-eval-wiring branch from 9564d5a to cbc10fc Compare September 3, 2026 18:03
@github-actions github-actions Bot added size/l PR size: L and removed size/l PR size: L labels Sep 3, 2026
@nborges-aws
nborges-aws force-pushed the harness-and-eval-wiring branch from cbc10fc to 6c2d90f Compare September 3, 2026 19:35
@github-actions github-actions Bot added size/l PR size: L and removed size/l PR size: L labels Sep 3, 2026
@nborges-aws
nborges-aws force-pushed the harness-and-eval-wiring branch from 6c2d90f to d95292b Compare September 3, 2026 20:12
@github-actions github-actions Bot added size/l PR size: L and removed size/l PR size: L labels Sep 3, 2026
@nborges-aws
nborges-aws force-pushed the harness-and-eval-wiring branch from d95292b to 45e3cb9 Compare September 3, 2026 20:24
@github-actions github-actions Bot added size/l PR size: L and removed size/l PR size: L labels Sep 3, 2026
@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 4, 2026
@nborges-aws
nborges-aws force-pushed the harness-and-eval-wiring branch from 8252f2f to 23e3d01 Compare September 4, 2026 16:49
@github-actions github-actions Bot added size/l PR size: L and removed size/l PR size: L labels Sep 4, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Sep 4, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 4, 2026
jariy17
jariy17 previously approved these changes Sep 4, 2026

@jariy17 jariy17 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@Hweinstock Hweinstock left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few questions, mostly looks good.

if (config.output) return resolve(cwd, config.output);
return resolve(cwd, `${config.traceId}.json`);
}
export { resolveTraceOutputPath } from "../../observability/traceOutputPath";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whats the purpose of re-exporting here? Could we migrate consumers to the new path?

flags: harnessFlags,
read: async (ctx, flags, query, signal) => {
const options = coreOptsFromCtx(ctx);
const runtime = await core.harness.resolveRuntime(flags.id, options, signal);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very clean and simple!

Comment thread src/core/harness.test.ts
});
});

describe("HarnessClient.resolveRuntime", () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we be using the fixtures here?

Comment thread src/core/eval.tsx Outdated
private readonly now: () => number = () => Date.now(),
) {}
) {
this.cloudWatch = new CloudWatchClient(clients);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason we don't instantiate this here

this.observability = new ObservabilityClient(this, {
, and inject it?

If a future client also wants to consume the CloudWatchClient, we would end up with two instances of the class, which I don't think we want.

@nborges-aws
nborges-aws force-pushed the harness-and-eval-wiring branch from 23e3d01 to 41172a4 Compare September 4, 2026 18:23
@github-actions github-actions Bot added size/l PR size: L and removed size/l PR size: L labels Sep 4, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Sep 4, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 4, 2026
@nborges-aws
nborges-aws force-pushed the harness-and-eval-wiring branch from 41172a4 to cadd0ae Compare September 4, 2026 18:25
@github-actions github-actions Bot added size/l PR size: L and removed size/l PR size: L labels Sep 4, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Sep 4, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 4, 2026
@nborges-aws
nborges-aws merged commit 1445639 into refactor Sep 4, 2026
17 checks passed
@nborges-aws
nborges-aws deleted the harness-and-eval-wiring branch September 4, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/l PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants