{"record":{"id":"141cef777693c679","repo":"jdx/mise","slug":"packslip-list-identity-prefix-must-be-a-non-empty","errorCode":null,"errorMessage":"packslip: list_identity_prefix must be a non-empty string","messagePattern":"packslip: list_identity_prefix must be a non-empty string","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/backend/packslip.rs","lineNumber":462,"sourceCode":"        return Ok(Pin::Identity(explicit));\n    }\n    match Policy::for_project(project) {\n        Some(policy) => Ok(Pin::Identity(policy)),\n        None => bail!(\n            \"packslip:{project} is not on a forge mise knows, so nothing pins its signer; set `pubkey`, or `identity` and `issuer`, in its tool options\"\n        ),\n    }\n}\n\nimpl Pin {\n    /// A vendor may publish its index from a different workflow than its bundles.\n    /// The override replaces only the list's subject constraint, retaining the issuer.\n    fn for_release_list(&self, opts: &PackslipOptions<'_>) -> Result<Self> {\n        let Some(value) = opts.raw.opts.get(\"list_identity_prefix\") else {\n            return Ok(self.clone());\n        };\n        let Some(prefix) = value.as_str().filter(|prefix| !prefix.trim().is_empty()) else {\n            bail!(\"packslip: list_identity_prefix must be a non-empty string\");\n        };\n        let Self::Identity(policy) = self else {\n            bail!(\"packslip: list_identity_prefix cannot be combined with pubkey\");\n        };\n        if policy.issuer.as_deref().is_none_or(str::is_empty) {\n            bail!(\"packslip: list_identity_prefix requires an issuer\");\n        }\n        Ok(Self::Identity(Policy {\n            issuer: policy.issuer.clone(),\n            identity: None,\n            identity_prefix: Some(prefix.to_string()),\n        }))\n    }\n\n    fn trust(&self) -> Trust<'_> {\n        match self {\n            Pin::Identity(policy) => Trust::Identity(policy),\n            Pin::Key(key) => Trust::Key(key),","sourceCodeStart":444,"sourceCodeEnd":480,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/backend/packslip.rs#L444-L480","documentation":"packslip's `for_release_list` applies per-call overrides to a verification policy when listing releases. When an override supplies a `list_identity_prefix` it must be a non-empty string, because an empty or whitespace-only prefix would make the identity constraint meaningless (matching every identity) and silently weaken trust verification. The function rejects empty, non-string (e.g. numeric or boolean) TOML values with this error.","triggerScenarios":"Calling `release_list`/`github_list` (or the test helper `release_list_policy_rejects_invalid_overrides`) with packslip options where the `list_identity_prefix` opts entry is `\"\"`, a whitespace-only string like `\"  \"`, or a non-string TOML value (integer, bool, array).","commonSituations":"A user sets `list_identity_prefix = \"\"` or leaves it blank in mise.toml while configuring a packslip backend pin; templating or env interpolation resolves to an empty string; a user pastes a config example where the prefix was meant to be filled in.","solutions":["Set `list_identity_prefix` to a non-empty string, e.g. the identity prefix used in the vendor's signing certificate","Remove the `list_identity_prefix` key entirely if you don't need to narrow the list's identity constraint","Check that templating/env interpolation used for the value isn't resolving to an empty string"],"exampleFix":"// before\n[tools.\"packslip:acme\"]\nlist_identity_prefix = \"\"\n// after\n[tools.\"packslip:acme\"]\nlist_identity_prefix = \"acme-release-signer\"","handlingStrategy":"validation","validationCode":"let prefix = opts.get(\"list_identity_prefix\");\nif let Some(p) = prefix {\n    if !p.is_string() || p.as_str().unwrap().trim().is_empty() {\n        return Err(\"list_identity_prefix must be a non-empty string\");\n    }\n}","typeGuard":"fn is_valid_prefix(v: &toml::Value) -> bool {\n    v.as_str().map(|s| !s.trim().is_empty()).unwrap_or(false)\n}","tryCatchPattern":null,"preventionTips":["Always give list_identity_prefix a concrete non-empty value; never leave it blank","Validate config values that come from env vars or templates resolve to non-empty strings","Keep the vendor's documented prefix string handy and copy it verbatim"],"tags":["packslip","config","validation"],"backgroundTag":"empty-required-field","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}