Simplify configuration comparison acquisition

This commit is contained in:
2026-11-23 02:29:19 +00:00
parent 1d5dc370e8
commit b63bef2d43

View File

@@ -73,7 +73,7 @@ The [configuration reference](../config.md#secrets-handling),
### Configured startup
When acquiring the primary pipeline, Narratio passes its native `File` or
When acquiring a pipeline, Narratio passes its native `File` or
`SearchConfig` source to `LoadSecretsIntoEnvironmentFromConfig`. Operators can
declare:
@@ -99,10 +99,13 @@ is configured.
### Invocation lifecycle and inspection
Give startup one invocation-owned coordinator for source preparation, bootstrap,
and the handoff to configuration loading. Share it across execution, planning,
and inspection where needed, retaining bootstrap completion for the invocation.
Bootstrap remains explicit, lazy, and fallible, before pipeline credential
Use one ordinary pipeline-acquisition path for native source preparation,
configured bootstrap, and the handoff to configuration loading. Share that path
across execution, planning, and inspection. Reuse an already-acquired result
through normal invocation-owned acquisition state; a distinct pipeline
acquisition performs its own native preparation and bootstrap. Replace the
blanket once-per-invocation bootstrap guard with this ordinary acquisition reuse.
Bootstrap remains explicit, lazy, and fallible, before that pipeline's credential
resolution and adapter construction; ordinary library loaders do not mutate the
environment.
@@ -112,10 +115,17 @@ acquisition: configured pipeline bootstrap runs when that invocation actually
needs the pipeline. Direct document inspection does not acquire a pipeline solely
to bootstrap credentials.
Configuration comparisons use one startup environment. The primary pipeline
selection owns configured bootstrap; comparison-only pipeline sources undergo
ordinary loading without additional bootstrap. Preserve separate ConfigKit
results for each side; no per-side environment isolation is required.
Configuration comparison is a best-effort operator convenience. Each side uses
the ordinary acquisition path and loads only the configuration it needs. A side
that acquires a pipeline performs configured bootstrap and loads the returned
prepared source, just as an ordinary invocation would. Let `ckconfig` control
comparison loading and presentation, and pass through native results and errors.
Both sides share the process environment. ConfigKit's native preservation or
overwrite behavior applies in acquisition order. Keep separate completed results
for each side and ordinary acquisition reuse where applicable. Add no primary-side
bootstrap rule, comparison-specific startup coordinator, or environment
isolation, snapshot, or restoration machinery.
Use CommandKit invocation features if they reduce local lifecycle or reporting
plumbing. Evaluate their native report timing and visibility against Narratio's
@@ -165,8 +175,10 @@ and affected pinned contract links to their adopted revisions.
Connect native pipeline source selection, configured bootstrap, and prepared-source
loading through the application/configuration boundary. Remove duplicate startup
entry paths, the secrets-directory flag and selector wiring, the direct-directory
route, and the conventional-directory probe. Keep invocation state small; this
work does not require a generic startup framework or global cache.
route, and the conventional-directory probe. Replace the blanket invocation-level
bootstrap guard with ordinary acquisition reuse, including during comparisons.
Keep invocation state small and focused on acquisition and reporting;
this work does not require a generic startup framework or global cache.
Adapt reporting to retain native reports and typed failures separately. Keep
existing CommandKit outcome handling and useful native diagnostic details.
@@ -174,14 +186,16 @@ existing CommandKit outcome handling and useful native diagnostic details.
### Policy, documentation, and operator migration
When implementation lands, update the architecture policy's startup wording to
affirm the native preparation, bootstrap, and final-load boundary. Describe
environment precedence as the selected ConfigKit bootstrap policy. ADR 0003's
configuration ownership decision remains applicable.
affirm the native preparation, bootstrap, and final-load boundary. Replace its
once-per-invocation bootstrap requirement with ordinary acquisition reuse.
Describe environment precedence as the selected ConfigKit bootstrap policy.
ADR 0003's configuration ownership decision remains applicable.
Update the configuration reference, CLI reference, operations and troubleshooting
guidance, configuration internals, and affected maintained examples. Document
configured startup, the primary comparison source, and removal of `--secrets-dir`
and automatic conventional-directory loading.
configured startup, ordinary acquisition for comparison sides with a shared
process environment, and removal of `--secrets-dir` and automatic
conventional-directory loading.
Link upstream for bootstrap control definitions and overwrite semantics. Replace
stale fixed-fallback and before-any-configuration-read language.
@@ -228,8 +242,11 @@ operation. Cover useful reports and typed errors on failure, including retained
partial effects, without duplicating ConfigKit's complete file-validation test
suite.
Exercise invocation reuse, lazy non-pipeline inspection, acquisition-free CLI
paths, bare `config explain` help, and primary-source comparison bootstrap.
Exercise ordinary acquisition reuse, lazy non-pipeline inspection,
acquisition-free CLI paths, bare `config explain` help, and comparison sides
using the same acquisition path. Cover a comparison where only one side needs a
pipeline and differing configured directories using native environment semantics;
tests should not assert per-side isolation or special primary-side behavior.
Verify the existing command tree and native configuration operations against the
coordinated dependency versions. Retain existing tests for native inspection,
credential forwarding/redaction, separate domain derivation, and semantic reuse.