jdx/mise · error

workspace provider {provider_id:?} returned project ID {:?};

Error message

workspace provider {provider_id:?} returned project ID {:?}; IDs must use the {expected_prefix:?} namespace

What it means

Each workspace provider must namespace every discovered project's ID as `<provider_id>:<local_id>`. When a provider returns a project whose ID does not begin with its own `provider_id:` prefix, mise rejects the workspace so project IDs stay globally unambiguous and attributable to their provider.

Source

Thrown at src/task/workspace.rs:654

        for (provider_id, provider) in providers {
            let discovered = match provider.discover_with_context(workspace_root, context) {
                Ok(projects) => projects,
                Err(error) if skip_provider_errors => {
                    let error = format!("{error:#}");
                    warn!(
                        "failed to discover {provider_id} workspace projects at {}; inferred tasks \
                         and upstream task dependencies from this provider are unavailable: {error}",
                        workspace_root.display(),
                    );
                    provider_errors.insert(provider_id, error);
                    continue;
                }
                Err(error) => return Err(error),
            };
            for mut project in discovered {
                let expected_prefix = format!("{provider_id}:");
                let Some(local_id) = project.id.as_str().strip_prefix(&expected_prefix) else {
                    bail!(
                        "workspace provider {provider_id:?} returned project ID {:?}; IDs must use the {expected_prefix:?} namespace",
                        project.id
                    );
                };
                validate_id_part("project", local_id)?;
                project.root = normalize_project_root(&project.id, &project.root)?;
                attach_provider_provenance(&mut project, &provider_id);
                let id = project.id.clone();
                if projects.insert(id.clone(), project).is_some() {
                    bail!(
                        "workspace provider {provider_id:?} returned duplicate project ID {id:?}"
                    );
                }
            }
        }

        Ok(Self {
            projects,

View on GitHub (pinned to afd2eddd3a)

Solutions

  1. Fix the provider so it prefixes every project ID with its own provider ID, e.g. `"monorepo:api"` for provider id "monorepo".
  2. If the provider ID was renamed, update the provider's returned project IDs to the new prefix.
  3. Validate the local ID part also passes identifier validation (no invalid characters) after the prefix.

Example fix

// before (provider discovery output)
WorkspaceProject { id: "api", root: "services/api", .. }

// after
WorkspaceProject { id: "monorepo:api", root: "services/api", .. }
Defensive patterns

Strategy: validation

Validate before calling

fn assert_namespaced(provider_id: &str, projects: &[WorkspaceProject]) -> Result<(), String> {
    projects.iter()
        .find(|p| !p.id.starts_with(&format!("{provider_id}:")))
        .map_or(Ok(()), |p| Err(format!("project id {} lacks prefix {provider_id}:", p.id)))
}

Prevention

When it happens

Trigger: A workspace provider's `discover`-style API returns a WorkspaceProject whose `id` string does not start with `format!("{provider_id}:")`; also fires for a provider whose local project ID part would be empty or malformed.

Common situations: Custom or third-party provider implementations returning bare IDs like `"api"` instead of `"monorepo:api"`; renaming a provider in config while its projects still carry the old prefix; hand-written provider plugins that skip the namespacing convention.

Understand the failure class

Background: "invalid id" errors: invalid identifier format — why libraries reject IDs before lookup, and how to fix them — this error's family across 37 libraries.

Related errors


AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09). Data as JSON: /api/errors/71e1e13b2cc3c5b6. Report an issue: GitHub.