← Back to Pull requests

fix(schemas): behaviour of GET /schemas with deleted flag, sr migration script #1377

Closed
unknown closed this pull request without merging on Oct 02, 2026 07:39 UTC
View on GitHub
unknown unknown commented on Sep 30, 2026 17:01 UTC
Author

<!-- All contributors please complete these sections, including maintainers -->

About this change - What it does

  • Adds a script for sr migration
  • bin/sr_migrate.py import --source http://source:8081 --target http://target:8081 \
          --scope global --reserve-subject _migration_id_reservation
    

  • Bug fix

  • GET /schemas applied the deleted query parameter the wrong way round:

    | Request | Expected | Actual |
    | --- | --- | --- |
    | GET /schemas | live versions only | live and soft-deleted versions |
    | GET /schemas?deleted=true | live and soft-deleted versions | live versions only |

    InMemoryDatabase.find_schemas dropped soft-deleted versions when include_deleted was True and kept them when it was False. The flag passes straight through from the router, so the inversion reached the API. It has been there since the endpoint was added (77d88e14); a unit test pinned it and noted the semantics were inverted.

    Confluent's API reference describes deleted=true as listing "both current and soft-deleted" schemas, with only current ones listed by default. The per-subject endpoints (/subjects?deleted=true, /subjects/{subject}/versions?deleted=true) already behave that way and are unaffected.

    <!-- Provide a small sentence that summarizes the change. -->

    <!-- Provide the issue number below if it exists. -->
    References: #xxxxx

    Why this way

    <!-- Provide a small explanation on why this is the approach you took for solving this problem. -->

    Diff: 190 lines (+142 / -48) across 2 files Reviewer: muralibasani Review duration: 2318m
    All Vouch review confidence checks passed
    Residual risk 0.23 = Change Risk (0.59) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.59 · 190 lines diff across 2 files
    0.59
    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.314
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.059
    Real PR Conversation Timeline
    1 comments
    "Review active on #1377"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    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: 59.1% (MEDIUM) · Higher = larger blast radius
    59.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: 23.3% · Safe to merge
    23.3%