jdx/mise · error
bootstrap compose project
Error message
bootstrap compose project '{name}' down_volumes and down_images require state = "absent" What it means
Thrown during TOML validation when `down_volumes` or `down_images` is set but the project's `state` is not "absent". These options only apply when tearing a project down with `compose down`; on any other state they are meaningless leftovers, so the library rejects the combination.
Solutions
- Change `state` to `"absent"` if the project really should be torn down
- Remove `down_volumes`/`down_images` keys if the project should run or exist
Example fix
# before [system.compose.myproj] services = ["db"] state = "running" down_volumes = true # after [system.compose.myproj] services = ["db"] state = "absent" down_volumes = true
Defensive patterns
Strategy: validation
Validate before calling
if (cfg.down_volumes || cfg.down_images.is_some()) && cfg.state != "absent" {
return Err("down_volumes/down_images require state = \"absent\"");
} Prevention
- Keep tear-down options (down_*) only in state="absent" blocks
- Audit configs after switching project state
- Use distinct config sections for create vs teardown
When it happens
Trigger: A `[system.compose.<name>]` block with `down_volumes = true` or `down_images = "..."` (or both) while `state` is "running", "present", or omitted. Raised from `from_toml_with_origin` at parse time.
Common situations: Converting a previously `absent` (tear-down) project into a `running` one without removing the down options; copy-pasting a removal template and forgetting to strip the down flags.
Understand the failure class
Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.
Related errors
- bootstrap compose project
- bootstrap compose project
- bootstrap compose project
- bootstrap compose project
- agent ' ' `start_calendar_interval. ` must be between and
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/0197947fdcf79573.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/compose.rs:343
validate_values("service", &config.services)?;
validate_values("oneshot service", &config.oneshot)?;
validate_command("command", &config.command)?;
validate_command("engine_command", &config.engine_command)?;
if config.state == ComposeState::Absent && !config.services.is_empty() {
bail!(
"bootstrap compose project '{name}' services cannot be combined with state = \"absent\" because compose down removes the entire project"
);
}
if !config.wait && config.wait_timeout.is_some() {
bail!("bootstrap compose project '{name}' wait_timeout requires wait = true");
}
if config.wait_timeout == Some(0) {
bail!("bootstrap compose project '{name}' wait_timeout must be greater than zero");
}
if config.state != ComposeState::Absent
&& (config.down_volumes || config.down_images.is_some())
{
bail!(
"bootstrap compose project '{name}' down_volumes and down_images require state = \"absent\""
);
}
if config.state != ComposeState::Running && config.renew_anonymous_volumes {
bail!(
"bootstrap compose project '{name}' renew_anonymous_volumes requires state = \"running\""
);
}
let explicit_dependencies = config
.depends_on
.iter()
.map(|dependency| parse_dependency(dependency))
.collect::<Result<Vec<_>>>()?;
let services = dedupe(config.services);
let oneshot: IndexSet<String> = dedupe(config.oneshot).into_iter().collect();
if !services.is_empty() && oneshot.iter().any(|service| !services.contains(service)) {
bail!(
"bootstrap compose project '{name}' oneshot services must also appear in services"View on GitHub (pinned to 533346cc37)