Skip to content

fix(evh): rename Transport.bind + null AwsLambdaContext - #5360

Merged
adrians5j merged 3 commits into
nextfrom
adrian/ev-handler-1-2026-07-03
Jul 3, 2026
Merged

fix(evh): rename Transport.bind + null AwsLambdaContext#5360
adrians5j merged 3 commits into
nextfrom
adrian/ev-handler-1-2026-07-03

Conversation

@adrians5j

@adrians5j adrians5j commented Jul 3, 2026

Copy link
Copy Markdown
Member

What changed

Three small follow-up cleanups on the event-handler layer, on top of the Transport refactor that landed in #5359. No behavior change for end users or API consumers.

  • Rename Transport.extractTransport.bind. The method name read backwards — it pushes raw platform args into the request container, it doesn't pull anything out. bind describes what it does. Renamed across the Transport interface, noopTransport, the createHandler call site, and awsLambdaTransport.
  • Remove the unused Function URL transport. FunctionUrlEventType and FunctionUrlTranslator were scaffolded but never wired into any feature, handler, or template — only their own tests referenced them. Removed both, their index exports, and the covering tests.
  • Always register AwsLambdaContext (null object). Per review feedback: instead of registering AwsLambdaContext only when a Lambda context is present (which forces consumers to handle a missing registration), always register one. It's now an IAwsLambdaContext with isSet() / get(); the transport binds a real value when a context exists and a NullAwsLambdaContext (isSet() === false) when it doesn't, so consumers can resolve it unconditionally and branch on isSet().

Changelog

Title line: Tidy up the event handler transport layer

Body: Internal cleanups to the request-handling layer: clearer naming, removal of an unused code path that was never hooked up, and a more robust way of exposing the AWS Lambda context so downstream code never has to guard against it being absent. No change to how applications behave.

Squash Merge Commit

refactor(event-handler): tidy transport layer (bind, null context, cleanup) (#5360)
refactor(event-handler): rename Transport.bind + null AwsLambdaContext (#5360)

adrians5j and others added 3 commits July 3, 2026 10:17
"extract" read backwards — the method pushes raw platform args INTO the
container, it doesn't pull anything out. "bind" describes what it does
(binds transport primitives into the per-request container). Renamed across
the Transport interface, noopTransport, the createHandler call site, and
awsLambdaTransport.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
FunctionUrlEventType and FunctionUrlTranslator were scaffolded but never
wired into any feature, handler, or template — only their own tests
referenced them. Remove both, their index exports, and the covering tests.
Nothing else in the repo referenced Function URLs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…bject)

Per review feedback: instead of conditionally registering AwsLambdaContext
only when a Lambda context is present (which forces consumers to handle a
missing registration), always register one. AwsLambdaContext is now an
IAwsLambdaContext with isSet()/get(); the transport binds an
AwsLambdaContextValue when a context exists and a NullAwsLambdaContext when it
doesn't. NullAwsLambdaContext.isSet() returns false and get() returns an empty
placeholder context (all fields defaulted, callbacks no-op) rather than null,
so consumers resolve AwsLambdaContext unconditionally, branch on isSet(), and
never null-check get().

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@adrians5j
adrians5j force-pushed the adrian/ev-handler-1-2026-07-03 branch from bca67c7 to 11c65e7 Compare July 3, 2026 08:31
@adrians5j adrians5j added this to the 6.6.0 milestone Jul 3, 2026
@adrians5j adrians5j changed the title Event handler: transport layer cleanups (bind, null context, dead code) fix(evh): rename Transport.bind + null AwsLambdaContext Jul 3, 2026
@adrians5j
adrians5j merged commit eb3984a into next Jul 3, 2026
20 checks passed
@adrians5j
adrians5j deleted the adrian/ev-handler-1-2026-07-03 branch July 3, 2026 09:06
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