Files
com_r35157_nenjim-hubd-impl…/openspec/changes/76-introduce-nenjim-component-registry/proposal.md
T

3.4 KiB

Why

Nenjim's current bootstrap directly constructs and starts a hardcoded object graph, leaving ordinary applications without a typed catalogue of independently registered components. A small read-only Registry and a dedicated Registry manager establish component identity, lookup, composition, and lifecycle ownership without prematurely introducing Contexts, resolution, discovery, or runtime loading.

What Changes

  • Add NenjimComponent and NenjimApplication contracts plus a validated NenjimComponentId value type.
  • Add a read-only NenjimRegistryService, package-private administration view, and thread-safe reference implementation with ordered interface indexing and single-use startup.
  • Add NenjimRegistryServiceManager and its public reference implementation as the one composition root for the current hardcoded component set and explicit active application subset.
  • BREAKING: Replace the old Hub interface, com.r35157.nenjim.hubd.impl.ref.NenjimHubImpl composition implementation, and com.r35157.nenjim.hubd.impl.ref.Main entry point with the thin com.r35157.nenjim.hubd.Main bootstrap, whose Main.main(...) only starts the Registry manager.
  • Make every registered query interface a Nenjim component and make each registered no-argument lifecycle implementation a Nenjim application without adding a common stop contract.
  • Replace the Ticker's temporary directly injected source objects with an injected public Registry view and explicitly configured source component IDs.
  • BREAKING: Rename the directly affected Ticker price-source packages from .plugins.pricesource to .pricesource and update their imports and terminology.
  • Document component identity, Registry views, application-owned selection/activation, manager-owned construction/registration, and the boundary around deferred runtime features.
  • Preserve the current concrete component choices, dependency-safe startup order, deliberately inactive components, and online wait behavior.

Capabilities

New Capabilities

  • nenjim-component-registry: Defines component/application contracts, component IDs, read-only lookup, internal registration, interface indexing, lifecycle, hardcoded composition, and bootstrap behavior.

Modified Capabilities

  • assetaz-ticker-service: Replaces temporary Context/plugin discovery language with explicit component-ID selection through the injected read-only Registry while preserving source lifecycle and history behavior.
  • assetaz-currency-identity-service: Transfers ownership of the one shared hardcoded catalogue from the removed Hub composition implementation to the Registry service manager.

Impact

  • Adds public component and Registry APIs under com.r35157.nenjim.component and com.r35157.nenjim.service.registry, with administration and storage confined to .impl.ref.
  • Moves current composition into NenjimRegistryServiceManagerImpl, changes the application main class, and removes the superseded Hub implementation path.
  • Updates the registered domain interfaces and lifecycle implementation declarations needed for typed Registry discovery.
  • Changes the public TickerServiceImpl construction contract and the Ticker price-source package names.
  • Updates Nenjim, terminology, alarm, and OpenSpec documentation; no new dependency, ValueTag, persistent state, runtime discovery, Context, resolution, classloading, permission, event, removal, or common-stop API is introduced.