{"record":{"id":"a68c81cedb1ef787","repo":"t8y2/dbx","slug":"native-agent-artifact-missing-for-driver-name-p","errorCode":null,"errorMessage":"Native agent artifact missing for {driver_name}/{platform}: {source}","messagePattern":"Native agent artifact missing for (.+?)/(.+?): (.+?)","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"agents/scripts/build_driver_zips.py","lineNumber":95,"sourceCode":"                raise FileNotFoundError(f\"Java agent artifact missing for {driver_name}: {source}\")\n\n            package_driver = copy.deepcopy(driver)\n            package_driver.pop(\"native\", None)\n            package_driver[\"jar\"] = packaged_artifact(jar_artifact, source)\n            package_registry = {\"jres\": {}, \"drivers\": {driver_name: package_driver}}\n            output = release_dir / f\"dbx-agent-{driver_name}-{version}.tar.zst\"\n            if not output.exists():\n                write_driver_tar_zstd(output, package_registry, source, executable=False)\n            elif not output.is_file():\n                raise FileExistsError(f\"Reusable Java agent package is not a file: {output}\")\n            update_release_artifact(jar_artifact, output)\n            outputs.append(output)\n\n        for platform, artifact in driver.get(\"native\", {}).items():\n            filename = artifact_filename(artifact[\"url\"])\n            source = release_dir / filename\n            if not source.is_file():\n                raise FileNotFoundError(f\"Native agent artifact missing for {driver_name}/{platform}: {source}\")\n\n            package_driver = copy.deepcopy(driver)\n            package_driver.pop(\"jar\", None)\n            package_driver[\"native\"] = {platform: packaged_artifact(artifact, source)}\n            package_registry = {\"jres\": {}, \"drivers\": {driver_name: package_driver}}\n            output = release_dir / f\"dbx-agent-{driver_name}-{version}-{platform}.tar.zst\"\n            if not output.exists():\n                write_driver_tar_zstd(output, package_registry, source, executable=True)\n            elif not output.is_file():\n                raise FileExistsError(f\"Reusable native agent package is not a file: {output}\")\n            update_release_artifact(artifact, output)\n            outputs.append(output)\n\n    registry_path.write_text(json.dumps(registry, ensure_ascii=False, indent=2) + \"\\n\", encoding=\"utf-8\")\n    return outputs\n\n\ndef remove_raw_driver_artifacts(release_dir: Path) -> list[Path]:","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/scripts/build_driver_zips.py#L77-L113","documentation":"For each native artifact of a driver, build_driver_zips looks for the file named by artifact_filename(artifact['url']) inside release_dir and raises FileNotFoundError naming driver, platform, and path if it's missing. Native binaries are platform-specific, so each declared platform must have its binary present before packaging.","triggerScenarios":"A driver's registry entry declares native artifacts for one or more platforms, but the corresponding downloaded binary is absent from release_dir — e.g. only linux-x86_64 was downloaded while windows-amd64 is also declared, or the URL-derived filename doesn't match the local file.","commonSituations":"Partial artifact download skipping some platforms; registry updated to add a new platform before artifacts were built; filename convention change in artifact_filename; running packaging on a machine that synced only some binaries.","solutions":["Download the missing native binary for the named platform into release_dir with the URL-derived filename.","Re-run the full artifact download step covering every platform in the registry.","Remove the platform from the registry if it's no longer supported, or skip drivers you can't package.","Diff artifact_filename(artifact['url']) outputs against `ls release_dir` to find mismatches."],"exampleFix":"# before\nrelease_dir contains only dbx-agent-foo-1.0.0-linux-x86_64 binary\n# after\ndownload windows-amd64 binary to release_dir, then rerun build_driver_zips.py","handlingStrategy":"validation","validationCode":"from pathlib import Path\nfrom build_driver_zips import artifact_filename\nmissing = [(n, p, a) for n, d in registry[\"drivers\"].items()\n           for p, a in d.get(\"native\", {}).items()\n           if not (Path(\"out\") / artifact_filename(a[\"url\"])).is_file()]\nif missing:\n    raise SystemExit(f\"missing native artifacts: {missing}\")","typeGuard":null,"tryCatchPattern":"try:\n    build_driver_zips(release_dir)\nexcept FileNotFoundError as e:\n    print(f\"incomplete native release: {e}; download all platform binaries\")","preventionTips":["Download artifacts for every platform declared in the registry","Run packaging only after the full multi-platform build completes","Verify each platform binary exists before packaging","Drop retired platforms from the registry"],"tags":["python","file-not-found","packaging","native-binaries"],"backgroundTag":"missing-build-artifact","analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}