← Back to Pull requests

[Docs] Require cold-load timing for in-process backends #51

Closed
unknown closed this pull request without merging on Oct 08, 2026 15:08 UTC
View on GitHub
unknown unknown commented on Oct 07, 2026 10:13 UTC
Author

Why

The backend checklist does not ask contributors to measure cold model loading. Issue #29 describes how throwaway weight initialization previously dominated Laya's startup time.

Addresses #29. The Julia-1 load measurement remains part of #25; this PR adds the contributor guidance, not that measurement.

How

Add step 5 to "Adding a backend" in docs/decision-models.md. It asks for a fresh-process from_env() measurement, separate from warm inference and episode timing, and profiling for loads above 5 seconds.

Skipping random weight initialization is allowed only when a checkpoint replaces every weight and loading fails on missing keys. Prefer fixing the loader in its model package. HTTP-served backends are outside this step's scope.

What

  • Add the cold-load timing and profiling step.

  • Add an Unreleased changelog entry.

  • No runtime code, dependencies, or model behavior changes.
  • Verification

  • git diff --check: passed.

  • Rendered the changed Markdown and checked that "Adding a backend" has five ordered steps, with the timing threshold, missing-key safeguard and HTTP scope intact.

  • Visually inspected the rendered section: step 5 is readable and remains in the ordered list.

  • Reviewed the complete diff against main at e7b7d2bcfb066a912e2e6bd935f1d6608f0fde1b: 8 added documentation lines, 0 authored-code lines.

  • Did not run Python lint, type checks, pytest or smoke tests: this changes only two Markdown files.

  • No cold model load was measured in this PR. The Julia-1 contributor owns that follow-up under #25.
  • Demo / evidence

    N/A for an agent-run video: documentation-only change. Verification is the rendered five-step checklist; no agent behavior or performance result is claimed.

    Diff: 217 lines (+162 / -55) across 2 files Reviewer: hsliuustc0106 Review duration: 1735m
    All Vouch review confidence checks passed
    Residual risk 0.14 = 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 · 217 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.322
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #51"
    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: 36.7% (MEDIUM) · Higher = larger blast radius
    36.7%
    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.5% · Safe to merge
    14.5%