Skip to content

fix(harness): resolve memorySpec by deployed ARN for arn-only memory refs#1407

Merged
jesseturner21 merged 3 commits into
mainfrom
fix/ltm-harness-arn-resolve
May 28, 2026
Merged

fix(harness): resolve memorySpec by deployed ARN for arn-only memory refs#1407
jesseturner21 merged 3 commits into
mainfrom
fix/ltm-harness-arn-resolve

Conversation

@jesseturner21
Copy link
Copy Markdown
Contributor

Summary

  • When a harness references memory by ARN only (no name field), resolveMemorySpec now walks deployedResources.memories to match by ARN and find the corresponding projectSpec memory
  • Without this fix, ARN-only memory refs silently omit retrievalConfig and exclude the memory from configHash
  • Exports HarnessMemoryRef from the schema barrel for use as the explicit parameter type

Cherry-picked from #1374 (third commit, missing from the feature-flag consolidation PR).

Related Issue

Closes #1097

Test plan

  • Unit tests for ARN-match path (resolves memorySpec by deployed ARN when memory.name is absent)
  • Unit test for undefined fallback for genuinely external memories
  • npm run typecheck passes
  • All existing harness-deployer tests continue to pass (17/17)

…refs

When a harness references memory by ARN only (no name field), the previous
lookup returned undefined, silently omitting retrievalConfig and excluding
the memory from the configHash. resolveMemorySpec now walks
deployedResources.memories to match by ARN and find the corresponding
projectSpec memory, so name-less refs that point at a CLI-managed memory
get the same treatment as name-based refs.

HarnessMemoryRef is exported from the schema barrel so it can be used as
the explicit parameter type on resolveMemorySpec.

Adds unit tests for both the ARN-match path and the intentional undefined
fallback for genuinely external memories.
@jesseturner21 jesseturner21 requested a review from a team May 28, 2026 13:25
@github-actions github-actions Bot added the size/m PR size: M label May 28, 2026
@github-actions github-actions Bot added the agentcore-harness-reviewing AgentCore Harness review in progress label May 28, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label May 28, 2026
@github-actions github-actions Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label May 28, 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 May 28, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Package Tarball

aws-agentcore-0.15.0.tgz

How to install

gh release download pr-1407-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-0.15.0.tgz

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 28, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 34.96% 10674 / 30529
🔵 Statements 34.32% 11343 / 33044
🔵 Functions 30% 1815 / 6049
🔵 Branches 29.01% 6751 / 23266
Generated in workflow #3368 for commit 8eb61a1 by the Vitest Coverage Report Action

…rdown test

The harness deletion can end in DELETE_FAILED due to backend issues
unrelated to the CLI teardown logic. The e2e test should verify the
deletion was attempted, not that the backend successfully completed it.
@github-actions github-actions Bot removed the size/m PR size: M label May 28, 2026
@github-actions github-actions Bot added the size/m PR size: M label May 28, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label May 28, 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 May 28, 2026
The IAM permission fix (adding DeleteAgentRuntimeEndpoint) addresses
the root cause. The e2e test should still fail on DELETE_FAILED to
catch real issues.
@github-actions github-actions Bot added size/m PR size: M and removed size/m PR size: M labels May 28, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label May 28, 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 May 28, 2026
@jesseturner21 jesseturner21 merged commit ddca71b into main May 28, 2026
28 checks passed
@jesseturner21 jesseturner21 deleted the fix/ltm-harness-arn-resolve branch May 28, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Long-term memory for Harness with actor ID not propagating

2 participants