Skip to content

fix: migrate engine no-op SPI defaults from @ApplicationScoped to @DefaultBean #257

@mdproctor

Description

@mdproctor

Problem

Bare @ApplicationScoped no-op SPI defaults in the engine runtime collide with consumer implementations when the engine is indexed alongside a consumer repo's @QuarkusTest classpath. CDI sees two qualifying beans and fails with an ambiguity error. The reactive variants use @Alternative, which avoids collision but requires explicit activation per consumer.

Fix

Annotate all nine no-op/empty defaults with @DefaultBean @ApplicationScoped. @DefaultBean yields automatically to any non-default qualifying bean — the correct semantic for a platform fallback.

Blocking variants — runtime/src/main/java/io/casehub/engine/internal/worker/:

  • NoOpWorkerProvisioner — bare @ApplicationScoped@DefaultBean @ApplicationScoped
  • NoOpCaseChannelProvider — bare @ApplicationScoped@DefaultBean @ApplicationScoped
  • NoOpWorkerStatusListener — bare @ApplicationScoped@DefaultBean @ApplicationScoped
  • EmptyWorkerContextProvider — bare @ApplicationScoped@DefaultBean @ApplicationScoped

Diff variant — runtime/src/main/java/io/casehub/engine/internal/diff/:

  • NoOpContextDiffStrategy@Alternative@DefaultBean

Reactive variants (migrate from @Alternative to @DefaultBean):

  • NoOpReactiveWorkerProvisioner
  • NoOpReactiveCaseChannelProvider
  • NoOpReactiveWorkerStatusListener
  • EmptyReactiveWorkerContextProvider

Acceptance

  • All nine beans annotated @DefaultBean @ApplicationScoped
  • mvn test -pl runtime passes with no regressions
  • Protocol PP-20260514-engine-spi-noops-defaultbean updated to include all nine beans

Protocol

PP-20260514-engine-spi-noops-defaultbean — Engine SPI no-op defaults must use @DefaultBean

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions