{"record":{"id":"c85f4df886d9bc50","repo":"astrid-runtime/astrid","slug":"compiled-wasm-binary-is-not-a-regular-file","errorCode":null,"errorMessage":"Compiled WASM binary is not a regular file: {}","messagePattern":"Compiled WASM binary is not a regular file: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-build/src/rust.rs","lineNumber":632,"sourceCode":"        Err(error) if error.kind() == std::io::ErrorKind::NotFound => bail!(\n            \"Could not locate compiled WASM binary at `target/{target}/{PROFILE}/{wasm_name}.wasm` under configured target directory {}\",\n            target_root.display()\n        ),\n        Err(error) => {\n            return Err(error).with_context(|| {\n                format!(\n                    \"Failed to inspect compiled WASM binary {}\",\n                    candidate.display()\n                )\n            });\n        },\n    };\n\n    if artifact_metadata.file_type().is_symlink() {\n        bail!(\"Compiled WASM binary is a symlink: {}\", candidate.display());\n    }\n    if !artifact_metadata.is_file() {\n        bail!(\n            \"Compiled WASM binary is not a regular file: {}\",\n            candidate.display()\n        );\n    }\n\n    // A regular artifact beneath a symlinked parent could still resolve\n    // outside the configured root. Canonicalize only for containment; return\n    // Cargo's path so callers retain the authoritative configured location,\n    // including when the target root itself is a legitimate symlink.\n    let resolved_target_root = fs::canonicalize(target_root).with_context(|| {\n        format!(\n            \"Failed to resolve target directory {}\",\n            target_root.display()\n        )\n    })?;\n    let resolved_candidate = fs::canonicalize(&candidate).with_context(|| {\n        format!(\n            \"Failed to resolve compiled WASM binary {}\",","sourceCodeStart":614,"sourceCodeEnd":650,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-build/src/rust.rs#L614-L650","documentation":"Sibling integrity guard in locate_wasm_binary: the .wasm candidate's metadata shows it is neither a regular file nor a symlink (e.g. a directory, fifo, or device node occupies the expected artifact path). The builder refuses to package anything but a regular compiled binary. Practically means something overwrote or squatted on the expected output path.","triggerScenarios":"Thrown at crates/astrid-build/src/rust.rs:632 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Clean the target directory and rebuild so a real .wasm file is emitted","Check what occupies the expected artifact path","Ensure no script replaces the artifact with a non-file"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}