{"record":{"id":"94f0398d3609d336","repo":"abhigyanpatwari/GitNexus","slug":"ce-plugin-version-must-be-an-exact-semantic-vers","errorCode":null,"errorMessage":"--ce-plugin-version must be an exact semantic version (aliases and ranges are forbidden)","messagePattern":"--ce-plugin-version must be an exact semantic version \\(aliases and ranges are forbidden\\)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"eval/workflow_bench/runtime_mounts.py","lineNumber":270,"sourceCode":"\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\ndef _plugin_files(source: Path) -> Iterator[tuple[PurePosixPath, Path]]:\n    \"\"\"Yield only allowlisted plugin files in stable order.\"\"\"","sourceCodeStart":252,"sourceCodeEnd":288,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/d540b00184d71a896261ee02670da9a92d59d8f7/eval/workflow_bench/runtime_mounts.py#L252-L288","documentation":"validate_ce_plugin_inputs() requires --ce-plugin-version to fully match _EXACT_VERSION — a strict semver regex (MAJOR.MINOR.PATCH with optional pre-release/build, no leading comparators). Aliases like `latest` and ranges like `^1.0.0`, `~1`, `>=1.0` are rejected because they make benchmark runs non-reproducible.","triggerScenarios":"Passing `--ce-plugin-version ^1.0.0`, `~1.2`, `>=1.0.0`, `latest`, `*`, or `1.x` to the CLI; or calling validate_ce_plugin_inputs with such a string.","commonSituations":"Copy-pasting a version range from package.json dependencies; using a dist-tag instead of a release version; CI templating that injects a range.","solutions":["Resolve the range to an exact released version and pin it, e.g. `--ce-plugin-version 1.2.3`.","Pre-release/build metadata are allowed: `1.2.3-beta.1+build.7` matches the regex."],"exampleFix":"# before\n--ce-plugin-version \"^1.0.0\"\n# after\n--ce-plugin-version \"1.0.0\"","handlingStrategy":"validation","validationCode":"from eval.workflow_bench.runtime_mounts import _EXACT_VERSION\n\ndef is_exact_ce_version(v: str | None) -> bool:\n    return v is not None and _EXACT_VERSION.fullmatch(v) is not None","typeGuard":"import re\nfrom eval.workflow_bench.runtime_mounts import _EXACT_VERSION\n\ndef is_exact_version(v: str) -> bool:\n    \"\"\"Type/narrowing guard: True only for exact semver (no ranges/aliases).\"\"\"\n    return bool(_EXACT_VERSION.fullmatch(v))","tryCatchPattern":"try:\n    cfg = validate_ce_plugin_inputs(arms, plugin_dir, plugin_version)\nexcept ValueError as exc:\n    if \"exact semantic version\" in str(exc):\n        # resolve the range to a concrete release and retry\n        ...\n    raise","preventionTips":["Pin plugin versions to literal releases like 1.2.3 in CI configs.","Reject range characters (^, ~, >=, <, *, x) at config-template time.","Document the exact-semver requirement next to --ce-plugin-version in tooling help."],"tags":["cli","semver","argument-validation","ce-plugin"],"backgroundTag":null,"analyzedSha":"d540b00184d71a896261ee02670da9a92d59d8f7","analyzedAt":"2026-08-12T19:50:25.132Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}