environment.preflight
One verdict per claim about this checkout — git; the episode, its briefing, the task and the handover; the policy, the rule corpus and the ADRs; the shared server and the MCP, API and Cockpit surfaces it serves; the peer board; recorded test runs, rule enforcement, provider projections, generated documentation and the deployment — each `verified`, `active`, `fresh`, `stale`, `degraded`, `unavailable`, `failed`, `unknown` or `not_applicable`, with the evidence it rests on. A verdict that asserts something is in force cannot be produced without evidence. The same value the command line prints and the entry banner summarises.
One verdict per claim about this checkout — git; the episode, its briefing, the task and the handover; the policy, the rule corpus and the ADRs; the shared server and the MCP, API and Cockpit surfaces it serves; the peer board; recorded test runs, rule enforcement, provider projections, generated documentation and the deployment — each `verified`, `active`, `fresh`, `stale`, `degraded`, `unavailable`, `failed`, `unknown` or `not_applicable`, with the evidence it rests on. A verdict that asserts something is in force cannot be produced without evidence. The same value the command line prints and the entry banner summarises.
- query
- behaviorally_verified
- module environment
- #environment
- #governance
- #verification
- #evidence
Exposure
Where this one definition is reachable. Absence is explicit: a surface not listed does not carry it.
| surface | as |
|---|---|
| MCP | tool majordomus_preflight resource majordomus://environment/preflight |
| HTTP | GET /api/v1/environment/preflight operationId environment.preflight |
| 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 · PreflightInput
use majordomus_cli::capability::builtin::environment::PreflightInput;
let input: PreflightInput = serde_json::from_str("{}").unwrap();
assert!(!input.probe, "a served request asks no other process by default");| property | type | required | description |
|---|---|---|---|
| probe | boolean | no | Ask the loopback address a server of this checkout published, and its peer board. Off by default: a served request answers from what this process can see, and when this process holds the checkout's lease that is itself the evidence. default false |
JSON Schema
{
"additionalProperties": false,
"description": "What a served preflight may cost.\n\n```\nuse majordomus_cli::capability::builtin::environment::PreflightInput;\nlet input: PreflightInput = serde_json::from_str(\"{}\").unwrap();\nassert!(!input.probe, \"a served request asks no other process by default\");\n```",
"properties": {
"probe": {
"default": false,
"description": "Ask the loopback address a server of this checkout published, and its peer board.\nOff by default: a served request answers from what this process can see, and when\nthis process holds the checkout's lease that is itself the evidence.",
"type": "boolean"
}
},
"title": "PreflightInput",
"type": "object"
}output · Preflight
use majordomus_cli::environment::preflight::{derive, Observations, Preflight};
let p = derive(&Observations::empty("demo", 0));
assert_eq!(p.schema, Preflight::schema_id());
assert_eq!(p.verdicts().len(), p.sections.iter().map(|s| s.checks.len()).sum::<usize>());| property | type | required | description |
|---|---|---|---|
| attention | array | yes | The ids of every check that needs a look, most urgent first. |
| branch | string | null | no | The branch, when git named one. |
| generated_at | string | yes | When the observations were taken, RFC 3339 in UTC. |
| head | string | null | no | The commit HEAD names. |
| repository | string | yes | The repository's name. |
| resolution | reference | yes | How the environment behind it was resolved. |
| schema | string | yes | majordomus/preflight/v1. |
| sections | array | yes | The groups of checks. |
JSON Schema
{
"$defs": {
"PreflightCheck": {
"description": "One claim, its verdict, and what the verdict rests on.\n\n```\nuse majordomus_cli::environment::preflight::{Check, Evidence, Verdict};\n\n// a claim of something in force without evidence is not accepted as one\nlet bare = Check::new(\"integration.mcp\", \"MCP\", Verdict::Verified, \"healthy\", vec![]);\nassert_eq!(bare.verdict, Verdict::Unknown);\nassert!(bare.summary.contains(\"no evidence\"));\n\nlet backed = Check::new(\n \"integration.mcp\", \"MCP\", Verdict::Verified, \"served\",\n vec![Evidence::new(\"GET /\", \"surface mcp ready\")],\n);\nassert_eq!(backed.verdict, Verdict::Verified);\n```",
"properties": {
"evidence": {
"description": "Everything the verdict rests on. Never empty for a verdict that proves something.",
"items": {
"$ref": "#/$defs/PreflightEvidence"
},
"type": "array"
},
"id": {
"description": "A stable dotted id, `<section>.<claim>`.",
"type": "string"
},
"next": {
"description": "The command that shows more, or that changes the verdict.",
"type": [
"string",
"null"
]
},
"summary": {
"description": "The verdict in one sentence, with the numbers that decided it.",
"type": "string"
},
"title": {
"description": "The short name a person reads.",
"type": "string"
},
"verdict": {
"$ref": "#/$defs/PreflightVerdict",
"description": "What the repository can show."
}
},
"required": [
"id",
"title",
"verdict",
"summary"
],
"type": "object"
},
"PreflightEvidence": {
"description": "One thing a verdict rests on: where it was read and what was seen there.\n\n```\nuse majordomus_cli::environment::preflight::Evidence;\nlet e = Evidence::new(\".ai/repo/evidence/ledger.json\", \"6 recorded runs\");\nassert_eq!(e.source, \".ai/repo/evidence/ledger.json\");\n```",
"properties": {
"observed": {
"description": "What it said, in one phrase.",
"type": "string"
},
"source": {
"description": "The file, command, route or capability that was read.",
"type": "string"
}
},
"required": [
"source",
"observed"
],
"type": "object"
},
"PreflightSection": {
"description": "A group of checks: repository, session, governance, integration, verification.\n\n```\nuse majordomus_cli::environment::preflight::{derive, Observations, Section};\nlet p = derive(&Observations::empty(\"demo\", 0));\nlet ids: Vec<&str> = p.sections.iter().map(|s| s.id.as_str()).collect();\nassert_eq!(ids, [\"repository\", \"session\", \"governance\", \"integration\", \"verification\"]);\n// every check in a section carries the section's id as its prefix\nlet session: &Section = &p.sections[1];\nassert!(session.checks.iter().all(|c| c.id.starts_with(\"session.\")));\n```",
"properties": {
"checks": {
"description": "The checks, in the order they are rendered.",
"items": {
"$ref": "#/$defs/PreflightCheck"
},
"type": "array"
},
"id": {
"description": "A stable id, the prefix of every check in it.",
"type": "string"
},
"title": {
"description": "The heading a person reads.",
"type": "string"
}
},
"required": [
"id",
"title",
"checks"
],
"type": "object"
},
"PreflightVerdict": {
"description": "What the repository can show about one claim.\n\nNine words, not a boolean, because the actions they call for differ: `stale` is re-run\nthe proof, `unavailable` is nothing is there, `unknown` is nobody looked, and\n`not_applicable` is there is nothing to look for.\n\n```\nuse majordomus_cli::environment::preflight::Verdict;\nassert!(Verdict::Verified.proves() && Verdict::Active.proves() && Verdict::Fresh.proves());\nassert!(!Verdict::Stale.proves() && !Verdict::NotApplicable.proves());\nassert_eq!(Verdict::NotApplicable.as_str(), \"not_applicable\");\n// the most urgent first: a failure outranks a stale proof, which outranks an absence\nassert!(Verdict::Failed.urgency() < Verdict::Stale.urgency());\nassert_eq!(Verdict::Verified.urgency(), None);\n```",
"oneOf": [
{
"const": "verified",
"description": "Proven against this tree by a recorded result or a direct answer.",
"type": "string"
},
{
"const": "active",
"description": "In force now, observed directly, with nothing recorded to verify.",
"type": "string"
},
{
"const": "fresh",
"description": "Judged recent enough to act on, against a declared threshold or the current commit.",
"type": "string"
},
{
"const": "stale",
"description": "Evidence exists, but it is about another commit, tree or moment.",
"type": "string"
},
{
"const": "degraded",
"description": "In force, but in a form that is not the one this executable would serve.",
"type": "string"
},
{
"const": "unavailable",
"description": "Nothing is there to observe.",
"type": "string"
},
{
"const": "failed",
"description": "Observed, and it did not hold.",
"type": "string"
},
{
"const": "unknown",
"description": "Nobody looked, or the looking did not finish.",
"type": "string"
},
{
"const": "not_applicable",
"description": "There is nothing here to judge.",
"type": "string"
}
]
},
"Resolution": {
"description": "How completely a snapshot was resolved. Carried in the snapshot because a consumer must\nbe able to tell \"there is no server running\" from \"nobody looked\".",
"oneOf": [
{
"const": "fast",
"description": "Only what is cheap enough for a shell prompt; the rest from the cache.",
"type": "string"
},
{
"const": "full",
"description": "Everything, including the index. Writes the cache.",
"type": "string"
}
]
}
},
"description": "Whether Majordomus is in force in this checkout, claim by claim, with the evidence.\n\n```\nuse majordomus_cli::environment::preflight::{derive, Observations, Preflight};\nlet p = derive(&Observations::empty(\"demo\", 0));\nassert_eq!(p.schema, Preflight::schema_id());\nassert_eq!(p.verdicts().len(), p.sections.iter().map(|s| s.checks.len()).sum::<usize>());\n```",
"properties": {
"attention": {
"description": "The ids of every check that needs a look, most urgent first.",
"items": {
"type": "string"
},
"type": "array"
},
"branch": {
"description": "The branch, when git named one.",
"type": [
"string",
"null"
]
},
"generated_at": {
"description": "When the observations were taken, RFC 3339 in UTC.",
"type": "string"
},
"head": {
"description": "The commit HEAD names.",
"type": [
"string",
"null"
]
},
"repository": {
"description": "The repository's name.",
"type": "string"
},
"resolution": {
"$ref": "#/$defs/Resolution",
"description": "How the environment behind it was resolved."
},
"schema": {
"description": "`majordomus/preflight/v1`.",
"type": "string"
},
"sections": {
"description": "The groups of checks.",
"items": {
"$ref": "#/$defs/PreflightSection"
},
"type": "array"
}
},
"required": [
"schema",
"generated_at",
"resolution",
"repository",
"sections",
"attention"
],
"title": "Preflight",
"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.