{"record":{"id":"f657a600a69c9ad9","repo":"abhigyanpatwari/GitNexus","slug":"compound-engineering-plugin-manifest-is-invalid","errorCode":null,"errorMessage":"Compound Engineering plugin manifest is invalid: {exc}","messagePattern":"Compound Engineering plugin manifest is invalid: (.+?)","errorType":"exception","errorClass":"SandboxError","httpStatus":null,"severity":"error","filePath":"eval/workflow_bench/runtime_mounts.py","lineNumber":453,"sourceCode":"            _write_snapshot_file(\n                root / Path(*relative.parts),\n                payload,\n                executable=executable,\n            )\n            entries.append(\n                {\n                    \"path\": relative_text,\n                    \"sha256\": hashlib.sha256(payload).hexdigest(),\n                    \"size\": len(payload),\n                    \"executable\": executable,\n                }\n            )\n\n        manifest_path = root / \".claude-plugin\" / \"plugin.json\"\n        try:\n            plugin_manifest = json.loads(manifest_path.read_text())\n        except (OSError, UnicodeError, json.JSONDecodeError) as exc:\n            raise SandboxError(f\"Compound Engineering plugin manifest is invalid: {exc}\") from exc\n        if not isinstance(plugin_manifest, dict) or plugin_manifest.get(\"name\") != \"compound-engineering\":\n            raise SandboxError(\"CE comparator requires the compound-engineering plugin manifest\")\n        if plugin_manifest.get(\"version\") != config.version:\n            raise SandboxError(\n                \"Compound Engineering plugin version mismatch: \"\n                f\"expected {config.version}, got {plugin_manifest.get('version')!r}\"\n            )\n        for skill in (\"ce-plan\", \"ce-work\", \"ce-code-review\"):\n            if not (root / \"skills\" / skill / \"SKILL.md\").is_file():\n                raise SandboxError(f\"Compound Engineering plugin is missing required skill: {skill}\")\n\n        canonical_manifest = json.dumps(\n            {\n                \"schema_version\": CE_PLUGIN_MANIFEST_SCHEMA_VERSION,\n                \"files\": entries,\n            },\n            sort_keys=True,\n            separators=(\",\", \":\"),","sourceCodeStart":435,"sourceCodeEnd":471,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/d540b00184d71a896261ee02670da9a92d59d8f7/eval/workflow_bench/runtime_mounts.py#L435-L471","documentation":"Manifest parse guard in _build_ce_plugin_snapshot. After all files are copied, the harness reads <root>/.claude-plugin/plugin.json; if the read or json.loads raises OSError, UnicodeError, or json.JSONDecodeError, the manifest is unusable and the snapshot is rejected. The error wraps the underlying exception via 'from exc'.","triggerScenarios":".claude-plugin/plugin.json is missing (OSError), not valid UTF-8 (UnicodeDecodeError, a UnicodeError subclass), truncated, or syntactically invalid JSON (JSONDecodeError). Note the snapshot root is the harness's staging dir, so this reflects what was actually copied from the source.","commonSituations":"Plugin source has no .claude-plugin/plugin.json (wrong directory passed to --ce-plugin-dir); file is BOM/latin-1 encoded; trailing-comma or comment in JSON5 style; file excluded by a build step or .gitignore so it never ships.","solutions":["Verify the source has the file: 'test -f <plugin_dir>/.claude-plugin/plugin.json && python -c \"import json,sys; json.load(open(sys.argv[1]))\" <plugin_dir>/.claude-plugin/plugin.json'.","Confirm --ce-plugin-dir points at the plugin root (the parent of .claude-plugin), not a subdirectory.","Re-encode the manifest as UTF-8 without BOM and validate with a strict JSON parser (no comments, no trailing commas).","Check the build pipeline is not stripping .claude-plugin/ (e.g. an over-eager clean step or .gitignore)."],"exampleFix":"// before: .claude-plugin/plugin.json with trailing comma\n{ \"name\": \"compound-engineering\", \"version\": \"1.0.0\", }\n// after\n{ \"name\": \"compound-engineering\", \"version\": \"1.0.0\" }","handlingStrategy":"validation","validationCode":"import json\nfrom pathlib import Path\n\nplugin = Path(\"ce-plugin\")\nmanifest = plugin / \".claude-plugin\" / \"plugin.json\"\nif not manifest.is_file():\n    raise SystemExit(f\"missing manifest: {manifest}\")\ntry:\n    data = manifest.read_text(encoding=\"utf-8\")\n    json.loads(data)\nexcept (OSError, UnicodeError, json.JSONDecodeError) as exc:\n    raise SystemExit(f\"invalid manifest: {exc}\")","typeGuard":"import json\nfrom pathlib import Path\n\ndef manifest_parses(plugin_dir: Path) -> bool:\n    m = plugin_dir / \".claude-plugin\" / \"plugin.json\"\n    try:\n        json.loads(m.read_text(encoding=\"utf-8\"))\n        return True\n    except (OSError, UnicodeError, json.JSONDecodeError):\n        return False","tryCatchPattern":"try:\n    snapshot = _build_ce_plugin_snapshot(config, destination_parent)\nexcept SandboxError as exc:\n    if \"manifest is invalid\" in str(exc):\n        log.error(\"plugin.json missing/invalid; fix and retry\")\n    raise","preventionTips":["Keep .claude-plugin/plugin.json valid UTF-8 JSON (no BOM, comments, or trailing commas).","Ensure the release/archive step includes .claude-plugin/.","Pre-validate the manifest with a strict JSON parser in CI."],"tags":["sandbox","ce-plugin","manifest","json","validation","workflow-bench"],"backgroundTag":null,"analyzedSha":"d540b00184d71a896261ee02670da9a92d59d8f7","analyzedAt":"2026-08-12T19:50:25.132Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}