Skip to content

fix(bma): rename environment template and skip unsupported dev - #61

Closed
Hweinstock wants to merge 3 commits into
refactorfrom
fix/bma-refactor
Closed

Hweinstock wants to merge 3 commits into
refactorfrom
fix/bma-refactor

Conversation

@Hweinstock

@Hweinstock Hweinstock commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Problem

The public BMA template is named bedrock-managed-agents instead of environment-python-bma. Local dev attempts to start BMA through unsupported local runners, producing unclear failures. Mixed projects should skip BMA, while individual selection should explain that local dev is unsupported. The starting lockfile also has five Fastify audit findings.

Solution

  • Rename the public BMA template to environment-python-bma across scaffolding, TUI choices, and help.
  • Skip BMA in mixed dev sessions; reject individual selection with NotImplementedError and source: "user".
  • Update Fastify to 5.12.5 in the lockfile to resolve the five audit findings.

The public shortcut uses internal framework bma. Shared metadata and runtime classification live in bma.ts; the existing runtime tag and policy identify BMA even when tags are overridden or missing.

Verification

Verified with the compiled Linux CLI:

Scenario Result
Create wizard and create/add help Show environment-python-bma; the wizard screenshot is retained locally.
Headless create Scaffolds the BMA lifecycle server, container settings, policy, and runtime tag.
BMA-only or explicit BMA dev Both headless and browser modes exit 1 before runners or collectors start.
Mixed dev and Inspector reload Skip BMA and retain supported runtimes; a real HTTP invocation succeeds.
Overridden or missing BMA tags The policy still identifies BMA and prevents local dev.
> agentcore create --name BmaExample --template environment-python-bma --skip-install --skip-git --json --region us-west-2
{"operation":"create","project":{"name":"BmaExample",...}}

> agentcore dev --mode headless --agent agent --region us-west-2
Local dev is not supported for runtime 'agent' (environment-python-bma). Run agentcore deploy, then use client.py to connect through Bedrock Managed Agents.

> agentcore dev --mode headless --no-traces --port 16883 --region us-west-2
Skipping runtime 'agent': local dev is not supported for environment-python-bma.
[local] Agent 'local' is running on port 16883.
> curl -sS http://127.0.0.1:16883/invocations -H 'Content-Type: application/json' -d '{"prompt":"hello"}'
{"agent": "local", "ok": true}
Implementation spec

Spec

Problem

There are two polish areas for the bma template.

  • it is currently called bedrock-managed-agents, but should be called environment-python-bma.
  • if a user tries to run dev on the template, it doesn't provide a great experience.

Definition of Done

  • The public facing template name is "environment-python-bma".
  • dev does not work on the bma template, it skips when run with multi-agent, and fails with an error when specifically started individually that dev is not supported. (use not supported error) with clear error message.

Verification

  • screenshot of TUI create flow that shows the new template name.
  • example run on headless with new template name.
  • help page with new template name.
  • verification that dev fails/skips in thr right conditions.
PR checklist

Related issue: implementation spec included above; issues are disabled on this fork.

Documentation: README files, docs/, and command.md are unchanged.

Type of change: bug fix; breaking public template rename; targeted dependency patch.

  • I ran bun test --coverage --coverage-reporter=lcov
  • Relevant end-to-end verification used the compiled CLI and a real local HTTP server; AWS deployment tests are not applicable.
  • I ran bun run typecheck
  • I ran bun run lint:check
  • I ran bun run format:check
  • I ran bun run build
  • No asset changes or snapshot updates are required.
  • I have read the CONTRIBUTING document.
  • Necessary tests prove the fix; new cases remain at the handler level.
  • No documentation changes are needed; CLI examples are included above.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Hweinstock
Hweinstock force-pushed the fix/bma-refactor branch 3 times, most recently from 57ebaeb to 7dfc032 Compare October 1, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant