← Back to Pull requests

tests: reject unknown comparison descriptor fields at load #3592

Closed
unknown closed this pull request without merging on Sep 02, 2026 11:43 UTC
View on GitHub
unknown unknown commented on Aug 31, 2026 17:13 UTC
Author

What this does

Follow-up to the descriptor harness (#3577), closing the five findings of its final Copilot review (review 5067507448). A comparison descriptor decides what is compared, so a misspelled field must fail at load, not be silently replaced by a default.

  • Unknown fields are rejected at three levels: the descriptor top level, each scenario, and each ignoredLabels entry. Previously helmUsesKustomizeNameHash: or excludeKind: loaded and were ignored.

  • Action values are typed: ignorePodTemplateAnnotations and compareDataAsYaml must be non-empty lists of keys. Previously a boolean raised TypeError at comparison time and a scalar string was iterated character by character.

  • A declared scenario values file must exist in the chart.

  • *helmOnlyResources patterns now match with per-segment wildcards**, through the same resource_matches used by knownDifferences, as tests/README.md already documents. Previously the mapping was exact string membership.

  • helmOnlyResources patterns get the same shape validation (Kind/name or Kind/namespace/name) as every other pattern family.
  • Verification

  • python3 tests/run_helm_kustomize_comparison.py all — all eleven components, every scenario, green under Helm 4.2.2: every shipping descriptor loads under the stricter rules.

  • python3 tests/comparison_descriptors_test.py — 24 tests, including new guards for each rejection.

  • python3 tests/helm_kustomize_compare_test.py (both invocation forms) — includes a new wildcard-matching test.

  • black --check tests/, git diff --check clean.
  • Diff: 220 lines (+165 / -55) across 2 files Reviewer: juliusvonkohout Review duration: 2550m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 220 lines diff across 2 files
    0.42
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.323
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #3592"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 41.8% (MEDIUM) · Higher = larger blast radius
    41.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.5% · Safe to merge
    16.5%