{"record":{"id":"f2bbf8d01f54087c","repo":"zed-industries/zed","slug":"actions-json-not-found-at","errorCode":null,"errorMessage":"actions.json not found at {}: {}","messagePattern":"actions\\.json not found at (.+?): (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/docs_preprocessor/src/main.rs","lineNumber":669,"sourceCode":"#[derive(Debug, serde::Deserialize)]\nstruct ActionManifest {\n    actions: Vec<ActionDef>,\n    #[serde(default)]\n    schema_definitions: serde_json::Map<String, serde_json::Value>,\n}\n\nfn load_all_actions() -> ActionManifest {\n    let asset_path = concat!(env!(\"CARGO_MANIFEST_DIR\"), \"/actions.json\");\n    match std::fs::read_to_string(asset_path) {\n        Ok(content) => {\n            let mut manifest: ActionManifest =\n                serde_json::from_str(&content).expect(\"Failed to parse actions.json\");\n            manifest.actions.sort_by(|a, b| a.name.cmp(&b.name));\n            manifest\n        }\n        Err(err) => {\n            if std::env::var(\"CI\").is_ok() {\n                panic!(\"actions.json not found at {}: {}\", asset_path, err);\n            }\n            eprintln!(\n                \"Warning: actions.json not found, action validation will be skipped: {}\",\n                err\n            );\n            ActionManifest {\n                actions: Vec::new(),\n                schema_definitions: serde_json::Map::new(),\n            }\n        }\n    }\n}\n\nfn handle_postprocessing() -> Result<()> {\n    let logger = zlog::scoped!(\"render\");\n    let mut ctx = mdbook::renderer::RenderContext::from_json(io::stdin())?;\n    let output = ctx\n        .config","sourceCodeStart":651,"sourceCodeEnd":687,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/docs_preprocessor/src/main.rs#L651-L687","documentation":"The docs preprocessor loads a generated actions.json from its crate manifest dir (via CARGO_MANIFEST_DIR) to validate action documentation. Outside CI a missing file only prints a warning and disables action validation; inside CI (the CI env var is set) it panics with the asset path and the io error. Hitting it means the generation step that produces actions.json was skipped before the docs build ran in CI.","triggerScenarios":"A CI job running the preprocessor without the prior step that generates actions.json; building from a copied or packaged tree where CARGO_MANIFEST_DIR no longer contains the asset; packaging rules excluding generated JSON.","commonSituations":"New or refactored CI pipelines dropping the generation step; clean-cache runners; building from a source tarball that never contained generated files.","solutions":["Run the repo's action-manifest generation step (the one that writes crates/docs_preprocessor/actions.json) before the docs build in CI","Verify the artifact exists after generation: ls crates/docs_preprocessor/actions.json","Keep generation and docs build in the same CI job, or cache the generated file between them","Reproduce locally with CI=1 to confirm the fix"],"exampleFix":"# before (CI job)\ncargo run -p docs_preprocessor   # panics: actions.json not found at ...\n\n# after (CI job)\nscript/generate-actions-json      # the repo's manifest generation step\ncargo run -p docs_preprocessor","handlingStrategy":"validation","validationCode":"#!/bin/sh\n# CI preflight before running docs_preprocessor\nACTIONS=\"$(dirname \"$0\")/../crates/docs_preprocessor/actions.json\"\n[ -f \"$ACTIONS\" ] || { echo \"actions.json missing; run the generation step first\" >&2; exit 1; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Make the generation step a declared dependency of the docs build in CI","Reproduce with CI=1 locally before pushing CI changes","Do not package or archive source trees without generated assets"],"tags":["ci","generated-asset","docs","build","panic"],"backgroundTag":"missing-generated-asset","analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}