81: Control Nenjim process construction and ordered startup through NenjimHub.conf

This commit is contained in:
2026-09-03 14:10:28 +02:00
parent ed952fd6b1
commit 734de67c54
16 changed files with 1146 additions and 156 deletions
@@ -0,0 +1,33 @@
## 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 2 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 `conf/NenjimHub.conf.example` that reproduces the former successful startup sequence and remains a copy-only template, 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 2 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 2, manual dependency ordering, 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.