Skip to content

refactor(abstractions): rename ILambdaHostContext to ILambdaInvocationContext#253

Merged
j-d-ha merged 3 commits into
mainfrom
refactor/update-context-name
Dec 17, 2025
Merged

refactor(abstractions): rename ILambdaHostContext to ILambdaInvocationContext#253
j-d-ha merged 3 commits into
mainfrom
refactor/update-context-name

Conversation

@j-d-ha

@j-d-ha j-d-ha commented Dec 17, 2025

Copy link
Copy Markdown
Collaborator

🚀 Pull Request

📋 Summary

Renames ILambdaHostContext to ILambdaInvocationContext to better reflect its purpose as an invocation-scoped context rather than a host-level context. This change improves API clarity and aligns the naming with the actual lifecycle scope of the context object.

Changes include:

  • Renamed ILambdaHostContext interface to ILambdaInvocationContext
  • Renamed ILambdaHostContextAccessor to ILambdaInvocationContextAccessor
  • Updated all references in documentation (core concepts, guides, examples)
  • Updated source generators to use new type name
  • Updated all middleware, handlers, and feature interfaces

✅ Checklist

  • My changes build cleanly
  • I've added/updated relevant tests
  • I've added/updated documentation or README
  • I've followed the coding style for this project
  • I've tested the changes locally (if applicable)

🧪 Related Issues or PRs

N/A


💬 Notes for Reviewers

This is a straightforward rename with no behavioral changes. All references have been updated consistently across the codebase including:

  • Core abstractions and interfaces
  • Documentation files
  • Example projects
  • Source generators
  • Extension methods

…ambdaInvocationContext`

- Update all references to `ILambdaHostContext` with `ILambdaInvocationContext` in core abstractions.
- Rename `ILambdaHostContextFactory` to `ILambdaInvocationContextFactory` and ensure consistent usage.
- Adjust unit tests to reflect the updated interface and implementation names.
- Apply similar updates to `LambdaHostContextAccessor`, renamed to `LambdaInvocationContextFactoryAccessor`.
- Align delegate and extension methods with the new naming convention.
- Update documentation within comments to correspond with the new terms.
@github-actions github-actions Bot added the type: refactor Code refactoring label Dec 17, 2025
…tion token handling

- Add snapshot test for verifying `ExpressionLambda` handling of
  `CancellationToken` and `LambdaInvocationContext`.
- Ensure test correctness through verified `.g.verified.cs` snapshot file.
@codecov

codecov Bot commented Dec 17, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #253      +/-   ##
==========================================
+ Coverage   88.37%   88.41%   +0.03%     
==========================================
  Files         130      130              
  Lines        3115     3125      +10     
  Branches      344      344              
==========================================
+ Hits         2753     2763      +10     
  Misses        229      229              
  Partials      133      133              
Files with missing lines Coverage Δ
...malLambda.SourceGenerators/Models/ParameterInfo.cs 97.87% <100.00%> (ø)
...ceGenerators/OutputGenerators/MapHandlerSources.cs 97.93% <100.00%> (ø)
...xtensions/MiddlewareLambdaApplicationExtensions.cs 100.00% <ø> (ø)
.../Builder/Extensions/ServiceCollectionExtensions.cs 100.00% <100.00%> (ø)
...imalLambda/Core/Context/LambdaInvocationContext.cs 95.65% <100.00%> (ø)
...da/Core/Context/LambdaInvocationContextAccessor.cs 100.00% <100.00%> (ø)
...bda/Core/Context/LambdaInvocationContextFactory.cs 100.00% <100.00%> (ø)
...MinimalLambda/Core/Features/DefaultEventFeature.cs 100.00% <100.00%> (ø)
...imalLambda/Core/Features/DefaultResponseFeature.cs 100.00% <ø> (ø)
...atures/FeatureLambdaInvocationContextExtensions.cs 100.00% <ø> (ø)
... and 1 more

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 667327c...04a7506. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

… `LambdaInvocationContextAccessor`

- Update all references from `LambdaInvocationContextFactoryAccessor` to `LambdaInvocationContextAccessor`.
- Adjust unit tests to use the renamed class in all relevant test methods.
- Update DI container to register `LambdaInvocationContextAccessor` as the implementation for `ILambdaInvocationContextAccessor`.
@sonarqubecloud

sonarqubecloud Bot commented Dec 17, 2025

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
1 Accepted issue

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@j-d-ha
j-d-ha merged commit b2ae249 into main Dec 17, 2025
10 checks passed
@j-d-ha
j-d-ha deleted the refactor/update-context-name branch December 17, 2025 02:00
@j-d-ha j-d-ha added the breaking-change Introduces a breaking change label Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Introduces a breaking change type: refactor Code refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant