← Back to Pull requests

feat(evaluation): add production evidence measurement harness #14

Closed
unknown closed this pull request without merging on Sep 29, 2026 04:37 UTC
View on GitHub
unknown unknown commented on Sep 29, 2026 04:33 UTC
Author

Problem

Issue #7 tracks production evidence gaps for provider usage/cost, latency, task success, Redis, ERP, Qdrant, and degraded behavior.

Goal

Make those gaps measurable without inventing production evidence.

Measurements Supported

  • versioned deterministic local workloads with repeated samples and warmup

  • interpolated P50/P95/P99 latency with sample counts and percentile method

  • TTFT/E2E/component latency schema

  • provider estimated vs provider-reported token/cost fields

  • Hit@K, Recall@K, MRR, and vector/BM25/hybrid breakdown fields

  • deterministic task-success and recoverability contracts

  • JSON plus human-readable Markdown evidence artifacts
  • Evidence Source Labels

    PROVIDER_REPORTED, APPLICATION_MEASURED, ESTIMATED, FIXTURE, NOT_AVAILABLE, NOT_MEASURED, and NOT_VERIFIED are serialized explicitly. Missing values remain null.

    Local Verification

    local harness: 36 measured fixture requests, 12 warmup requests
    targeted tests: 4 passed
    unit tests: 1371 passed
    integration tests: 99 passed
    compileall: PASS
    ruff: PASS
    mypy: PASS
    bandit: PASS
    

    The local result is LOCAL_ONLY / FIXTURE and is not production evidence.

    Production / External Systems Not Yet Verified

    Provider, Redis, ERP, and Qdrant suites are disabled by default and emit NOT_VERIFIED without external calls. No production credentials, live ERP, live Redis, provider billing, or destructive Qdrant migration are used.

    Privacy / Safety

    Evidence artifacts are ignored under artifacts/evidence/. No raw provider response, customer data, PII, credential, or billing secret is committed.

    Rollback

    Revert this PR; it is isolated to the measurement harness, fixtures, tests, documentation, and artifact ignore rules.

    Diff: 220 lines (+165 / -55) across 2 files Reviewer: Xander-Xai Review duration: 4m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.37) × (1 − Review Confidence (0.54)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 220 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: 87% · Reviewer familiarity: 35%
    53%
    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.323
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #14"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 53.6% 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.8% (MEDIUM) · Higher = larger blast radius
    36.8%
    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: 53.6% · Lower = rushed or shallow review
    53.6%
    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: 17.1% · Safe to merge
    17.1%