Files
configkit/docs/adr/0024-compare-inspection-views-across-application-types.md

1.9 KiB

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 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.