{"record":{"id":"8c9d85f76315081a","repo":"affaan-m/ECC","slug":"output-bundle-contains-a-special-file-entry-path","errorCode":null,"errorMessage":"output bundle contains a special file: {entry.path}","messagePattern":"output bundle contains a special file: (.+?)","errorType":"validation","errorClass":"ContractError","httpStatus":null,"severity":"error","filePath":"skills/taste-application/scripts/tasteforge/contract.py","lineNumber":114,"sourceCode":"    try:\n        metadata = root.lstat()\n    except FileNotFoundError:\n        raise ContractError(\"output bundle is missing\") from None\n    if stat.S_ISLNK(metadata.st_mode):\n        raise ContractError(\"output bundle root must not be a symlink\")\n    if not stat.S_ISDIR(metadata.st_mode):\n        raise ContractError(\"output bundle root must be a directory\")\n    pending = [root]\n    while pending:\n        directory = pending.pop()\n        with os.scandir(directory) as entries:\n            for entry in entries:\n                if entry.is_symlink():\n                    raise ContractError(f\"output bundle contains a symlink: {entry.path}\")\n                if entry.is_dir(follow_symlinks=False):\n                    pending.append(Path(entry.path))\n                elif not entry.is_file(follow_symlinks=False):\n                    raise ContractError(f\"output bundle contains a special file: {entry.path}\")\n\n\ndef validate_genre_specs(specs: list[dict[str, Any]]) -> None:\n    \"\"\"Require complete, semantically distinct numbered genre specs.\"\"\"\n    if not specs:\n        raise ContractError(\"at least one genre spec is required\")\n    numbers = [spec.get(\"number\") for spec in specs]\n    if len(numbers) != len(set(numbers)):\n        raise ContractError(\"genre numbers must be distinct\")\n\n    fingerprints = [spec.get(\"style_fingerprint\") for spec in specs]\n    signatures = [_semantic_signature(spec) for spec in specs]\n    if len(fingerprints) != len(set(fingerprints)) or len(signatures) != len(set(signatures)):\n        raise ContractError(\"genre references collapsed into a generic style; distinct specs required\")\n\n    for spec in specs:\n        if spec.get(\"dry_run\") is not True:\n            raise ContractError(f\"genre {spec.get('number')} crosses the dry-run boundary\")","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/skills/taste-application/scripts/tasteforge/contract.py#L96-L132","documentation":"During the bundle walk, any entry that is neither a symlink, directory, nor regular file is rejected as a 'special file' (FIFOs, sockets, device nodes). The contract requires the bundle to contain only plain directories and files so packaging/hashing is deterministic.","triggerScenarios":"A FIFO, Unix socket, or device node exists inside the output bundle when validate_bundle walks it — typically left behind by a build/test process that created a pipe or socket in the output dir and didn't clean up.","commonSituations":"Dev servers leaving .sock files in a dist directory, mkfifo used in test fixtures, or a builder accidentally writing through a device path.","solutions":["Delete the named special file at the reported path and rerun validation","Find the process/tool that created the pipe/socket in the output dir and fix its cleanup","Clean the output directory fully (rm -rf and regenerate) before validating","Add a pre-validation sweep: find <bundle> ! -type f ! -type d -delete"],"exampleFix":"# before\nmkfifo dist/bundle/pipe && validate_bundle(Path('dist/bundle'))\n# after\nrm -f dist/bundle/pipe && validate_bundle(Path('dist/bundle'))","handlingStrategy":"validation","validationCode":"import os\nspecial = [os.path.join(d, n) for d, ds, fs in os.walk(bundle_root)\n           for n in ds + fs\n           if not os.path.isfile(os.path.join(d, n)) and not os.path.isdir(os.path.join(d, n)) and not os.path.islink(os.path.join(d, n))]\nassert not special, f'special files in bundle: {special}'","typeGuard":null,"tryCatchPattern":"try:\n    validate_bundle(root)\nexcept ContractError as e:\n    if 'special file' in str(e):\n        print(f'Remove the special file and fix its creator: {e}')\n    else:\n        raise","preventionTips":["Clean output dirs (rm -rf) before regeneration","Ensure dev servers/tests don't leave sockets or FIFOs in dist/","Sweep with: find <bundle> ! -type f ! -type d"],"tags":["filesystem","validation","special-file"],"backgroundTag":"incompatible-source-type","analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}