dbt-labs/dbt-core · error

root manifest path config missing

Error message

root manifest path config missing

What it means

`path_config_for_package` panics when the requested package IS the root project but no `ManifestPathConfig` is registered under `resolver_state.root_project_name`. The root project's path config is expected to be installed before any manifest node path resolution happens; its absence means the resolver state was built incompletely.

Source

Thrown at crates/dbt-schemas/src/schemas/manifest/manifest.rs:430

        child_map,
        group_map,
        disabled,
    }
}

/// Returns the path config that owns a manifest node's resource paths.
///
/// Manifest `path` conformance is package-relative: dependency resources must be normalized
/// using that dependency package's `model-paths`, `test-paths`, etc., not the root project's.
fn path_config_for_package<'a>(
    resolver_state: &'a ResolverState,
    package_name: &str,
) -> &'a ManifestPathConfig {
    let root_config = resolver_state
        .manifest_path_configs
        .get(&resolver_state.root_project_name);
    if package_name == resolver_state.root_project_name {
        return root_config.expect("root manifest path config missing");
    }

    resolver_state
        .manifest_path_configs
        .get(package_name)
        .or(root_config)
        .expect("manifest path config missing for manifest node package")
}

/// True only for public models imported via a publication artifact (cross-project
/// mesh), whose source files don't exist locally. Public models from a
/// locally-parsed package (`local:` / `git:` / `registry:`) always have a
/// `ManifestPathConfig` registered and must keep their real paths so dbt-core
/// can locate the compiled output — matches mantle's behaviour.
fn is_public_model_from_publication(resolver_state: &ResolverState, model: &ManifestModel) -> bool {
    let package = &model.__common_attr__.package_name;
    model.access == Some(Access::Public)
        && &resolver_state.root_project_name != package

View on GitHub (pinned to 0267ce9170)

Solutions

  1. Ensure the root project's `ManifestPathConfig` is registered in `resolver_state.manifest_path_configs` before resolving node paths
  2. Clear stale partial-parse/cache state and re-run so resolver state is rebuilt completely
  3. If constructing `ResolverState` manually (tests/tooling), insert the root project's config explicitly

Example fix

// before
return root_config.expect("root manifest path config missing");
// after
return root_config.unwrap_or_else(|| default_manifest_path_config());
Defensive patterns

Strategy: fallback

Validate before calling

// before path resolution
if !resolver_state.manifest_path_configs.contains_key(&resolver_state.root_project_name) {
    return Err("resolver state missing root project path config; rebuild state".into());
}

Type guard

fn has_root_config(state: &ResolverState) -> bool {
    state.manifest_path_configs.contains_key(&state.root_project_name)
}

Try / catch

let config = std::panic::catch_unwind(|| path_config_for_package(resolver_state, pkg))
    .ok()
    .and_then(|r| r.ok());

Prevention

When it happens

Trigger: `DbtManifest`/`build_disabled_map` resolving a node whose package equals `root_project_name` while `manifest_path_configs` was never populated with the root entry — e.g. resolver state constructed from a partial parse, or the root project registration step skipped/failed earlier.

Common situations: Running with a partially-built manifest (e.g. partial parsing bugs or state reuse across runs); custom harnesses/tests that construct `ResolverState` without registering the root project's path config; version mismatch between cached state and current code.

Understand the failure class

Background: "missing required config value" errors: why libraries refuse to start when a configuration key is empty, unset, or blank — this error's family across 48 libraries.

Related errors


AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07). Data as JSON: /api/errors/63ef39845eb6fc8f. Report an issue: GitHub.