{"record":{"id":"12a6162461815d65","repo":"astrid-runtime/astrid","slug":"legacy-capsule-authority-receipt-is-not-a-regular","errorCode":null,"errorMessage":"legacy capsule authority receipt is not a regular file: {}","messagePattern":"legacy capsule authority receipt is not a regular file: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-capsule-install/src/authority.rs","lineNumber":259,"sourceCode":"            Err(error) => {\n                return Err(error).with_context(|| {\n                    format!(\n                        \"inspect legacy capsule authority {label} {}\",\n                        path.display()\n                    )\n                });\n            },\n        }\n    }\n\n    let metadata = std::fs::symlink_metadata(&paths.active).with_context(|| {\n        format!(\n            \"legacy capsule authority receipt disappeared before retirement: {}\",\n            paths.active.display()\n        )\n    })?;\n    if metadata.file_type().is_symlink() || !metadata.is_file() {\n        bail!(\n            \"legacy capsule authority receipt is not a regular file: {}\",\n            paths.active.display()\n        );\n    }\n    astrid_core::platform_fs::verify_no_redirects(&paths.active).with_context(|| {\n        format!(\n            \"verify legacy capsule authority receipt {}\",\n            paths.active.display()\n        )\n    })?;\n    let actual = std::fs::read(&paths.active)\n        .with_context(|| format!(\"read legacy capsule authority {}\", paths.active.display()))?;\n    if actual != expected_bytes {\n        bail!(\n            \"legacy capsule authority receipt changed before retirement: {}\",\n            paths.active.display()\n        );\n    }","sourceCodeStart":241,"sourceCodeEnd":277,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-capsule-install/src/authority.rs#L241-L277","documentation":"Fired by retire_legacy_authority_receipt when the active receipt's symlink metadata shows it is a symlink or not a regular file. A redirected or non-regular receipt could point at content outside the authority directory.","triggerScenarios":"Thrown at crates/astrid-capsule-install/src/authority.rs:259 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the bogus symlink/non-file and reinstall the capsule to regenerate the receipt","Investigate how the receipt was replaced (tampering or crashed migration)","Never link authority receipts; they must be regular files"],"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"}