{"record":{"id":"10f32d87487e56b9","repo":"abhigyanpatwari/GitNexus","slug":"ce-arms-require-both-ce-plugin-dir-and-ce-pl","errorCode":null,"errorMessage":"ce_* arms require both --ce-plugin-dir and --ce-plugin-version","messagePattern":"ce_\\* arms require both --ce-plugin-dir and --ce-plugin-version","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"eval/workflow_bench/runtime_mounts.py","lineNumber":268,"sourceCode":"        raise SandboxError(\"pinned GitNexus shared runtime has an unexpected package identity\")\n    return mounts\n\n\ndef validate_ce_plugin_inputs(\n    arms: Sequence[str],\n    plugin_dir: Path | None,\n    plugin_version: str | None,\n) -> CePluginConfig | None:\n    \"\"\"Require an explicit directory and exact version iff a CE arm is selected.\"\"\"\n\n    has_ce_arm = any(arm in CE_ARMS for arm in arms)\n    supplied = plugin_dir is not None or plugin_version is not None\n    if not has_ce_arm:\n        if supplied:\n            raise ValueError(\"--ce-plugin-dir and --ce-plugin-version require at least one ce_* arm\")\n        return None\n    if plugin_dir is None or plugin_version is None:\n        raise ValueError(\"ce_* arms require both --ce-plugin-dir and --ce-plugin-version\")\n    if _EXACT_VERSION.fullmatch(plugin_version) is None:\n        raise ValueError(\"--ce-plugin-version must be an exact semantic version (aliases and ranges are forbidden)\")\n    source = _validated_runtime_root(plugin_dir, label=\"Compound Engineering plugin source\")\n    return CePluginConfig(source=source, version=plugin_version)\n\n\ndef _is_forbidden_plugin_path(relative: PurePosixPath) -> bool:\n    for part in relative.parts:\n        lowered = part.lower()\n        if lowered in _FORBIDDEN_PATH_PARTS or lowered in _SECRET_EXACT_NAMES:\n            return True\n        if lowered.startswith(\".env.\") or lowered.startswith(\".npmrc.\"):\n            return True\n        if lowered.endswith(_SECRET_SUFFIXES) or any(marker in lowered for marker in _SECRET_NAME_MARKERS):\n            return True\n    return False\n\n","sourceCodeStart":250,"sourceCodeEnd":286,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/d540b00184d71a896261ee02670da9a92d59d8f7/eval/workflow_bench/runtime_mounts.py#L250-L286","documentation":"validate_ce_plugin_inputs() raises ValueError when a ce_* arm is selected but only one (or neither) of --ce-plugin-dir / --ce-plugin-version is supplied. CE arms require both because the snapshot is built from a directory pinned to an exact version.","triggerScenarios":"Invoking with `--arms ce_review --ce-plugin-dir ./plugin` (version missing), or `--arms ce_workflow --ce-plugin-version 1.2.3` (dir missing).","commonSituations":"User supplies the directory but forgets the version flag (or vice versa); partial config file templating.","solutions":["Supply both flags together: `--ce-plugin-dir <dir> --ce-plugin-version <exact-semver>`.","If version is unknown, look it up in the plugin's .claude-plugin/plugin.json first."],"exampleFix":"# before\n--arms ce_review --ce-plugin-dir ./plugin\n# after\n--arms ce_review --ce-plugin-dir ./plugin --ce-plugin-version 1.2.3","handlingStrategy":"validation","validationCode":"from eval.workflow_bench.runtime_mounts import CE_ARMS\n\ndef ce_arm_inputs_complete(arms, plugin_dir, plugin_version) -> bool:\n    has_ce_arm = any(a in CE_ARMS for a in arms)\n    if not has_ce_arm:\n        return True\n    return plugin_dir is not None and plugin_version is not None","typeGuard":null,"tryCatchPattern":"try:\n    cfg = validate_ce_plugin_inputs(arms, plugin_dir, plugin_version)\nexcept ValueError as exc:\n    if \"require both\" in str(exc):\n        # fill in the missing flag\n        ...\n    raise","preventionTips":["Treat --ce-plugin-dir and --ce-plugin-version as a pair in CLI wrappers.","Add an assertion in your wrapper script that both are non-None before invoking the benchmark."],"tags":["cli","argument-validation","ce-plugin"],"backgroundTag":null,"analyzedSha":"d540b00184d71a896261ee02670da9a92d59d8f7","analyzedAt":"2026-08-12T19:50:25.132Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}