Skip to content

lifecycle.runtime

The commit the served index was built at, against the commit the repository is on, read on this call. A server that froze its index at start-up answers every question about a commit from hours ago with nothing in the answer saying so; this is the reading that can tell.

The commit the served index was built at, against the commit the repository is on, read on this call. A server that froze its index at start-up answers every question about a commit from hours ago with nothing in the answer saying so; this is the reading that can tell.

Exposure

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

surfaceas
MCPtool majordomus_lifecycle_runtime
HTTPGET /api/v1/lifecycle/runtime operationId lifecycle.runtime
command line—

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 · Empty

No input.

No properties: the capability takes no input.

JSON Schema
{
  "additionalProperties": false,
  "description": "No input.",
  "title": "Empty",
  "type": "object"
}

output · RuntimeView

The commit this process answers about, against the commit the repository is on.

Both halves are read here and neither is assumed. served is what the index this process is holding was built from; repository is what git says now, on this call. A server that follows the repository reports them equal and pays one git invocation for the proof; a server that froze its index at start-up reports them different, which is the only way a reader could ever have found that out.

agree is the field with the operational meaning, and what it says is not "the repository is fine" but "the answers you are reading are about the tree you are looking at". When it is false every other capability this process serves is answering about a commit that is no longer checked out, and nothing else in the API would tell you.

use majordomus_cli::capability::builtin::lifecycle::RuntimeView;
use serde_json::json;

let view = |served: &str, repo: &str, agree: bool| -> RuntimeView {
    serde_json::from_value(json!({
        "root": "example/repo",
        "served_head": served, "served_branch": "master", "served_working_tree": "clean",
        "repository_head": repo, "repository_branch": "master",
        "repository_working_tree": "clean",
        "agree": agree, "objects": 1319, "index_state": "ok",
        "note": "as measured on this call",
    })).unwrap()
};

// a server following the repository: one `git` invocation buys the proof
let current = view("a1b2c3d", "a1b2c3d", true);
assert!(current.agree);
assert_eq!(current.served_head, current.repository_head);
assert_eq!(current.index_state, "ok");

// and one that froze its index at start-up: every answer it serves is about the old commit
let frozen = view("a1b2c3d", "9f8e7d6", false);
assert!(!frozen.agree);
assert_ne!(frozen.served_head, frozen.repository_head);
propertytyperequireddescription
agree boolean yes Whether the two agree on the commit and the branch.
index_state string yes ok or degraded.
note string yes What the comparison means, and what to do when it disagrees.
objects integer yes How many objects the served index holds, and whether it was degraded.
repository_branch string no Its branch now.
repository_head string no The commit the repository is on, read on this call.
repository_working_tree string no The working tree now.
root string yes The repository root this process is serving.
served_branch string no Its branch, or DETACHED.
served_head string no The commit the served index was built at.
served_working_tree string no Whether the working tree was clean when the index was built.
JSON Schema
{
  "description": "The commit this process answers about, against the commit the repository is on.\n\nBoth halves are read here and neither is assumed. `served` is what the index this\nprocess is holding was built from; `repository` is what `git` says now, on this call. A\nserver that follows the repository reports them equal and pays one `git` invocation for\nthe proof; a server that froze its index at start-up reports them different, which is\nthe only way a reader could ever have found that out.\n\n`agree` is the field with the operational meaning, and what it says is *not* \"the\nrepository is fine\" but \"the answers you are reading are about the tree you are looking\nat\". When it is false every other capability this process serves is answering about a\ncommit that is no longer checked out, and nothing else in the API would tell you.\n\n```\nuse majordomus_cli::capability::builtin::lifecycle::RuntimeView;\nuse serde_json::json;\n\nlet view = |served: &str, repo: &str, agree: bool| -> RuntimeView {\n    serde_json::from_value(json!({\n        \"root\": \"example/repo\",\n        \"served_head\": served, \"served_branch\": \"master\", \"served_working_tree\": \"clean\",\n        \"repository_head\": repo, \"repository_branch\": \"master\",\n        \"repository_working_tree\": \"clean\",\n        \"agree\": agree, \"objects\": 1319, \"index_state\": \"ok\",\n        \"note\": \"as measured on this call\",\n    })).unwrap()\n};\n\n// a server following the repository: one `git` invocation buys the proof\nlet current = view(\"a1b2c3d\", \"a1b2c3d\", true);\nassert!(current.agree);\nassert_eq!(current.served_head, current.repository_head);\nassert_eq!(current.index_state, \"ok\");\n\n// and one that froze its index at start-up: every answer it serves is about the old commit\nlet frozen = view(\"a1b2c3d\", \"9f8e7d6\", false);\nassert!(!frozen.agree);\nassert_ne!(frozen.served_head, frozen.repository_head);\n```",
  "properties": {
    "agree": {
      "description": "Whether the two agree on the commit and the branch.",
      "type": "boolean"
    },
    "index_state": {
      "description": "`ok` or `degraded`.",
      "type": "string"
    },
    "note": {
      "description": "What the comparison means, and what to do when it disagrees.",
      "type": "string"
    },
    "objects": {
      "description": "How many objects the served index holds, and whether it was degraded.",
      "format": "uint",
      "minimum": 0,
      "type": "integer"
    },
    "repository_branch": {
      "description": "Its branch now.",
      "type": "string"
    },
    "repository_head": {
      "description": "The commit the repository is on, read on this call.",
      "type": "string"
    },
    "repository_working_tree": {
      "description": "The working tree now.",
      "type": "string"
    },
    "root": {
      "description": "The repository root this process is serving.",
      "type": "string"
    },
    "served_branch": {
      "description": "Its branch, or `DETACHED`.",
      "type": "string"
    },
    "served_head": {
      "description": "The commit the served index was built at.",
      "type": "string"
    },
    "served_working_tree": {
      "description": "Whether the working tree was clean when the index was built.",
      "type": "string"
    }
  },
  "required": [
    "root",
    "agree",
    "objects",
    "index_state",
    "note"
  ],
  "title": "RuntimeView",
  "type": "object"
}

Policies

benchmark
required — a target on every transport the exposure declares; the cases are the input type's
cache
process — up to 2 entries in the process, 2s 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
directcovered1default cold+warm
mcpcovered1default cold+warm
httpcovered1default cold+warm

Claims implemented beside it

Attached by the file that implements each claim; every one links to its page with the implementation and the test that proves it.

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