← Back to Pull requests

Accept a `.inf` string for unbounded process thresholds #25422

Closed
unknown closed this pull request without merging on Oct 21, 2026 19:01 UTC
View on GitHub
unknown unknown commented on Sep 28, 2026 22:57 UTC
Author

Checklist before requesting review

  • I self-reviewed the full diff, and this description matches the final change

  • Tests cover the change, or this description explains why none are needed

  • Automated review comments, including Codex review, were addressed or answered

  • I, the human author, understand this change, can explain it to reviewers, and believe it meets the repository standards
  • What does this PR do?

    Lets the process check's thresholds.warning and thresholds.critical take the string '.inf' as an unbounded upper bound, and rejects threshold values the check can't use at config load.

  • spec.yaml: each bound is anyOf: [number, '.inf']; the description states the bound rules. The generated model and conf.yaml.example match.

  • process.py: converts '.inf' to float('inf') before comparing, and treats an explicit null range as the default [1, inf] instead of crashing.

  • config_models/validators.py: instance_thresholds checks every bound on the raw config, before pydantic's lax float parsing. Only numbers, or '.inf' as the upper bound, pass; other strings, booleans, NaN, infinite bounds in the wrong direction or past the two bounds, and inverted ranges fail with a ConfigurationError naming the value.

  • test_process.py: end-to-end dd_run_check cases for '.inf', null ranges, and every rejected input.
  • Motivation

    Customer report (Zendesk 3018831): an unbounded threshold set in Fleet Automation's Remote Config UI didn't work. Local YAML .inf is a float, but Remote Config sends JSON, which has no infinity, so it arrived as null. The string '.inf' survives JSON. Follows #25140, which made warning/critical structured. Fleet form support for this shape is still to do (ddoghq/web-ui#17846 was backed out and has no net changes).

    Compatibility

  • Older Agents can't use '.inf': process 5.5.3 rejects it at load, and 5.5.2 and earlier load it but fail every run with a TypeError. Fleet should only offer it to Agents with process 6.0.0 or later.

  • The schema's anyOf can't express position, so a schema-valid ['.inf', 5] passes the form but fails at load. The Fleet form should offer .inf only for the upper bound; this agent-side load error is the intended backstop.

  • Breaking change (.changed, major bump of process from 5.5.3 to 6.0.0): a customer with an odd threshold today (for example [10, 5], [.inf, 5], [1, .nan], [true, 5], or [2, 'inf'], which fails only after the metrics are sent) still has a running check that sends process metrics, even though the threshold is wrong. After they upgrade, that check fails to load and sends nothing, so their dashboards and monitors for it go quiet. Something that was running stops running, which is why this is .changed. Normal configs like [5, 10] or [2, '.inf'] are unaffected. .fixed covers '.inf' and the null crash.
  • Diff: 373 lines (+279 / -94) across 4 files Reviewer: Yqnn Review duration: 32883m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 373 lines diff across 4 files
    0.43
    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.354
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #25422"
    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: 42.8% (MEDIUM) · Higher = larger blast radius
    42.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.9% · Safe to merge
    16.9%