{"record":{"id":"dbd13d561313e254","repo":"github/spec-kit","slug":"downloaded-extension-archive-must-contain-exactly","errorCode":null,"errorMessage":"Downloaded extension archive must contain exactly one top-level directory","messagePattern":"Downloaded extension archive must contain exactly one top-level directory","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/specify_cli/extensions/_commands.py","lineNumber":1944,"sourceCode":"                            raise ValueError(\n                                \"Archive must use canonical 'extension.yml' casing\"\n                            )\n                        canonical_root_manifest = next(\n                            (\n                                entry\n                                for entry in root_manifest_entries\n                                if entry.name == \"extension.yml\"\n                            ),\n                            None,\n                        )\n                        if canonical_root_manifest is not None:\n                            manifest_path = canonical_root_manifest\n                        else:\n                            top_level_dirs = [\n                                entry for entry in top_level if entry.is_dir()\n                            ]\n                            if len(top_level_dirs) != 1:\n                                raise ValueError(\n                                    \"Downloaded extension archive must contain exactly \"\n                                    \"one top-level directory\"\n                                )\n                            manifest_root = top_level_dirs[0]\n                            nested_manifest_entries = [\n                                entry\n                                for entry in manifest_root.iterdir()\n                                if entry.name.casefold() == \"extension.yml\"\n                            ]\n                            if any(\n                                entry.name != \"extension.yml\"\n                                for entry in nested_manifest_entries\n                            ):\n                                raise ValueError(\n                                    \"Archive must use canonical 'extension.yml' casing\"\n                                )\n                            manifest_path = next(\n                                (","sourceCodeStart":1926,"sourceCodeEnd":1962,"githubUrl":"https://github.com/github/spec-kit/blob/bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c/src/specify_cli/extensions/_commands.py#L1926-L1962","documentation":"Error \"Downloaded extension archive must contain exactly one top-level directory\" thrown in github/spec-kit.","triggerScenarios":"Thrown at src/specify_cli/extensions/_commands.py:1944 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Repackage the archive so it contains exactly one top-level directory holding the extension."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c","analyzedAt":"2026-08-14T19:43:37.150Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}