Separate comparison side selectors
This commit is contained in:
@@ -465,10 +465,11 @@ configuration inspection API. PromptKit owns the meaning of that native
|
||||
comparison; CommandKit uses the existing `config diff` preparation and report
|
||||
path.
|
||||
`--config` and `--overlay` select the left side. `--against-config` and
|
||||
`--against-overlay` independently override the right side. When a right-side
|
||||
field is omitted, it inherits the corresponding left value and supplied state;
|
||||
an explicit empty string overrides it and remains supplied. Equal selections are
|
||||
allowed; their equality alone does not cause CommandKit to skip the provider.
|
||||
`--against-overlay` select the right side. An omitted field keeps that side's
|
||||
ordinary application loading behavior and unsupplied state; an explicit empty
|
||||
string remains supplied. Application selectors affect the left side, while
|
||||
declared `--against-*` counterparts affect the right. Equal selections are
|
||||
allowed and do not cause CommandKit to skip the provider.
|
||||
|
||||
Automatic output is YAML. The shared `--format` also accepts YAML, JSON, and
|
||||
text; text uses the same structured representation. For example:
|
||||
|
||||
@@ -237,8 +237,10 @@ Use `ckconfig.Command(ckconfig.Suite[I, S]{...})` when the application needs
|
||||
multiple named scopes, selector flags, scope-aware input checks, or shared
|
||||
acquisition state or a custom comparison provider. A declared `Diff` capability
|
||||
uses `Scope.Compare`; `ckconfig.FromConfigKit` and `AppCommand` provide the
|
||||
ConfigKit-backed implementation. Each comparison side gets its own initialized
|
||||
and checked input, while state is shared by the invocation. Factory results
|
||||
ConfigKit-backed implementation. `Selector.AgainstName` opts a selector into an
|
||||
independent right-side flag. Each comparison side gets its own initialized and
|
||||
checked input, with only its supplied selectors applied; state is shared by the
|
||||
invocation. Factory results
|
||||
remain caller-owned, so separate initialization calls do not guarantee distinct
|
||||
objects. See
|
||||
[ckconfig.Suite's GoDoc](../../integrations/ckconfig/contracts.go) for factory
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Shared reporting and PromptKit v0.20.0 implementation plan
|
||||
|
||||
Status: implementation in progress; Stages 1–14 complete.
|
||||
Status: implementation in progress; Stages 1–15 complete.
|
||||
|
||||
## Scope, authority, and execution
|
||||
|
||||
@@ -539,6 +539,12 @@ failure, independently supplied diagnostics, and metadata/help without loading.
|
||||
|
||||
## Stage 15: Independent comparison selector inputs
|
||||
|
||||
**Complete.** Comparison sides now capture and apply independently declared
|
||||
selectors and configuration selections. `FlagValues.ApplySuppliedTo` was added
|
||||
to core because ordinary captured replay also applies flag defaults; this keeps
|
||||
each side's factory defaults intact while retaining required checks and ordered
|
||||
occurrences. Root, ckconfig, and ckprompt workspace suites passed with Go 1.27.0.
|
||||
|
||||
Replace inheritance in [input.go](../../integrations/ckconfig/input.go).
|
||||
Add `Selector.AgainstName string`; an empty name declares no right-side flag.
|
||||
For a declared counterpart use Stage 6's `RenameFlag` to retain domain parsing
|
||||
|
||||
Reference in New Issue
Block a user