Skip to content

config: aggregate validation diagnostics - #207

Merged
Zariel merged 1 commit into
mainfrom
agent/aggregate-config-validation
Aug 5, 2026
Merged

config: aggregate validation diagnostics#207
Zariel merged 1 commit into
mainfrom
agent/aggregate-config-validation

Conversation

@Zariel

@Zariel Zariel commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Collect independent structural and semantic ClusterConfig failures in one validation pass. Diagnostics are deterministically ordered, use public named-node paths, include YAML source lines where available, suppress cascades from malformed values, and avoid exposing internal compiler names.

Collect independent structural and semantic configuration failures
before returning, with deterministic public paths and source lines. This
lets operators fix a complete set of actionable node-specific problems
in one validation run without exposing compiler representation details.
@Zariel
Zariel enabled auto-merge (squash) August 5, 2026 23:18
@greptile-apps

greptile-apps Bot commented Aug 5, 2026

Copy link
Copy Markdown

Greptile Summary

The PR changes ClusterConfig validation from fail-fast behavior to deterministic aggregation of independent structural and semantic diagnostics.

  • Adds source-aware validation with public paths and YAML line numbers.
  • Collects validation failures across nodes, storage, host configuration, extensions, labels, and taints.
  • Runs source validation before the existing archive build pipeline.
  • Documents the aggregated diagnostic contract and adds CLI coverage for stable ordering and public names.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete blocking or independently actionable non-blocking defects identified.

The new validation pass preserves the existing full BuildArchive pipeline while aggregating source and effective-node errors, suppressing dependent cascades, and deterministically presenting public diagnostics.

Important Files Changed

Filename Overview
internal/installer/configbundle/validation.go Introduces source-aware issue aggregation, cascade suppression, deterministic sorting, public-path extraction, and YAML line indexing.
internal/installer/configbundle/bundle.go Refactors normalization and resolved-node validation to collect independent semantic failures rather than returning the first error.
internal/installer/configbundle/schema.go Extends reflected YAML validation to aggregate unsupported fields and structural type mismatches.
internal/installer/configbundle/source_layering.go Aggregates storage, host configuration, extension, access, disk, label, and taint validation across effective node layers.
cmd/katlctl/main.go Adds the source-only diagnostic pass before the existing full archive validation pipeline.
internal/installer/manifest/manifest.go Makes label validation deterministic and exposes a safe helper for validating operator-authored labels and taints.
cmd/katlctl/main_test.go Covers stable public-path ordering, source lines, type diagnostics, node naming, and suppression of internal implementation names.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[ClusterConfig YAML] --> B[Parse YAML node tree]
    B --> C[Collect structural and type issues]
    B --> D[Decode SourceConfig]
    D --> E[Normalize and collect semantic issues]
    E --> F[Resolve node layers]
    F --> G[Collect effective per-node issues]
    C --> H[Suppress dependent cascades]
    D --> H
    E --> H
    G --> H
    H --> I[Deduplicate and sort by public path]
    I --> J{Any issues?}
    J -- Yes --> K[Return aggregated diagnostics with source lines]
    J -- No --> L[Continue BuildArchive validation]
Loading

Reviews (1): Last reviewed commit: "config: aggregate validation diagnostics" | Re-trigger Greptile

@Zariel
Zariel merged commit 0ec60a0 into main Aug 5, 2026
6 checks passed
@Zariel
Zariel deleted the agent/aggregate-config-validation branch August 5, 2026 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant