Skip to content

docs(aspire-testing): gather provider-specific replacement use cases #879

Open

Description

@akrock

Problem and current behavior

The activation-services hook delivered in PR #872, closing case #866, modifies IServiceCollection after module/framework registration and before the selected activation provider is built. The options reference and provider-boundary guide already explain that later ConfigureContainer registrations, including Autofac modules, follow container precedence and may override service-collection descriptors. Provider identity is preserved; universal last-wins behavior is not promised.

Additional replacement guidance or a general provider abstraction should be driven by real adopter needs. No two concrete provider-specific adopter cases have been established. This preserves deferred TODO C7 as a P3 discovery case, blocked on evidence from at least two consumers. The current precedence documentation is already shipped; this case does not ask to redo it.

Smallest useful outcome

Collect distinct replacement needs with actual provider contracts, then decide whether linked provider-specific examples are enough or whether a shared abstraction has a defensible common contract. The benefit is reliable consumer guidance; the cost is provider coupling and ongoing maintenance.

Acceptance criteria

  1. Gather at least two concrete adopter cases. Name their maintainers, providers and versions, registration phases, intended replacements, and observed constructor dependency resolution. Include reproductions or source links.
  2. Reproduce the relevant behavior through public APIs with the existing default-provider and Autofac proof as the baseline. Cover service-collection replacement followed by later container registration, provider identity, and disposal ownership.
  3. Determine whether existing precedence guidance and narrow provider-specific examples solve each case. Prefer those when sufficient; publish useful examples only for demonstrated gaps and link them from the canonical testing guide.
  4. Consider a general abstraction only if the two cases establish a shared contract. Document limits, ordering, compatibility, ownership, and required provider integration/regression coverage before proposing implementation.
  5. Record a no-abstraction/no-change disposition if the evidence supports retaining the existing API and documentation.

Scope and sequencing

Depends on real replacement needs after #866. Preserve the selected provider and its semantics. Do not call BuildServiceProvider inside a hook, silently replace the provider, or promise that a service-collection callback overrides every container registration. This case does not implement the separate Skoolit migration #1259.

Planning estimate from the deferred TODO: human L / agent M for an evidence-backed extension; discovery effort remains unestimated until adopters are named. Priority P3.

Duplicate check

On 2026-10-14, searched open and closed AppSurface cases for provider replacement, pre-activation hooks, async hooks, and ConfigureContainer. No separate follow-up with this two-consumer demand gate was found. #866 already delivers the activation hook and documents default-provider/container precedence; other search matches concern configuration or durable-testing scopes.

Activity

  1. added
    documentation
    question
    external blocker
    on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationexternal blockerquestion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions