Skip to content

Add capability-aware diagnostics with explicit older-cluster fallbacks #409

Closed
7 of 7 issues completed
Closed

Description

@hellices

Problem

New diagnostics must not turn korvid into a latest-Kubernetes-only TUI. A server version does not establish that a feature is enabled, its controller or driver is installed, its metrics are exposed, or the current principal can read the evidence. Conversely, a failed or denied read must not be reported as an unsupported feature or a healthy empty result.

Goal and first-version scope

Provide a shared, bounded capability/evidence contract for the nine proposed diagnostic enhancements. Existing core-resource workflows remain usable when optional APIs or integrations are unavailable. No LLM is required.

For each diagnostic, report the selected API/version, available evidence, coverage, observation time, and a reasoned state: available, partially available, unsupported, access denied, unavailable/error, or not yet known. Report a disabled feature gate or missing installation only when evidence actually establishes that reason.

Compatibility and UI contract

  • Reuse existing discovery, authorization checks, and bounded read paths, including resources served only through non-preferred API versions. Discovery-advertised verbs are not proof of user permission; permission checks are advisory and actual reads remain authoritative.
  • Use explicitly supported API-version adapters. A newer server version alone must not enable an action, and an unfamiliar schema must not be silently interpreted as a known one.
  • Detect capabilities at their real scope: API server, selected namespace/principal, node, driver, or metrics provider. A mixed cluster must not inherit one global yes/no result from a single node.
  • Keep the basic diagnostic accessible; explain unavailable detail in the panel and keep keyboard help/Action Palette availability consistent. Do not silently replace native gang scheduling or native workload certificates with a different feature and claim equivalence.
  • Scope cached observations to context/session identity, namespace and authorization state as appropriate. Refresh/invalidate on context or credential changes; discard late results from the old context. Bound retries and cache lifetime so failures are not permanent capability decisions.
  • Show missing, stale, partial, and denied evidence explicitly. Do not infer feature enablement from an empty list or call missing metrics zero.
  • Preserve independently optional observability/agent/MCP dependencies, current layer boundaries, constructor injection, masking, and existing approval/audit invariants. No extra privileges, hidden cluster-wide scans, or write probes.

Support policy

Choose and document the oldest supported Kubernetes version before claiming a tested version range. This issue does not invent a minimum version or promise support for every historical cluster. Distinguish verified integration-test coverage from fixture-only schema compatibility. Record field/API prerequisites rather than unverified release-stage claims.

Acceptance criteria

  • Diagnostic code can consume capability facts without depending on Textual or duplicating version-string gates.
  • API absent, served non-preferred version, unknown schema, denied discovery/read, transient transport failure, disabled feature when observable, and missing metrics produce distinct, useful outcomes.
  • Older-cluster baseline views remain usable with all optional integrations absent.
  • Partial listings, mixed-node support, stale observations, context changes, credential changes, and late worker results cannot produce a false complete/healthy result.
  • The documented matrix covers the chosen oldest supported release, representative intermediate releases, and the newest qualified release, with optional features both present and absent.
  • Tests enforce bounded/cancellable reads, no Secret payload reads, no mutation probes, and no optional-extra import regressions.

Planning

Scheduled for v0.7.0 as the shared diagnostic foundation. Preserve the already-selected v0.6.0 scope (#404, #405, #406, #408) and the v0.5.0 release contract (#387). The nine feature enhancements are separate work and are not required to close this foundation issue. No release date is committed.

Related: #49 (RBAC-limited operation), #345 (non-preferred API discovery), #389 (Pulse), #388 (Action Palette).

Upstream references

Feature issue map

The following are separate deliverables assigned to planning milestones, not release-date guarantees. This shared foundation is scheduled for v0.7.0. Completing this foundation does not require completing its consumers; the feature issues depend on #409, not the reverse.

v0.7.0 — Baseline diagnostics

v0.8.0 — Operational explanations

v0.9.0 — Environment-dependent integrations

Activity

  1. added
    enhancementNew feature or request
    priority: highShould be scheduled ahead of normal-priority work
    area: uiTextual application, screens, widgets, and interaction design
    area: k8sKubernetes clients, resources, operations, and cluster behavior
    concern: architectureModule boundaries, dependency direction, and system structure
    concern: testingTest infrastructure, evaluation, and quality measurement
    concern: reliabilityGraceful degradation, lifecycle safety, and operational correctness
    status: tbdValid follow-up work deferred from the current release scope
    on Sep 18, 2026
  2. added this to the v0.7.0 milestone on Sep 18, 2026
  3. removed
    status: tbdValid follow-up work deferred from the current release scope
    on Sep 18, 2026
  4. added
    status: acceptedConfirmed bug or accepted change; a pull request may follow once the issue is assigned
    on Oct 20, 2026
  5. hellices commented on Oct 29, 2026

    @hellices
    OwnerAuthor

    All six delivery slices of the capability-aware diagnostics design have landed:

    Slice Issue Pull request
    S1 vocabulary and read-outcome classifier #490 #492
    S2 discovery outcomes and API-version resolution #491 #493
    S3 bounded, metadata-safe evidence reads #487 #494
    S4 run tokens and late results #488 #495
    S5 Kubernetes support policy and version matrix #489 #496
    S6 shared evidence renderer #486 #509

    How each acceptance criterion is met:

    • No Textual or version-string gates: core/capability, core/api_versions and core/evidence_reads are pure core, and tach enforces it. Versions are resolved from discovery and never from the server version.
    • Distinct outcomes: one classifier gives distinct states and bases for an absent API, a non-preferred version, an unknown schema, denied discovery or read, transport failures and disabled features. The renderer has a sentence for every basis. A missing provider is UNSUPPORTED/PROVIDER_NOT_CONFIGURED in the vocabulary; no provider collector exists until a consumer needs one, per design decision 7.
    • Older clusters without extras: the readers and the first consumer use core APIs only, and the optional-extras import tests cover every new module.
    • No false complete result: EvidenceSet.baseline treats partial, stale and denied evidence as such. Run tokens drop results after context switches, credential changes, newer runs and selection changes.
    • Documented matrix: docs/kubernetes-support.md and the Kubernetes version matrix verify 1.33 to 1.36, with optional APIs both present and absent.
    • Bounded reads, no payloads, no mutation probes: the readers enforce page, byte and deadline budgets and are cancellable. ConfigMaps and Secrets are read as metadata only. No write or dry-run probe exists.

    The feature issues in the map stay open on their own: #410 has P2 left, and #411 is next in v0.7.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: k8sKubernetes clients, resources, operations, and cluster behaviorarea: uiTextual application, screens, widgets, and interaction designconcern: architectureModule boundaries, dependency direction, and system structureconcern: reliabilityGraceful degradation, lifecycle safety, and operational correctnessconcern: testingTest infrastructure, evaluation, and quality measurementenhancementNew feature or requestpriority: highShould be scheduled ahead of normal-priority workstatus: acceptedConfirmed bug or accepted change; a pull request may follow once the issue is assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions