← Back to Pull requests

fix: default release, large IDs, max_age in days, and error JSON #18

Closed
unknown closed this pull request without merging on Nov 04, 2026 12:57 UTC
View on GitHub
unknown unknown commented on Oct 23, 2026 06:29 UTC
Author

Summary


  • Default release: pick the first OCP release (N.N) without a GA date, so the default no longer resolves to gcp-hcp-main and returns empty job data.

  • fields: keep large integers exact, so filtered Prow run IDs can be passed to get_job_run_summary.

  • get_job_runs: prow_id and timestamp are strings in Sippy, so the reshape into JobRunRow failed and the tool returned the raw, untrimmed payload. Fixed the types and moved the fixtures to the live shape.

  • search_ci_logs: accept day values for max_age (7d becomes 168h), and return an invalid-parameter error for counts that overflow and for other values with a day unit (1d12h, 1.5d).

  • Error results are valid JSON: InvalidParam quoted the parameter name inside a JSON string, and %q escapes like \x01 are not JSON.
  • Merge order: #18, then #19, then #20. This PR does not depend on the others and does not conflict with them.

    Fixes #15

    Test plan


  • make test, make lint, make smoke (same results as main), plus new unit tests for each fix

  • Manual: default get_job_report now returns 5.1 jobs; get_job_runs returns the trimmed rows with the exact string prow_id; max_age: 1d works and 1d12h gives a 400
  • <!-- This is an auto-generated comment: release notes by coderabbit.ai -->
    <!-- coderabbit-ai-generated:v1 -->

    Implementation details

  • FilterFields decodes numbers as json.Number and leaves input unchanged if trailing data follows the JSON value.

  • Day-based max_age values are converted to hours. Values above the Go-duration-safe limit return an invalid-parameter result.

  • Release selection filters for N.N releases first, then falls back to the full release list if none match.

  • Error results are JSON-marshaled with an error message and HTTP status code.

  • <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 235 lines (+176 / -59) across 2 files Reviewer: fonta-rh Review duration: 17668m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 235 lines diff across 2 files
    0.37
    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.327
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #18"
    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: 37.1% (MEDIUM) · Higher = larger blast radius
    37.1%
    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.7% · Safe to merge
    14.7%