Forecast CI feedback loop economics

Forecast company-local CI feedback delay, compute spend, terminal failure and governed post-release escape loss with hierarchical Dirichlet/Beta outcomes, log-normal feedback, runner-queue amplification, coherent common shocks and strict latest-period validation against global baselines.

What it's for

Shows CTOs what slow or unreliable CI is likely to cost—not only in runner spend, but in waiting time, failed releases, escaped defects and severe common-mode downside—using a model that must first work on their own later data.

What you give it

Inputs split into evidence read from your connected systems, calibration your team owns, and numerical controls that affect precision but never the result's meaning.

Field Type Role Required
common_scenarios array of objects (7 fields) Evidence Yes
current_workloads array of objects (9 fields) Evidence Yes
historical_periods array of objects (15 fields) Evidence Yes
max_detail_rows integer ≥ 1, ≤ 500 Numerical control Optional
maximum_failure_ece number ≥ 0, ≤ 1 Your calibration Optional
minimum_training_periods integer ≥ 2, ≤ 100 Your calibration Optional
minimum_validation_improvement number ≥ 0, ≤ 1 Your calibration Optional
posterior_draws integer ≥ 200, ≤ 20000 Numerical control Optional
seed integer ≥ 0, ≤ 4294967295 Numerical control Optional
tail_probability number > 0, < 1 Your calibration Optional
validation_periods integer ≥ 1, ≤ 12 Your calibration Optional

Each historical_periods record

Field Type Required
clean_first_pass_count integer (≥ 0) Yes
compute_minutes_sum number (≥ 0) Yes
eligible_run_count integer (≥ 1) Yes
evidence_verified boolean Yes
feedback_log_minutes_sq_sum number (≥ 0) Yes
feedback_log_minutes_sum number Yes
feedback_minutes_sum number (≥ 0) Yes
id string (non-empty) Yes
outcome_mature boolean Yes
period_index integer (≥ 0) Yes
pipeline_class_id string (non-empty) Yes
post_release_escape_count integer (≥ 0) Yes
recovered_flake_count integer (≥ 0) Yes
terminal_failure_count integer (≥ 0) Yes
timeout_or_cancel_count integer (≥ 0) Yes
Example input
{
  "common_scenarios": [
    {
      "arrival_multiplier": 1,
      "common_escape_probability": 0,
      "common_failure_probability": 0,
      "id": "normal",
      "probability": 1,
      "runner_availability": 1,
      "service_time_multiplier": 1
    }
  ],
  "current_workloads": [
    {
      "compute_cost_per_minute": 0.1,
      "evidence_verified": true,
      "expected_run_count": 40,
      "id": "checkout-ci",
      "pipeline_class_id": "fast",
      "post_release_escape_loss": 10000,
      "runner_capacity_minutes": 1000,
      "terminal_failure_loss": 500,
      "value_per_feedback_minute": 2
    }
  ],
  "historical_periods": [
    {
      "clean_first_pass_count": 18,
      "compute_minutes_sum": 60,
      "eligible_run_count": 20,
      "evidence_verified": true,
      "feedback_log_minutes_sq_sum": 51.80580787960469,
      "feedback_log_minutes_sum": 32.18875824868201,
      "feedback_minutes_sum": 100,
      "id": "fast-0",
      "outcome_mature": true,
      "period_index": 0,
      "pipeline_class_id": "fast",
      "post_release_escape_count": 1,
      "recovered_flake_count": 1,
      "terminal_failure_count": 1,
      "timeout_or_cancel_count": 0
    },
    {

Truncated for display — the full payload is 234 lines.

What you get back

This is the actual output of running the example above — computed by the same function the platform calls, not an illustration.

Example output
{
  "decision": "accepted",
  "detail_truncated": false,
  "interpretation": "The forecast is company-local and aggregate. Post-release escapes require governed incident linkage; association with a CI profile is not causal proof that a test or team caused an incident.",
  "method": "hierarchical_dirichlet_lognormal_ci_queue_economic_forecast",
  "portfolio_forecast": {
    "conditional_value_at_risk": 66309.5687,
    "expected_compute_cost": 13.1772,
    "expected_feedback_delay_cost": 437.2606,
    "expected_post_release_escape_loss": 24166.6667,
    "expected_terminal_failure_loss": 1428.3333,
    "expected_total_economic_loss": 26045.4378,
    "posterior_draws": 300,
    "tail_probability": 0.1,
    "value_at_risk": 51911.6219
  },
  "validation": {
    "accepted": true,
    "all_evidence_verified_and_mature": true,
    "baseline_feedback_mae_minutes": 7.5,
    "baseline_multiclass_log_loss": 0.96,
    "failure_ece": 0.0167,
    "holdout_periods": [
      5
    ],
    "holdout_row_count": 2,
    "holdout_run_count": 40,
    "maximum_failure_ece": 0.2,
    "minimum_validation_improvement": 0,
    "model_feedback_mae_minutes": 0.5556,
    "model_multiclass_log_loss": 0.7972,
    "relative_feedback_mae_improvement": 0.9259,
    "relative_log_loss_improvement": 0.1696,
    "training_period_count": 5,
    "training_run_count": 200,
    "unseen_current_class_ids": [],
    "unseen_holdout_class_ids": [],
    "unsupported_holdout_row_count": 0
  },
  "workloads": [
    {
      "expected_economic_loss": 26045.4378,
      "expected_post_release_escapes": 2.4167,
      "expected_terminal_failures": 2.8567,

Truncated for display — the full payload is 51 lines.

How it works

Forecasting & survival — Estimate when something completes or fails, with censoring and unresolved work handled honestly rather than dropped.

  1. 1 Construct consecutive zero-inclusive pipeline-class periods with mutually exclusive first-pass, recovered-flake, terminal-failure and timeout/cancel outcomes, mature post-release escape linkage, feedback log moments, compute and immutable evidence; reserve the latest whole periods before fitting.
  2. 2 Partially pool class outcome probabilities, escape rates, feedback and compute toward company-wide priors, then require later-period multiclass log loss and feedback MAE to beat global baselines while failure calibration, class support, maturity and evidence gates pass.
  3. 3 Draw one coherent arrival, service, runner-availability, common-failure and common-escape scenario per portfolio path; propagate queue amplification and price feedback, compute, terminal failures and mature escapes into expected loss, VaR and CVaR.

Before you trust it

Every tool in the catalog ships with the conditions under which its answer is meaningful — and the conditions under which it should abstain instead of guessing.

Assumptions & guardrails

  • Training examples precede their outcomes, censoring and unresolved work are represented, and deployment populations remain comparable to validation cohorts.
  • Pipeline classes and period cadence are stable, every eligible run belongs to exactly one outcome, feedback and compute use comparable boundaries, and post-release escapes are independently governed incident links rather than labels inferred from CI failure.
  • A predictive interval or risk estimate is not a deadline promise, causal explanation, or individual-performance judgment.
  • This is an aggregate conditional system forecast; association between CI profiles and incidents is not proof that a test, pipeline, repository, team or person caused an escape.

Minimum evidence

  • historical_periods: required and organization-defined
  • current_workloads: required and organization-defined
  • common_scenarios: required and organization-defined

How to validate it

Use chronological train/calibration/test windows, compare proper scores and decision value with a simple baseline, and recalibrate only from outcomes resolved after prediction time.

Calibrating it to your org

Same for everyone

The mathematical kernel, validation rules, method version, and JSON output semantics are organization-independent; no tenant-trained coefficients or company benchmark is embedded in the function.

Specific to you

  • one zero-inclusive period mart partitioning every eligible run into clean first pass, recovered flake, terminal failure or timeout/cancel, with mature incident/deployment escape linkage, comparable feedback log moments, compute, evidence state and immutable class version
  • pipeline class and cadence, outcome/escape definitions and maturity, latest-period holdout, training support, baseline-improvement and ECE gates, demand and runner horizon, value/cost perimeter, common scenarios, tail appetite and recalibration triggers

Calibration workflow

  1. 1 Define the management decision, target outcome, aggregate unit, privacy boundary, cadence, and prediction/intervention horizon for this organization.
  2. 2 Build a tenant-scoped historical cohort using only information available before each prediction or decision; preserve zero periods, censoring, assignment probabilities, and unresolved outcomes when the method requires them.
  3. 3 Estimate statistical parameters on training history, but obtain costs, utilities, risk tolerance, practical-effect thresholds, capacity, and policy constraints from accountable decision owners.
  4. 4 Validate on later time windows or held-out aggregate units at the deployment grain, against a simple baseline and the function-specific validation strategy.
  5. 5 Deploy only if the returned decision clears evidence, overlap, calibration, robustness, and guardrail checks; warning, unsupported, schema-gap, and fallback decisions are abstentions.
  6. 6 Monitor realized outcomes, data drift, coverage, and decision regret; recalibrate at a governed cadence or after a detected regime/definition change, never merely because a stakeholder dislikes the result.

Call it from your AI

You don't wire up 388 tools in your MCP client. The GitRevio MCP server exposes 18 tools, three of which let an agent search the catalog, read a tool's schema, and run it — so the assistant finds this one on its own.

gitrevio_capabilities_search
  { "q": "forecast companylocal ci feedback delay compute" }
  → finds "forecast_ci_feedback_loop_economics"

gitrevio_capability_describe
  { "capability_id": "forecast_ci_feedback_loop_economics" }
  → returns the input schema and agent guidance shown on this page

gitrevio_capability_run
  { "capability_id": "forecast_ci_feedback_loop_economics", "arguments": { ... } }
  → returns the result shown above

Works in Claude Desktop, Claude Code, Cursor, Cline, Continue.dev, Goose and Aider. See the MCP server.

Related tools

Audit CI pipeline evidence integrity

Audit the complete point-in-time change-to-pipeline-to-job-to-rerun cohort, exposing missing CI, orphan records, future leakage, inconsistent required-job outcomes, incomplete provider evidence and same-configuration fail-then-pass flake proxies without scoring people.

Statistical audit & measurement

Optimize CI assurance portfolio

Choose one baseline, cache, shard, test-selection, flaky-repair, mutation, integration-suite or runner-scale option per assurance unit using only prospective randomized/known-propensity fault-detection and feedback evidence, common random scenarios, controls, relations, budget, implementation and runner capacity, undetected-fault, latency and CVaR gates.

Causal inference & experiment design

Audit incident learning evidence integrity

Audit the complete point-in-time incident-to-postmortem-to-corrective-action lineage, separating missing or contradictory evidence from genuine overdue learning debt without attributing individual fault.

Statistical audit & measurement

Audit operational alert decision integrity

Audit every point-in-time operational alert evaluation by recomputing fire/suppress decisions and verifying effective policy, cooldown, evidence freshness, context, controls, severity routing, acknowledgement, action and mature outcome lineage.

Constrained optimization

Audit root cause traceback evidence integrity

Audit whether an anomaly traceback is complete, point-in-time, multiplicity-controlled and honestly labeled as temporal or causal, including every upstream candidate, path lag, edge identification basis and later root-recovery validation.

Causal inference & experiment design

Estimate software reliability growth

Estimate long-run software reliability growth with a power-law nonhomogeneous Poisson process, bootstrap trend evidence, and future incident exposure.

Forecasting & survival

See every tool in Quality, incidents & reliability →

Ready to See Your Engineering work clearly?

Request a free demo