{"record":{"id":"f1d7b270e96649b5","repo":"jdx/mise","slug":"api-metadata-has-no-tap-git-head","errorCode":null,"errorMessage":"{}: API metadata has no tap_git_head","messagePattern":"(.+?): API metadata has no tap_git_head","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/packages/brew/source.rs","lineNumber":84,"sourceCode":"    };\n    if let Some(using) = &src.using {\n        bail!(\n            \"{}: source uses the {using:?} download strategy, which mise cannot build from \\\n             (and no bottle exists for this machine)\",\n            formula.name,\n        );\n    }\n    if src.checksum.is_none() {\n        bail!(\"{}: source archive has no sha256 in the API\", formula.name);\n    }\n    // the formula .rb must be pinned to the API snapshot's commit and\n    // verifiable — evaluating a newer/unverified formula against older\n    // source metadata would build the wrong thing\n    if formula.ruby_source_path.is_none() {\n        bail!(\"{}: API metadata has no ruby_source_path\", formula.name);\n    }\n    if formula.tap_git_head.is_none() {\n        bail!(\"{}: API metadata has no tap_git_head\", formula.name);\n    }\n    if formula\n        .ruby_source_checksum\n        .as_ref()\n        .and_then(|c| c.sha256.as_deref())\n        .is_none()\n    {\n        bail!(\"{}: API metadata has no formula checksum\", formula.name);\n    }\n    Ok(())\n}\n\n/// Build a formula from source into its keg and link it.\npub(super) async fn build(\n    rf: &ResolvedFormula,\n    closure: &[ResolvedFormula],\n    pr: &dyn SingleReport,\n) -> Result<()> {","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/packages/brew/source.rs#L66-L102","documentation":"mise pins the tap's git HEAD recorded in the API snapshot when evaluating the formula's Ruby source for a source build. A missing `tap_git_head` means it cannot pin and verify the formula definition, so the build is rejected up front.","triggerScenarios":"`check_buildable` sees `formula.tap_git_head.is_none()` while the formula has no bottle for the host and is being prepared for a source build.","commonSituations":"API snapshot missing tap head info (partial metadata or unusual taps); third-party taps that do not expose git head in the API; stale cached metadata.","solutions":["Update/refresh Homebrew API metadata and retry","Use a bottle-backed version/platform so source build is skipped","Install via brew directly; mise cannot verify this formula's source provenance","If a third-party tap lacks this metadata, surface it to the tap maintainers or mise"],"exampleFix":"null","handlingStrategy":"validation","validationCode":"curl -s https://formulae.brew.sh/api/formula/<name>.json | jq -e '.tap_git_head' >/dev/null && echo ok || echo 'missing tap_git_head'","typeGuard":null,"tryCatchPattern":"catch 'API metadata has no tap_git_head' => refresh metadata and retry; if it is a third-party tap gap, install via brew or request the tap publish head info","preventionTips":["Use homebrew/core where metadata is complete","Refresh API snapshots before source builds","Check tap health after upstream changes","Prefer bottles on unusual platforms"],"tags":["homebrew","api-metadata","verification","build-from-source"],"backgroundTag":"missing-required-config-field","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}