Files
com_r35157_nenjim-hubd-impl…/openspec/changes/81-configure-ordered-process-autorun/proposal.md
T
2026-09-03 14:36:00 +02:00

3.4 KiB

Why

NenjimHubImpl currently constructs the complete active process graph and starts a fixed process sequence, so one build cannot serve deployment roles such as a headless server without also constructing JavaFX processes. Issue #81 introduces an explicit, validated deployment configuration now, while process dependency discovery and recursive construction remain future work.

What Changes

  • BREAKING: Require the Hub to read conf/NenjimHub.conf in strict format version 1 before any process starts; missing, unreadable, non-regular, malformed, or unsupported configuration fails startup without fallback.
  • Add one mandatory ordered [AUTO_START] section whose active lines are canonical NenjimComponentId values, with defined whitespace, # comment, and blank-line termination rules.
  • Validate the complete requested process sequence before Registry startup, including known process capability, uniqueness, and Registry/Journal placement as the first two entries.
  • Bootstrap Registry, then eagerly construct and register the complete passive component graph, while lazily constructing, registering, and starting only the remaining configured process objects in exact configuration order.
  • Preserve registration-before-start, post-success startup recording, fail-fast partial-startup semantics, the online point, and the blocking runtime wait without rollback or dependency inference.
  • Make all modern Hub-known processes selectable, including the otherwise inactive Jupiter Perps Alarm, while an omitted process is neither constructed, registered, nor started.
  • Add a documented, copy-only conf/NenjimHub.conf.example that provides a generic minimal bootstrap with only the mandatory Registry and Journal processes, plus headless configuration documentation.
  • Remove the unconditional process-construction path and fixed startup list without adding public factory, discovery, lifecycle, Context, or configuration APIs.

Capabilities

New Capabilities

  • nenjim-hub-configuration: Defines the mandatory format 1 Hub configuration grammar, validation, ordered bootstrap and startup plan, lazy selected-process construction, omitted-process behavior, template role, and failure semantics.

Modified Capabilities

  • nenjim-component-registry: Replaces the Hub's complete hardcoded process graph and fixed startup subset with eager passive registration plus configuration-selected process construction and registration.
  • javafx-runtime-service: Replaces the fixed Hub ordering guarantee with explicit dependency-safe configuration ordering and permits a valid headless Hub configuration to omit every JavaFX process.

Impact

  • Adds an implementation-only Hub configuration parser/model and process-construction catalogue under com.r35157.nenjim.hubd.impl.ref without changing the public NenjimHub API.
  • Refactors NenjimHubImpl composition so Registry remains the bootstrap exception, passive dependencies remain eager, and process instances become lazy.
  • Adds conf/NenjimHub.conf.example while retaining the ignored deployment-specific runtime file at conf/NenjimHub.conf.
  • Updates Nenjim architecture and terminology documentation to describe format 1, manual dependency ordering, a generic minimal template, headless operation, and actual successful-start snapshots.
  • Adds no automated tests, external dependencies, process rollback, automatic dependency resolution, dynamic discovery, or command-line configuration selection.