environment.preflight
Jeden verdikt za každé tvrzení o tomto checkoutu — git; epizoda, její zasvěcení, úloha a předávka; politika, korpus pravidel a ADR; sdílený server a povrchy MCP, API a Cockpit, které servíruje; nástěnka peerů; zaznamenané běhy testů, vynucování pravidel, projekce providerů, vygenerovaná dokumentace a nasazení — každý `verified`, `active`, `fresh`, `stale`, `degraded`, `unavailable`, `failed`, `unknown` nebo `not_applicable`, s důkazy, na nichž stojí. Verdikt, který tvrdí, že něco platí, nelze vytvořit bez důkazů. Stejná hodnota, kterou vypisuje příkazová řádka a shrnuje úvodní banner.
Jeden verdikt za každé tvrzení o tomto checkoutu — git; epizoda, její zasvěcení, úloha a předávka; politika, korpus pravidel a ADR; sdílený server a povrchy MCP, API a Cockpit, které servíruje; nástěnka peerů; zaznamenané běhy testů, vynucování pravidel, projekce providerů, vygenerovaná dokumentace a nasazení — každý `verified`, `active`, `fresh`, `stale`, `degraded`, `unavailable`, `failed`, `unknown` nebo `not_applicable`, s důkazy, na nichž stojí. Verdikt, který tvrdí, že něco platí, nelze vytvořit bez důkazů. Stejná hodnota, kterou vypisuje příkazová řádka a shrnuje úvodní banner.
- query
- behaviorally_verified
- module environment
- #environment
- #governance
- #verification
- #evidence
Zpřístupnění
Kde je tato jedna definice dosažitelná. Absence je explicitní: povrch, který není uveden, ji nenese.
| povrch | jako |
|---|---|
| MCP | nástroj majordomus_preflight zdroj majordomus://environment/preflight |
| HTTP | GET /api/v1/environment/preflight operationId environment.preflight |
| příkazová řádka | — |
Schémata
Kanonický vstup a výstup z typů Rustu; schéma nástroje MCP a parametry a odpovědi OpenAPI se odvozují z nich.
vstup · 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");| vlastnost | typ | povinné | popis |
|---|---|---|---|
| probe | boolean | ne | Zeptat se na adresu loopbacku, kterou publikoval server tohoto checkoutu, a na jeho nástěnku peerů. Ve výchozím stavu vypnuto: obsloužený požadavek odpovídá z toho, co tento proces vidí, a když tento proces drží lease checkoutu, je to samo o sobě důkaz. výchozí 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"
}výstup · 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>());| vlastnost | typ | povinné | popis |
|---|---|---|---|
| pozornost | array | ano | Id všech kontrol, které vyžadují pozornost, od nejnaléhavější. |
| větev | string | null | ne | Větev, když ji git pojmenoval. |
| generated_at | string | ano | Kdy byla pozorování pořízena, RFC 3339 v UTC. |
| head | string | null | ne | Commit, který pojmenovává HEAD. |
| repozitář | string | ano | Název repozitáře. |
| rozlišení | reference | ano | Jak bylo určeno prostředí za ní. |
| schema | string | ano | majordomus/preflight/v1. |
| sekce | array | ano | Skupiny kontrol. |
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"
}Politiky
- benchmark
- povinné — cíl na každém transportu, který expozice deklaruje; případy jsou ty ze vstupního typu
- cache
- vypnuto — každé volání spustí handler
Cíle benchmarku
Odvozeno z registru pro tento repozitář: jeden požadavek na transport a případy, které poskytuje typ vstupu. Celá matice je na stránce měření výkonu.
| transport | state | případy | targets |
|---|---|---|---|
| direct | pokryto | 1 | zapečetěno |
| mcp | pokryto | 1 | zapečetěno |
| http | pokryto | 1 | zapečetěno |