{"record":{"id":"d695f9fbc9420c81","repo":"zed-industries/zed","slug":"registry-dataset-requires-a-name","errorCode":null,"errorMessage":"registry dataset requires a name","messagePattern":"registry dataset requires a name","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"warning","filePath":"crates/eval_cli/zed_eval/harness_command.py","lineNumber":29,"sourceCode":"from typing import Any\n\nfrom . import benchmarks, config\n\n\ndef _benchmark_block(run_request: dict[str, Any]) -> dict[str, Any]:\n    block = run_request.get(\"benchmark\")\n    if not isinstance(block, dict):\n        raise ValueError(\"run request is missing a 'benchmark' block\")\n    return block\n\n\ndef dataset_args(benchmark: dict[str, Any]) -> list[str]:\n    dataset = benchmark.get(\"dataset\") or {}\n    kind = dataset.get(\"kind\")\n    if kind == benchmarks.DATASET_REGISTRY:\n        name = dataset.get(\"name\")\n        if not name:\n            raise ValueError(\"registry dataset requires a name\")\n        return [\"-d\", name]\n    if kind in (benchmarks.DATASET_PATH, benchmarks.DATASET_PIER_PATH):\n        data_dir = dataset.get(\"data_dir\")\n        if not data_dir:\n            raise ValueError(\"path dataset requires data_dir\")\n        return [\"-p\", dataset_path(benchmark)]\n    raise ValueError(f\"unsupported dataset kind: {kind}\")\n\n\ndef dataset_clone_dir(benchmark: dict[str, Any]) -> str:\n    \"\"\"Where the controller clones the dataset repo for path datasets.\"\"\"\n    return f\"/tmp/datasets/{benchmark['id']}\"\n\n\ndef dataset_path(benchmark: dict[str, Any]) -> str:\n    \"\"\"Repo-relative task directory inside the cloned dataset repo.\"\"\"\n    dataset = benchmark.get(\"dataset\") or {}\n    return f\"{dataset_clone_dir(benchmark)}/{dataset.get('data_dir')}\"","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/eval_cli/zed_eval/harness_command.py#L11-L47","documentation":"The open listener normalizes ssh targets: after stripping ssh://, it requires a ':~/' or ':/' separator to form the path, and the host must parse as a non-empty url::Host. URLs that fail any of this bail with 'invalid ssh url' (the same message also appears as context when the ssh:// prefix itself is missing).","triggerScenarios":"An ssh URL with no ':/' or ':~/' path separator (ssh://host), one whose separator is just ':' (ssh://host:relpath), or a host that fails url::Host::parse — empty host (ssh://user@/path), invalid characters, or unbracketed IPv6.","commonSituations":"Opening zed ssh:// links copied from docs/READMEs with nonstandard shapes; forgetting the slash after the colon (ssh://host:abs instead of ssh://host:/abs); user prefixes with unexpected characters.","solutions":["Use the canonical absolute-path form: zed ssh://user@host:/absolute/path","Or the home-relative form: zed ssh://user@host:~/relative/path","Bracket IPv6 literals: zed 'ssh://[2600::]:/path'"],"exampleFix":"# before\nzed ssh://dev@box:repos/proj   # missing '/' after colon\n\n# after\nzed ssh://dev@box:/repos/proj   # absolute path\n# or\nzed ssh://dev@box:~/repos/proj  # home-relative","handlingStrategy":"validation","validationCode":"// Normalize + validate before opening the remote project:\nfn validate_ssh_url(input: &str) -> Result<()> {\n    let target = input.strip_prefix(\"ssh://\").context(\"invalid ssh url: missing ssh:// prefix\")?;\n    let (authority, _path) = target\n        .rsplit_once(\":~/\")\n        .or_else(|| target.rsplit_once(\":/\"))\n        .context(\"invalid ssh url: need ':/abs/path' or ':~/rel/path'\")?;\n    let host = authority.rsplit_once('@').map_or(authority, |(_, host)| host);\n    ensure!(!host.is_empty() && url::Host::parse(host).is_ok(), \"invalid ssh url: bad host\");\n    Ok(())\n}","typeGuard":"fn is_valid_ssh_url(input: &str) -> bool {\n    let Some(target) = input.strip_prefix(\"ssh://\") else { return false };\n    let Some((authority, _)) = target.rsplit_once(\":~/\").or_else(|| target.rsplit_once(\":/\")) else {\n        return false;\n    };\n    let host = authority.rsplit_once('@').map_or(authority, |(_, host)| host);\n    !host.is_empty() && url::Host::parse(host).is_ok()\n}","tryCatchPattern":null,"preventionTips":["Standardize on 'zed ssh://user@host:/abs/path' in docs and shell aliases","Bracket IPv6 hosts and always keep the slash after the colon","Run URLs through a normalizer (same rules as the parser) before storing them in recent-projects lists"],"tags":["ssh","url-parsing","cli","remote"],"backgroundTag":"ssh-url-parsing","analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}