{"record":{"id":"f9f8126f0ab754ed","repo":"github/spec-kit","slug":"failed-to-parse-downloaded-bundle-entry-id-fro","errorCode":null,"errorMessage":"Failed to parse downloaded bundle '{entry_id}' from {_source_desc}: {exc}","messagePattern":"Failed to parse downloaded bundle '(.+?)' from (.+?): (.+?)","errorType":"exception","errorClass":"BundlerError","httpStatus":null,"severity":"error","filePath":"src/specify_cli/commands/bundle/__init__.py","lineNumber":1051,"sourceCode":"                # and silently degrade instead of raising a clear error.\n                if manifest is None:\n                    raise BundlerError(\n                        f\"Downloaded artifact for bundle '{entry_id}' from \"\n                        f\"{_source_desc} is not a valid bundle.\"\n                    )\n                return manifest\n\n        data = _yaml.safe_load(io.BytesIO(raw))\n        return BundleManifest.from_dict(data)\n    except BundlerError:\n        raise\n    except _yaml.YAMLError as exc:\n        raise BundlerError(\n            f\"Downloaded content for bundle '{entry_id}' from {_source_desc} \"\n            f\"is not valid YAML: {exc}\"\n        ) from exc\n    except Exception as exc:  # noqa: BLE001\n        raise BundlerError(\n            f\"Failed to parse downloaded bundle '{entry_id}' from \"\n            f\"{_source_desc}: {exc}\"\n        ) from exc\n\n\ndef _validate_manifest_structure(manifest, *, source: str) -> None:\n    \"\"\"Reject a malformed manifest before any project mutation can occur.\"\"\"\n    from ...bundler.services.validator import validate_manifest\n\n    report = validate_manifest(manifest)\n    if report.ok:\n        return\n    raise BundlerError(\n        f\"{source} contains an invalid bundle manifest:\\n  - \"\n        + \"\\n  - \".join(report.errors)\n    )\n\n","sourceCodeStart":1033,"sourceCodeEnd":1069,"githubUrl":"https://github.com/github/spec-kit/blob/bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c/src/specify_cli/commands/bundle/__init__.py#L1033-L1069","documentation":"This is the final safety net while converting successfully parsed YAML into a BundleManifest. Exceptions that are already BundlerError or yaml.YAMLError are re-raised with their clearer messages; anything unexpected is wrapped here with its cause attached. Seeing it usually indicates an unusual parser/model failure or a Spec Kit bug rather than ordinary invalid YAML.","triggerScenarios":"`BundleManifest.from_dict(data)` raises a non-BundlerError exception, such as an unexpected TypeError while converting a YAML value, after `_yaml.safe_load` has already succeeded.","commonSituations":"Rare. Potential contexts are an exotic YAML value that reaches an unguarded conversion, a Python/library version incompatibility, or an internal regression in manifest construction.","solutions":["Inspect the chained `__cause__` and the downloaded YAML at the URL named in the message.","Reduce bundle.yml to the minimal fields (schema_version, bundle metadata, requires.speckit_version) and re-add sections until the failing construct is found.","Validate the same file locally with BundleManifest.from_dict to see whether the failure is reproducible outside downloading.","If a minimal valid-looking manifest still triggers it, report a Spec Kit bug with the YAML and traceback."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"from pathlib import Path\nimport yaml\n\ndef manifest_is_plain_mapping(path: Path) -> bool:\n    data = yaml.safe_load(path.read_text(encoding=\"utf-8\"))\n    return isinstance(data, dict) and isinstance(data.get(\"bundle\"), dict)","typeGuard":null,"tryCatchPattern":"except BundlerError as exc:\n    if \"Failed to parse downloaded bundle\" in str(exc):\n        log_yaml_and_cause(exc.__cause__)\n        report_minimal_reproduction()\n    else:\n        raise","preventionTips":["Keep manifest values as plain YAML scalars, mappings, and lists.","Test manifests with BundleManifest.from_dict before publishing.","Preserve chained causes in logs so unexpected parser errors can be classified."],"tags":["yaml","bundle","manifest","parse","unexpected-error"],"backgroundTag":null,"analyzedSha":"bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c","analyzedAt":"2026-08-14T19:43:37.150Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}