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.

What it's for

Answers the executive question CI dashboards avoid: which caching, sharding, flaky-test repair, mutation, integration-test or runner investment has causal evidence and creates the best risk-adjusted assurance within real money and capacity limits?

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
assurance_units array of objects (14 fields) Evidence Yes
beam_width integer ≥ 2, ≤ 20000 Numerical control Optional
budget number ≥ 0 Your calibration Yes
common_scenarios array of objects (8 fields) Evidence Yes
exact_search_limit integer ≥ 1, ≤ 5000000 Your calibration Optional
implementation_capacity_hours number ≥ 0 Your calibration Yes
intervention_studies array of objects (18 fields) ≥ 0 items Evidence Yes
max_frontier_rows integer ≥ 1, ≤ 500 Your calibration Optional
maximum_cvar_loss number ≥ 0 Your calibration Yes
maximum_expected_undetected_faults number ≥ 0 Your calibration Yes
maximum_p95_feedback_minutes number ≥ 0 Your calibration Yes
maximum_runner_overload_probability number ≥ 0, ≤ 1 Your calibration Optional
minimum_effective_sample_size number ≥ 1 Your calibration Optional
options array of objects (12 fields) Evidence Yes
runner_capacity_minutes number ≥ 0 Your calibration Yes
seed integer ≥ 0, ≤ 4294967295 Numerical control Optional
simulation_draws integer ≥ 200, ≤ 20000 Numerical control Optional
tail_probability number > 0, < 1 Your calibration Optional

Each intervention_studies record

Field Type Required
control_detected_count integer (≥ 0) Yes
control_fault_count integer (≥ 1) Yes
control_feedback_count integer (≥ 2) Yes
control_feedback_log_sq_sum number (≥ 0) Yes
control_feedback_log_sum number Yes
evidence_verified boolean Yes
id string (non-empty) Yes
intervention_type one of "cache", "shard", "test_selection", "flaky_repair", "mutation_testing", "integration_suite", "runner_scale" Yes
outcome_mature boolean Yes
pipeline_class_id string (non-empty) Yes
prospectively_registered boolean Yes
randomized_or_known_propensity boolean Yes
transport_similarity number (≥ 0, ≤ 1) Yes
treated_detected_count integer (≥ 0) Yes
treated_fault_count integer (≥ 1) Yes
treated_feedback_count integer (≥ 2) Yes
treated_feedback_log_sq_sum number (≥ 0) Yes
treated_feedback_log_sum number Yes
Example input
{
  "assurance_units": [
    {
      "baseline_compute_minutes_per_run": 2,
      "baseline_detection_probability": 0.5,
      "baseline_feedback_minutes": 10,
      "common_loss_group_id": "checkout",
      "compute_cost_per_minute": 0.1,
      "evidence_verified": true,
      "expected_fault_count": 1,
      "expected_run_count": 40,
      "id": "checkout-ci",
      "pipeline_class_id": "fast",
      "required_control_ids": [
        "required-tests"
      ],
      "shared_common_loss": 20000,
      "undetected_fault_loss": 10000,
      "value_per_feedback_minute": 2
    }
  ],
  "budget": 5000,
  "common_scenarios": [
    {
      "arrival_multiplier": 1,
      "common_tool_failure_probability": 0,
      "fault_multiplier": 1,
      "id": "normal",
      "probability": 1,
      "runner_availability": 1,
      "service_time_multiplier": 1,
      "shared_loss_multiplier": 1
    }
  ],
  "implementation_capacity_hours": 40,
  "intervention_studies": [
    {
      "control_detected_count": 15,
      "control_fault_count": 30,
      "control_feedback_count": 30,
      "control_feedback_log_sq_sum": 129.72231375791435,
      "control_feedback_log_sum": 62.383246250395075,
      "evidence_verified": true,
      "id": "flake-switchback",

Truncated for display — the full payload is 102 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
{
  "constraints": {
    "budget": 5000,
    "implementation_capacity_hours": 40,
    "maximum_cvar_loss": 100000,
    "maximum_expected_undetected_faults": 5,
    "maximum_p95_feedback_minutes": 100,
    "maximum_runner_overload_probability": 0.05,
    "minimum_effective_sample_size": 20,
    "runner_capacity_minutes": 500,
    "tail_probability": 0.1
  },
  "decision": "selected",
  "frontier_truncated": false,
  "interpretation": "Selection is a human-governed planning recommendation over submitted options. It does not authorize skipping required tests, changing branch protection, merging code, or judging any contributor.",
  "method": "transport_weighted_causal_ci_assurance_stochastic_portfolio",
  "option_evidence": [
    {
      "assurance_unit_id": "checkout-ci",
      "effective_sample_size": null,
      "evidence_eligible": true,
      "option_id": "current",
      "option_type": "baseline",
      "probability_detection_improves": null,
      "probability_feedback_improves": null
    },
    {
      "assurance_unit_id": "checkout-ci",
      "effective_sample_size": 30,
      "evidence_eligible": true,
      "option_id": "repair-flakes",
      "option_type": "flaky_repair",
      "probability_detection_improves": 1,
      "probability_feedback_improves": 1
    }
  ],
  "pareto_frontier": [
    {
      "conditional_value_at_risk": 35653.5238,
      "cost": 0,
      "expected_loss": 13436.8571,
      "expected_undetected_faults": 0.5483,
      "option_ids": [
        "current"

Truncated for display — the full payload is 87 lines.

How it works

Causal inference & experiment design — Separate what a change caused from what merely moved alongside it.

  1. 1 Admit non-baseline effects only from prospectively registered randomized or known-propensity studies with injected/governed fault-detection denominators, mature feedback log moments, verified treatment versions and approved class transport similarity; shrink transported log effects toward no effect.
  2. 2 Enumerate or deterministically beam-search one option per assurance unit, preserve required controls and option relations, and replay every alternative under common fault arrivals, detection uncertainty, runner/service shocks and shared common-loss groups while counting each shared loss once.
  3. 3 Select the feasible minimum expected loss-plus-cost portfolio under budget, implementation, declared and stochastic runner capacity, expected undetected-fault, p95 feedback and CVaR limits; expose effect eligibility, solver certainty and a cost-risk Pareto frontier.

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

  • Assignment or adoption timing, interference policy, overlap, attrition, and outcome availability match the estimand encoded by the method.
  • Fault injection represents the governed failure classes of interest, treatments match proposed versions, feedback timing is comparable, transport similarity is prespecified, option controls/relations are complete, and finance owns unique loss, delay value, costs and shared-loss groups.
  • A causal label is warranted only when design and diagnostic requirements pass; otherwise treat the result as descriptive or abstain.
  • A selected option is a reversible human-governed planning recommendation, never authorization to skip required tests, weaken branch protection, merge code automatically, purchase capacity, or judge a contributor.

Minimum evidence

  • assurance_units: required and organization-defined
  • options: required and organization-defined
  • intervention_studies: at least 0 rows/items
  • common_scenarios: required and organization-defined
  • budget: required and organization-defined
  • implementation_capacity_hours: required and organization-defined
  • runner_capacity_minutes: required and organization-defined
  • maximum_expected_undetected_faults: required and organization-defined
  • maximum_p95_feedback_minutes: required and organization-defined
  • maximum_cvar_loss: required and organization-defined

How to validate it

Preserve the assignment/adoption design and validate overlap, pre-period or placebo diagnostics, attrition, interference policy, and cluster-level uncertainty; never tune on the estimated effect.

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 immutable option-effect mart joining injected or independently adjudicated fault denominators, detection outcomes, feedback log moments, assignment/propensity provenance, treatment version, transport similarity, controls, dependencies/exclusions, scenario availability and finance-owned unique/shared loss
  • fault taxonomy and representativeness, treatment fidelity/version, study admissibility and transport, required controls, option relations, scenario availability, budget, implementation and runner capacity, expected undetected-fault, p95 feedback, runner-overload and CVaR appetite plus human approval authority

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": "choose one baseline cache shard testselection" }
  → finds "optimize_ci_assurance_portfolio"

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

gitrevio_capability_run
  { "capability_id": "optimize_ci_assurance_portfolio", "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

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.

Forecasting & survival

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