← Back to Pull requests

kernel_version: allow "." before the vendor suffix #472

Closed
unknown closed this pull request without merging on Nov 27, 2026 15:35 UTC
View on GitHub
unknown unknown commented on Nov 17, 2026 10:28 UTC
Author

Fixes #471.

Summary

parse_kernel_version cut the release string at the first character that was neither a digit nor ., so 6.18.52.mshv1-2.azl3 (Azure Linux guest kernel on AKS Pod Sandboxing / Kata) became 6.18.52. and failed on the empty trailing component. host_kernel_version() then panics and runc aborts container startup.

 suffix starts at the first byte that is
-  not a digit and not "."
+  not a digit and not ".", or
+  a "." followed by an ASCII letter

Stray dots that the existing tests reject on purpose (42.12., 4.10.-default, 1..3) are still rejected.

Evidence

New test parse_kernel_version_with_dot_suffix, run in rust:1.99-trixie:

parse_kernel_version("6.18.52.mshv1-2.azl3") == Some(6.18.52)
parse_kernel_version("6.18.52-mshv1-2.azl3") == Some(6.18.52)
parse_kernel_version("5.4.0.custom")         == Some(5.4.0)
parse_kernel_version("4.19.112.x86_64")      == Some(4.19.112)
parse_kernel_version("2.6.16.48.foo.1")      == Some(2.6.16.48)

  • Before: cargo test --lib utils::kernel_version → 15 passed; 1 failed (parse_kernel_version_with_dot_suffix)

  • After: 16 passed; 0 failed; cargo fmt --check and cargo clippy --all-targets clean.

    Merge Danger

    Door: two-way

    Blast Radius: narrow

    Only changes which release strings parse; strings that parsed before give the same result. Releases of the form X.Y.Z.<letter>… now parse instead of panicking.

    Diff: 182 lines (+136 / -46) across 2 files Reviewer: cyphar Review duration: 14707m
    All Vouch review confidence checks passed
    Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 182 lines diff across 2 files
    0.36
    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.312
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #472"
    general weight: 0.35
    Reviewers
    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: 35.6% (MEDIUM) · Higher = larger blast radius
    35.6%
    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: 14.1% · Safe to merge
    14.1%