fix(harness): surface managed-memory heads-up on dev deploy + validate session storage path in TUI#1555
Merged
tejaskash merged 1 commit intoJun 17, 2026
Conversation
…e session storage path in TUI
Two bugs found in the gated managed-memory / harness TUI flows.
1. Managed-memory heads-up missing on `agentcore dev` deploys. The dev deploy
hook (useDevDeploy) called handleDeploy without an onNotice callback, so the
"this harness provisions a dedicated AgentCore Memory resource (3-5 min)..."
heads-up that the regular deploy path shows never reached the dev UI. Wire
onNotice through useDevDeploy and render it in DevScreen's deploying view as
a plain dim "Note:" (matching the deploy-screen convention).
2. Session-storage mount path not validated in the add-harness wizard. The step
only checked value.startsWith('/'), so a nested path like /mnt/data/workplace/
passed Enter and failed later at schema-write/deploy. The API constraint is
exactly one segment under /mnt (smithy MountPath pattern ^/mnt/[a-zA-Z0-9._-]+/?$,
length 6-200; mirrored in the Harness CFN resource schema). Use the existing
validateBYOMountPath (already used by the EFS/S3 mount-path steps and matching
that pattern) so the step shows a red error and blocks Enter on invalid input.
Adds useDevDeploy tests for the onNotice -> managedMemoryNotice wiring (set and
unset cases). The mount-path validator already has direct coverage incl. the
nested-path rejection (/mnt/foo/bar).
Contributor
Package TarballHow to installgh release download pr-1555-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-0.19.0.tgz |
Contributor
|
Claude Security Review: no high-confidence findings. (run) |
agentcore-cli-automation
approved these changes
Jun 17, 2026
agentcore-cli-automation
left a comment
There was a problem hiding this comment.
Looks good to merge.
Both fixes are small, focused, and follow existing patterns:
- The
onNotice→managedMemoryNoticewiring inuseDevDeploymirrors the deploy flow (useDeployFlow.ts/DeployScreen.tsx) exactly, including the!completerender gate and<Text dimColor>Note: …</Text>styling. - The session-storage
customValidationnow usesvalidateBYOMountPathmatching the existing EFS and S3 mount-path steps in the same file. Confirmed the regex matches the smithy/CFNMountPathconstraint as described. - Test additions cover both the set and unset paths for the notice; mocking is at the same I/O boundaries (
handleDeploy,ConfigIO) the existing tests use — no new excessive mocking. - No new telemetry needed: this is a UI-surfacing fix for a notice already emitted by
handleDeploy; deploy-level telemetry already exists at the command boundary.
Contributor
Coverage Report
|
15 tasks
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.
Description
Fixes two bugs in the gated managed-memory / harness TUI flows (both gated behind
ENABLE_GATED_FEATURES).1. Managed-memory heads-up missing on
agentcore devdeploysThe regular
deploypath shows a heads-up when a harness uses managed memory ("this harness automatically provisions a dedicated AgentCore Memory resource… provisioning can take 3-5 minutes…"). The dev deploy path did not:useDevDeploycalledhandleDeploywithout anonNoticecallback, so the notice (emitted viaonNotice) was dropped.Fix: thread
onNoticethroughuseDevDeployinto amanagedMemoryNoticestate, and render it inDevScreen's "Deploying project resources…" view as a plain dimNote:(matching the deploy-screen convention). Verified live: the note now appears as the CFN apply starts and stays pinned through memory provisioning.2. Session-storage mount path not validated in the add-harness wizard
The session-storage step only checked
value.startsWith('/'), so a nested path like/mnt/data/workplace/passed Enter and then failed later at schema-write/deploy. The other mount-path steps (EFS, S3 Files) already validate withvalidateBYOMountPath.I confirmed the constraint against the API: the smithy
MountPathshape (com.amazonaws.bedrockagentcorecontrol#MountPath) ispattern: ^/mnt/[a-zA-Z0-9._-]+/?$, length 6-200 — exactly one segment under/mnt— and theAWS::BedrockAgentCore::HarnessCFN resource schema mirrors it. So nested paths are genuinely invalid at the API; the CLI regex is correct, the TUI step just wasn't using it.Fix: use
validateBYOMountPathin the session-storage step'scustomValidation.TextInputalready blocks Enter and renders a red error/✗ when validation fails. Verified live:/mnt/data/workplace/now shows a red error and Enter is blocked;/mnt/datashows ✓.Related Issue
Closes #
Type of Change
Testing
How have you tested the change?
npm run test:unit(addeduseDevDeploytests for theonNotice→managedMemoryNoticewiring, set + unset; the mount-path validator already has direct coverage incl. nested-path rejection)npm run typechecknpm run lint(no new warnings; the 2 remaining inAddHarnessScreen.tsxare pre-existing and outside the changed lines)src/assets/— n/a, no asset changesAlso verified end-to-end live (account 603141041947, ap-southeast-2, preview build) via the TUI harness:
agentcore devon a managed-memory harness now shows theNote:heads-up during the deploy phase (pinned throughCREATE_IN_PROGRESS).add harnesssession-storage step:/mnt/data/workplace/→ red error + Enter blocked;/mnt/data→ ✓.Checklist