{"record":{"id":"63ef39845eb6fc8f","repo":"dbt-labs/dbt-core","slug":"root-manifest-path-config-missing","errorCode":null,"errorMessage":"root manifest path config missing","messagePattern":"root manifest path config missing","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-schemas/src/schemas/manifest/manifest.rs","lineNumber":430,"sourceCode":"        child_map,\n        group_map,\n        disabled,\n    }\n}\n\n/// Returns the path config that owns a manifest node's resource paths.\n///\n/// Manifest `path` conformance is package-relative: dependency resources must be normalized\n/// using that dependency package's `model-paths`, `test-paths`, etc., not the root project's.\nfn path_config_for_package<'a>(\n    resolver_state: &'a ResolverState,\n    package_name: &str,\n) -> &'a ManifestPathConfig {\n    let root_config = resolver_state\n        .manifest_path_configs\n        .get(&resolver_state.root_project_name);\n    if package_name == resolver_state.root_project_name {\n        return root_config.expect(\"root manifest path config missing\");\n    }\n\n    resolver_state\n        .manifest_path_configs\n        .get(package_name)\n        .or(root_config)\n        .expect(\"manifest path config missing for manifest node package\")\n}\n\n/// True only for public models imported via a publication artifact (cross-project\n/// mesh), whose source files don't exist locally. Public models from a\n/// locally-parsed package (`local:` / `git:` / `registry:`) always have a\n/// `ManifestPathConfig` registered and must keep their real paths so dbt-core\n/// can locate the compiled output — matches mantle's behaviour.\nfn is_public_model_from_publication(resolver_state: &ResolverState, model: &ManifestModel) -> bool {\n    let package = &model.__common_attr__.package_name;\n    model.access == Some(Access::Public)\n        && &resolver_state.root_project_name != package","sourceCodeStart":412,"sourceCodeEnd":448,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-schemas/src/schemas/manifest/manifest.rs#L412-L448","documentation":"`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.","triggerScenarios":"`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.","commonSituations":"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.","solutions":["Ensure the root project's `ManifestPathConfig` is registered in `resolver_state.manifest_path_configs` before resolving node paths","Clear stale partial-parse/cache state and re-run so resolver state is rebuilt completely","If constructing `ResolverState` manually (tests/tooling), insert the root project's config explicitly"],"exampleFix":"// before\nreturn root_config.expect(\"root manifest path config missing\");\n// after\nreturn root_config.unwrap_or_else(|| default_manifest_path_config());","handlingStrategy":"fallback","validationCode":"// before path resolution\nif !resolver_state.manifest_path_configs.contains_key(&resolver_state.root_project_name) {\n    return Err(\"resolver state missing root project path config; rebuild state\".into());\n}","typeGuard":"fn has_root_config(state: &ResolverState) -> bool {\n    state.manifest_path_configs.contains_key(&state.root_project_name)\n}","tryCatchPattern":"let config = std::panic::catch_unwind(|| path_config_for_package(resolver_state, pkg))\n    .ok()\n    .and_then(|r| r.ok());","preventionTips":["Always register the root project's ManifestPathConfig when constructing ResolverState","Clear partial-parse caches after upgrading dbt versions","Cover ResolverState construction with a test asserting the root entry exists"],"tags":["manifest","resolver","panic","config"],"backgroundTag":"missing-config-value","analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}