knowledge_base.status
Polovina úsudku o zastaveném zapisovači týkající se čerstvosti (ADR 0052, aplikováno na deriver znalostí ADR 0091): nejnovější řádek knowledge.derived, nejnovější řádek session.closed, kolik uzavřených epizod nejmenuje žádné odvození, počty kandidátů a — jakmile se v tomto checkoutu odvození spustilo a přepínač je zapnutý — zda nejnovější uzavřená epizoda zůstala neodvozená déle než session.freshness.stale_minutes. Id epizod se porovnávají, nikdy pořadí řádků. Zda cesta uzavření stále volá deriver, čte z kódu shellový validátor, ne zde.
Polovina úsudku o zastaveném zapisovači týkající se čerstvosti (ADR 0052, aplikováno na deriver znalostí ADR 0091): nejnovější řádek knowledge.derived, nejnovější řádek session.closed, kolik uzavřených epizod nejmenuje žádné odvození, počty kandidátů a — jakmile se v tomto checkoutu odvození spustilo a přepínač je zapnutý — zda nejnovější uzavřená epizoda zůstala neodvozená déle než session.freshness.stale_minutes. Id epizod se porovnávají, nikdy pořadí řádků. Zda cesta uzavření stále volá deriver, čte z kódu shellový validátor, ne zde.
- query
- behaviorally_verified
- module knowledge_base
- #knowledge
- #continuity
- #session
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_knowledge_status zdroj majordomus://knowledge-status |
| HTTP | GET /api/v1/knowledge/status operationId knowledge_base.status |
| příkazová řádka | majordomus knowledge status |
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 · Prázdné
Žádné vlastnosti: schopnost nebere žádný vstup.
JSON Schema
{
"additionalProperties": false,
"description": "No input.",
"title": "Empty",
"type": "object"
}výstup · KnowledgeStatus
Úsudek patří ADR 0052 a je aplikován na tohoto zapisovatele: dokud se epizody zavírají, odvození následuje po každém zavření. Porovnává ID epizod, nikdy pořadí řádků ani časová razítka mezi oběma událostmi, protože zavření odvozuje dřív, než připojí session.closed. Je to jen polovina úsudku o aktuálnosti; zda cesta zavření a adaptér komprimace stále volají odvozovač, čte ze zdroje shellový validátor, což je místo, kde zdroj je.
use majordomus_cli::capability::builtin::knowledge_base::KnowledgeStatus;
let fresh: KnowledgeStatus = serde_json::from_str(r#"{
"present": false, "branch": "master", "closed_without_derivation": 0, "candidates": 0,
"on_this_branch": 0, "freshness": "unknown", "freshness_reason": "no episode has closed here",
"judged": false, "stopped_writer": false, "knowledge_on_end": true, "knowledge_on_compact": true
}"#).unwrap();
assert!(!fresh.present, "a fresh clone has no ledger, and that is not a fault");
assert!(!fresh.stopped_writer);| vlastnost | typ | povinné | popis |
|---|---|---|---|
| age_minutes | integer | null | ne | Toto stáří v celých minutách, když šlo změřit. |
| větev | string | ano | Branch, na kterém tento checkout je, nebo DETACHED. |
| candidates | integer | ano | Kolik záznamů nese status: candidate ve třídě kandidátů. |
| closed_without_derivation | integer | ano | Kolik uzavřených epizod v tomto ledgeru nejmenuje žádný řádek knowledge.derived. |
| zjištění | array | ne | Co by měl čtenář vědět: proč bylo posouzení zadrženo, nebo co zjistilo. |
| čerstvost | reference | ano | Jak stará je nejnovější uzavřená epizoda, posouzeno podle session.freshness. |
| freshness_reason | string | ano | Proč bylo posouzeno takto. Nikdy prázdné. |
| posouzeno | boolean | ano | Zda se posouzení zastaveného zapisovatele vůbec provedlo. False, s důvodem mezi findings, dokud se tady neuzavřela žádná epizoda, dokud je přepínač vypnutý nebo dokud v tomto checkoutu neproběhlo žádné odvozování. |
| knowledge_on_compact | boolean | ano | session.knowledge_on_compact, stejně. |
| knowledge_on_end | boolean | ano | session.knowledge_on_end, jak ho deklaruje politika; chybějící znamená zapnuto. |
| last_closed | jedno ze 2 | ne | Nejnovější řádek session.closed, nebo None, když se tady dosud žádná epizoda neuzavřela. |
| last_derived | jedno ze 2 | ne | Nejnovější řádek knowledge.derived, nebo None, když deriver tady nikdy neběžel. |
| on_this_branch | integer | ano | Kolik z nich pochází z epizody na této větvi. |
| přítomno | boolean | ano | Zda je zde něco k posouzení: řádek ledgeru nebo kandidát. False v čerstvém klonu. |
| stopped_writer | boolean | ano | Nález: epizody se tu uzavírají a do prahu zastarání nenásledovalo žádné odvození po nejnovější z nich. Pravda jen když judged. |
JSON Schema
{
"$defs": {
"Freshness": {
"description": "How old a record is, judged against `session.freshness` in the policy.\n\nThis is the second of two independent judgements every record carries, and it exists\nbecause the first one cannot answer this question. `Divergence` says where a record's\ncommit sits relative to HEAD; `advanced` means that commit is an ancestor of this one,\nwhich sounds like agreement and is identically true on the day the record is written and\na month later. Between 2026-09-05 and 2026-09-11 this repository served a handover that\nwas `advanced` and six days dead, and every surface that read this model — MCP, the HTTP\nAPI, the Cockpit — presented its `Next Action` as the thing to do (ADR 0052).\n\nThe thresholds are policy and are read, never restated here: a constant in this file\nwould be a second source of truth for a number the policy owns, and a repository whose\npolicy predates the key is reported as `Freshness::Unknown` naming the missing key\nrather than judged against a default nobody declared.\n\nThe five words divide into two groups, and the division is the one a caller acts on:\n`fresh` and `aging` are current and may be presented as the instruction, `stale` and\n`invalid` must be shown as history, and `unknown` is neither — a record nobody can date\nis not thereby an old record, and treating it as one would quietly discard a briefing\nthat is perfectly good. `Freshness::history` is that division, and it is the only\nplace it is decided.\n\n```\nuse majordomus_cli::capability::builtin::continuity::Freshness;\n\n// the two renderings are one value: the serialised word is the word `as_str` gives,\n// so a reader who met `stale` from MCP and from the command line met one fact\nlet stale = serde_json::to_value(Freshness::Stale).unwrap();\nassert_eq!(stale, serde_json::json!(\"stale\"));\nassert_eq!(stale.as_str(), Some(Freshness::Stale.as_str()));\n\n// and the division a caller acts on: absence of a judgement is not a bad judgement\nassert!(Freshness::Stale.history() && Freshness::Invalid.history());\nassert!(!Freshness::Unknown.history(), \"undated is not old\");\nassert!(!Freshness::Fresh.history() && !Freshness::Aging.history());\n```",
"oneOf": [
{
"const": "fresh",
"description": "Inside `session.freshness.fresh_minutes`. Current; act on it.",
"type": "string"
},
{
"const": "aging",
"description": "Between the two thresholds. Still current, but its age is worth stating.",
"type": "string"
},
{
"const": "stale",
"description": "At or beyond `session.freshness.stale_minutes`. History, never current.",
"type": "string"
},
{
"const": "unknown",
"description": "Nothing to judge it by: no timestamp, or no thresholds declared.",
"type": "string"
},
{
"const": "invalid",
"description": "A timestamp that does not parse, or one in the future.",
"type": "string"
}
]
},
"LedgerMark": {
"description": "One ledger line that matters to the judgement: when, and which episode.\n\n```\nuse majordomus_cli::capability::builtin::knowledge_base::LedgerMark;\nlet m: LedgerMark = serde_json::from_str(r#\"{\"ts\":\"2026-09-12T10:00:00Z\",\"episode\":\"e1\"}\"#).unwrap();\nassert_eq!(m.episode, \"e1\");\n```",
"properties": {
"episode": {
"description": "The episode the line is about; empty when the line names none.",
"type": "string"
},
"ts": {
"description": "The line's timestamp, RFC 3339 in UTC.",
"type": "string"
}
},
"required": [
"ts"
],
"type": "object"
}
},
"description": "Whether the deriver is still writing, and what it last wrote.\n\nThe judgement is ADR 0052's, applied to this writer: while episodes keep closing, a\nderivation follows every close. It compares episode ids, never line order or timestamps\nbetween the two events, because the close derives before it appends `session.closed`.\nIt is the freshness half of the judgement only; whether the close path and the\ncompaction adapter still call the deriver is read from the source by the shell\nvalidator, which is where the source is.\n\n```\nuse majordomus_cli::capability::builtin::knowledge_base::KnowledgeStatus;\nlet fresh: KnowledgeStatus = serde_json::from_str(r#\"{\n \"present\": false, \"branch\": \"master\", \"closed_without_derivation\": 0, \"candidates\": 0,\n \"on_this_branch\": 0, \"freshness\": \"unknown\", \"freshness_reason\": \"no episode has closed here\",\n \"judged\": false, \"stopped_writer\": false, \"knowledge_on_end\": true, \"knowledge_on_compact\": true\n}\"#).unwrap();\nassert!(!fresh.present, \"a fresh clone has no ledger, and that is not a fault\");\nassert!(!fresh.stopped_writer);\n```",
"properties": {
"age_minutes": {
"description": "That age in whole minutes, when it could be measured.",
"format": "int64",
"type": [
"integer",
"null"
]
},
"branch": {
"description": "The branch this checkout is on, or `DETACHED`.",
"type": "string"
},
"candidates": {
"description": "How many records carry `status: candidate` under the candidates class.",
"format": "uint",
"minimum": 0,
"type": "integer"
},
"closed_without_derivation": {
"description": "How many closed episodes in this ledger no `knowledge.derived` line names.",
"format": "uint",
"minimum": 0,
"type": "integer"
},
"findings": {
"description": "What a reader should know: why the judgement was withheld, or what it found.",
"items": {
"type": "string"
},
"type": "array"
},
"freshness": {
"$ref": "#/$defs/Freshness",
"description": "How old the newest closed episode is, judged against `session.freshness`."
},
"freshness_reason": {
"description": "Why it was judged that way. Never empty.",
"type": "string"
},
"judged": {
"description": "Whether the stopped-writer judgement was made at all. False, with the reason among\n`findings`, while no episode has closed here, while the switch is off, or while no\nderivation has yet run in this checkout.",
"type": "boolean"
},
"knowledge_on_compact": {
"description": "`session.knowledge_on_compact`, likewise.",
"type": "boolean"
},
"knowledge_on_end": {
"description": "`session.knowledge_on_end`, as the policy declares it; absent means on.",
"type": "boolean"
},
"last_closed": {
"anyOf": [
{
"$ref": "#/$defs/LedgerMark"
},
{
"type": "null"
}
],
"description": "The newest `session.closed` line, or `None` when no episode has closed here."
},
"last_derived": {
"anyOf": [
{
"$ref": "#/$defs/LedgerMark"
},
{
"type": "null"
}
],
"description": "The newest `knowledge.derived` line, or `None` when the deriver has never run here."
},
"on_this_branch": {
"description": "How many of those came from an episode on this branch.",
"format": "uint",
"minimum": 0,
"type": "integer"
},
"present": {
"description": "Whether anything is here to judge: a ledger line or a candidate. False in a fresh clone.",
"type": "boolean"
},
"stopped_writer": {
"description": "The finding: episodes close here and no derivation followed the newest one within\nthe stale threshold. True only when `judged`.",
"type": "boolean"
}
},
"required": [
"present",
"branch",
"closed_without_derivation",
"candidates",
"on_this_branch",
"freshness",
"freshness_reason",
"judged",
"stopped_writer",
"knowledge_on_end",
"knowledge_on_compact"
],
"title": "KnowledgeStatus",
"type": "object"
}Politiky
- benchmark
- povinné — cíl na každém transportu, který expozice deklaruje; případy jsou ty ze vstupního typu
- cache
- process — až 2 záznamy v procesu, po 2 s každý, vymezené otiskem registru
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 | výchozí studený+teplý |
| mcp | pokryto | 1 | výchozí studený+teplý |
| http | pokryto | 1 | výchozí studený+teplý |
Tvrzení implementovaná vedle ní
Připojeno souborem, který každé tvrzení implementuje; každé odkazuje na svou stránku s implementací a testem, který je dokazuje.