Skip to content

[testing] Add scenario tests for DI lifecycle and request scope in real HTTP requests #1253

Description

@kang-heewon

Problem

DI request scope is tested at the container level, but Croco also needs scenario tests proving the same lifecycle behavior inside real HTTP request handling.

Desired outcome

Request-scoped and singleton providers behave correctly across actual Node and Lambda request boundaries.

Acceptance criteria

  • Add an HTTP fixture with singleton and request-scoped providers.
  • Verify the same request reuses request-scoped instances where expected.
  • Verify separate requests receive distinct request-scoped instances.
  • Verify scope mismatch diagnostics during bootstrap or graph validation.
  • Run the scenario through both Node/app fetch and Lambda handler paths.
  • Include DI graph evidence in the test output where practical.

Metadata

Metadata

Assignees

Labels

1.0framework-contextruntimeRuntime behavior, lifecycle, and environment capability workspinetestingTesting utilities, harnesses, and verification workflowstransports-http

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions