mesh.build_cache.env
What the process that starts the sccache server should have in its environment on this machine, derived and never typed: the local disk as the first level and the selected store as the second (SCCACHE_MULTILEVEL_CHAIN=disk,s3, the bucket, the endpoint, the region, whether TLS is used, a key prefix of rustc's host triple, the credential FILE path and its profile) only when sccache has the multi-level chain (measured on a throwaway server, not assumed), a credential file of mode 0600 holding the profile exists, and the store answered its readiness route now; otherwise no variable at all, with the one condition that did not hold. sccache fixes its chain at server start and fails the compile when a level is down then, so a store is added only to a server that is starting. No key is ever in the answer, only the credential file's path (ADR 0157, I2673).
What the process that starts the sccache server should have in its environment on this machine, derived and never typed: the local disk as the first level and the selected store as the second (SCCACHE_MULTILEVEL_CHAIN=disk,s3, the bucket, the endpoint, the region, whether TLS is used, a key prefix of rustc's host triple, the credential FILE path and its profile) only when sccache has the multi-level chain (measured on a throwaway server, not assumed), a credential file of mode 0600 holding the profile exists, and the store answered its readiness route now; otherwise no variable at all, with the one condition that did not hold. sccache fixes its chain at server start and fails the compile when a level is down then, so a store is added only to a server that is starting. No key is ever in the answer, only the credential file's path (ADR 0157, I2673).
- query
- experimental
- module mesh
- #mesh
- #build
- #cache
Exposure
Where this one definition is reachable. Absence is explicit: a surface not listed does not carry it.
| surface | as |
|---|---|
| MCP | tool majordomus_mesh_build_cache_env |
| HTTP | GET /api/v1/mesh/build-cache/env operationId mesh.build_cache.env |
| command line | majordomus mesh build-cache env |
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 · BuildCacheEnvInput
mesh.build_cache.env.| property | type | required | description |
|---|---|---|---|
| credentials | string | null | no | The AWS-format credential file, mode 0600. |
| node_file | string | null | no | The node file naming the store this node offers or knows. |
| sccache | string | null | no | The sccache executable to ask; sccache when absent. |
JSON Schema
{
"additionalProperties": false,
"description": "The input of `mesh.build_cache.env`.",
"properties": {
"credentials": {
"description": "The AWS-format credential file, mode 0600.",
"type": [
"string",
"null"
]
},
"node_file": {
"description": "The node file naming the store this node offers or knows.",
"type": [
"string",
"null"
]
},
"sccache": {
"description": "The sccache executable to ask; `sccache` when absent.",
"type": [
"string",
"null"
]
}
},
"title": "BuildCacheEnvInput",
"type": "object"
}output · BuildCacheEnvReport
report.
Example
use majordomus_cli::mesh::build_cache::env::{EnvReport, Mode, Sccache};
let r = EnvReport {
mode: Mode::LocalOnly, reason: "sccache is not installed".into(),
sccache: Sccache { found: false, version: None, multilevel: None, detail: String::new() },
store: None, credentials_file: None, variables: vec![], passed_over: vec![],
};
assert!(r.variables.is_empty());| property | type | required | description |
|---|---|---|---|
| credentials_file | string | null | no | The path of the credential file the variables name; never its content. |
| mode | reference | yes | What the client is configured as. |
| passed_over | array | no | The offers selection passed over, with the rule. |
| reason | string | yes | Why, always one sentence; for a local-only answer, the condition that did not hold. |
| sccache | reference | yes | The installed sccache. |
| store | one of 2 | no | The selected store, when one was. |
| variables | array | yes | The variables to set in the environment of the process that starts the sccache server; empty when the client is local-only. |
JSON Schema
{
"$defs": {
"BuildCacheEnvVar": {
"description": "One variable of the client's environment.\n\n# Example\n\n```\nuse majordomus_cli::mesh::build_cache::env::EnvVar;\nlet v = EnvVar { name: \"SCCACHE_REGION\".into(), value: \"us-east-1\".into() };\nassert_eq!(v.name, \"SCCACHE_REGION\");\n```",
"properties": {
"name": {
"description": "The variable.",
"type": "string"
},
"value": {
"description": "Its value: never a key, at most the path of a credential file.",
"type": "string"
}
},
"required": [
"name",
"value"
],
"type": "object"
},
"BuildCachePassedOver": {
"description": "An offer that was not chosen, and the rule that said no.\n\n# Example\n\n```\nuse majordomus_cli::mesh::build_cache::{select, PassedOver, Policy};\nlet answer = select(&[], &Policy::default());\nlet passed: Vec<PassedOver> = answer.passed_over;\nassert!(passed.is_empty());\n```",
"properties": {
"node": {
"description": "The offer's node.",
"type": "string"
},
"why": {
"description": "The rule, in words.",
"type": "string"
}
},
"required": [
"node",
"why"
],
"type": "object"
},
"BuildCacheSccache": {
"description": "What the installed sccache is, as measured.\n\n# Example\n\n```\nuse majordomus_cli::mesh::build_cache::env::Sccache;\nlet s = Sccache { found: false, version: None, multilevel: None, detail: \"absent\".into() };\nassert!(!s.found);\n```",
"properties": {
"detail": {
"description": "How that was found out, in words.",
"type": "string"
},
"found": {
"description": "Whether `--version` was answered.",
"type": "boolean"
},
"multilevel": {
"description": "Whether it has the multi-level chain: measured, and unknown when the measurement\ncould not be made.",
"type": [
"boolean",
"null"
]
},
"version": {
"description": "The version it stated.",
"type": [
"string",
"null"
]
}
},
"required": [
"found",
"detail"
],
"type": "object"
},
"BuildCacheStore": {
"description": "The store the second level is.\n\n# Example\n\n```\nuse majordomus_cli::mesh::build_cache::env::Store;\nlet s = Store { node: \"n1\".into(), provider: \"minio\".into(),\n endpoint: \"http://192.168.100.30:9000\".into(), bucket: \"b\".into() };\nassert_eq!(s.provider, \"minio\");\n```",
"properties": {
"bucket": {
"description": "The bucket.",
"type": "string"
},
"endpoint": {
"description": "The non-secret endpoint.",
"type": "string"
},
"node": {
"description": "The offering node.",
"type": "string"
},
"provider": {
"description": "What serves the store.",
"type": "string"
}
},
"required": [
"node",
"provider",
"endpoint",
"bucket"
],
"type": "object"
},
"Mode": {
"description": "What the client is configured as.\n\n# Example\n\n```\nuse majordomus_cli::mesh::build_cache::env::Mode;\nassert_ne!(Mode::Mesh, Mode::LocalOnly);\n```",
"oneOf": [
{
"const": "mesh",
"description": "Local disk first, the selected store second.",
"type": "string"
},
{
"const": "local-only",
"description": "The local disk alone: the build is what it was.",
"type": "string"
}
]
}
},
"description": "The answer of `report`.\n\n# Example\n\n```\nuse majordomus_cli::mesh::build_cache::env::{EnvReport, Mode, Sccache};\nlet r = EnvReport {\n mode: Mode::LocalOnly, reason: \"sccache is not installed\".into(),\n sccache: Sccache { found: false, version: None, multilevel: None, detail: String::new() },\n store: None, credentials_file: None, variables: vec![], passed_over: vec![],\n};\nassert!(r.variables.is_empty());\n```",
"properties": {
"credentials_file": {
"description": "The path of the credential file the variables name; never its content.",
"type": [
"string",
"null"
]
},
"mode": {
"$ref": "#/$defs/Mode",
"description": "What the client is configured as."
},
"passed_over": {
"description": "The offers selection passed over, with the rule.",
"items": {
"$ref": "#/$defs/BuildCachePassedOver"
},
"type": "array"
},
"reason": {
"description": "Why, always one sentence; for a local-only answer, the condition that did not hold.",
"type": "string"
},
"sccache": {
"$ref": "#/$defs/BuildCacheSccache",
"description": "The installed sccache."
},
"store": {
"anyOf": [
{
"$ref": "#/$defs/BuildCacheStore"
},
{
"type": "null"
}
],
"description": "The selected store, when one was."
},
"variables": {
"description": "The variables to set in the environment of the process that starts the sccache\nserver; empty when the client is local-only.",
"items": {
"$ref": "#/$defs/BuildCacheEnvVar"
},
"type": "array"
}
},
"required": [
"mode",
"reason",
"sccache",
"variables"
],
"title": "BuildCacheEnvReport",
"type": "object"
}Policies
- benchmark
- waived — waived: external_dependency
- 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.
| transport | state | cases | targets |
|---|---|---|---|
| direct | waived (external_dependency) | 0 | |
| mcp | waived (external_dependency) | 0 | |
| http | waived (external_dependency) | 0 |