{"record":{"id":"f94e76fa4a1fc0e6","repo":"abhigyanpatwari/GitNexus","slug":"compound-engineering-plugin-exceeds-the-total-byte","errorCode":null,"errorMessage":"Compound Engineering plugin exceeds the total byte limit","messagePattern":"Compound Engineering plugin exceeds the total byte limit","errorType":"exception","errorClass":"SandboxError","httpStatus":null,"severity":"error","filePath":"eval/workflow_bench/runtime_mounts.py","lineNumber":434,"sourceCode":"\n\ndef _build_ce_plugin_snapshot(config: CePluginConfig, destination_parent: Path) -> CePluginSnapshot:\n    parent = _validated_runtime_root(destination_parent, label=\"CE plugin snapshot parent\")\n    root = Path(tempfile.mkdtemp(prefix=\"wfbench-ce-plugin-\", dir=parent))\n    root.chmod(0o700)\n    entries: list[dict[str, Any]] = []\n    total_bytes = 0\n    try:\n        for relative, source in _plugin_files(config.source):\n            relative_text = relative.as_posix()\n            if len(relative_text.encode()) > MAX_CE_PLUGIN_PATH_BYTES:\n                raise SandboxError(f\"Compound Engineering plugin path exceeds the byte limit: {relative_text}\")\n            if len(entries) >= MAX_CE_PLUGIN_FILES:\n                raise SandboxError(\"Compound Engineering plugin exceeds the file-count limit\")\n            payload, executable = _bounded_plugin_bytes(source)\n            total_bytes += len(payload)\n            if total_bytes > MAX_CE_PLUGIN_TOTAL_BYTES:\n                raise SandboxError(\"Compound Engineering plugin exceeds the total byte limit\")\n            _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:","sourceCodeStart":416,"sourceCodeEnd":452,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/d540b00184d71a896261ee02670da9a92d59d8f7/eval/workflow_bench/runtime_mounts.py#L416-L452","documentation":"Cumulative size guard in _build_ce_plugin_snapshot. The running total of payload bytes across all admitted files must stay within MAX_CE_PLUGIN_TOTAL_BYTES (16 MiB). Once a file pushes total_bytes past the cap, the snapshot is rejected. Per-file bytes (error 541/543) already bound each entry; this bounds the whole plugin.","triggerScenarios":"The sum of all plugin file sizes exceeds 16 MiB. Typical producers: many medium assets (icons, fonts, embeddings), a large bundled dataset split into <2 MiB chunks that together exceed 16 MiB, or a vendored model/grammar pack.","commonSituations":"Embedding a reference corpus, shipping multiple binary helpers under 2 MiB each, bundling grammar files for many languages, including docsets.","solutions":["Measure: 'du -sh <plugin_dir>' and 'du -ah <plugin_dir> | sort -rh | head' to find the biggest contributors, then trim.","Move bulky reference data out of the plugin and fetch it by content hash at runtime.","Drop unused assets (extra languages, unused skills' resources, doc PDFs).","If the plugin genuinely needs more, split into separately versioned releases and mount only what each arm run needs."],"exampleFix":"# before\nassets/embeddings/*.bin  # 22 MiB across 12 files\n# after\nassets/embeddings/manifest.json  # hashes + URLs; fetched on demand","handlingStrategy":"validation","validationCode":"from pathlib import Path\n\nMAX_TOTAL = 16 * 1024 * 1024\nplugin = Path(\"ce-plugin\")\ntotal = sum(p.stat().st_size for p in plugin.rglob(\"*\") if p.is_file())\nif total > MAX_TOTAL:\n    raise SystemExit(f\"plugin total {total} bytes exceeds {MAX_TOTAL}\")","typeGuard":"MAX_CE_PLUGIN_TOTAL_BYTES = 16 * 1024 * 1024\n\ndef total_within_bound(total_bytes: int) -> bool:\n    return total_bytes <= MAX_CE_PLUGIN_TOTAL_BYTES","tryCatchPattern":"try:\n    snapshot = _build_ce_plugin_snapshot(config, destination_parent)\nexcept SandboxError as exc:\n    if \"total byte limit\" in str(exc):\n        log.error(\"plugin > 16 MiB; move bulk data out\")\n    raise","preventionTips":["Keep total plugin size well under 16 MiB.","Move bulky reference data out; fetch by hash at runtime.","CI gate: 'du -sh <plugin_dir>' must be under 16 MiB."],"tags":["sandbox","ce-plugin","size-limit","validation","workflow-bench"],"backgroundTag":null,"analyzedSha":"d540b00184d71a896261ee02670da9a92d59d8f7","analyzedAt":"2026-08-12T19:50:25.132Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}