Skip to content

feat(templates): wire in memory to the runtime templates - #2116

Draft
Hweinstock wants to merge 3 commits into
aws:refactorfrom
Hweinstock:memory-in-templates
Draft

feat(templates): wire in memory to the runtime templates#2116
Hweinstock wants to merge 3 commits into
aws:refactorfrom
Hweinstock:memory-in-templates

Conversation

@Hweinstock

@Hweinstock Hweinstock commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Dependent on #2099 (ignore this until that is merged)

Problem

Memory is currently hardcoded to none. The old CLI defaulted to a real memory, and allowed none | longAndShort | short options.

Solutions

  • mirror old CLI arguments for memory with the same default.
  • wire that memory through to the template resolver.
  • refactor the fsTreeNode asset resolver to accept transformations and filters for added flexibility.

Testing

  • created a project with the memory template then deployed, verified the project and my cdk stack included a memory. Also verified the memory code was included in the asset rendering.
  • unit tests!

@github-actions github-actions Bot added size/xl PR size: XL and removed size/xl PR size: XL labels Aug 26, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added agentcore-harness-reviewing AgentCore Harness review in progress claude-security-reviewing Claude Code /security-review in progress labels Aug 26, 2026
@codecov-commenter

codecov-commenter commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.22%. Comparing base (2595b9d) to head (13f6e95).

Additional details and impacted files
@@            Coverage Diff            @@
##           refactor    #2116   +/-   ##
=========================================
  Coverage     97.22%   97.22%           
=========================================
  Files           463      464    +1     
  Lines         28160    28227   +67     
=========================================
+ Hits          27378    27445   +67     
  Misses          782      782           

☔ 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.

@agentcore-devx-automation agentcore-devx-automation Bot 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.

AgentCore Harness Review

Verdict: Looks good

I traced through the refactor and the new strands-http-python template. The extraction into templates/{project,runtime,harness,renderer,types,fsTree}.ts is coherent, the manager's addResource rollback semantics are preserved (mutating projectSpec in place is fine because it isn't written on the error path), the new fromTextFile correctly reads Dockerfile content from disk (so getHarnessTemplateResolver matches the old copyFile behavior, minus the pre-write existence check — the error is still thrown at write time via InputValidationError), and the manifest snapshot confirms memory/ is filtered out when --memory is not set.

Two very minor observations that are not blocking:

  • mergeSpecEntries in src/core/project/templates/project.ts merges runtimes/credentials/memories but ignores harnesses, even though SpecEntries includes it. Currently unreachable since createProjectTree only invokes the runtime resolver, so the omission is harmless — worth fixing if a future template contributes harnesses at project-create time.
  • src/assets/templates/strands-http-python/main.py references a pyJsonStr helper ({{pyJsonStr inputSchema}} and {{pyJsonStr litellmAdditionalParams}}) that isn't registered in HandlebarsTemplateRenderer. Guarded behind inlineFunctionTools / litellmAdditionalParams, both of which are never set in the current runtime.ts context, so it's latent — but it will blow up the day someone flips those flags on.

Neither of these needs to hold up the merge.

@agentcore-devx-automation agentcore-devx-automation Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Aug 26, 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 Aug 26, 2026
@github-actions github-actions Bot added size/xl PR size: XL and removed size/xl PR size: XL labels Aug 26, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Aug 26, 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 Aug 26, 2026
@github-actions github-actions Bot added size/xl PR size: XL and removed size/xl PR size: XL labels Aug 26, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Aug 26, 2026
@Hweinstock
Hweinstock force-pushed the memory-in-templates branch from 1b25e3b to f07f985 Compare August 26, 2026 21:51
@github-actions github-actions Bot removed the size/xl PR size: XL label Aug 26, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

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

@github-actions github-actions Bot added the size/xl PR size: XL label Aug 26, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added claude-security-reviewing Claude Code /security-review in progress and removed claude-security-reviewing Claude Code /security-review in progress labels Aug 26, 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 Aug 26, 2026
@Hweinstock
Hweinstock force-pushed the memory-in-templates branch from f07f985 to 9088f13 Compare August 26, 2026 22:25
@github-actions github-actions Bot added size/xl PR size: XL and removed size/xl PR size: XL labels Aug 26, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Aug 26, 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 Aug 26, 2026
@Hweinstock
Hweinstock force-pushed the memory-in-templates branch from 9088f13 to 2f80ed2 Compare August 27, 2026 01:48
@github-actions github-actions Bot added size/xl PR size: XL and removed size/xl PR size: XL labels Aug 27, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Aug 27, 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 Aug 27, 2026
@Hweinstock
Hweinstock force-pushed the memory-in-templates branch from 2f80ed2 to 311ee32 Compare August 27, 2026 17:37
@github-actions github-actions Bot added size/xl PR size: XL and removed size/xl PR size: XL labels Aug 27, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Aug 27, 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 Aug 27, 2026
@Hweinstock
Hweinstock force-pushed the memory-in-templates branch from 311ee32 to 13f6e95 Compare August 27, 2026 18:31
@github-actions github-actions Bot added size/m PR size: M and removed size/xl PR size: XL labels Aug 27, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Aug 27, 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 Aug 27, 2026
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.

2 participants