← Back to Pull requests

fix!: correct statistical, plotting and reporting defects for 0.13.0 #100

Closed
unknown closed this pull request without merging on Sep 06, 2026 12:49 UTC
View on GitHub
unknown unknown commented on Sep 06, 2026 11:13 UTC
Author

[!NOTE]

Drafted by a LLM-based AI tool (Codex/GPT-6).

This fixes statistical, diagnostic, plotting, reporting and upload defects in the shared library and prepares version 0.13.0. Shifting a GP input range previously changed its approximate covariance, missing effective-sample-size columns could pass the convergence gate, and a missing named posterior parameter could silently change the LOO calculation.

  • Correct HSGP boundaries for PyMC's midpoint centring and size the basis before integer truncation when increasing its boundary. Explicit L and center arguments let subset fits preserve the full basis. Covariance tests reduce example errors from about 0.60 and 0.69 to below 0.01; function tests check identical retained-row values under identical weights.

  • Read BFMI by named dimensions and accept NumPy arrays at the consumer patch point. Share diagnostic reductions, fail closed on unavailable diagnostics, record scan_completed, and sanitise nested JSON amendments without changing the caller's input.

  • Reject non-finite LOO thresholds, count unusable diagnostics explicitly, and expose SampledParametersUnavailableError. Fall back only for unavailable names, preserve literal console labels, and support legacy ArviZ attributes.

  • Align medians and intervals on finite draws, reject invalid regression inputs and ROPE widths, and avoid numeric inverse-logit overflow.

  • Fix GP and contour plots, graph layouts, report key lookups and table ranks. Use the public ArviZ figure accessor and close only the collection's figures.

  • Encode blob URLs, retain aligned raw relative_paths, select the root report and omit supplied SAS query strings from rejection messages.
  • The review report records findings and evidence. The 0.13.0 migration guide defines the changed contracts and lists pending consumer changes. The branch includes the 0.12.5 version sync from main and a release commit with a BREAKING CHANGE: footer.

    Validation passed with the isolated source on PYTHONPATH.

  • Full Python suite, 483 passed. The initial review added 52 cases to the original 386; reviewer follow-up adds another 45. The initial follow-up reproduction run failed 31 cases before the fixes.

  • The cited language-reading-predictors test_subfit_convergence_flags_low_bfmi passes in that project's environment.

  • Vocabulary-growth's actual unpublished_assets function accepts the uploaded raw paths for names with spaces, plus signs and non-ASCII characters. Its current URL-stripping call site still requires migration.

  • Ruff lint and formatting, Markdown formatting and spelling, dependency-lock validation and git diff --check pass. Version 0.13.0 builds as a wheel and source distribution. A real matplotlib-backed ArviZ collection test verifies its title and selective closing.
  • Affected HSGP models require coordinated consumer changes and fresh fits. Consumer source and pins have not been changed, and this PR does not publish the release tag. No models were refitted or live Azure uploads performed. Windows was not exercised. The remaining library test warnings come from deliberately constant posterior parameters.

    Diff: 421 lines (+315 / -106) across 5 files Reviewer: frankbuckley Review duration: 96m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 421 lines diff across 5 files
    0.50
    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.362
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #100"
    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: 50% (MEDIUM) · Higher = larger blast radius
    50%
    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: 19.8% · Safe to merge
    19.8%