← Back to Pull requests

Harden current-schema capacity reservation and recovery status #920

Closed
unknown closed this pull request without merging on Oct 16, 2026 02:02 UTC
View on GitHub
unknown unknown commented on Oct 15, 2026 17:30 UTC
Author

Summary


Current-schema deployment now reserves a mathematically bounded growth envelope for a live WAL database instead of treating a racy filesystem sample as an exact ceiling. Status also distinguishes unresolved marker loss from completed, markerless predecessor recovery.

Changed


  • Compute each reservation ceiling per filesystem so two physical copies, maximum admitted live growth, capacity evidence, and the unchanged 20 GiB floor all fit simultaneously

  • Recheck both the stopped database size and free-space floor under exclusive ownership before backup or migration

  • Persist initial/rechecked source sizes, timestamps, and the reserved ceiling in durable transaction evidence

  • Put both allocations and evidence persistence under one cleanup boundary; failed cleanup retains the claim and selects no-snapshot recovery rather than claiming a predecessor checkpoint

  • Show recovery commands only for an actual claim owner; markerless unresolved status warns to preserve evidence, while completed predecessor status remains terminal

  • Cover real WAL growth/checkpointing, modeled interleaved under-sampling, same/split filesystem arithmetic, floor loss, allocation/evidence cleanup faults, and status ownership states
  • Why


    A live main/WAL/SHM sample can become stale through ordinary writes or be internally inconsistent if checkpointing races its separate filesystem stats. Reserving from proven filesystem headroom makes that sample a lower-bound observation while preserving fail-closed stopped-state checks.

    Validation


    The focused deployment-controller suites passed 223 tests; full devpy passed 699 tests. The latter unexpectedly invoked a real local Rust build through an existing seed-test setup and is recorded as resource-noncompliant evidence, not a safe qualification method. Subsequent review was source-only and found no actionable findings. Hosted CI is the authoritative post-commit qualification; no production recovery, retry, or mutation is authorized by this PR.

    Diff: 250 lines (+187 / -63) across 3 files Reviewer: scottopell Review duration: 512m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 250 lines diff across 3 files
    0.39
    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.331
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #920"
    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: 39.0% (MEDIUM) · Higher = larger blast radius
    39.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: 15.4% · Safe to merge
    15.4%