Skip to content

economics.runs

The raw facts every economics metric is computed from: each recorded run with its task, variant, repetition, model, revision, success-gate verdicts and the totals derived from its provider usage, and the path of its record.

The raw facts every economics metric is computed from: each recorded run with its task, variant, repetition, model, revision, success-gate verdicts and the totals derived from its provider usage, and the path of its record.

Exposure

Where this one definition is reachable. Absence is explicit: a surface not listed does not carry it.

surfaceas
MCPtool majordomus_economics_runs
HTTPGET /api/v1/economics/runs operationId economics.runs
command linemajordomus economics runs

Schemas

The canonical input and output, from the Rust types; the MCP tool schema and the OpenAPI parameters and responses are derived from these.

input · EconomicsRunsQuery

The input of economics.runs: optional filters on suite, task and variant, all of which must match. An empty query lists every recorded run, and an unknown field is refused.

use majordomus_cli::economics::model::EconomicsRunsQuery;
let wire = serde_json::json!({ "suite": "pilot", "variant": "baseline" });
let q: EconomicsRunsQuery = serde_json::from_value(wire.clone()).unwrap();
assert!(q.task.is_none(), "an absent filter matches every task");
assert_eq!(serde_json::to_value(&q).unwrap(), wire, "absent filters are not written back");
let by_model = serde_json::json!({ "model": "claude-sonnet-5" });
assert!(serde_json::from_value::<EconomicsRunsQuery>(by_model).is_err());
propertytyperequireddescription
suite string | null no Only this suite.
task string | null no Only this task.
variant string | null no Only this variant.
JSON Schema
{
  "additionalProperties": false,
  "description": "The input of `economics.runs`: optional filters on suite, task and variant, all of which\nmust match. An empty query lists every recorded run, and an unknown field is refused.\n\n```\nuse majordomus_cli::economics::model::EconomicsRunsQuery;\nlet wire = serde_json::json!({ \"suite\": \"pilot\", \"variant\": \"baseline\" });\nlet q: EconomicsRunsQuery = serde_json::from_value(wire.clone()).unwrap();\nassert!(q.task.is_none(), \"an absent filter matches every task\");\nassert_eq!(serde_json::to_value(&q).unwrap(), wire, \"absent filters are not written back\");\nlet by_model = serde_json::json!({ \"model\": \"claude-sonnet-5\" });\nassert!(serde_json::from_value::<EconomicsRunsQuery>(by_model).is_err());\n```",
  "properties": {
    "suite": {
      "description": "Only this suite.",
      "type": [
        "string",
        "null"
      ]
    },
    "task": {
      "description": "Only this task.",
      "type": [
        "string",
        "null"
      ]
    },
    "variant": {
      "description": "Only this variant.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "title": "EconomicsRunsQuery",
  "type": "object"
}

output · EconomicsRunList

The answer of economics.runs: the raw facts every metric is computed from.

use majordomus_cli::economics::model::EconomicsRunList;
let l: EconomicsRunList =
    serde_json::from_value(serde_json::json!({ "count": 0, "runs": [] })).unwrap();
assert_eq!(l.count, l.runs.len());
assert!(l.diagnostics.is_empty(), "no diagnostics listed means none");
propertytyperequireddescription
count integer yes How many.
diagnostics array no Records that could not be read. default []
runs array yes The runs, sorted by id.
JSON Schema
{
  "$defs": {
    "EconomicsCheck": {
      "description": "One success gate's verdict on a run.\n\n```\nuse majordomus_cli::economics::model::EconomicsCheck;\nlet c = EconomicsCheck { id: \"tests_kept\".into(), passed: true, detail: \"0 deleted\".into() };\nlet back: EconomicsCheck = serde_json::from_value(serde_json::to_value(&c).unwrap()).unwrap();\nassert_eq!(back, c);\n```",
      "properties": {
        "detail": {
          "description": "What was found.",
          "type": "string"
        },
        "id": {
          "description": "The gate's id.",
          "type": "string"
        },
        "passed": {
          "description": "Whether it passed.",
          "type": "boolean"
        }
      },
      "required": [
        "id",
        "passed",
        "detail"
      ],
      "type": "object"
    },
    "EconomicsRunView": {
      "description": "One run in brief, with its derived totals.\n\n```\nuse majordomus_cli::economics::model::EconomicsRunView;\nlet v: EconomicsRunView = serde_json::from_value(serde_json::json!({\n    \"id\": \"vat-rounding--majordomus--r1\", \"suite\": \"pilot\", \"task\": \"vat-rounding\",\n    \"variant\": \"majordomus\", \"repetition\": 1, \"model\": \"claude-sonnet-5\",\n    \"revision\": \"8d37d011ef\", \"completed\": false, \"checks\": [], \"sessions\": 1,\n    \"path\": \".ai/repo/benchmarks/economics/runs/pilot/vat-rounding--majordomus--r1.json\"\n}))\n.unwrap();\nassert!(v.usage.is_none(), \"a run whose provider reported no usage has no totals\");\nassert!(v.path.ends_with(&format!(\"{}.json\", v.id)));\n```",
      "properties": {
        "checks": {
          "description": "Each gate's verdict.",
          "items": {
            "$ref": "#/$defs/EconomicsCheck"
          },
          "type": "array"
        },
        "completed": {
          "description": "Whether every success gate passed.",
          "type": "boolean"
        },
        "id": {
          "description": "The run's id.",
          "type": "string"
        },
        "model": {
          "description": "The model requested.",
          "type": "string"
        },
        "path": {
          "description": "Where the raw record is.",
          "type": "string"
        },
        "repetition": {
          "description": "The repetition.",
          "format": "uint32",
          "minimum": 0,
          "type": "integer"
        },
        "revision": {
          "description": "The revision.",
          "type": "string"
        },
        "sessions": {
          "description": "Sessions.",
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "suite": {
          "description": "The suite.",
          "type": "string"
        },
        "task": {
          "description": "The task.",
          "type": "string"
        },
        "usage": {
          "anyOf": [
            {
              "$ref": "#/$defs/EconomicsUsage"
            },
            {
              "type": "null"
            }
          ],
          "description": "Totals, when the provider reported usage."
        },
        "variant": {
          "description": "The variant.",
          "type": "string"
        }
      },
      "required": [
        "id",
        "suite",
        "task",
        "variant",
        "repetition",
        "model",
        "revision",
        "completed",
        "checks",
        "sessions",
        "path"
      ],
      "type": "object"
    },
    "EconomicsUsage": {
      "description": "A run's totals, derived from its raw usage.\n\n```\nuse majordomus_cli::economics::model::EconomicsUsage;\nlet u = EconomicsUsage {\n    input_uncached: 10, cache_write: 90, cache_read: 900, output: 50,\n    total_input: 1000, total: 1050, requests: 3, ..EconomicsUsage::default()\n};\nassert_eq!(u.total_input, u.input_uncached + u.cache_write + u.cache_read);\nlet json = serde_json::to_value(&u).unwrap();\nassert!(json.get(\"reasoning\").is_none() && json.get(\"cost_microusd\").is_none());\n```",
      "properties": {
        "cache_read": {
          "description": "Input read from the cache.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "cache_write": {
          "description": "Input written to the cache.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "cost_microusd": {
          "description": "The harness's cost projection, in millionths of a dollar, when every session had one.",
          "format": "uint64",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "input_uncached": {
          "description": "Input neither read from nor written to the cache.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "output": {
          "description": "Output, reasoning included.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "reasoning": {
          "description": "Reasoning tokens, when every request reported them.",
          "format": "uint64",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "requests": {
          "description": "Provider requests.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "tool_calls": {
          "description": "Tool calls.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "total": {
          "description": "All input and output.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "total_input": {
          "description": "All input.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "input_uncached",
        "cache_write",
        "cache_read",
        "output",
        "total_input",
        "total",
        "requests",
        "tool_calls"
      ],
      "type": "object"
    }
  },
  "description": "The answer of `economics.runs`: the raw facts every metric is computed from.\n\n```\nuse majordomus_cli::economics::model::EconomicsRunList;\nlet l: EconomicsRunList =\n    serde_json::from_value(serde_json::json!({ \"count\": 0, \"runs\": [] })).unwrap();\nassert_eq!(l.count, l.runs.len());\nassert!(l.diagnostics.is_empty(), \"no diagnostics listed means none\");\n```",
  "properties": {
    "count": {
      "description": "How many.",
      "format": "uint",
      "minimum": 0,
      "type": "integer"
    },
    "diagnostics": {
      "default": [],
      "description": "Records that could not be read.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "runs": {
      "description": "The runs, sorted by id.",
      "items": {
        "$ref": "#/$defs/EconomicsRunView"
      },
      "type": "array"
    }
  },
  "required": [
    "count",
    "runs"
  ],
  "title": "EconomicsRunList",
  "type": "object"
}

Policies

benchmark
required — a target on every transport the exposure declares; the cases are the input type's
cache
process — up to 16 entries in the process, 5s each, scoped by the registry fingerprint

Benchmark targets

Derived from the registry for this repository: one requirement per transport, and the cases the input type provides. The whole matrix is on the benchmarks page.

transportstatecasestargets
directcovered2all cold+warm
narrowed cold+warm
mcpcovered2all cold+warm
narrowed cold+warm
httpcovered2all cold+warm
narrowed cold+warm

Searches the titles and descriptions of every page this site publishes.