← Back to Pull requests

fix: include certificate operation details in readiness errors #7683

Closed
unknown closed this pull request without merging on Oct 22, 2026 19:18 UTC
View on GitHub
unknown unknown commented on Oct 22, 2026 08:43 UTC
Author

What

Include certificate-operation metadata and service error details when TLS certificate readiness reports a failed, cancelled, or unknown operation status. Serialize SDK field values and exclude CSR bytes from diagnostics.

Why

Status alone does not explain why certificate issuance stopped. Status details, issuer metadata, request/resource identifiers, and nested service errors provide context for investigation without changing readiness decisions.

Testing

Added table-driven regression cases for failed, cancelled, and unknown statuses, covering diagnostic values, error wrapping, CSR exclusion, and non-mutation. Existing readiness cases cover success, pending, missing resources, nil status, and client errors.

Local validation passed:

  • Focused readiness/diagnostics tests: all 18 subtests.

  • Full azureresources package tests: 83.0% statement coverage.

  • Repository lint scoped to the changed package: zero issues.

  • Backend build, including a forced repeat.

  • Repository-pinned import formatting, Go formatting, and whitespace checks.
  • Full repository tests and remote CI have not been run as part of local validation. Optional deployment-environment generation emitted local setup warnings; backend compilation succeeded. Deployment-environment generation is not validated, and this PR contains no deployment or infrastructure changes.

    Special notes for your reviewer

    SDK ErrorInfo retains message and nested-error payloads behind Error(); SDK JSON includes only its exported Code. The formatter includes both SDK JSON and quoted service error details. CSR is removed from a copy so the response is not mutated. Success, pending, nil-status, and error-return semantics remain unchanged.

    No tracking issue was supplied for this narrowly scoped diagnostics improvement.

    PR Checklist

  • PR is scoped to a single task (no mixed concerns)

  • Title follows Conventional Commits format

  • Summary explains the Why behind the change

  • Linked to relevant ticket/issue (none supplied; explanation above)

  • Screenshots included (not applicable)

  • Self-reviewed the diff

  • CI/CD checks are passing (ignore Tide; local targeted checks pass, remote CI not yet checked)

  • Draft PR used for WIP (not applicable; ready for review)

  • Commit history is clean (single signed commit)

  • Tricky code blocks are commented

  • Specific reviewers tagged

  • All comment threads resolved before merge
  • If E2E tests are included: not applicable.

    ---
    AI-generated. Review for accuracy.

    @machi1990 requested from Slack

    Diff: 323 lines (+242 / -81) across 4 files Reviewer: JameelB Review duration: 634m
    All Vouch review confidence checks passed
    Residual risk 0.17 = 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 · 323 lines diff across 4 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.346
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #7683"
    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.0% (MEDIUM) · Higher = larger blast radius
    42.0%
    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.6% · Safe to merge
    16.6%
    Repository