Prepare both configuration comparison inputs

This commit is contained in:
2026-10-11 21:43:30 +00:00
parent d1591463ee
commit d2434b9580
4 changed files with 414 additions and 33 deletions

View File

@@ -169,12 +169,11 @@ remain supplied. The `diff` command defaults to YAML, accepts explicit YAML, and
rejects text and unsupported formats. Its help exposes both right-side flags;
validate, show, sources, and explain do not, and `--path` remains explain-only.
Comparison scope preflight defaults to `app` and rejects `all`, unknown, and
unsupported scopes before suite factories run. Valid comparison preparation
stores the resolved right selection without constructing application input or
shared state. The existing show default and other operation defaults remain
unchanged. Focused tests and the full ckconfig and dependent ckp suites pass.
Separate typed pair preparation remains in Stage 4; acquisition and delivery
remain in Stage 8.
unsupported scopes before suite factories run. Preflight resolves right-side
fields before pair preparation. The existing show default and other operation
defaults remain unchanged. Focused tests and the full ckconfig and dependent ckp
suites passed at this point in the sequence. Separate typed pair preparation is
completed in Stage 4; acquisition and delivery remain in Stage 8.
## Stage 4: Prepare separate typed inputs for the selected pair
@@ -205,11 +204,18 @@ shared state remains uninitialized until execution.
values are usage errors; `ErrFlagWiring` remains operational. Both stop before
state creation and provider calls. Side wording is not a new exact-text contract.
**Completion evidence:** equal selections still prepare both reached inputs;
applicable required selectors, explicit false/zero, parser conversion once, and
repeated-value independence. Verify preflight/check failures stop state/provider
work. Help converts supplied values without invoking suite factories/providers.
Do not assert calls that the accepted early-failure contract allows to be skipped.
**Completion evidence — complete:** comparison plans now hold a dedicated
prepared pair with its selected scope and two `ComparisonSide` values; ordinary
scope inputs remain separate, and the pair is stored only after both inputs pass
checks. The shared helper initializes each reached input, applies the captured
scope bindings, and checks it with that side's selection. Tests cover equal
selections preparing twice, explicit false/zero and required selector handling,
one conversion per supplied occurrence, independent repeated slices, nil factory
zero values, preserved caller aliases, wrapped right-side wiring classification
and context, and absence of a partial plan after a side failure. Shared state is
created only after both checks pass. Help converts even an inapplicable supplied
selector while leaving input/check/state factories untouched. Focused comparison
tests and the full ckconfig and dependent ckp suites pass.
## Stage 5: Implement typed native comparison and diagnostic retention