Skip to content

commit.history

Every commit in a git range against the commit policy, in one pass: how many were read, how many git composed and are exempt, how many carry an error, and every commit that has a finding with what it is. What the gate reads to refuse new debt, and what answers `is the history of this branch clean?` without a process per commit.

Every commit in a git range against the commit policy, in one pass: how many were read, how many git composed and are exempt, how many carry an error, and every commit that has a finding with what it is. What the gate reads to refuse new debt, and what answers `is the history of this branch clean?` without a process per commit.

Exposure

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

surfaceas
MCPtool majordomus_commit_history
HTTPGET /api/v1/commit/history operationId commit.history
command linemajordomus commit history

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

Which range of history to judge.

use majordomus_cli::capability::builtin::commit::HistoryInput;
let h: HistoryInput = serde_json::from_str("{}").expect("an empty input");
assert_eq!(h.range, "HEAD", "the whole history reachable from here");
propertytyperequireddescription
range string no Anything git log accepts: origin/master..HEAD, v0.6.0.., a bare HEAD. Default HEAD, which is the whole history reachable from here. default "HEAD"
JSON Schema
{
  "additionalProperties": false,
  "description": "Which range of history to judge.\n```\nuse majordomus_cli::capability::builtin::commit::HistoryInput;\nlet h: HistoryInput = serde_json::from_str(\"{}\").expect(\"an empty input\");\nassert_eq!(h.range, \"HEAD\", \"the whole history reachable from here\");\n```",
  "properties": {
    "range": {
      "default": "HEAD",
      "description": "Anything `git log` accepts: `origin/master..HEAD`, `v0.6.0..`, a bare `HEAD`.\nDefault `HEAD`, which is the whole history reachable from here.",
      "type": "string"
    }
  },
  "title": "HistoryInput",
  "type": "object"
}

output · HistoryReport

A range of history, judged. A range of history, judged in one pass.

use majordomus_cli::commit::verdict::HistoryReport;
let r = HistoryReport {
    range: "HEAD".into(),
    total: 1755,
    exempt: 561,
    failing: 54,
    commits: Vec::new(),
};
// a commit with nothing to say is counted and not listed: a report of a thousand
// passing commits is a report nobody reads
assert!(r.commits.is_empty());
assert_eq!(r.total - r.exempt, 1194);
propertytyperequireddescription
commits array yes Every commit that carries a finding, newest first. A commit with nothing to say is counted and not listed: a report that printed a thousand passing commits would be a report nobody reads.
exempt integer yes How many were exempt because git composed their subject.
failing integer yes How many carry a finding of error severity.
range string yes The range as asked for.
total integer yes How many commits were read.
JSON Schema
{
  "$defs": {
    "CommitExemption": {
      "description": "Why a commit was not judged.\n```\nuse majordomus_cli::commit::{judge, CommitExemption, CommitPolicy, CommitSubject};\nlet v = judge(&CommitSubject::of(\"Merge pull request #1 from a/b\"), &CommitPolicy::default());\nassert_eq!(v.exempt, Some(CommitExemption::GitAuthored));\n```",
      "oneOf": [
        {
          "const": "git_authored",
          "description": "git composed the subject: a merge, a revert, a fixup.",
          "type": "string"
        }
      ]
    },
    "Diagnostic": {
      "description": "One finding about the declarative state, named by a stable code, tied to a path where\nthere is one, and carrying the command that reproduces it where there is one.",
      "properties": {
        "code": {
          "description": "A stable machine-readable code, e.g. `unknown_key`, `duplicate_identity`.",
          "type": "string"
        },
        "message": {
          "description": "What is wrong, for a person; the code is for a program.",
          "type": "string"
        },
        "path": {
          "description": "Repository-relative path of the file concerned, when there is one.",
          "type": [
            "string",
            "null"
          ]
        },
        "severity": {
          "$ref": "#/$defs/Severity",
          "description": "How bad."
        }
      },
      "required": [
        "severity",
        "code",
        "message"
      ],
      "type": "object"
    },
    "JudgedCommit": {
      "description": "One commit of the history, judged.\n```\nuse majordomus_cli::commit::verdict::JudgedCommit;\n// what a history report lists: only the commits that have something to say\nlet row = JudgedCommit {\n    commit: \"a1b2c3d4e\".into(),\n    subject: \"update stuff\".into(),\n    passed: false,\n    exempt: None,\n    findings: Vec::new(),\n};\nassert!(!row.passed);\n```",
      "properties": {
        "commit": {
          "description": "The commit name, as git gave it.",
          "type": "string"
        },
        "exempt": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommitExemption"
            },
            {
              "type": "null"
            }
          ],
          "description": "Why it was not judged, when it was not."
        },
        "findings": {
          "description": "Every finding.",
          "items": {
            "$ref": "#/$defs/Diagnostic"
          },
          "type": "array"
        },
        "passed": {
          "description": "Whether it passed.",
          "type": "boolean"
        },
        "subject": {
          "description": "Its subject line.",
          "type": "string"
        }
      },
      "required": [
        "commit",
        "subject",
        "passed",
        "findings"
      ],
      "type": "object"
    },
    "Severity": {
      "description": "How bad a diagnostic is. `Error` excludes the file it concerns from the index and puts\nthe index into the degraded state; `Warning` and `Info` do neither.",
      "oneOf": [
        {
          "const": "info",
          "description": "Worth knowing; changes nothing.",
          "type": "string"
        },
        {
          "const": "warning",
          "description": "Something to look at; the object is still served.",
          "type": "string"
        },
        {
          "const": "error",
          "description": "The file is excluded and the index is degraded.",
          "type": "string"
        }
      ]
    }
  },
  "description": "A range of history, judged.\nA range of history, judged in one pass.\n\n```\nuse majordomus_cli::commit::verdict::HistoryReport;\nlet r = HistoryReport {\n    range: \"HEAD\".into(),\n    total: 1755,\n    exempt: 561,\n    failing: 54,\n    commits: Vec::new(),\n};\n// a commit with nothing to say is counted and not listed: a report of a thousand\n// passing commits is a report nobody reads\nassert!(r.commits.is_empty());\nassert_eq!(r.total - r.exempt, 1194);\n```",
  "properties": {
    "commits": {
      "description": "Every commit that carries a finding, newest first. A commit with nothing to say is\ncounted and not listed: a report that printed a thousand passing commits would be a\nreport nobody reads.",
      "items": {
        "$ref": "#/$defs/JudgedCommit"
      },
      "type": "array"
    },
    "exempt": {
      "description": "How many were exempt because git composed their subject.",
      "format": "uint",
      "minimum": 0,
      "type": "integer"
    },
    "failing": {
      "description": "How many carry a finding of error severity.",
      "format": "uint",
      "minimum": 0,
      "type": "integer"
    },
    "range": {
      "description": "The range as asked for.",
      "type": "string"
    },
    "total": {
      "description": "How many commits were read.",
      "format": "uint",
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "range",
    "total",
    "exempt",
    "failing",
    "commits"
  ],
  "title": "HistoryReport",
  "type": "object"
}

Policies

benchmark
required — a target on every transport the exposure declares; the cases are the input type's
cache
disabled — every call runs the handler

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
directcovered1whole-history
mcpcovered1whole-history
httpcovered1whole-history

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