Skip to content

fix(dataset): tui back-navigation bugs + kmsKeyArn support#1379

Open
jariy17 wants to merge 3 commits into
mainfrom
dataset-tui-kmsKey-fix
Open

fix(dataset): tui back-navigation bugs + kmsKeyArn support#1379
jariy17 wants to merge 3 commits into
mainfrom
dataset-tui-kmsKey-fix

Conversation

@jariy17
Copy link
Copy Markdown
Contributor

@jariy17 jariy17 commented May 26, 2026

Summary

  • Fix 3 TUI back-navigation bugs reported on feat: dataset management — full feature with tests #1347 by @padmak30:

    1. Batch eval wizard Escape skips source-picker — now returns to source picker instead of exiting
    2. AddDatasetScreen loses typed name on back-nav — now preserves user input
    3. DatasetFlow back-nav resets datasets to [] — now preserves loaded dataset list
  • Wire kmsKeyArn through the add-dataset flow (flagged by @padmak30, confirmed by @jariy17 as dropped during rebase):

    • CLI: --kms-key-arn <arn> flag with ARN validation
    • TUI: optional step after Description (Enter to skip)
    • Primitive: writes kmsKeyArn to agentcore.json
    • CDK construct already passes KmsKeyArn to CloudFormation (no CDK changes needed)

Test plan

  • All 48 existing dataset unit tests pass
  • Typecheck passes (tsc --noEmit)
  • Lint + prettier + secretlint pass (pre-commit hooks)
  • Issue chore: Add 3rd party licenses #2 reproduced and fix verified live via TUI harness
  • Issue feat: testing fixes as well as refactoring test organization and to use npm & tsx #3 reproduced and fix verified live via TUI harness (real deployed dataset in us-east-1)
  • agentcore add dataset --help shows --kms-key-arn flag
  • Manual: add dataset with --kms-key-arn, verify agentcore.json contains field
  • Manual: TUI wizard KMS step — Enter to skip, valid ARN accepted, invalid ARN rejected
  • Manual: deploy dataset with kmsKeyArn, verify CFN stack uses the key

jariy17 added 2 commits May 26, 2026 18:26
Three back-navigation issues reported on PR #1347:

1. BatchEvalWizard Escape skips source-picker — onExit passed the
   top-level exit handler instead of returning to the source-picker
   state. Now returns to source-picker on first-step back-nav.

2. AddDatasetScreen loses typed name — initialValue always called
   generateUniqueName() ignoring the stored name state. Now uses
   the previously submitted name when available.

3. DatasetFlow back-nav resets datasets to [] — all four sub-screen
   onExit/onCancel handlers hardcoded an empty array. Added
   loadedDatasets state that persists across flow transitions.
Wire kmsKeyArn through the full add-dataset flow:
- CLI: --kms-key-arn flag with ARN validation
- TUI: optional step after Description (Enter to skip)
- Primitive: writes kmsKeyArn to agentcore.json when provided
- CDK construct already passes KmsKeyArn to CloudFormation

The field is immutable after dataset creation (createOnly CFN property).
@jariy17 jariy17 requested a review from a team May 26, 2026 18:37
@github-actions github-actions Bot added the size/m PR size: M label May 26, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label May 26, 2026
@github-actions github-actions Bot added the agentcore-harness-reviewing AgentCore Harness review in progress label May 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Package Tarball

aws-agentcore-0.15.0.tgz

How to install

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

@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 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 26, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 44.6% 9930 / 22263
🔵 Statements 43.84% 10545 / 24052
🔵 Functions 41.2% 1726 / 4189
🔵 Branches 40.89% 6348 / 15522
Generated in workflow #3290 for commit ed30251 by the Vitest Coverage Report Action

@github-actions github-actions Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label May 26, 2026
Cover the kmsKeyArn flow with:
- Unit: DatasetPrimitive.add() persists kmsKeyArn when provided, omits when absent
- Integ: CLI --kms-key-arn writes to agentcore.json, invalid ARN rejected, absent ARN omitted
@jariy17 jariy17 changed the title fix(dataset): TUI back-navigation bugs + kmsKeyArn support fix(dataset): tui back-navigation bugs + kmsKeyArn support May 26, 2026
@github-actions github-actions Bot added size/m PR size: M and removed size/m PR size: M labels May 26, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label May 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 May 26, 2026
@github-actions github-actions Bot added size/m PR size: M and removed size/m PR size: M labels May 26, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label May 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 May 26, 2026
@jariy17 jariy17 force-pushed the dataset-tui-kmsKey-fix branch from 9b2d82a to ed30251 Compare May 26, 2026 20:49
@github-actions github-actions Bot added size/m PR size: M and removed size/m PR size: M labels May 26, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label May 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 May 26, 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.

1 participant