Simplify configuration acquisition and comparison guidance

This commit is contained in:
2026-11-23 16:33:51 +00:00
parent bb15edc057
commit 7f7033779c

View File

@@ -102,15 +102,14 @@ is configured.
### Invocation lifecycle and inspection ### Invocation lifecycle and inspection
Use one ordinary pipeline-acquisition path for native source preparation, Use one ordinary pipeline-acquisition path across execution, planning, and
configured bootstrap, and the handoff to configuration loading. Share that path inspection: select a native source, perform configured bootstrap, and load the
across execution, planning, and inspection. Reuse an already-acquired result returned prepared source. Reuse the completed result within its acquisition
through normal invocation-owned acquisition state; a distinct pipeline object. Each distinct pipeline acquisition follows that same path.
acquisition performs its own native preparation and bootstrap. Replace the
blanket once-per-invocation bootstrap guard with this ordinary acquisition reuse. Acquisition owns explicit, lazy, fallible bootstrap before that pipeline's
Bootstrap remains explicit, lazy, and fallible, before that pipeline's credential credential resolution and adapter construction. Library loaders remain pure.
resolution and adapter construction; ordinary library loaders do not mutate the Keep only the local state needed for ordinary acquisition reuse and reporting.
environment.
Help, version, completion, and scope listing retain their current acquisition-free Help, version, completion, and scope listing retain their current acquisition-free
behavior. Direct inspection of campaign, session, or party documents retains lazy behavior. Direct inspection of campaign, session, or party documents retains lazy
@@ -118,24 +117,26 @@ acquisition: configured pipeline bootstrap runs when that invocation actually
needs the pipeline. Direct document inspection does not acquire a pipeline solely needs the pipeline. Direct document inspection does not acquire a pipeline solely
to bootstrap credentials. to bootstrap credentials.
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 Use CommandKit invocation features if they reduce local lifecycle or reporting
plumbing. Evaluate their native report timing and visibility against Narratio's plumbing. Evaluate their native report timing and visibility against Narratio's
reporting needs. They need not perform bootstrap themselves: acquisition can reporting needs. They need not perform bootstrap themselves: acquisition can
remain responsible for fallible work. Do not preserve existing buffers, wrappers, remain responsible for fallible work. Do not preserve existing buffers, wrappers,
or assembly solely to retain the current implementation structure. or assembly solely to retain the current implementation structure.
### Best-effort configuration comparisons
Treat comparison as an operator convenience backed by native `ckconfig`
behavior. Each side uses ordinary acquisition with its own selections and loads
only the configuration it needs. Delegate loading order, comparison,
presentation, and error handling to the upstream integration.
Both acquisitions use the shared process environment. ConfigKit's native
preservation and overwrite behavior applies as each pipeline is acquired, so an
earlier bootstrap can affect a later load. Accept those ordinary upstream
effects. Use the same acquisition state and native pass-through as other
commands; comparison needs no additional startup or environment-management
layer.
### Reports, errors, and ownership ### Reports, errors, and ownership
Keep the native `SecretsReport` separate from later configuration results and Keep the native `SecretsReport` separate from later configuration results and
@@ -179,9 +180,10 @@ Connect native pipeline source selection, configured bootstrap, and prepared-sou
loading through the application/configuration boundary. Remove duplicate startup loading through the application/configuration boundary. Remove duplicate startup
entry paths, the secrets-directory flag and selector wiring, the direct-directory entry paths, the secrets-directory flag and selector wiring, the direct-directory
route, and the conventional-directory probe. Replace the blanket invocation-level route, and the conventional-directory probe. Replace the blanket invocation-level
bootstrap guard with ordinary acquisition reuse, including during comparisons. bootstrap guard with ordinary acquisition reuse. Native scope loader callbacks
Keep invocation state small and focused on acquisition and reporting; create ordinary acquisitions for their selected configuration, including during
this work does not require a generic startup framework or global cache. comparisons. Keep local state focused on acquisition reuse and reporting, and
remove comparison-specific startup bookkeeping made redundant by this wiring.
Adapt reporting to retain native reports and typed failures separately. Keep Adapt reporting to retain native reports and typed failures separately. Keep
existing CommandKit outcome handling and useful native diagnostic details. existing CommandKit outcome handling and useful native diagnostic details.
@@ -246,10 +248,11 @@ partial effects, without duplicating ConfigKit's complete file-validation test
suite. suite.
Exercise ordinary acquisition reuse, lazy non-pipeline inspection, Exercise ordinary acquisition reuse, lazy non-pipeline inspection,
acquisition-free CLI paths, bare `config explain` help, and comparison sides acquisition-free CLI paths, and bare `config explain` help. Use a few focused
using the same acquisition path. Cover a comparison where only one side needs a comparison cases to verify ordinary acquisition, including when only one side
pipeline and differing configured directories using native environment semantics; needs a pipeline and when configured directories differ. Assert native
tests should not assert per-side isolation or special primary-side behavior. pass-through with shared-environment behavior; keep generic comparison
semantics covered upstream.
Verify the existing command tree and native configuration operations against the Verify the existing command tree and native configuration operations against the
coordinated dependency versions. Retain existing tests for native inspection, coordinated dependency versions. Retain existing tests for native inspection,
credential forwarding/redaction, separate domain derivation, and semantic reuse. credential forwarding/redaction, separate domain derivation, and semantic reuse.