Use native configuration validation and diagnostics
This commit is contained in:
@@ -70,61 +70,32 @@ Required remediation:
|
||||
existing round-trip expectation rather than preserving the newly frozen
|
||||
behavior as a contract.
|
||||
|
||||
## 2. P2: Classify identifiable Narratio input errors consistently
|
||||
## 2. Simplify native validation and error presentation
|
||||
|
||||
Status: Domain-validation unit completed; native identity classification remains
|
||||
pending upstream support. Catalog derivation now identifies invalid relations
|
||||
with a typed input error, retaining its underlying cause. Native `artifacts list`
|
||||
and `run --stage analyze` regressions return status 2 for an unknown dependency;
|
||||
joined storage/cancellation errors retain status 1. ckconfig v0.9.0 and the current
|
||||
upstream checkout classify native ConfigKit load errors only and expose no
|
||||
consumer classification hook. An upstream extension and its adoption are still
|
||||
needed for campaign/session assertions in native acquisition and comparison;
|
||||
permission to modify that repository has been requested.
|
||||
Status: Completed. Identity assertions now use ConfigKit validation, and domain
|
||||
commands present loading diagnostics through `ckconfig.AdaptDiagnostics`. Removed
|
||||
the custom identity error and its classification/presentation branches, along
|
||||
with configuration-layer diagnostic rewriting. Native causes and joined
|
||||
operational failures remain intact. Regression coverage exercises campaign and
|
||||
session mismatches (including right-side comparisons), malformed and missing
|
||||
sources, and native warning visibility alongside joined failures. Full tests,
|
||||
race tests, vet, and build pass with Go 1.27.4. No upstream changes were needed.
|
||||
|
||||
Stages: 1, 7–10, and 12; native outcome verification in Stage 21.
|
||||
Use ConfigKit's validation lifecycle for campaign/session identity assertions,
|
||||
including comparison selections. Let ckconfig present and classify their native
|
||||
diagnostics. Remove the separate identity error type and its presentation and
|
||||
classification branches; no upstream extension is required.
|
||||
|
||||
Locations: `internal/app/configuration_commands.go:75–96`,
|
||||
`internal/app/configuration_acquisition.go:294–297`, and
|
||||
`internal/app/command_outcome.go:30–55`.
|
||||
Retain native ConfigKit load errors and source evidence. Use ckconfig's existing
|
||||
diagnostic adapter at Narratio's command boundary instead of rewriting source IDs
|
||||
and embedding rendered diagnostics in configuration errors. Preserve useful
|
||||
operation context and all joined operational causes.
|
||||
|
||||
Two integration paths return operational status 1 for identifiable input errors:
|
||||
|
||||
1. Native configuration acquisition/comparison returns
|
||||
`config.SessionIdentityError` for a supplied campaign/session identity that
|
||||
differs from the selected file. The scope wrapper adds explanatory text but
|
||||
passes the same error to ckconfig, whose classifier does not know Narratio's
|
||||
type. For example, `config show --scope campaign --campaign-file FILE
|
||||
--campaign WRONG` returns status 1. Session assertions and comparison-side
|
||||
assertions have the same problem. The application outcome adapter recognizes
|
||||
the type for domain commands, but native config commands do not use it.
|
||||
2. Catalog derivation returns plain errors for invalid configuration relations.
|
||||
A configured artifact with `depends_on: [missing]` reaches domain derivation,
|
||||
then `artifacts list` and `run --stage analyze` return status 1. The error
|
||||
unambiguously identifies invalid supplied configuration, not a service failure.
|
||||
Such relational validation belongs in domain derivation; moving family
|
||||
expansion into native app inspection is not the remedy.
|
||||
|
||||
The roadmap and [CLI outcome contract](../cli.md#cancellation-and-exit-status)
|
||||
reserve status 2 for invalid invocation or identifiable configuration input.
|
||||
Current identity tests check only a nonzero status and explanatory text, leaving
|
||||
this integration mismatch undetected.
|
||||
|
||||
Required remediation:
|
||||
|
||||
- Preserve the agreed status 2 classification for post-resolution identity
|
||||
assertions in native config acquisition and comparison, including the right
|
||||
side. Use genuine native resolution/validation or a supported classification
|
||||
integration point while preserving the underlying typed cause. If the released
|
||||
API lacks the necessary integration point, address that narrow capability
|
||||
upstream rather than forking native commands or matching error strings.
|
||||
- Give Narratio-owned invalid domain-configuration relations typed input
|
||||
classification at their existing boundary. Keep cancellation, storage/access
|
||||
failures, shutdown/persistence errors, and mixed operational causes at status 1.
|
||||
Do not classify every acquisition or catalog error as user input indiscriminately.
|
||||
- Add native invocation regressions asserting exact status classification for
|
||||
campaign/session mismatch, comparison-side mismatch, and an unknown artifact
|
||||
dependency, alongside an operational or joined-cause counterexample.
|
||||
Keep minimal outcome adaptation for Narratio-owned input errors, partial reports,
|
||||
and execution/persistence/resource-release failures. Preserve native visibility,
|
||||
classification, and secret-safe diagnostics. Verify identity mismatches, malformed
|
||||
and missing sources, comparison sides, and mixed operational failures through
|
||||
native invocations.
|
||||
|
||||
## 3. P2: Correct the documented empty spell-catalog behavior
|
||||
|
||||
@@ -516,4 +487,5 @@ with official Go 1.27.4. Documentation checks and `git diff --check` also pass.
|
||||
Native regression coverage verifies equivalent-party resume, real roster changes,
|
||||
source normalization, and typed domain-input outcomes. No upstream files,
|
||||
dependencies, releases, tags, or remote repositories were changed. Finding 2's
|
||||
native configuration identity classification remains outstanding as recorded above.
|
||||
local simplifications are also complete and verified with the same checks on
|
||||
Go 1.27.4, as recorded above.
|
||||
|
||||
Reference in New Issue
Block a user