{"record":{"id":"5b23a23916af96e3","repo":"jdx/mise","slug":"managed-path-notifies-user-scope-bootstrap-se","errorCode":null,"errorMessage":"managed path '{}' notifies user-scope bootstrap service '{}'; notifications apply to system services only","messagePattern":"managed path '(.+?)' notifies user-scope bootstrap service '(.+?)'; notifications apply to system services only","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/services_common.rs","lineNumber":304,"sourceCode":"        .iter()\n        .map(|service| service.name.as_str())\n        .collect::<IndexSet<_>>();\n    for (resource, notification) in files\n        .iter()\n        .flat_map(|file| {\n            file.notify\n                .iter()\n                .map(move |notification| (file.path.as_path(), notification))\n        })\n        .chain(directories.iter().flat_map(|directory| {\n            directory\n                .notify\n                .iter()\n                .map(move |notification| (directory.path.as_path(), notification))\n        }))\n    {\n        if user_services.iter().any(|name| name == notification) {\n            bail!(\n                \"managed path '{}' notifies user-scope bootstrap service '{}'; notifications apply to system services only\",\n                resource.display(),\n                notification\n            );\n        }\n        if !configured.contains(notification.as_str()) {\n            bail!(\n                \"managed path '{}' notifies unconfigured bootstrap service '{}'\",\n                resource.display(),\n                notification\n            );\n        }\n    }\n    Ok(())\n}\n\nfn default_true() -> bool {\n    true","sourceCodeStart":286,"sourceCodeEnd":322,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/services_common.rs#L286-L322","documentation":"validate_notifications checks that every managed path's `notify` list references only configured system-scope services. If a path notifies a service that is configured but has scope = \"user\", mise bails because file notifications only apply to system services.","triggerScenarios":"A managed directory/file config sets `notify = [\"myservice\"]` and myservice exists among user-scope bootstrap services; detected while validating notifications after composing declarations.","commonSituations":"Wiring a watched path to a user service (e.g. a per-user agent) expecting auto-restart; misremembering that notify only works for system services.","solutions":["Remove the user service from the notify list","Convert the target service to `scope = \"system\"` if it should react to path changes","Drop the notify entry and restart the user service manually or via user-level tooling"],"exampleFix":"// before\nnotify = [\"my-user-service\"]\n\n// after\nnotify = []","handlingStrategy":"validation","validationCode":"for svc in notify_list {\n    if user_scope_services.contains(svc) {\n        eprintln!(\"{svc} is user-scope; notify only supports system services\");\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only reference system-scope services in notify lists","Cross-check notify entries against service scopes whenever editing either","Document in team config that path notifications are system-only"],"tags":["config","validation","services"],"backgroundTag":"invalid-config-value","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}