deploy.slug
Writes, into a directory outside the checkout that is absent or empty, the tree the deployment's provider receives (ADR 0219): the object's build inputs except the package the executable is compiled from, read from git at one commit (HEAD unless named); the provider's generated files of that commit at the slug's root, each held to what the object renders and the hooks made executable; the provider's buildpack line; the executable built at that commit; and a record naming the deployment, the commit, the executable's digest and the provider. Refuses an out directory inside the checkout or not empty, a deployment that names no provider, a build input the commit does not track, a provider file the object does not render, and two files that would land on one path. Changes nothing in the repository and reaches no network; pushing the slug is the provider workflow's.
Writes, into a directory outside the checkout that is absent or empty, the tree the deployment's provider receives (ADR 0219): the object's build inputs except the package the executable is compiled from, read from git at one commit (HEAD unless named); the provider's generated files of that commit at the slug's root, each held to what the object renders and the hooks made executable; the provider's buildpack line; the executable built at that commit; and a record naming the deployment, the commit, the executable's digest and the provider. Refuses an out directory inside the checkout or not empty, a deployment that names no provider, a build input the commit does not track, a provider file the object does not render, and two files that would land on one path. Changes nothing in the repository and reaches no network; pushing the slug is the provider workflow's.
- command
- behaviorally_verified
- module deploy
- #deployment
- #delivery
Exposure
Where this one definition is reachable. Absence is explicit: a surface not listed does not carry it.
| surface | as |
|---|---|
| MCP | — |
| HTTP | — |
| command line | majordomus deploy slug |
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 · SlugInput
deploy.slug: which deployment, at which commit, with which executable, and
where the slug is written. Relative paths are read against the working directory.| property | type | required | description |
|---|---|---|---|
| commit | string | null | no | The commit every file is read at, any revision git resolves; HEAD when absent. |
| deployment | string | null | no | The deployment's id; when absent, the one deployment that names a provider. |
| executable | string | yes | The executable built at that commit. |
| out | string | yes | The directory the slug is written into: outside the checkout, absent or empty. |
| site | string | null | no | The site built at that commit (scripts/site-build --serve), required exactly when the
deployment declares build.site: the object says the slug carries one, this says where
the build left it. |
JSON Schema
{
"additionalProperties": false,
"description": "The input of `deploy.slug`: which deployment, at which commit, with which executable, and\nwhere the slug is written. Relative paths are read against the working directory.",
"properties": {
"commit": {
"description": "The commit every file is read at, any revision git resolves; `HEAD` when absent.",
"type": [
"string",
"null"
]
},
"deployment": {
"description": "The deployment's `id`; when absent, the one deployment that names a provider.",
"type": [
"string",
"null"
]
},
"executable": {
"description": "The executable built at that commit.",
"type": "string"
},
"out": {
"description": "The directory the slug is written into: outside the checkout, absent or empty.",
"type": "string"
},
"site": {
"description": "The site built at that commit (`scripts/site-build --serve`), required exactly when the\ndeployment declares `build.site`: the object says the slug carries one, this says where\nthe build left it.",
"type": [
"string",
"null"
]
}
},
"required": [
"executable",
"out"
],
"title": "SlugInput",
"type": "object"
}output · Slug
use majordomus_cli::deploy::slug::Slug;
let json = r#"{"deployment":"majordomus","commit":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"out":"/tmp/slug","entries":[".buildpacks","Procfile"],"files":2,"bytes":10,
"executable":".majordomus/bin/majordomus","executable_sha256":"00",
"buildpack":"https://example.org/bp#0","liveness":"/api/v1/live",
"provider":{"name":"gigalixir","app":"a-b","stack":"gigalixir-24",
"url":"https://a-b.gigalixirapp.com"}}"#;
let s: Slug = serde_json::from_str(json).unwrap();
assert_eq!(s.provider.app, "a-b");
assert_eq!(s.entries.len(), 2);| property | type | required | description |
|---|---|---|---|
| buildpack | string | yes | The buildpack line written to BUILDPACKS_FILE. |
| bytes | integer | yes | Their total size in bytes. |
| commit | string | yes | The full commit every file was read at. |
| deployment | string | yes | The deployment's id. |
| entries | array | yes | Every top-level entry of the slug, sorted: the whole of what a provider receives at its root. |
| executable | string | yes | Where the executable sits, relative to the slug's root. |
| executable_sha256 | string | yes | Its hex SHA-256. |
| files | integer | yes | How many files (and links) were written. |
| liveness | string | yes | The route the deployment answers its commit on (health.liveness). |
| out | string | yes | The directory the slug was written into, absolute. |
| provider | reference | yes | The provider block of the object, as read at the commit. |
| site | string | null | no | Where the built site sits in the slug, when the object declares one. |
| site_files | integer | null | no | How many of its files the slug carries. |
| site_sha256 | string | null | no | The digest over them, as Source::site_sha256. |
JSON Schema
{
"$defs": {
"Provider": {
"additionalProperties": false,
"description": "The hosting provider that runs the deployment, and the facts that are the provider's\nalone. Every file the provider reads is rendered from this block and the generic keys\n(see `render`); its credential is never one of these fields.\n\n```\nuse majordomus_cli::deploy::{Provider, ProviderName};\n\nlet p: Provider = serde_json::from_value(serde_json::json!({\n \"name\": \"gigalixir\",\n \"app\": \"prismatic-majordomus\",\n \"stack\": \"gigalixir-24\",\n \"url\": \"https://prismatic-majordomus.gigalixirapp.com\",\n}))\n.unwrap();\nassert_eq!(p.name, ProviderName::Gigalixir);\nassert_eq!(p.app, \"prismatic-majordomus\");\n\n// a key the provider block does not have is refused, a token above all\nassert!(serde_json::from_value::<Provider>(serde_json::json!({\n \"name\": \"gigalixir\", \"app\": \"a-b-c\", \"stack\": \"gigalixir-24\",\n \"url\": \"https://a-b-c.gigalixirapp.com\", \"api_key\": \"x\",\n}))\n.is_err());\n```",
"properties": {
"app": {
"description": "The application's name at the provider.",
"type": "string"
},
"name": {
"$ref": "#/$defs/ProviderName",
"description": "Which provider."
},
"stack": {
"description": "The provider's stack the application runs on (`gigalixir-24`).",
"type": "string"
},
"url": {
"description": "The public URL the deployment answers on; always `https://`.",
"type": "string"
}
},
"required": [
"name",
"app",
"stack",
"url"
],
"type": "object"
},
"ProviderName": {
"description": "A hosting provider the contract knows. A name outside this list is refused at parse time:\na provider whose files nothing renders would be a block nothing reads.\n\n```\nuse majordomus_cli::deploy::ProviderName;\n\nlet name: ProviderName = serde_json::from_value(serde_json::json!(\"gigalixir\")).unwrap();\nassert_eq!(name, ProviderName::Gigalixir);\nassert_eq!(name.as_str(), \"gigalixir\");\nassert!(serde_json::from_value::<ProviderName>(serde_json::json!(\"fly\")).is_err());\n```",
"oneOf": [
{
"const": "gigalixir",
"description": "Gigalixir: a Heroku-compatible platform that runs a Procfile over a buildpack.",
"type": "string"
}
]
}
},
"description": "What was assembled: where, from what, and the provider facts a publisher needs to push\nit and to ask the deployment what it serves.\n\n```\nuse majordomus_cli::deploy::slug::Slug;\nlet json = r#\"{\"deployment\":\"majordomus\",\"commit\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\n \"out\":\"/tmp/slug\",\"entries\":[\".buildpacks\",\"Procfile\"],\"files\":2,\"bytes\":10,\n \"executable\":\".majordomus/bin/majordomus\",\"executable_sha256\":\"00\",\n \"buildpack\":\"https://example.org/bp#0\",\"liveness\":\"/api/v1/live\",\n \"provider\":{\"name\":\"gigalixir\",\"app\":\"a-b\",\"stack\":\"gigalixir-24\",\n \"url\":\"https://a-b.gigalixirapp.com\"}}\"#;\nlet s: Slug = serde_json::from_str(json).unwrap();\nassert_eq!(s.provider.app, \"a-b\");\nassert_eq!(s.entries.len(), 2);\n```",
"properties": {
"buildpack": {
"description": "The buildpack line written to `BUILDPACKS_FILE`.",
"type": "string"
},
"bytes": {
"description": "Their total size in bytes.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"commit": {
"description": "The full commit every file was read at.",
"type": "string"
},
"deployment": {
"description": "The deployment's `id`.",
"type": "string"
},
"entries": {
"description": "Every top-level entry of the slug, sorted: the whole of what a provider receives at\nits root.",
"items": {
"type": "string"
},
"type": "array"
},
"executable": {
"description": "Where the executable sits, relative to the slug's root.",
"type": "string"
},
"executable_sha256": {
"description": "Its hex SHA-256.",
"type": "string"
},
"files": {
"description": "How many files (and links) were written.",
"format": "uint",
"minimum": 0,
"type": "integer"
},
"liveness": {
"description": "The route the deployment answers its commit on (`health.liveness`).",
"type": "string"
},
"out": {
"description": "The directory the slug was written into, absolute.",
"type": "string"
},
"provider": {
"$ref": "#/$defs/Provider",
"description": "The provider block of the object, as read at the commit."
},
"site": {
"description": "Where the built site sits in the slug, when the object declares one.",
"type": [
"string",
"null"
]
},
"site_files": {
"description": "How many of its files the slug carries.",
"format": "uint",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"site_sha256": {
"description": "The digest over them, as `Source::site_sha256`.",
"type": [
"string",
"null"
]
}
},
"required": [
"deployment",
"commit",
"out",
"entries",
"files",
"bytes",
"executable",
"executable_sha256",
"buildpack",
"liveness",
"provider"
],
"title": "Slug",
"type": "object"
}Policies
- benchmark
- waived — waived: destructive
- 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 (destructive) | 0 |