fix(hyperion): address review findings from PR #43347 - #2
Merged
adhajar-amzn merged 1 commit intoMar 12, 2026
Merged
Conversation
… pairing, tool key mapping - Derive tenant ID from session key via extractTenantId() instead of agent name, preventing cross-tenant collisions when agents share names (P1) - Consume pairing codes atomically with DynamoDB conditional delete to prevent double-redemption race conditions (P1) - Map tool API keys to provider-specific paths (brave_search → search.apiKey, others → search.<provider>.apiKey) instead of overwriting a single key (P1) - Pass gateway base config (ctx.config) into Hyperion runtime so tenant configs inherit global settings like ACP backend selection (P1) - Add endpointOverride to AgentCore config that applies after SSM loading, so runtime ARNs are still discovered when testing with a local endpoint (P2) - Fix env var restoration in credentials test to delete undefined keys instead of setting them to string "undefined" - Update tests for all changes; all 99 tests pass Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
adhajar-amzn
merged commit Mar 12, 2026
4436131
into
feat/hyperion-multi-tenant
2 of 9 checks passed
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.
Summary
Addresses automated review comments (Codex + Greptile) from PR #43347:
P1 fixes
agentcore/runtime.ts) — UseextractTenantId(sessionKey)instead ofagentname to prevent cross-tenant collisions when different users share an agent name like"main"pairing-store.ts,dynamodb-client.ts) — Replace read-then-delete with DynamoDB conditional delete (attribute_exists+ReturnValues: ALL_OLD) to prevent double-redemption race conditionstenant-config-loader.ts) — Mapbrave_search→search.apiKeyand other providers →search.<provider>.apiKeyinstead of overwriting a single key for all providershyperion/service.ts) — Forwardctx.configasdefaultConfigtocreateHyperionRuntime()so tenant configs inherit global settings (e.g., ACP backend selection)P2 fixes
agentcore/config.ts,agentcore/index.ts) — AddendpointOverridefield that applies after SSM loading, so runtime ARNs are still discovered when testing with a local endpointOther
credentials.test.ts) — Delete undefined env var keys instead of setting them to string"undefined"viaprocess.env.X = undefinedSkipped (not our code / false positive)
register.onboard.ts:135— OC core filetenant-config-loader.ts:201— False positive;...config.agentsspread already preservesAgentsConfigshapeTest plan
vitest runon 5 test files)endpointOverrideinconfig.test.tsconsumePairingCodeflow🤖 Generated with Claude Code