Record inspection comparison across application types
This commit is contained in:
@@ -2,7 +2,10 @@
|
||||
|
||||
## Status
|
||||
|
||||
Accepted and implemented. The
|
||||
Accepted and implemented. Extended by
|
||||
[ADR 0024](0024-compare-inspection-views-across-application-types.md) for inspection
|
||||
view comparison across application Go types. The existing same-type comparison
|
||||
API continues to follow this decision. The
|
||||
[configuration contract](../config.md#effective-configuration-diffs) owns current
|
||||
behavior. Completed planning and remediation records are preserved in Git
|
||||
history at `1c2610c` under `docs/roadmap/`.
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
# ADR 0024: Compare Inspection Views Across Application Types
|
||||
|
||||
## Status
|
||||
|
||||
Accepted.
|
||||
|
||||
## Date
|
||||
|
||||
2026-11-20
|
||||
|
||||
## Context
|
||||
|
||||
An application can load configuration once and share the result with libraries.
|
||||
Each library needs to inspect its own section while the application chooses the
|
||||
Go type that holds the complete configuration.
|
||||
|
||||
[ADR 0010](0010-effective-configuration-diff.md) provides comparison between
|
||||
results with the same Go configuration type. A shared inspection view lets a
|
||||
library compare configurations without knowing that application type.
|
||||
|
||||
## Decision
|
||||
|
||||
Provide inspection views that compare saved configuration values from successful
|
||||
loads regardless of the original application Go types. Views being compared
|
||||
select the same location within their respective configurations.
|
||||
|
||||
ConfigKit owns comparison and redaction. Use the saved load snapshots and the
|
||||
equality, sequence comparison, and sensitive-value handling established by
|
||||
ADR 0010. Report changes that overlap the selected location, retaining original
|
||||
application paths and any containing changes.
|
||||
|
||||
This decision extends ADR 0010. The existing same-type comparison API continues
|
||||
to follow that decision.
|
||||
|
||||
## Alternatives Considered
|
||||
|
||||
- **Require matching application Go types.** This follows the existing API's
|
||||
restriction but adds type checks or application-specific adapters to a shared
|
||||
inspection view.
|
||||
- **Let libraries implement comparison.** This gives libraries control but
|
||||
duplicates ConfigKit's comparison and redaction rules.
|
||||
|
||||
## Consequences
|
||||
|
||||
Libraries can offer configuration comparison through one inspection interface
|
||||
across applications. Applications retain ownership of their Go configuration
|
||||
types and presentation.
|
||||
|
||||
A reported change to a containing value may include configuration outside the
|
||||
selected section. The view provides a reporting focus, with the existing
|
||||
redaction rules applied to all returned values.
|
||||
@@ -30,6 +30,9 @@ API remain outside this roadmap.
|
||||
|
||||
Add two complementary capabilities: trusted access to current typed settings,
|
||||
and a lightweight reporting view over existing frozen inspection state.
|
||||
The inspection comparison extension is recorded in
|
||||
[ADR 0024](../adr/0024-compare-inspection-views-across-application-types.md), which
|
||||
extends [ADR 0010](../adr/0010-effective-configuration-diff.md).
|
||||
|
||||
### Typed value access
|
||||
|
||||
@@ -263,9 +266,8 @@ presence-state handling, resource capture, and settings ownership refactoring.
|
||||
repository checks. This is an additive API; existing loading, inspection,
|
||||
comparison, and shared source-version behavior remain as documented.
|
||||
Clarify the distinction between same-type `Diff[T]` and structural view
|
||||
comparison in the architecture policy and comparison documentation. Record
|
||||
the extension to [ADR 0010](../adr/0010-effective-configuration-diff.md) through
|
||||
the ADR process, preserving its accepted decision content.
|
||||
comparison in the architecture policy and comparison documentation, following
|
||||
[ADR 0024](../adr/0024-compare-inspection-views-across-application-types.md).
|
||||
|
||||
Completion means both representative library consumers can obtain their typed
|
||||
settings and existing provenance from one application result without application
|
||||
|
||||
Reference in New Issue
Block a user