{"record":{"id":"25a78c8e037f4486","repo":"jdx/mise","slug":"bootstrap-compose-project-name-renew-anonymous","errorCode":null,"errorMessage":"bootstrap compose project '{name}' renew_anonymous_volumes requires state = \"running\"","messagePattern":"bootstrap compose project '(.+?)' renew_anonymous_volumes requires state = \"running\"","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/compose.rs","lineNumber":348,"sourceCode":"            bail!(\n                \"bootstrap compose project '{name}' services cannot be combined with state = \\\"absent\\\" because compose down removes the entire project\"\n            );\n        }\n        if !config.wait && config.wait_timeout.is_some() {\n            bail!(\"bootstrap compose project '{name}' wait_timeout requires wait = true\");\n        }\n        if config.wait_timeout == Some(0) {\n            bail!(\"bootstrap compose project '{name}' wait_timeout must be greater than zero\");\n        }\n        if config.state != ComposeState::Absent\n            && (config.down_volumes || config.down_images.is_some())\n        {\n            bail!(\n                \"bootstrap compose project '{name}' down_volumes and down_images require state = \\\"absent\\\"\"\n            );\n        }\n        if config.state != ComposeState::Running && config.renew_anonymous_volumes {\n            bail!(\n                \"bootstrap compose project '{name}' renew_anonymous_volumes requires state = \\\"running\\\"\"\n            );\n        }\n        let explicit_dependencies = config\n            .depends_on\n            .iter()\n            .map(|dependency| parse_dependency(dependency))\n            .collect::<Result<Vec<_>>>()?;\n        let services = dedupe(config.services);\n        let oneshot: IndexSet<String> = dedupe(config.oneshot).into_iter().collect();\n        if !services.is_empty() && oneshot.iter().any(|service| !services.contains(service)) {\n            bail!(\n                \"bootstrap compose project '{name}' oneshot services must also appear in services\"\n            );\n        }\n        let files = resolve_paths(&config.project_dir, config.files);\n        let env_files = resolve_paths(&config.project_dir, config.env_files);\n        let path_dependencies = std::iter::once(ResourceId::new(","sourceCodeStart":330,"sourceCodeEnd":366,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/compose.rs#L330-L366","documentation":"Thrown during TOML validation when `renew_anonymous_volumes` is enabled for a project whose `state` is not \"running\". The flag maps to `docker compose up --renew-anonymous-volumes`, which only takes effect during startup, so it requires `state = \"running\"` to be meaningful.","triggerScenarios":"A `[system.compose.<name>]` block with `renew_anonymous_volumes = true` while `state` is \"present\", \"absent\", or anything other than \"running\". Raised from `from_toml_with_origin` at parse time.","commonSituations":"Copy-pasting an up-time tuning flag into a tear-down config; switching state to \"absent\" while leaving the renew flag set.","solutions":["Set `state = \"running\"` if the project should start with renewed anonymous volumes","Remove `renew_anonymous_volumes` if the state is intentionally not \"running\""],"exampleFix":"# before\n[system.compose.myproj]\nstate = \"present\"\nrenew_anonymous_volumes = true\n# after\n[system.compose.myproj]\nstate = \"running\"\nrenew_anonymous_volumes = true","handlingStrategy":"validation","validationCode":"if cfg.renew_anonymous_volumes && cfg.state != \"running\" {\n    return Err(\"renew_anonymous_volumes requires state = \\\"running\\\"\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set up-time flags only when state=\"running\"","Re-review flags after changing state","Document flag-state dependencies in your config template"],"tags":["config","validation","docker-compose"],"backgroundTag":"conflicting-config-options","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}