Skip to content

Bedrock Agent function resolver checklist

Finite boundary audit (#193)

Reviewed boundary Evidence Classification
Resolver/tool/options/event/error, Parameters accessors, FunctionResponse/Build and state exports Existing 371 actual scenarios and native parameter-order tests Verified function-based mapping; no OpenAPI action-group API
Number/boolean/duplicate parameter conversion and body strings Existing exact reference outputs Verified scoped values; native marshalers keep JSON v2 contracts
Session/prompt/knowledge fields and explicit response overrides Existing response ownership and 64-invocation tests Invocation-owned references; replacement versus mutation follows documented captured-reference behavior
Invalid UTF-8 in strings, map keys/values, arrays and parameter keys/values Six TestNativeInvalidStringsFailBeforeBodyPublication rows Reproduced and fixed: report encoding failures through the diagnostic/error-body path without partial JSON
Unicode, binary, struct and nested nil containers TestNativeBodiesRetainJSONV2Contracts and ancestor-identity regressions Deliberate native JSON and typed-nil mapping; cycles differ from repeated references

BR-COMPLETE remains broader than this matrix. Explicit FunctionResponse values bypass ordinary conversion and remain caller-owned; arbitrary native/async behavior, live service acceptance and performance are not certified.

Implementation history

Reference: installed Powertools TypeScript v2.35.0 event-handler/bedrock-agent runtime exports. This scope is the function-based action-group resolver. Do not silently substitute another runtime's OpenAPI action-group implementation.

  • BR-SOURCE: Inspect BedrockAgentFunctionResolver, BedrockFunctionResponse, the event assertion and public index. The two public exports require no other feature package. The resolver uses Commons environment/type helpers; numeric conversion can reuse commons.ParseNumber after differential verification.
  • BR-CORE: Add independent eventhandler/bedrock module, exact-name tool registration/replacement, lightweight event validation and original context/event delivery. Invalid events throw before tool execution; missing tools return a response body with the reference error text.
  • BR-PARAMETERS: Preserve boolean equality to the literal true, JavaScript Number conversion for number/integer parameters, original-string fallback for NaN, unchanged array/unknown parameter strings, duplicate-name and ordered/prototype-name behavior in the reference corpus. Broader native/prototype boundaries remain under BR-COMPLETE.
  • BR-RESPONSE: Implement explicit function responses, state/session/prompt-session/knowledge-base fields and default JSON body conversion. Preserve null/undefined/empty-string handling, inherited event attributes for ordinary results and independently configured attributes for explicit responses. Map handler and serialization errors to response bodies; native encoding/error differences remain explicit in BEDROCK.md.
  • BR-REFERENCE: Verify 371 actual upstream scenarios for guards, routes, conversions, responses, diagnostics and errors. Compare body strings without decoding/reordering them. Verify 64 concurrent invocations, cancellation/context identity, ownership, reentrant callbacks, native nil and cycle behavior. A recursive test diagnostic was corrected before the passing focused run; it did not require changing the reference callback contract.
  • BR-LOCAL: Verify all 25 packaged modules/22 standalone consumers, native Lambda examples, Parser/Logger/OTel composition and both CGO-disabled Linux builds. Passed 790/790 RIE assertions, 95/95 streaming Runtime API checks and 14/14 saved Batch artifact checks (2026-09-23, Asia/Shanghai). Docker executed amd64; arm64 was cross-compiled. Verified Bedrock and corrected GraphQL archives match every current module file. Temporary runtime resources were cleaned; no AWS resources were used. See VALIDATION.md for evidence and tooling improvements.
  • BR-COMPLETE: Complete public type/API mapping, JavaScript serialization/native/async boundaries, live Bedrock action-group acceptance when requested, resource budgets and publication gates.